From 3abff29bd6887d69b2b45680fb64f164babd4aee Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Thu, 18 Oct 2018 16:35:01 +0000 Subject: added a stage5 with java7-openjdk --- README | 7 +++++ create_java7-openjdk-shim-i486.sh | 56 +++++++++++++++++++++++++++++++++++++++ default.conf | 9 +++++++ 3 files changed, 72 insertions(+) create mode 100755 create_java7-openjdk-shim-i486.sh diff --git a/README b/README index 80f57c4..1d38fa5 100644 --- a/README +++ b/README @@ -272,3 +272,10 @@ su cross ./prepare_stage4_repo.sh # - some python modules are virtually untestable due to excessive dependencies # e.g, python-packaging # - glibc tests run out of memory + +######### +# STAGE 5 +######### + +Currently some unsorted trials to bootstrap packages like java, rust, ... +Focusing on i486 for now (so this is not a real bootstrapping for something like RISC-V!). diff --git a/create_java7-openjdk-shim-i486.sh b/create_java7-openjdk-shim-i486.sh new file mode 100755 index 0000000..998e265 --- /dev/null +++ b/create_java7-openjdk-shim-i486.sh @@ -0,0 +1,56 @@ +#!/bin/sh + +# shellcheck source=./default.conf +. "./default.conf" + +# the java7-openjdk shim + +if test ! -f $STAGE5_CHROOT/packages/$TARGET_CPU/jdk7-openjdk-7.0.0.0.9-1-$TARGET_CPU.pkg.tar.xz; then + + cd $STAGE5_BUILD || exit 1 + sudo rm -rf jdk7-openjdk + mkdir jdk7-openjdk + cd jdk7-openjdk || exit 1 + mkdir -p pkg/jdk7-openjdk + cd pkg/jdk7-openjdk || exit 1 + mkdir -p opt/jdk7-openjdk + cd opt/jdk7-openjdk || exit 1 + tar zxf $HOME/jdk-7u80-linux-i586.tar.gz + mv jdk1.7.0_80/* . + rmdir jdk1.7.0_80 + cd ../.. || exit 1 + mkdir -p usr/bin + for i in opt/jdk7-openjdk/bin/*; do + ln -s /$i usr/bin/. + done + cd ../.. || exit 1 + + BUILDDATE=$(date '+%s') + size=$(du -sk --apparent-size pkg/) + size="$(( ${size%%[^0-9]*} * 1024 ))" + cat > pkg/jdk7-openjdk/.PKGINFO < ../../jdk7-openjdk-7.0.0.0.9-1-$TARGET_CPU.pkg.tar.xz + cd ../.. || exit 1 + + cp -v ./*.pkg.tar.xz $STAGE5_CHROOT/packages/$TARGET_CPU/. + rm -rf $STAGE5_CHROOT/var/cache/pacman/pkg/* + rm -rf $STAGE5_CHROOT/packages/$TARGET_CPU/temp.db* + rm -rf $STAGE5_CHROOT/packages/$TARGET_CPU/temp.files* + repo-add -R $STAGE5_CHROOT/packages/$TARGET_CPU/temp.db.tar.gz $STAGE5_CHROOT/packages/$TARGET_CPU/*pkg.tar.xz + sudo pacman --noconfirm --config $STAGE5_CHROOT/etc/pacman.conf -r $STAGE5_CHROOT -Syy gcc-libs +fi + +echo "java7-openjdk shim exists." diff --git a/default.conf b/default.conf index 51d7e71..4bfb161 100644 --- a/default.conf +++ b/default.conf @@ -75,6 +75,15 @@ STAGE4_BUILD=$CROSS_HOME/$TARGET_CPU-build-stage4 # where to store the directory which go to the ISO image STAGE4_ISOLINUX=$CROSS_HOME/isolinux-stage4 +# the chroot of stage 5 +STAGE5_CHROOT=$CROSS_HOME/$TARGET_CPU-root-stage5 + +# where packages are stored for stage 5 (on the host) +STAGE5_PACKAGES=$STAGE5_CHROOT/packages/$TARGET_CPU/ + +# where build results are stored for stage 5 +STAGE5_BUILD=$CROSS_HOME/$TARGET_CPU-build-stage5 + # git repository for PKGBUILD diffs and patches for the # i686 architecture GIT_URL_ARCHLINUX32_PACKAGES=https://github.com/archlinux32/packages.git -- cgit v1.2.3-70-g09d2