summaryrefslogtreecommitdiffstats
path: root/bootstrap-main.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap-main.sh')
-rwxr-xr-xbootstrap-main.sh29
1 files changed, 2 insertions, 27 deletions
diff --git a/bootstrap-main.sh b/bootstrap-main.sh
index 26e3555..6ee7dca 100755
--- a/bootstrap-main.sh
+++ b/bootstrap-main.sh
@@ -3,40 +3,15 @@
set -e
SCRIPT_DIR=
-ARCH=
-PLAT=
main()
{
SCRIPT_DIR="$(cd "${0%/*}" && pwd)"
- setup_arch_plat
+
"${SCRIPT_DIR}/bootstrap-prepare.sh"
"${SCRIPT_DIR}/bootstrap-stage1-build.sh"
"${SCRIPT_DIR}/bootstrap-stage1-install.sh"
- stage1
-}
-
-setup_arch_plat()
-{
- ARCH="$(cat /etc/proteanos_arch)"
- PLAT="$(cat /etc/proteanos_plat)"
-}
-
-stage1()
-{
- local zlib_upstream_ver
-
- sudo chroot . true
- sudo chroot . readelf -hl /usr/bin/readelf
-
- zlib_upstream_ver="$(printf '%s' ../pkg/zlib/zlib-*.orig.tar* | sed \
- 's|^.*/zlib-\([a-z0-9.~]*\).*\.orig\.tar.*$|\1|')"
- tar -xjOf ../pkg/zlib/zlib-*.orig.tar* \
- "zlib-${zlib_upstream_ver}/examples/fitblk.c" >fitblk.c
- sudo chroot . "${ARCH}-gcc" -lz -o /fitblk /fitblk.c
- sudo chroot . /fitblk | grep -F 'fitblk abort' >/dev/null
-
- cd ..
+ "${SCRIPT_DIR}/bootstrap-stage1-test.sh"
}
main "${@}"