Hi, I'm working on something similar for the other targets and here are my two cents on the topic:
On Tue, Feb 17, 2015 at 05:12:05PM +0100, Álvaro Fernández Rojas wrote: > + which parted > /dev/null I ended up using coreutils-sfdisk instead of parted for the simple reason that parted is not part of OpenWrt's core package set. However, I reckon that including parted is actually the nicer option. Also note, that if you are intending to use this script as a part of the ImageBuilder, you can use the "ptgen" tool. If this is supposed to be a stand-alone installer for OpenWrt on SD-cards, I don't get why it should be included in the source tree at all. > + # this is needed to format the drive > + which mkfs.ext4 > /dev/null > ... > +# create ext4 partition with optimized settings for running on flash/sd > +# See http://blogofterje.wordpress.com/2012/01/14/optimizing-fs-on-sd-card/ > for reference. Is there any specific reason why ext4 is used for r/w rootfs? >From what I understood, the only good reason to do so is compatibility with legacy distributions, right? I'm currently trying two other directions: f2fs seems to be the appropriate replacement for jffs2 on MMC, as it can work nicely as an overlayfs on top of squashfs, it's light-weight and specificly designed for black-box-FTL devices. However, fstools currently lacks support for block devices and as identifying block devices requires libblkid(-tiny), we'll probably end-up with two build variants of libfstools, one with and one without support for block devices... (John: what do you think?) btrfs on the other hand also has sufficiently good support for flash drives and also got built-in support for snapshots and raid, but that might as well be overkill. However, it does provide all the needed features to become the single solution for all block-device based setups. No matter if squashfs+f2fs or btrfs will be used, I believe that rootfs-overlay, snapshot and failsafe-mode are key features of OpenWrt. Designing new targets in a way which relies on a single read-write mounted rootfs feels like taking the wrong turn to me. Having that option is nice, just like having a single JFFS2 or UBIFS r/w rootfs. With eMMC being more and more common, it'd be sad if it remains the only choice... Cheers Daniel _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel