[OpenWrt-Devel] [PATCH] brcm2708: add squashfs rootfs image
Christian Lamparter
chunkeey at gmail.com
Tue Apr 24 14:07:40 EDT 2018
On Dienstag, 24. April 2018 19:56:38 CEST Stijn Tintel wrote:
> On 24-04-18 19:17, Stijn Tintel wrote:
> > On 24-04-18 17:59, Christian Lamparter wrote:
> >> On Dienstag, 24. April 2018 13:29:17 CEST Stijn Tintel wrote:
> >>> On 27-03-18 20:42, Christian Lamparter wrote:
> >>>> This patch adds a image with squashfs as the root filesystem.
> >>>> A rootfs_data partition will be generated on the first boot
> >>>> and placed inside the rootfs partition (just after the squashfs
> >>>> image).
> >>>>
> >>>> advantages:
> >>>> - it is possible to migrate from an existing -ext4
> >>>> installation and back via sysupgrade.
> >>>> - existing partition layout will not be lost.
> >>>> - slightly smaller image size.
> >>>> - support for attendedsysupgrade
> >>>>
> >>>> disadvantages:
> >>>> - needs f2fs + tools as well. This is because fs-tools decides on the
> >>>> blocksize of the sdcard. So either f2fs or ext4 can get choosen as
> >>>> the rootfs_data filesystem (depends on the size of the root partition).
> >>>> - rootfs_data is placed into the rootfs partition. This makes
> >>>> it difficult for tools that expect a /dev/mmc0pX device.
> >>>> It also makes it difficult for data recovery tools since they
> >>>> might not expect to find a embedded partition or will be
> >>>> confused.
> >>>>
> >>>> For people with existing build configurations: make sure to include mkf2fs
> >>>> and f2fsck package into the image... Otherwise the new -squashfs image will
> >>>> boot of a ram-overlay and won't keep the configurations after a reboot.
> >>>>
> >>> Tried to sysupgrade one of my RPi0W from ext4 to squashfs, and it
> >>> appeared to work at first, until I rebooted it again. Apparently the
> >>> overlay is completely missing, the SD card only has /boot (FAT32) and /
> >>> (squashfs). Can you please look into this?
> >> I think know the problem. The commit-message mentions it and the symptoms
> >> you are describing would fit. But just in case: can you please provide the
> >> image's diffconfig (or full-config ... and I guess a bootlog wouldn't
> >> hurt either - but it would be optional) to confirm?
> > Please find diffconfig attached. The machine was running headless so I
> > don't have a bootlog.
> >> (I also tested it again on an uptodate "OpenWrt SNAPSHOT, r6759+2-9e848f901c"
> >> with my rpi-b - which should be in the same family/subtarget as your RPi0W so
> >> I can try your generated images as well.)
> >>
> >>> If you can get it resolved I will merge the patch.
> >> The original issue [0] has been addressed by this patch [1]. And indeed
> >> the luci-app will now successfully generate a image (currently, only for the
> >> rpi-3 though!):
> >> "openwrt-dbbb09d2658d5c2-brcm2708-bcm2710-rpi-3-ext4-sdcard.img.gz"
> >> and install it.
> >>
> >> this patch is therefore no longer necessary since it the existing ext4
> >> images work as well. :) ... Plus the ext4 images don't confuse tools and
> >> brains as much.
> > I still find it useful, I've had way too many corrupted ext4 filesystems
> > on my RPis, and I'm hoping squashfs + f2fs would be more reliable than
> > ext4 on SD cards...
> Read the commit message again, and I see what you mean. Must have
> misread CONFIG_DEFAULT_mkf2fs=y as CONFIG_PACKAGE_mkf2fs=y. Too bad make
> defconfig doesn't enable DEFAULT_PACKAGES. Sorry for the noise, I'll do
> some more testing and accept this patch.
Well, if you want to go through with it, you could always add more
"WARNING - DANGER - ATTENTION" stickers and point out that
CONFIG_DEFAULT_mkf2fs=y != CONFIG_PACKAGE_mkf2fs=y . So people will
really watch out.
Regards,
Christian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list