2014-01-25 13:56:06 +01:00
|
|
|
# Template file for 'cubieboard2-uboot'
|
|
|
|
pkgname=cubieboard2-uboot
|
2015-06-10 09:30:53 +02:00
|
|
|
version=2015.04
|
|
|
|
revision=1
|
2015-05-20 19:04:34 +02:00
|
|
|
wrksrc="u-boot-${version}"
|
|
|
|
hostmakedepends="bc git sunxi-tools uboot-mkimage"
|
|
|
|
short_desc="U-Boot for cubieboard2"
|
2015-04-10 09:16:30 +02:00
|
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
2014-01-25 13:56:06 +01:00
|
|
|
license="GPL-2"
|
2015-05-20 19:04:34 +02:00
|
|
|
homepage="http://www.denx.de/wiki/U-Boot/WebHome"
|
|
|
|
distfiles="ftp://ftp.denx.de/pub/u-boot/u-boot-${version}.tar.bz2"
|
2015-06-10 09:30:53 +02:00
|
|
|
checksum=0a1a70df586655f527befa6f12e184e96ed61b126e5a567382321b17200f5d60
|
2014-01-25 13:56:06 +01:00
|
|
|
|
2015-05-20 19:06:16 +02:00
|
|
|
only_for_archs="armv7l armv7l-musl"
|
|
|
|
|
2015-05-20 19:04:34 +02:00
|
|
|
do_configure() {
|
|
|
|
git clone https://github.com/linux-sunxi/sunxi-boards
|
|
|
|
}
|
2014-01-25 13:56:06 +01:00
|
|
|
do_build() {
|
2015-05-20 19:04:34 +02:00
|
|
|
local _boards="Cubieboard2 Cubietruck"
|
|
|
|
|
2014-01-25 13:56:06 +01:00
|
|
|
unset CFLAGS CXXFLAGS LDFLAGS
|
|
|
|
|
2015-05-20 19:04:34 +02:00
|
|
|
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
|
|
|
|
}
|
2014-01-25 13:56:06 +01:00
|
|
|
do_install() {
|
2015-05-20 19:04:34 +02:00
|
|
|
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
|
2014-01-26 00:53:16 +01:00
|
|
|
vinstall boot.scr 644 boot
|
2015-05-20 19:04:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
2014-01-25 13:56:06 +01:00
|
|
|
}
|