fosslinux / live-bootstrap

Use of a Linux initramfs to fully automate the bootstrapping process
523 stars 37 forks source link

Alternative tcc bootstrap path #355

Open cosinusoidally opened 11 months ago

cosinusoidally commented 11 months ago

I've been working on an alternative bootstrap path for tcc (https://github.com/cosinusoidally/tcc_bootstrap_alt). I am able to go from a cut down version of stage0-posix-x86 (I only need cc_x86) all the way up to tcc-0.9.27. I hacked a version of live-bootstrap to use my alternative path (https://github.com/cosinusoidally/live-bootstrap/compare/master...cosinusoidally:live-bootstrap:tcc_bootstrap_alt). With my tweaks to live-bootstrap on my vm I was able to reduce the time to get to tcc-0.9.27 from around 30mins to around 3:45mins. It's also possible to use this to get to tcc-0.9.27 in < 512MB of RAM. The speed improvements are largely due to not building or using mescc (though I do still use meslibc).

I noticed that https://github.com/fosslinux/live-bootstrap/pull/334 has landed recently, so I'll probably refactor my live-bootstrap branch once that has stabilised and then raise a PR.

I was wondering what it would take to integrate this as an optional bootstrap path for live-bootstrap? There are quite a few limitations to my approach (the major one being that it's i386 only) but it does have the advantage of being considerably faster.

fosslinux commented 11 months ago

This may be a fairly good solution for #306 for 1.0, actually. Let me know if you hit any blockers with this.