From fd8bbbc755c8dd44fd6ffe0c3f065600f2eb569f Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Mon, 19 Feb 2018 21:29:09 +0100 Subject: building first package on stage 2 --- README | 8 +++++--- TODOS | 1 + build_stage2.sh | 3 +++ build_stage2_package.sh | 11 +++++++---- i486-stage2/which/DESCR | 0 5 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 i486-stage2/which/DESCR diff --git a/README b/README index 9af3759..3829728 100644 --- a/README +++ b/README @@ -168,13 +168,14 @@ su cross ./create_hdd.sh # STAGE 2 ######### -# Assume stage1 of the system is installed on the target architecture +# Assuming stage1 of the system is installed on the target architecture # (virtual or a real machine), we have a key-based SSH connection to # the machine and can build packages there. # Build stage2 in $STAGE2_BUILD with the tools on the stage1 system # and modified PKGBUILDs and patches into the target system (replacing -# stage 1 packages). Stage 1 serves now the same function as the sysroot. +# stage 1 packages). Stage 1 serves now the same function as the sysroot +# during cross-compilation of stage 1. # The goal is to get a self-hosting system on the target architecture, # not necesseraly containing all of base and base-devel, but enough to @@ -183,6 +184,7 @@ su cross ./create_hdd.sh su cross ./prepare_stage2_repo.sh # Build stage 2 on the target architecture and install it onto the -# stage 1 system. Resulting artifacts get stored in $STAGE2_BUILD. +# stage 1 system. Resulting artifacts get stored also back +# in $STAGE2_BUILD. ./build_stage2.sh diff --git a/TODOS b/TODOS index e1cb7c8..106829c 100644 --- a/TODOS +++ b/TODOS @@ -50,6 +50,7 @@ stage1 issues: 1 /home/cross/.build/i486-unknown-linux-gnu/src/gcc/libgcc/libgcc2.c: No such file or directory. - currently gcc has a PKGBUILD modified by hand instead of diff seds in DESCR (the diff is very big and complex) +- there is really no need to copy stage 1 repo /packages/i486 onto the hdd stage2 issues: - make: recursive tarkets like all-recursive don't work, neither with cross-compiled diff --git a/build_stage2.sh b/build_stage2.sh index 8cf5dfd..349f8cd 100755 --- a/build_stage2.sh +++ b/build_stage2.sh @@ -11,6 +11,9 @@ PACKAGES="bash" +# build bash first as 'cd subpackage' in autoconf generated makefiles break +# with cross-compiled bash + for p in $PACKAGES; do "$SCRIPT_DIR/build_stage2_package.sh" "$p" || exit 1 done diff --git a/build_stage2_package.sh b/build_stage2_package.sh index ebf75da..de6643a 100755 --- a/build_stage2_package.sh +++ b/build_stage2_package.sh @@ -92,10 +92,13 @@ if test "$(find "$STAGE2_PACKAGES" -regex ".*/$PACKAGE-.*pkg\\.tar\\.xz"n | wc - # copy everything to the stage 1 machine scp -i $CROSS_HOME/.ssh/id_rsa -rC "$STAGE2_BUILD/$PACKAGE" build@$STAGE1_MACHINE_IP:/build/. - # TODO: # building the actual package - #$STAGE1_BUILD/makepkg-$TARGET_CPU -C --config $STAGE1_BUILD/makepkg-$TARGET_CPU.conf \ -# --skipchecksums --skippgpcheck --nocheck > "$PACKAGE.log" 2>&1 -# RES=$? + ssh -i $CROSS_HOME/.ssh/id_rsa build@$STAGE1_MACHINE_IP bash -c "'cd $PACKAGE && makepkg --skipchecksums --skippgpcheck --nocheck'" > $PACKAGE.log 2>&1 + RES=$? + + tail "$PACKAGE.log" + + #~ if test $RES = 0; then + #~ fi fi diff --git a/i486-stage2/which/DESCR b/i486-stage2/which/DESCR new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3-54-g00ecf