The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Funtoo:Metro/Evolved Bootstrap"
(Created page with "This page documents how to use Funtoo from Scratch, aka Evolved Boostrap to seed a stage1 that is then fed to metro to build a stage3. == Evolved...") |
|||
Line 23: | Line 23: | ||
}} | }} | ||
You now have a {{c|stage1.tar}} tarball outside of the container, which can then be copied to a system set up with [[Funtoo:Metro|Metro]], and used to seed a Metro build, which we will cover next. | You now have a {{c|stage1.tar}} next-release tarball outside of the container, which can then be copied to a system set up with [[Funtoo:Metro|Metro]], and used to seed a Metro build, which we will cover next. | ||
== Seeding Metro == | |||
You will need a system set up to run Metro. The typical way you want to use this is to follow the [[Funtoo:Metro/Initial Setup|Initial Setup]] instructions, and initialize Metro to build a {{c|generic_64}} next-release build for {{c|x86-64bit}}. Assuming you have this set up in {{c|/home/mirror/funtoo/next/x86-64bit/generic_64}}, which is the default location, here is how you will set up Metro to use your stage1. Replace {{c|2022-10-10}} with the current date on your Linux system: | |||
{{console|body= | |||
# ##i##cd /home/mirror/funtoo/next/x86-64bit/generic_64 | |||
# ##i##mkdir 2022-10-10 | |||
# ##i##scp drobbins@host:/var/tmp/stage1.tar stage1-generic_64-next-2022-10-10.tar | |||
}} | |||
That's it! What we have done is set up Metro so that it thinks it has already built a valid stage1, so if we run the build script, this artifact will not be rebuilt -- and it will proceed to use the stage1 to build a stage2, and use the stage2 to build a stage3. Perform this build by running the following command: | |||
{{console|body= | |||
# ##i##cd /root/metro/scripts | |||
# ##i##./ezbuild.sh next x86-64bit generic_64 full | |||
}} | |||
Metro will proceed to build the stage2 and stage3, and you can follow the logs at {{c|/home/mirror/funtoo/next/x86-64bit/generic_64/2022-10-10/log/stage2.log}}. |
Revision as of 05:41, October 11, 2022
This page documents how to use Funtoo from Scratch, aka Evolved Boostrap to seed a stage1 that is then fed to metro to build a stage3.
Evolved Bootstrap
The Evolved Bootstrap project allows for the creation of a stage1 Funtoo tarball completely from a non-Funtoo/non-Gentoo environment, fully cross-compiled and from scratch.
In order to create a stage1 tarball using Evolved Bootstrap, you will want to follow the instructions located at https://code.funtoo.org/bitbucket/projects/CORE/repos/ffs/browse/README.rst. Use the LXD setup instructions to successfully complete a GNU build, as follows:
user $ cd ~/ffs user $ ci/lxd-baremetal/bin/ffs gnu x86-64bit
Once the build completes successfully, a stage1 will have been built, but is not (yet) automatically captured into a tarball. To do this, you will need to enter the container to grab it:
user $ lxc exec ffs-drobbins-x86-64bit-gnu-test -- /bin/bash --login container # cd /root/ffs-repo/tmp/stage1root container # tar cvf /var/tmp/stage1.tar --xattrs --acls . container # exit user $ lxc file pull ffs-drobbins-x86-64bit-gnu-test/var/tmp/stage1.tar .
You now have a stage1.tar
next-release tarball outside of the container, which can then be copied to a system set up with Metro, and used to seed a Metro build, which we will cover next.
Seeding Metro
You will need a system set up to run Metro. The typical way you want to use this is to follow the Initial Setup instructions, and initialize Metro to build a generic_64
next-release build for x86-64bit
. Assuming you have this set up in /home/mirror/funtoo/next/x86-64bit/generic_64
, which is the default location, here is how you will set up Metro to use your stage1. Replace 2022-10-10
with the current date on your Linux system:
root # cd /home/mirror/funtoo/next/x86-64bit/generic_64 root # mkdir 2022-10-10 root # scp drobbins@host:/var/tmp/stage1.tar stage1-generic_64-next-2022-10-10.tar
That's it! What we have done is set up Metro so that it thinks it has already built a valid stage1, so if we run the build script, this artifact will not be rebuilt -- and it will proceed to use the stage1 to build a stage2, and use the stage2 to build a stage3. Perform this build by running the following command:
root # cd /root/metro/scripts root # ./ezbuild.sh next x86-64bit generic_64 full
Metro will proceed to build the stage2 and stage3, and you can follow the logs at /home/mirror/funtoo/next/x86-64bit/generic_64/2022-10-10/log/stage2.log
.