summaryrefslogtreecommitdiff
path: root/libre/uboot4extlinux-sunxi
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-02-03 04:49:17 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-02-03 04:49:43 +0100
commited02d43a3f325e1d49ed593eec51ac04527cab93 (patch)
tree1ab8bd5a44e9a3ef70d29da275b8fc88c864d3b5 /libre/uboot4extlinux-sunxi
parent0a65e2a74db2ccc00dbf2c18f80f147ea29a99e6 (diff)
downloadabslibre-ed02d43a3f325e1d49ed593eec51ac04527cab93.tar.gz
abslibre-ed02d43a3f325e1d49ed593eec51ac04527cab93.tar.bz2
abslibre-ed02d43a3f325e1d49ed593eec51ac04527cab93.zip
Revert "[WIP] Enable cross build of u-boot"
This commit was accidentally pushed to master instead of a branch. This reverts commit 0a65e2a74db2ccc00dbf2c18f80f147ea29a99e6.
Diffstat (limited to 'libre/uboot4extlinux-sunxi')
-rw-r--r--libre/uboot4extlinux-sunxi/PKGBUILD298
-rwxr-xr-xlibre/uboot4extlinux-sunxi/install-uboot4extlinux.sh.in88
-rw-r--r--libre/uboot4extlinux-sunxi/uboot4extlinux-sunxi.hook12
3 files changed, 92 insertions, 306 deletions
diff --git a/libre/uboot4extlinux-sunxi/PKGBUILD b/libre/uboot4extlinux-sunxi/PKGBUILD
index a80a318d6..f3d069855 100644
--- a/libre/uboot4extlinux-sunxi/PKGBUILD
+++ b/libre/uboot4extlinux-sunxi/PKGBUILD
@@ -2,11 +2,8 @@
# Maintainer: Isaac David <isacdaavid@at@isacdaavid@dot@info>
# Contributor: André Silva <emulatorman@hyperbola.info>
# Contributor: Timothy Redaelli <timothy.redaelli@gmail.com>
-# Contributor: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
pkgbase=uboot4extlinux-sunxi
-pkgname=('uboot4extlinux-a10-olinuxino-lime')
-
pkgname=('uboot4extlinux-a10-olinuxino-lime'
'uboot4extlinux-a10s-olinuxino-m'
'uboot4extlinux-a13-olinuxino'
@@ -28,23 +25,16 @@ pkgname=('uboot4extlinux-a10-olinuxino-lime'
'uboot4extlinux-orangepi_one'
'uboot4extlinux-orangepi_pc'
'uboot4extlinux-orangepi_plus')
-
pkgver=2020.04
pkgrel=1
-arch=('armv7h' 'i686' 'x86_64')
+arch=('armv7h')
url="http://git.denx.de/u-boot.git/"
license=('GPL')
makedepends=('bc' 'dtc' 'python' 'python2' 'swig')
-makedepends_i686+=('arm-none-eabi-gcc')
-makedepends_x86_64+=('arm-none-eabi-gcc')
backup=(boot/extlinux/extlinux.conf)
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
- 'extlinux.conf'
- 'uboot4extlinux-sunxi.install'
- 'install-uboot4extlinux.sh.in')
+ 'extlinux.conf')
sha256sums=('fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372'
- 'SKIP'
- 'SKIP'
'SKIP')
boards=('A10-OLinuXino-Lime'
@@ -69,56 +59,32 @@ boards=('A10-OLinuXino-Lime'
'orangepi_pc'
'orangepi_plus')
-# Offset at which to install u-boot
-u_boot_with_spl_offset=8192
-
-case "$CARCH" in
- armv7h) ARCH=arm;;
- i686) ARCH=arm;CROSS_COMPILE=arm-none-eabi-;;
-esac
-
build() {
-echo
cd u-boot-${pkgver}
unset CFLAGS CXXFLAGS LDFLAGS
- # Used to store the result for each "board"
- rm -rf build
- install -d build
-
for i in ${boards[@]}; do
- make "ARCH=${ARCH}" distclean
- make "ARCH=${ARCH}" ${i}_defconfig
+ mkdir -p ../bin_${i}
+ make distclean
+ make ${i}_defconfig
echo 'CONFIG_IDENT_STRING=" Parabola GNU/Linux-libre"' >> .config
- if [ "$CARCH" = "i686" ]; then
- make "ARCH=${ARCH}" "CROSS_COMPILE=${CROSS_COMPILE}" EXTRAVERSION=-${pkgrel}
- else
- make "ARCH=${ARCH}" EXTRAVERSION=-${pkgrel}
- fi
-
- _target_pkgname="uboot4extlinux-$(echo ${i} | awk '{print tolower($0)}')"
- _destdir="build/${_target_pkgname}"
- install -d ${_destdir}
- mv -f u-boot-sunxi-with-spl.bin "${_destdir}"
+ make EXTRAVERSION=-${pkgrel}
+ mv -f u-boot-sunxi-with-spl.bin ../bin_${i}
done
}
package_uboot4extlinux-a10-olinuxino-lime() {
pkgdesc="U-Boot with Extlinux support for A10 OLinuXino Lime"
+ install=${pkgbase}.install
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- install=${pkgbase}.install
- cd "u-boot-${pkgver}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_A10-OLinuXino-Lime/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
-
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-a10s-olinuxino-m() {
@@ -128,15 +94,11 @@ package_uboot4extlinux-a10s-olinuxino-m() {
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
replaces=('uboot4extlinux-a10s-olinuxino-micro')
- cd "u-boot-${pkgver}"
-
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_A10s-OLinuXino-M/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-a13-olinuxino() {
@@ -145,15 +107,11 @@ package_uboot4extlinux-a13-olinuxino() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- cd "u-boot-${pkgver}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_A13-OLinuXino/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
-
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-a13-olinuxinom() {
@@ -163,15 +121,11 @@ package_uboot4extlinux-a13-olinuxinom() {
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
replaces=('uboot4extlinux-a13-olinuxino-micro')
- cd "u-boot-${pkgver}"
-
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_A13-OLinuXinoM/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-a20-olinuxino-lime() {
@@ -180,15 +134,11 @@ package_uboot4extlinux-a20-olinuxino-lime() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- cd "u-boot-${pkgver}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_A20-OLinuXino-Lime/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
-
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-a20-olinuxino-lime2() {
@@ -197,15 +147,11 @@ package_uboot4extlinux-a20-olinuxino-lime2() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- cd "u-boot-${pkgver}"
-
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_A20-OLinuXino-Lime2/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-a20-olinuxino-lime2-emmc() {
@@ -214,15 +160,11 @@ package_uboot4extlinux-a20-olinuxino-lime2-emmc() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- cd "u-boot-${pkgver}"
-
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_A20-OLinuXino-Lime2-eMMC/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-a20-olinuxino_micro() {
@@ -232,15 +174,11 @@ package_uboot4extlinux-a20-olinuxino_micro() {
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
replaces=('uboot-a20-olinuxino-micro')
- cd "u-boot-${pkgver}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_A20-OLinuXino_MICRO/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
-
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-bananapi() {
@@ -249,15 +187,11 @@ package_uboot4extlinux-bananapi() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- cd "u-boot-${pkgver}"
-
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_Bananapi/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-bananapro() {
@@ -266,15 +200,11 @@ package_uboot4extlinux-bananapro() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- cd "u-boot-${pkgver}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_Bananapro/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
-
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-chip() {
@@ -283,15 +213,11 @@ package_uboot4extlinux-chip() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- cd "u-boot-${pkgver}"
-
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_CHIP/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-cubieboard() {
@@ -300,15 +226,11 @@ package_uboot4extlinux-cubieboard() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- cd "u-boot-${pkgver}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_Cubieboard/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
-
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-cubieboard2() {
@@ -317,15 +239,11 @@ package_uboot4extlinux-cubieboard2() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- cd "u-boot-${pkgver}"
-
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_Cubieboard2/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-cubietruck() {
@@ -334,15 +252,11 @@ package_uboot4extlinux-cubietruck() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- cd "u-boot-${pkgver}"
-
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_Cubietruck/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-linksprite_pcduino() {
@@ -352,15 +266,11 @@ package_uboot4extlinux-linksprite_pcduino() {
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
replaces=('uboot4extlinux-pcduino')
- cd "u-boot-${pkgver}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_Linksprite_pcDuino/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
-
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-linksprite_pcduino3() {
@@ -370,15 +280,11 @@ package_uboot4extlinux-linksprite_pcduino3() {
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
replaces=('uboot4extlinux-pcduino3')
- cd "u-boot-${pkgver}"
-
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_Linksprite_pcDuino3/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-linksprite_pcduino3_nano() {
@@ -388,15 +294,11 @@ package_uboot4extlinux-linksprite_pcduino3_nano() {
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
replaces=('uboot4extlinux-pcduino3-nano')
- cd "u-boot-${pkgver}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_Linksprite_pcDuino3_Nano/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
-
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-orangepi_2() {
@@ -405,15 +307,11 @@ package_uboot4extlinux-orangepi_2() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- cd "u-boot-${pkgver}"
-
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_orangepi_2/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-orangepi_one() {
@@ -422,15 +320,11 @@ package_uboot4extlinux-orangepi_one() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- cd "u-boot-${pkgver}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_orangepi_one/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
-
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-orangepi_pc() {
@@ -439,15 +333,11 @@ package_uboot4extlinux-orangepi_pc() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- cd "u-boot-${pkgver}"
-
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_orangepi_pc/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
package_uboot4extlinux-orangepi_plus() {
@@ -456,13 +346,9 @@ package_uboot4extlinux-orangepi_plus() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- cd "u-boot-${pkgver}"
-
- install -d "${pkgdir}/usr/lib/u-boot/${pkgname}/"
- install -Dm644 "build/${pkgname}/u-boot-sunxi-with-spl.bin" "${pkgdir}/usr/lib/u-boot/${pkgname}"
- install -Dm644 "${srcdir}/extlinux.conf" "${pkgdir}/usr/lib/u-boot/${pkgname}"
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_orangepi_plus/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot/u-boot/images/
- sed < "$srcdir/install-uboot4extlinux.sh.in" > "${pkgdir}/usr/lib/u-boot/${pkgname}/install-uboot4extlinux.sh" \
- -e "s|@u_boot_with_spl[@]|/usr/lib/u-boot/${pkgname}/u-boot-sunxi-with-spl.bin|g" \
- -e "s|@u_boot_with_spl_offset[@]|${u_boot_with_spl_offset}|g"
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
}
diff --git a/libre/uboot4extlinux-sunxi/install-uboot4extlinux.sh.in b/libre/uboot4extlinux-sunxi/install-uboot4extlinux.sh.in
deleted file mode 100755
index d12e6eedc..000000000
--- a/libre/uboot4extlinux-sunxi/install-uboot4extlinux.sh.in
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/sh
-# SPDX-License-Identifier: GPL-2.0+
-# Copyright (C) 2020 Denis 'GNUtoo' Carikli
-
-progname="install-uboot4extlinux.sh"
-u_boot_with_spl="@u_boot_with_spl@"
-u_boot_with_spl_offset=@u_boot_with_spl_offset@
-
-usage()
-{
- echo "Usage: ${progname} [INSTALL_DEVICE]"
-}
-
-install_image()
-{
- install_device="$1"
- offset="$2"
- image="$3"
-
- # We need root permissions for now:
- # - blkid is used to bypass caching and it needs root access
- if [ "$(id -u)" != 0 ] ; then
- echo "Error: This script needs to be run as root"
- exit 1
- fi
-
- # We only support MBR for now
- # It will also catch errors like /dev/sdb1 and mmcbk0p1 as they
- # don't have the PTTYPE tag
- PTTYPE="$(blkid --probe --match-tag PTTYPE ${install_device} | \
- awk '{print $2}' | sed 's#^PTTYPE="##' | sed 's#"$##')"
- if [ -z "${PTTYPE}" ] ; then
- echo "Error: Could not find an (MBR) formating inside " \
- "${install_device}"
- echo " Possible causes:"
- echo " - Maybe {instal_device} is a partition"
- echo " - or Maybe it's completelyor unformated"
- exit 1
- elif [ "${PTTYPE}" != "dos" ] ; then
- echo "Error: ${install_device} is not in MBR format"
- echo " Currently, only the MBR format is supported"
- exit 1
- fi
-
- # Check if offset > MBR partition table part end
- if [ ${offset} -lt 512 ] ; then
- echo "Error: The offset (${offset}) is < 512"
- echo " offsets < 512 aren't supported (yet)"
- exit 1
- fi
-
- # Get the image size
- image_size="$(du --block-size=1 ${image} | awk '{print $1}')"
-
- # With MBR, most partitioning tools leave makes the first partition
- # start at 1MiB. So we need to check if the bootloader doesn't end
- # up overwriting the first partition.
- if [ $(expr ${image_size} + {offset}) -gt $(expr 1024 * 1024) ] ; then
- echo "Error: ${image} is too big:"
- echo " offset: ${offset}"
- echo " size: ${image_size}"
- echo " By default, "\
- "partitioing tools makes the first partition start at 1MiB"
- echo " Instaling ${images} "\
- "would overwrite that first partition (if it's present)."
- echo " Please contact the Parabola developers " \
- "so they could fix that issue"
- exit 1
- fi
-
- # Copies with with a block size of 1 can be quite slow in practice
- if [ "$(expr ${offset} % 512)" = 0] ; then
- dd conv=notrunc "if=${image}" "of=${install_device}" \
- bs=512 "seek=$(expr ${offset} / 512)"
- else
- echo "Warning: slow copy"
- dd conv=notrunc "if=${image}" "of=${install_device}" \
- bs=1 "seek=${offset}"
- fi
-
- sync "${install_device}"
-}
-
-if [ $# -ne 1 ] ; then
- usage
-else
- install_image "$1" "${u_boot_with_spl_offset}" "${u_boot_with_spl}"
-fi
diff --git a/libre/uboot4extlinux-sunxi/uboot4extlinux-sunxi.hook b/libre/uboot4extlinux-sunxi/uboot4extlinux-sunxi.hook
deleted file mode 100644
index 8f1ba29c2..000000000
--- a/libre/uboot4extlinux-sunxi/uboot4extlinux-sunxi.hook
+++ /dev/null
@@ -1,12 +0,0 @@
-[Trigger]
-Type = Package
-Operation = Install
-Operation = Upgrade
-Operation = Remove
-Target = *
-
-[Action]
-Description = Test
-When = PostTransaction
-Exec = /usr/share/libalpm/scripts/uboot4extlinux-sunxi.sh
-NeedsTargets