[PATCH 21.02 03/11] ramips: mt7621: Add support for ZyXEL NR7101

Rui Salvaterra rsalvaterra at gmail.com
Tue Jun 8 14:09:37 PDT 2021


Hi, guys,

On Tue, 8 Jun 2021 at 21:33, Hauke Mehrtens <hauke at hauke-m.de> wrote:
>
> On 6/8/21 1:10 PM, Bjørn Mork wrote:
> > Tested-by: Bjørn Mork <bjorn at mork.no>
> >
> >
> > Unrelated, but confused the hell out of me:
> >
> > I tested this by sysupgrading from a master based installation using a
> > 5.10 kernel.  And ended up with a tmpfs overlay because of:
> >
> > [    9.833676] UBIFS (ubi0:1): Mounting in unauthenticated mode
> > [    9.845003] UBIFS error (ubi0:1 pid 561): ubifs_mount: 'compressor "zstd" is not compiled in
> > [    9.862780] mount_root: failed to mount -t ubifs /dev/ubi0_1 /tmp/overlay: No error information
> > [    9.880490] mount_root: overlay filesystem has not been fully initialized yet
> > [    9.895085] mount_root: switching to ubifs overlay
> > [    9.904741] mount_root: switching to ubifs failed - fallback to ramoverlay
> >
> >
> > So I reinstalled the 21.02 build by sysupgrading from the running 21.02,
> > and everything was fine again - as expected.
> >
> > I realize that I did this to myself, and that this sort of downgrade
> > using sysupgrade is a pretty weird usecase.  But maybe there are other
> > similar situations where we can end up with an unmountable UBIFS due to
> > the missing compressor?

As long as we don't disable any previously enabled algorithms (and the
kernels have them enabled), we're fine. Your situation was indeed
unfortunate, but definitely expected. :/

> > The problem seems to be as simple as CONFIG_UBIFS_FS_ZSTD being
> > undefined in target/linux/generic/config-5.4 in 21.02.  It is defined
> > for a number of targets, though. Just not ralink.
> >
> > This was fixed in master by commit
> >
> >    be7b56027899 ("kernel: enable lzo, zlib and zstd in ubifs").
> >
> > Obvious candidate for backport to 21.02?
>
> This problem should affect the following targets:
> target/linux/apm821xx/nand
> target/linux/ath79/mikrotik
> target/linux/ath79/nand
> target/linux/kirkwood
> target/linux/lantiq/xway
> target/linux/mediatek/mt7622
> target/linux/mvebu
> target/linux/oxnas/ox820
> target/linux/ramips/mt7621
> They all have CONFIG_UBIFS_FS set, but not CONFIG_UBIFS_FS_ZSTD.
>
> OpenWrt 21.02 uses UBIFS_COMPR_LZO by default OpenWrt master uses
> UBIFS_COMPR_ZSTD by default.
> Downgrading a OpenWrt 21.02 installation to 19.07 should work.
>
> Did someone check how much bigger the images are getting with
> CONFIG_UBIFS_FS_ZSTD?

I haven't measured specifically (I build as few modules as humanly
feasible), but zstd is a chubby compression algorithm, the kmod
package weighing about 100 kiB. However, the sooner we enable it, the
sooner we'll be able to get rid of the others (zlib, lzo), which will
even things out a bit. Of course, disabling algorithms will require a
complete wipe on sysupgrade…

> If they are not so much bigger I would suggest to add
> CONFIG_UBIFS_FS_ZSTD to OpenWrt 21.02 then the downgrade from master
> should work.

+1, wholeheartedly. However, if enabling zstd by default in 21.02 is
on the menu, I'd really like to see the 5.4 part of c4d39c4d5f
("kernel: default to zstd compression in ubifs") there too. Enabling
support for zstd and not using it by default would be a shame.

Thanks,
Rui



More information about the openwrt-devel mailing list