Commit aae55a00 authored by Philippe Schommers's avatar Philippe Schommers

aports/scripts: Make it possible to build ARM from other architecture

parent 69e6577a
Pipeline #3020 passed with stages
in 2 minutes and 35 seconds
......@@ -261,6 +261,7 @@ for ARCH in $req_arch; do
# create root for caching packages
mkdir -p "$APKROOT/etc/apk/cache"
cp -Pr /etc/apk/keys "$APKROOT/etc/apk/"
cp /usr/share/apk/keys/*.pub "$APKROOT/etc/apk/keys/"
abuild-apk --arch "$ARCH" --root "$APKROOT" add --initdb
if [ -z "$REPOS" ]; then
......
_apk_fetch() {
apk fetch --root "$APKROOT" "$@"
}
build_rpi_blobs() {
apk fetch --quiet --stdout raspberrypi-bootloader | tar -C "${DESTDIR}" -zx --strip=1 boot/
_apk_fetch --quiet --stdout raspberrypi-bootloader | tar -C "${DESTDIR}" -zx --strip=1 boot/
}
rpi_gen_cmdline() {
......@@ -96,9 +100,9 @@ profile_rpi() {
build_uboot() {
set -x
# FIXME: Fix apk-tools to extract packages directly
local pkg pkgs="$(apk fetch --simulate --root "$APKROOT" --recursive u-boot-all | sed -ne "s/^Downloading \(.*\)\-[0-9].*$/\1/p")"
local pkg pkgs="$(_apk_fetch --simulate --recursive u-boot-all | sed -ne "s/^Downloading \(.*\)\-[0-9].*$/\1/p")"
for pkg in $pkgs; do
[ "$pkg" = "u-boot-all" ] || apk fetch --root "$APKROOT" --stdout $pkg | tar -C "$DESTDIR" -xz usr
[ "$pkg" = "u-boot-all" ] || _apk_fetch --stdout $pkg | tar -C "$DESTDIR" -xz usr
done
mkdir -p "$DESTDIR"/u-boot
mv "$DESTDIR"/usr/sbin/update-u-boot "$DESTDIR"/usr/share/u-boot/* "$DESTDIR"/u-boot
......@@ -107,7 +111,7 @@ build_uboot() {
section_uboot() {
[ -n "$uboot_install" ] || return 0
build_section uboot $ARCH $(apk fetch --root "$APKROOT" --simulate --recursive u-boot-all | sort | checksum)
build_section uboot $ARCH $(_apk_fetch --simulate --recursive u-boot-all | sort | checksum)
}
profile_uboot() {
......
......@@ -14,6 +14,7 @@ build_kernel() {
--feature "$initfs_features" \
--modloopfw "$modloopfw" \
--repositories-file "$APKROOT/etc/apk/repositories" \
--keys-dir "$APKROOT/etc/apk/keys" \
"$DESTDIR"
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment