Linux from scratch with the RPM packager
Switch branches/tags
Nothing to show
Clone or download
scrat
scrat 2018-09-17
Latest commit cb25fcd Sep 17, 2018
Permalink
Failed to load latest commit information.
BOOK 2018-03-16 Mar 16, 2018
SOURCES 2018-09-17 Sep 17, 2018
SPECS 2018-09-17 Sep 17, 2018
.gitignore 2018-09-17 Sep 17, 2018
Build.Order.text 2018-09-17 Sep 17, 2018
Notes.text 2018-09-12 Sep 12, 2018
README 2018-09-12 Sep 12, 2018
builder.sh 2018-09-09 Sep 9, 2018
chroot-lfs.sh 2018-09-09 Sep 9, 2018
chroot.sh 2018-09-09 Sep 9, 2018
fetch.sh 2018-09-09 Sep 9, 2018
gitter.sh 2018-09-09 Sep 9, 2018
installer.sh 2018-09-13 Sep 13, 2018
lfs.sh 2018-09-09 Sep 9, 2018
setup.sh 2018-09-17 Sep 17, 2018
tools.sh 2018-09-09 Sep 9, 2018
update.sh 2018-09-09 Sep 9, 2018
version-check.sh 2018-08-07 Aug 7, 2018

README

This build tracks linux from scratch version 8.2

This build system requires the following:

	1. Fetch build system from:
		https://www.github.com/baho-utot/LFS-RPM
	2. Directory for build, mounted at /mnt/lfs

		There should be a partition mounted there.
		You will be responsible for that.
		This build system uses whatever filesystem
		that is at ${LFS}

		This system was designed and debugged on an
		AMD64 {x86_64} system and I have not tested
		it on a i686 system as I no longer have or
		use such systems.

		The build system installs to:
		/mnt/lfs/usr/src/LFS-RPM

	REQUIREMENTS:
		1. build system from github
		2. partition and filesystem mount at /mnt/lfs
		3. wget on host system
		4. rpm on host system

	I have installed rpm macro files in:
	/home/lfs/.rpmmacros and in the base directory:
	/etc/rpm/macros.
	This makes the rpm environment correct so it builds
	the toolchain and base system correctly.
	I have also built a static version of rpm in the
	toolchain so as not to have any impact upon the base
	build.

	WARNING:
	This build system is designed in such a way to not be
	able to trash your host system.  Mistakes can happen.
	Not responsible for trashed host system.  You
	bear all responsibilities for any failures.
	
	linux-4.15.3.patch patches the .config generated by make defconfig
	It is tuned to my desktop computer and is a work in progress.
	You should edit linux.spec and remove this line:
		patch -i %{_sourcedir}/linux-4.15.3.patch
	You need to create your own ptach file based on your requirements.
	
	wget is added to this build so you can fetch BLFS packages if your
	network is setup and working
		
The build process has been changed to be recursive.  This was done so
I can use the same bash script to build lfs and blfs.  See the Build.Order.text
for the build chain.  If you want to make changes to the build order simply
change the BuildRequires: parameter to point to the previous package to build 
in the list.  For example You can run ./builder.sh tools-rpm.spec and it will
recurse the list to the beginning package tools-binutils-pass-1 and it will
start there, and work down through the build order either building the package
or giving the status.

I have also added a mkinitramfs step ( which requires cpio ) so if you need a
initrd to boot it creates one.  If your kernel configured so a initrd is not
required the inird is still created just ignore it when you make the entry into
grub.cfg

The installer.sh script will take the binary rpms ( chapter 6 ) and install them
into a partition that YOU mounted on /mnt.  If you want to install elseware then
change ROOTPATH="/mnt" to the installation partition mounted by YOU.

###		TODO	###
I am presently working on adding yum to the base build, I will add it to the
end of the build order so it can be skipped if not needed/wanted.
###		TODO	###

Build Procedure goes as follows:

Command to run			Comments don't enter these
------------------------------	-------------------------------------

Preprare for build
download the tarball from https://www.github.com/baho-utot/LFS-RPM
extract it to your HOME directory

You are responsible for the next four steps,  make sure you knowed
what you are doing!

fdisk /dev/sdx				partition drive, you need to do this
mkfs.ext4 /dev/sdxx			create ext4 filesystem
mkdir /mnt/lfs				create work directory
mount /dev/sdxx /mnt/lfs	mount partition to work directory

#
#	Install build system
#
login as root user
cd to directory where you placed and extracted the build system.
./setup.sh

#
#	Get the source tarballs
#
login as lfs user
cd /mnt/lfs/usr/src/LFS-RPM
fetch.sh

#
#Build tool chain one go with tests
#	if you need to restart ./tools.sh step then run: rpm -e $(rpm -qa | grep tools)
#
./tools.sh

#
#	Build LFS system
#
login as root
cd /mnt/lfs/usr/src/LFS-RPM
chroot.sh
cd /usr/src/LFS-RPM	change to build directory
./lfs.sh

The last step will remove the toolchain and use vim to make
modification to the conf files so when you reboot it will do the
right thingy.

Build at this point is complete.
All that is needed is to install grub and/or add a menu item in the
the grub configureation file /boot/grub.cfg

This completes the build.