summaryrefslogtreecommitdiff
path: root/libre/uboot4extlinux-sunxi/PKGBUILD
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-01-06 22:57:20 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-02-03 00:17:47 +0100
commit0a65e2a74db2ccc00dbf2c18f80f147ea29a99e6 (patch)
tree804a482227af970af5d30d4eb108f5ef6c193f3d /libre/uboot4extlinux-sunxi/PKGBUILD
parent1f2f68301569e4918d2d1da122ff241f93561ab8 (diff)
downloadabslibre-0a65e2a74db2ccc00dbf2c18f80f147ea29a99e6.tar.gz
abslibre-0a65e2a74db2ccc00dbf2c18f80f147ea29a99e6.tar.bz2
abslibre-0a65e2a74db2ccc00dbf2c18f80f147ea29a99e6.zip
[WIP] Enable cross build of u-boot
TODO: - Create a hook script - Finish the u-boot-sunxi-install script - Add dependencies for the install script (utils-linux) - Test on real hardware (lime2, pcduino-lite) Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'libre/uboot4extlinux-sunxi/PKGBUILD')
-rw-r--r--libre/uboot4extlinux-sunxi/PKGBUILD298
1 files changed, 206 insertions, 92 deletions
diff --git a/libre/uboot4extlinux-sunxi/PKGBUILD b/libre/uboot4extlinux-sunxi/PKGBUILD
index f3d069855..a80a318d6 100644
--- a/libre/uboot4extlinux-sunxi/PKGBUILD
+++ b/libre/uboot4extlinux-sunxi/PKGBUILD
@@ -2,8 +2,11 @@
# 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'
@@ -25,16 +28,23 @@ pkgname=('uboot4extlinux-a10-olinuxino-lime'
'uboot4extlinux-orangepi_one'
'uboot4extlinux-orangepi_pc'
'uboot4extlinux-orangepi_plus')
+
pkgver=2020.04
pkgrel=1
-arch=('armv7h')
+arch=('armv7h' 'i686' 'x86_64')
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')
+ 'extlinux.conf'
+ 'uboot4extlinux-sunxi.install'
+ 'install-uboot4extlinux.sh.in')
sha256sums=('fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372'
+ 'SKIP'
+ 'SKIP'
'SKIP')
boards=('A10-OLinuXino-Lime'
@@ -59,32 +69,56 @@ 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
- mkdir -p ../bin_${i}
- make distclean
- make ${i}_defconfig
+ make "ARCH=${ARCH}" distclean
+ make "ARCH=${ARCH}" ${i}_defconfig
echo 'CONFIG_IDENT_STRING=" Parabola GNU/Linux-libre"' >> .config
- make EXTRAVERSION=-${pkgrel}
- mv -f u-boot-sunxi-with-spl.bin ../bin_${i}
+ 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}"
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
- 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/
+ cd "u-boot-${pkgver}"
- install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-a10s-olinuxino-m() {
@@ -94,11 +128,15 @@ package_uboot4extlinux-a10s-olinuxino-m() {
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
replaces=('uboot4extlinux-a10s-olinuxino-micro')
- 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/
+ 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 -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-a13-olinuxino() {
@@ -107,11 +145,15 @@ package_uboot4extlinux-a13-olinuxino() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- 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/
+ cd "u-boot-${pkgver}"
- install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-a13-olinuxinom() {
@@ -121,11 +163,15 @@ package_uboot4extlinux-a13-olinuxinom() {
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
replaces=('uboot4extlinux-a13-olinuxino-micro')
- 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/
+ 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 -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-a20-olinuxino-lime() {
@@ -134,11 +180,15 @@ package_uboot4extlinux-a20-olinuxino-lime() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- 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/
+ cd "u-boot-${pkgver}"
- install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-a20-olinuxino-lime2() {
@@ -147,11 +197,15 @@ package_uboot4extlinux-a20-olinuxino-lime2() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- 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/
+ 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 -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-a20-olinuxino-lime2-emmc() {
@@ -160,11 +214,15 @@ package_uboot4extlinux-a20-olinuxino-lime2-emmc() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- 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/
+ 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 -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-a20-olinuxino_micro() {
@@ -174,11 +232,15 @@ package_uboot4extlinux-a20-olinuxino_micro() {
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
replaces=('uboot-a20-olinuxino-micro')
- 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/
+ cd "u-boot-${pkgver}"
- install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-bananapi() {
@@ -187,11 +249,15 @@ package_uboot4extlinux-bananapi() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- 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/
+ 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 -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-bananapro() {
@@ -200,11 +266,15 @@ package_uboot4extlinux-bananapro() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- 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/
+ cd "u-boot-${pkgver}"
- install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-chip() {
@@ -213,11 +283,15 @@ package_uboot4extlinux-chip() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- 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/
+ 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 -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-cubieboard() {
@@ -226,11 +300,15 @@ package_uboot4extlinux-cubieboard() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- 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/
+ cd "u-boot-${pkgver}"
- install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-cubieboard2() {
@@ -239,11 +317,15 @@ package_uboot4extlinux-cubieboard2() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- 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/
+ 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 -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-cubietruck() {
@@ -252,11 +334,15 @@ package_uboot4extlinux-cubietruck() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- 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/
+ 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 -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-linksprite_pcduino() {
@@ -266,11 +352,15 @@ package_uboot4extlinux-linksprite_pcduino() {
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
replaces=('uboot4extlinux-pcduino')
- 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/
+ cd "u-boot-${pkgver}"
- install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-linksprite_pcduino3() {
@@ -280,11 +370,15 @@ package_uboot4extlinux-linksprite_pcduino3() {
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
replaces=('uboot4extlinux-pcduino3')
- 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/
+ 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 -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-linksprite_pcduino3_nano() {
@@ -294,11 +388,15 @@ package_uboot4extlinux-linksprite_pcduino3_nano() {
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
replaces=('uboot4extlinux-pcduino3-nano')
- 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/
+ cd "u-boot-${pkgver}"
- install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-orangepi_2() {
@@ -307,11 +405,15 @@ package_uboot4extlinux-orangepi_2() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- 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/
+ 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 -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-orangepi_one() {
@@ -320,11 +422,15 @@ package_uboot4extlinux-orangepi_one() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- 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/
+ cd "u-boot-${pkgver}"
- install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-orangepi_pc() {
@@ -333,11 +439,15 @@ package_uboot4extlinux-orangepi_pc() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- 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/
+ 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 -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}
package_uboot4extlinux-orangepi_plus() {
@@ -346,9 +456,13 @@ package_uboot4extlinux-orangepi_plus() {
provides=('uboot4extlinux-sunxi')
conflicts=('uboot-sunxi' 'uboot4extlinux-sunxi' 'uboot4grub-sunxi')
- 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/
+ 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 -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+ 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"
}