LFS-tools
by hendrickxm from LinuxQuestions.org on (#4RY2Y)
I am using bedrock to build LFS starting from 6.7 (building final linux-headers).
From then on, instead of doing everything in the chroot, I exit the chroot and use pkgtools and cruxports4slack to build the packages.
In the chroot I would do Code:pkgmk to build from Pkgfiles, edited and borrowed from NuTyX. Instead I do
Code:sudo strat -r lfs pkgmkAfter finishing ch5 aka the tools, I copy tar-1.13 to /bedrock/strata/lfs/bin/ from the slackware tar package.
I copy installpkg to /bedrock/strata/lfs/sbin/ and create /bin/which using the script here: http://www.linuxfromscratch.org/blfs...ral/which.html.
I add a symlink to /tools/bin/du inside the chroot.
Code:ln -sv /tools/bin/du /bin and the lfs-tools is ready to go.
So my bedrock stratum is at /bedrock/strata/lfs and this contains the tools directory.
Because the tools are used to build the final system, /bedrock/strata/lfs is indeed the stratum but you need to add /tools/sbin, /tools/usr/sbin, /tools/bin and /tools/usr/bin to PATH and cross-bin in the /bedrock/etc/bedrock.conf file.
You add the stratum as decribed in https://bedrocklinux.org/0.7/workflows.html
You can still enter the chroot by using brl disable lfs and chrooting.
At the moment I still re-chroot after building glibc for example.
This method might not be useful for everyone who builds LFS but in my case, I see this as an easy way to test more then one LFS-release and as a way to build a newer glibc package and use it in the final system.
My lfs strata is just a temporary tools up until 6.6 for building the glibc-package.
I then have another lfs-stratum that contains a completely build. Because of pkgtools, I can remove almost everything in my stratum and rebuild it.


From then on, instead of doing everything in the chroot, I exit the chroot and use pkgtools and cruxports4slack to build the packages.
In the chroot I would do Code:pkgmk to build from Pkgfiles, edited and borrowed from NuTyX. Instead I do
Code:sudo strat -r lfs pkgmkAfter finishing ch5 aka the tools, I copy tar-1.13 to /bedrock/strata/lfs/bin/ from the slackware tar package.
I copy installpkg to /bedrock/strata/lfs/sbin/ and create /bin/which using the script here: http://www.linuxfromscratch.org/blfs...ral/which.html.
I add a symlink to /tools/bin/du inside the chroot.
Code:ln -sv /tools/bin/du /bin and the lfs-tools is ready to go.
So my bedrock stratum is at /bedrock/strata/lfs and this contains the tools directory.
Because the tools are used to build the final system, /bedrock/strata/lfs is indeed the stratum but you need to add /tools/sbin, /tools/usr/sbin, /tools/bin and /tools/usr/bin to PATH and cross-bin in the /bedrock/etc/bedrock.conf file.
You add the stratum as decribed in https://bedrocklinux.org/0.7/workflows.html
You can still enter the chroot by using brl disable lfs and chrooting.
At the moment I still re-chroot after building glibc for example.
This method might not be useful for everyone who builds LFS but in my case, I see this as an easy way to test more then one LFS-release and as a way to build a newer glibc package and use it in the final system.
My lfs strata is just a temporary tools up until 6.6 for building the glibc-package.
I then have another lfs-stratum that contains a completely build. Because of pkgtools, I can remove almost everything in my stratum and rebuild it.