56 lines
1.6 KiB
Bash
56 lines
1.6 KiB
Bash
# Template file for 'cubieboard2-uboot'
|
|
pkgname=cubieboard2-uboot
|
|
version=2015.01
|
|
revision=3
|
|
wrksrc="u-boot-${version}"
|
|
hostmakedepends="bc git sunxi-tools uboot-mkimage"
|
|
short_desc="U-Boot for cubieboard2"
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|
license="GPL-2"
|
|
homepage="http://www.denx.de/wiki/U-Boot/WebHome"
|
|
distfiles="ftp://ftp.denx.de/pub/u-boot/u-boot-${version}.tar.bz2"
|
|
checksum=383051a656ebe11757b17d38a3326387e4a1b0949ca8a9e8ee506bf71dac9fde
|
|
|
|
only_for_archs="armv7l armv7l-musl"
|
|
|
|
do_configure() {
|
|
git clone https://github.com/linux-sunxi/sunxi-boards
|
|
}
|
|
do_build() {
|
|
local _boards="Cubieboard2 Cubietruck"
|
|
|
|
unset CFLAGS CXXFLAGS LDFLAGS
|
|
|
|
for f in ${_boards}; do
|
|
mkdir bin_${f}
|
|
make distclean
|
|
if [ -n "$CROSS_BUILD" ]; then
|
|
make CROSS_COMPILE=${XBPS_CROSS_TRIPLET}- ${f}_config
|
|
make CROSS_COMPILE=${XBPS_CROSS_TRIPLET}- ${makejobs}
|
|
else
|
|
make ${f}_config
|
|
make ${makejobs}
|
|
fi
|
|
mv u-boot-sunxi-with-spl.bin bin_${f}
|
|
done
|
|
|
|
mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d ${FILESDIR}/boot.txt boot.scr
|
|
}
|
|
do_install() {
|
|
vmkdir boot
|
|
vinstall bin_Cubieboard2/u-boot-sunxi-with-spl.bin 644 boot
|
|
fex2bin sunxi-boards/sys_config/a20/cubieboard2.fex ${DESTDIR}/boot/script.bin
|
|
vinstall ${FILESDIR}/boot.txt 644 boot
|
|
vinstall boot.scr 644 boot
|
|
}
|
|
|
|
cubietruck-uboot_package() {
|
|
short_desc="${short_desc/cubieboard2/cubietruck}"
|
|
pkg_install () {
|
|
vmkdir boot
|
|
vinstall bin_Cubietruck/u-boot-sunxi-with-spl.bin 644 boot
|
|
fex2bin sunxi-boards/sys_config/a20/cubietruck.fex ${DESTDIR}/boot/script.bin
|
|
vinstall ${FILESDIR}/boot.txt 644 boot
|
|
vinstall boot.scr 644 boot
|
|
}
|
|
}
|