On Tue, 2020-11-24 at 19:51 +0100, Geert Uytterhoeven wrote: > Hi Damien, > > On Tue, Nov 24, 2020 at 5:39 AM Damien Le Moal <damien.lemoal@xxxxxxx> wrote: > > The nommu_k210_defconfig default configuration allows booting a K210 > > SoC based board using an embedded intramfs cpio file. Modifying this > > configuration to enable support for the board SD card is not > > trivial for all users. To help beginners getting started with this > > board, add the nommu_k210_sdcard_defconfig default configuration file > > to set all configuration options necessary to use the board mmc-spi > > sd card for the root file system. This configuration adds support for > > the block layer, the mmc-spi driver and modifies the boot options to > > specify the rootfs device as mmcblk0p1 (first partition of the sd card > > block device). The ext2 file system is selected by default to encourage > > its use as that results in only about 4KB added to the kernel image > > size. The default device tree compiled in is unchanged and must be > > replaced by the user with the device tree suitable for the board being > > used (k210_maix_bit, k210_maix_dock, k210_maix_go, k210_maixduino or > > k210_kd233). > > > > Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxx> > > While ext2 is definitely cheaper than ext4 (the latter takes almost +200 > KiB, ugh), ext2 does not have journaling. Yes. With ext4, kernel size jumps from 1.78 MB to over 2.00 MB (rv64 gcc 9.3). Even vfat is more expensive than ext2 in terms of kernel size. > Hence your root file system will be unclean all the time, unless you always > manage to unmount it before reboot. And your default buildroot > does not have e2fsck. Yes. I was using embedded rootfs cpio file until I got the SD card working with Sean's help, so I was not adding e2fsck to save space. I will add it. As for the fs being always unclean on mount, I know, this is not super nice. I think that adding rootflags=noatime to the boot params will help in avoiding the FS to break, but that is a little weak. For use cases where the SD card is used only for reading applications/shell commands, mounting ro should be the first choice, which may be a more sensible default for the defconfig. I will update the defconfig with that. > > Gr{oetje,eeting}s, > > Geert > -- Damien Le Moal Western Digital