diff options
author | William Harrington <kb0iic@berzerkula.org> | 2021-03-19 16:22:18 -0500 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2021-03-19 16:22:18 -0500 |
commit | d0a16c64c37ea06740ad865f93d988911969c15f (patch) | |
tree | 0fc94914f48d16dee8e33ab0ecafa68f81cf59a8 | |
parent | 021878457259f9afb076a873dd20e440eddbb0c9 (diff) |
Add comments.
-rwxr-xr-x | lfs.sh | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -1,18 +1,29 @@ #!/bin/bash +# LFS build environment settings source env.sh + +# Spinner function (returns an exit value) source spinner.sh + +# Colors defined for text source colors.sh + +# Version check script #source versioncheck.sh +# Create LFS directory if it doesn't exist [[ -d /mnt/lfs ]] || sudo mkdir ${LFS} +# Setup partition, filesystem, format and mount if +# LFS filesystem is not previously mounted if ! grep -q "${LFS}" /proc/mounts; then source setupdisk.sh "${LFS_DISK}" "${LFS_ROOT}" sudo mount "${LFS_DISK}${LFS_ROOT}" "${LFS}" sudo chown -v ${USER} "${LFS}" fi +# Create limited directory layout mkdir -pv ${LFS_SRC} mkdir -pv ${LFS}/tools mkdir -pv ${LFS}/bin @@ -26,20 +37,24 @@ case $(uname -m) in x86_64) mkdir -pv ${LFS}/lib64 ;; esac +# Will use normal user and not special lfs user #sudo groupadd lfs #sudo useradd -s /bin/bash -g lfs -m -k /dev/null lfs #echo -e "${LFS_PWD}\n${LFS_PWD}\n" | sudo passwd lfs +# Copy scripts and csv files to LFS sources target cp -rf *.sh chapter* *.csv "${LFS}/sources" cd "${LFS}/sources" +# Download packages and patches source download.sh retval=$? if [ "$retval" -ne 0 ]; then exit 1 fi +# Chapter 5 for package in binutils gcc linux-api-headers glibc libstdc++; do source packageinstall.sh 5 $package retval=$? @@ -48,6 +63,7 @@ for package in binutils gcc linux-api-headers glibc libstdc++; do fi done +# Chapter 6 for package in m4 ncurses bash coreutils diffutils file findutils gawk grep gzip make patch sed tar xz binutils gcc; do source packageinstall.sh 6 $package retval=$? |