summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-07-24 04:09:22 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-07-26 19:24:49 +0200
commita8aa679409902a096428b1401f672644877b4441 (patch)
tree620bd53b5a24c9d8a2d7271f2d24dee625e3035a
parent60f547f8e15074cc1599dab66d2043edd0d4498f (diff)
uboot4extlinux-sunxi: architecture: switch to 'any'
These u-boot binaries do not depend on glibc, so switching to 'any' shound't be an issue. In addition, they can instaled to a storage device (like a microSD for instance) from any architecture as the installation scripts are architecture independent. Shipping this package on other architectures than armv7h enables people already running Parabola on other architectures to (re-)install u-boot without having to chroot in the ARM rootfs. Chrooting in another rootfs can be a huge security risk in some circumstances: the user doing that has to trust that the binaries of the chroot (like ls or pacman for instance) are not compromised in any way. Otherwise as these binaries run as root, they could easily mount filesystems, modify the host binaries, load kernel modules compiled with the host architectures, and so on, to compromize the host. In addition there are also use cases that don't require a rootfs at all like network booting or quick tests to see if u-boot or the card works fine. These would be more difficult to do in a safe way if a chroot is required as users would have to manually dowload, verify and unpack Parabola ARM packages to do that. Here the arm-none-eabi-gcc has been replaced by arm-linux-gnueabi-gcc because arm-linux-gnueabi-gcc comes from Arch Linux and it's not available on armv7h. Since all the currently supported stable architecture (armv7h, i686, x86_64) have the arm-linux-gnueabi-gcc compiler, we use it instead. The arm-linux-gnueabi-gcc can also be bootstraped from abslibre if needed, so it's easier to add support for new architectures if needed. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r--libre/uboot4extlinux-sunxi/PKGBUILD24
1 files changed, 8 insertions, 16 deletions
diff --git a/libre/uboot4extlinux-sunxi/PKGBUILD b/libre/uboot4extlinux-sunxi/PKGBUILD
index 78c9ead9e..faf0cbba6 100644
--- a/libre/uboot4extlinux-sunxi/PKGBUILD
+++ b/libre/uboot4extlinux-sunxi/PKGBUILD
@@ -56,14 +56,12 @@ pkgname=("${pkgbase}"
'uboot4extlinux-orangepi_plus')
pkgver=2021.07
-pkgrel=2
-arch=('armv7h' 'i686' 'x86_64')
+pkgrel=3
+arch=('any')
url="http://git.denx.de/u-boot.git/"
license=('GPL')
-makedepends=('bc' 'dtc' 'python' 'python-setuptools' 'python2' 'swig')
-makedepends_i686+=('arm-none-eabi-gcc')
-makedepends_ppc64le+=('arm-none-eabi-gcc')
-makedepends_x86_64+=('arm-none-eabi-gcc')
+makedepends=('arm-linux-gnueabi-gcc' 'bc' 'dtc' 'python' 'python-setuptools'
+ 'python2' 'swig')
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
'extlinux.conf'
"${pkgbase}.hook.in"
@@ -100,10 +98,8 @@ _defconfigs=('A10-OLinuXino-Lime_defconfig'
# Offset at which to install u-boot
u_boot_with_spl_offset=8192
-case "$CARCH" in
- armv7h) ARCH=arm;;
- i686|ppc64le|x86_64) ARCH=arm;CROSS_COMPILE=arm-none-eabi-;;
-esac
+ARCH=arm
+CROSS_COMPILE=arm-linux-gnueabi-
_nr_targets=0
for _defconfig in ${_defconfigs[@]}; do
@@ -142,12 +138,8 @@ _build_uboot_target()
echo 'CONFIG_IDENT_STRING=" Parabola GNU/Linux-libre"' >> .config
- if [ "$CARCH" = "armv7h" ]; then
- make "ARCH=${ARCH}" EXTRAVERSION=-${pkgrel}
- else
- make "ARCH=${ARCH}" "CROSS_COMPILE=${CROSS_COMPILE}" \
- EXTRAVERSION=-${pkgrel}
- fi
+ make "ARCH=${ARCH}" "CROSS_COMPILE=${CROSS_COMPILE}" \
+ EXTRAVERSION=-${pkgrel}
echo "==> Installing ${_target_name} to ${_destdir}"
install -d ${_destdir}