<div dir="ltr">Hello<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 26, 2016 at 6:19 PM, Trammell Hudson <span dir="ltr"><<a href="mailto:hudson@trmm.net" target="_blank">hudson@trmm.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The 4MB flash in the older thinkpads is a little tight, but still<br>
sufficient for a text-based modern Linux kernel -- the biggest issue is<br>
the cryptsetup tool brings in quite a few dependencies right now,<br>
which complicates using it with a fully encrypted drive.<br></blockquote><div><br></div><div>Using busybox, cryptsetup, dmsetup, blkid and the libraries, my inittrd.gz is 2.6M<br></div><div>I didn't do any special optimization.<br><br>I suppose not using glibc but a smaller libc could make it smaller<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
With 8-16 MB you can have a write-protected, interactive shell version<br>
that can mount a USB drive and run spiflash tools to recover from<br>
failures, and a second, read-write version that can be reflashed by the<br>
system's owner with all the fancy features.</blockquote><div><br></div><div>In my ideal  scenario, coreboot would have the 2 images (normal, fallback) both starting the same payload (a minimal linux kernel) to save space.<br><br>/init would be a shell script using nvram to check whether it is running in normal or in fallback. <br><br>In normal mode, the kernel would just kexec the kernel that is used normally, using cmdline parameters found in the CBFS<br><br></div><div>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<br><br></div><div>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.<br></div><div><br></div><div>Charlotte<br></div><div><br></div><div><br></div><div><br></div></div></div></div></div>