2016-05-04 17:15:49 +00:00
|
|
|
# Template file for 'odroid-c2-uboot'
|
|
|
|
pkgname=odroid-c2-uboot
|
|
|
|
version=v2015.01
|
|
|
|
revision=1
|
|
|
|
_githash=f416a769454b89c39d5b217d28bd3c9f5d1594df
|
|
|
|
wrksrc="u-boot-${_githash}"
|
|
|
|
only_for_archs="aarch64 aarch64-musl"
|
|
|
|
conf_files="/boot/boot.ini"
|
2016-05-06 12:34:53 +00:00
|
|
|
hostmakedepends="bc"
|
2016-05-04 17:15:49 +00:00
|
|
|
short_desc="Odroid C2 U-Boot files for SD booting"
|
|
|
|
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
|
|
|
|
license="GPL-2"
|
|
|
|
homepage="https://github.com/hardkernel/u-boot"
|
|
|
|
distfiles="https://github.com/hardkernel/u-boot/archive/${_githash}.tar.gz"
|
|
|
|
checksum=da7ca9e6abdfedaa65ac4e0bd378155002bf5d0ccea663ddf03fa839dceb3724
|
|
|
|
|
2016-05-06 12:34:53 +00:00
|
|
|
case "$XBPS_MACHINE" in
|
|
|
|
x86_64) ;;
|
|
|
|
*) msg_error "Can only be built from x86_64: https://github.com/hardkernel/u-boot/issues/23\n" ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
make_build_args="ARCH=arm"
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
make_build_args+=" CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
|
|
|
|
else
|
|
|
|
make_build_args+=" HOSTARCH=arm"
|
|
|
|
fi
|
|
|
|
|
2016-05-04 17:15:49 +00:00
|
|
|
post_extract() {
|
|
|
|
touch include/stddef.h # musl hack
|
2016-05-06 12:34:53 +00:00
|
|
|
sed -i '1itypedef unsigned long ulong;' \
|
|
|
|
include/image.h tools/mkimage.h tools/proftool.c
|
2016-05-04 17:15:49 +00:00
|
|
|
}
|
|
|
|
do_configure() {
|
|
|
|
unset CFLAGS CXXFLAGS LDFLAGS
|
|
|
|
|
2016-05-06 12:34:53 +00:00
|
|
|
make ${make_build_args} distclean
|
|
|
|
make ${make_build_args} odroidc2_config
|
2016-05-04 17:15:49 +00:00
|
|
|
}
|
|
|
|
do_build() {
|
|
|
|
unset CFLAGS CXXFLAGS LDFLAGS
|
2016-05-06 12:34:53 +00:00
|
|
|
|
|
|
|
make ${makejobs} ${make_build_args}
|
2016-05-04 17:15:49 +00:00
|
|
|
}
|
|
|
|
do_install() {
|
|
|
|
vmkdir boot
|
|
|
|
vinstall sd_fuse/bl1.bin.hardkernel 644 boot
|
|
|
|
vinstall sd_fuse/u-boot.bin 644 boot
|
|
|
|
vinstall sd_fuse/sd_fusing.sh 755 boot
|
|
|
|
vinstall ${FILESDIR}/boot.ini 644 boot
|
|
|
|
}
|