summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-07-05 02:55:28 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-07-05 02:55:28 +0000
commit2221247fb7623d144b80c992ece01539db595c36 (patch)
treea375e0a3fa7b45d48db0fcec81fa2203c3dfb592 /scripts
parentbb738f76377a9be607463152c90cd9fc54a94e39 (diff)
downloadpackages-2221247fb7623d144b80c992ece01539db595c36.tar.gz
packages-2221247fb7623d144b80c992ece01539db595c36.tar.bz2
packages-2221247fb7623d144b80c992ece01539db595c36.tar.xz
packages-2221247fb7623d144b80c992ece01539db595c36.zip
bootstrap: make it work(-ish) again
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bootstrap.sh25
1 files changed, 11 insertions, 14 deletions
diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh
index 5d870f436..87d7b1d48 100755
--- a/scripts/bootstrap.sh
+++ b/scripts/bootstrap.sh
@@ -5,9 +5,6 @@ set -e
TARGET_ARCH="$1"
SUDO_APK=abuild-apk
-# optional cross build packages
-KERNEL_PKG="linux-firmware linux-vanilla"
-
# get abuild configurables
[ -e /usr/share/abuild/functions.sh ] || (echo "abuild not found" ; exit 1)
CBUILDROOT="$(CTARGET=$TARGET_ARCH . /usr/share/abuild/functions.sh ; echo $CBUILDROOT)"
@@ -17,7 +14,7 @@ CBUILDROOT="$(CTARGET=$TARGET_ARCH . /usr/share/abuild/functions.sh ; echo $CBUI
# deduce aports directory
[ -z "$APORTS" ] && APORTS=$(realpath $(dirname $0)/../)
-[ -e "$APORTS/system/build-tools" ] || die "Unable to deduce aports base checkout"
+[ -e "$APORTS/system/build-tools" ] || die "Unable to deduce packages directory"
apkbuildname() {
local repo="${1%%/*}"
@@ -39,14 +36,14 @@ if [ -z "$TARGET_ARCH" ]; then
usage: $program TARGET_ARCH
This script creates a local cross-compiler, and uses it to
-cross-compile an Alpine Linux base system for new architecture.
+cross-compile an Adélie Linux base system for new architecture.
Steps for introducing new architecture include:
- adding the compiler tripler and arch type to abuild
- adding the arch type detection to apk-tools
- adjusting build rules for packages that are arch aware:
- gcc, libressl, linux-headers
-- create new kernel config for linux-vanilla
+ gcc, musl, binutils, easy-kernel
+- create new kernel config for easy-kernel
After these steps the initial cross-build can be completed
by running this with the target arch as parameter, e.g.:
@@ -68,7 +65,7 @@ msg "Building cross-compiler"
# Build and install cross binutils (--with-sysroot)
CTARGET=$TARGET_ARCH BOOTSTRAP=nobase APKBUILD=$(apkbuildname binutils) abuild -r
-if ! CHOST=$TARGET_ARCH BOOTSTRAP=nolibc APKBUILD=$(apkbuildname musl) abuild up2date 2>/dev/null; then
+#if ! CHOST=$TARGET_ARCH BOOTSTRAP=nolibc APKBUILD=$(apkbuildname musl) abuild up2date 2>/dev/null; then
# C-library headers for target
CHOST=$TARGET_ARCH BOOTSTRAP=nocc APKBUILD=$(apkbuildname musl) abuild -r
@@ -79,7 +76,7 @@ if ! CHOST=$TARGET_ARCH BOOTSTRAP=nolibc APKBUILD=$(apkbuildname musl) abuild up
# Cross build bootstrap C-library for the target
EXTRADEPENDS_BUILD="gcc-pass2-$TARGET_ARCH" \
CHOST=$TARGET_ARCH BOOTSTRAP=nolibc APKBUILD=$(apkbuildname musl) abuild -r
-fi
+#fi
# Full cross GCC
EXTRADEPENDS_TARGET="musl musl-dev" \
@@ -97,10 +94,10 @@ apk info --quiet --installed --root "$CBUILDROOT" libgcc libstdc++ musl-dev || \
${SUDO_APK} --root "$CBUILDROOT" add --repository "$REPODEST/system" libgcc libstdc++ musl-dev
# ordered cross-build
-for PKG in fortify-headers linux-headers musl libc-dev pkgconf zlib \
- gettext-tiny ncurses readline bash binutils make bison flex m4 \
- openssl libfetch apk-tools linux-pam shadow \
- gmp mpfr3 mpc1 isl cloog gcc ca-certificates \
+for PKG in musl pkgconf zlib \
+ gettext-tiny ncurses bash binutils make bison flex m4 \
+ openssl apk-tools linux-pam shadow \
+ gmp mpfr3 mpc1 isl gcc ca-certificates \
openrc libcap-ng coreutils sed gzip bzip2 diffutils \
attr libcap patch sudo acl fakeroot libarchive mawk \
pax-utils abuild grep findutils patch lzip unzip autoconf automake libtool \
@@ -115,7 +112,7 @@ for PKG in fortify-headers linux-headers musl libc-dev pkgconf zlib \
fortify-headers | libc-dev | build-base)
# headers packages which are implicit but mandatory dependency
apk info --quiet --installed --root "$CBUILDROOT" $PKG || \
- ${SUDO_APK} --update --root "$CBUILDROOT" --repository "$REPODEST/main" add $PKG
+ ${SUDO_APK} --update --root "$CBUILDROOT" --repository "$REPODEST/system" add $PKG
;;
musl | gcc)
# target libraries rebuilt, force upgrade