Hello
On Sat, Nov 26, 2016 at 6:19 PM, Trammell Hudson hudson@trmm.net wrote:
The 4MB flash in the older thinkpads is a little tight, but still sufficient for a text-based modern Linux kernel -- the biggest issue is the cryptsetup tool brings in quite a few dependencies right now, which complicates using it with a fully encrypted drive.
Using busybox, cryptsetup, dmsetup, blkid and the libraries, my inittrd.gz is 2.6M I didn't do any special optimization.
I suppose not using glibc but a smaller libc could make it smaller
With 8-16 MB you can have a write-protected, interactive shell version that can mount a USB drive and run spiflash tools to recover from failures, and a second, read-write version that can be reflashed by the system's owner with all the fancy features.
In my ideal scenario, coreboot would have the 2 images (normal, fallback) both starting the same payload (a minimal linux kernel) to save space.
/init would be a shell script using nvram to check whether it is running in normal or in fallback.
In normal mode, the kernel would just kexec the kernel that is used normally, using cmdline parameters found in the CBFS
In fallback mode, busybox, flashtools and diagnosis tools (cbmem, ectool, inteltool, etc) would let the user at least mount a thumbdrive to reflash a working image
This would make development for new boards simpler. FT232 and serial consoles and ISP cables are nice, but I prefer to stay in software. Unless I mess up big time, I don't see any good reason to not use normal/fallback and flashrom straight on the board.
Charlotte