clean slate for pyrois

This commit is contained in:
phanes
2023-02-18 20:02:03 -05:00
parent 25f4bcba54
commit 536ae16532
22 changed files with 366 additions and 98 deletions

19
make.project/build_stage1.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# closely aligns with LFS Ch 5, 6
# fix an issue with open files limit on some hosts
ulimit -l unlimited
#ulimit -n 10240
ulimit -c unlimited
echo "Bootstrapping from MAKE to REX..."
# Executes rex from within the shell.
${dir_localtools}/rex \
-c ${dir_rex}/x86_64/rex.config \
-p ${dir_rex}/x86_64/plans/stage1.plan
retVal=$?

25
make.project/dirs.sh Executable file
View File

@@ -0,0 +1,25 @@
function echofail() {
echo $1
exit 1
}
function mkfaildir() {
echo "Creating directory '$1'."
mkdir -p $1 || echofail "Failed to create '$1' directory."
}
# clean the slate
rm -Rfv ${dir_stage}
mkfaildir ${dir_stage}
mkfaildir ${dir_localtools}
mkfaildir ${dir_artifacts}
mkfaildir ${dir_logs}
mkfaildir ${dir_configs}
mkfaildir ${dir_patches}
mkfaildir ${dir_sources}
mkfaildir ${dir_sysroot}
echo "Stage directories now exist."

View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
function echofail() {
echo "FAILED: $1"
exit 1
}
wget \
-q \
--show-progress \
--continue \
-R "index.html*" \
-r \
-np \
-nH \
--cut-dirs=2 \
-P ${dir_sources} \
--directory-prefix=${dir_sources} \
https://storage.darkhorselinux.org/sources/upstream_sources/ \
|| echofail "Downloading sources..."
echo "Validating source downloads..."
pushd ${dir_sources} 1>/dev/null 2>/dev/null
md5sum --quiet -c "md5sums.txt" || echofail "Validation failed. Redownload."
err=$?
popd 1>/dev/null 2>/dev/null
echo "Finished with exit code $err"

14
make.project/install_rex.sh Executable file
View File

@@ -0,0 +1,14 @@
function echofail() {
echo "Failed: $1"
exit 1
}
echo "Downloading Rex Source code to '${dir_stage}/rex'."
git clone https://source.silogroup.org/SURRO-Linux/rex ${dir_stage}/rex || echofail "Cloning rex repo."
pushd ${dir_stage}/rex || echofail "Entering rex build dir"
cmake . || echofail "cmake/rex."
make || echofail "make/rex"
cp -v ./rex ${dir_localtools}/ || fail "Installing rex to '${dir_localtools}'."
dirs -c