Rebuilding Gentoo for ppc64el sffs using Gentoo's built-in tools. A specific version of the stage3 tarball was chosen to guarantee full reproducibility and was uploaded to our server since Gentoo's mirrors take down anything older than a month. This task consists not only of the work of rebuilding Gentoo, but also documentation (wiki page: https://libre-soc.org/SFFS/gentoo_bootstrap ) that guarantees full reproduciblity and only requires one to have a POWER8 or newer system and to download the tarball to rebuild everything from source using the scripts.
Building Gentoo for sffs is the same as building for regular power9, with the only exception being adding these flags to /etc/portage/make.conf COMMON_FLAGS="-O2 -pipe -mcpu=power9 -mno-altivec -mno-vsx -mno-crypto -mno-htm -mlong-double-64" CPU_FLAGS_PPC="" #To overwrite just in case, mostly unnecessary Keep in mind you'll have to rebuild world to make sure all packages are rebuilt with these flags: emerge --keep-going --ask -e @world EDIT: this has also been verified with the objdump test from https://bugs.libre-soc.org/show_bug.cgi?id=1128#c8
just a note that there is a way to not need a ppc64 actual hardware host, by running the entire build in qemu-ppc64le-user. this is slightly slower than what openembedded/yocto do, which is to perform *only* things like autoconf in qemu-*-user and then use cross-compilers but it is at least a way not to have to have USD 10,000 hardware in order to replicate this task. https://libre-soc.org/irclog/%23libre-soc.2023-08-23.log.html#t2023-08-23T16:22:17 also i moved the page to a subdirectory covering SFFS https://git.libre-soc.org/?p=libreriscv.git;a=commit;h=fe042658fb325b888c12f7ed338f370d97119fe8
a copy of the stage-3 bootstrap (which is rolling, sigh) has had to be dropped here: https://ftp.libre-soc.org/sffs/stage3-ppc64le-openrc-20230720T024654Z.tar.xz the SHA256 checksum is shown here: https://libre-soc.org/irclog/%23libre-soc.2023-08-23.log.html#t2023-08-23T16:39:56
The Gentoo SFFS bootstrap is complete and the full tutorial is available on https://libre-soc.org/SFFS/gentoo_bootstrap
TODO for the future, modify the script so that it checks if a local copy of the stage3 is already present, and if not attempts to download from multiple sources https://libre-soc.org/irclog/%23libre-soc.2023-08-23.log.html#t2023-08-23T17:25:35
same update as on bug #1130, they are likely a cut/paste clone of each other and needed the same minor corrections. https://git.libre-soc.org/?p=libreriscv.git;a=commitdiff;h=25e5ac028738cc1fb9660649f4ae005a56d4ee9f