2020-04-10 21:39:49 +02:00
|
|
|
#U-Boot: Rock64
|
2020-03-22 14:47:11 +01:00
|
|
|
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
|
|
|
|
pkgname=uboot-rock64
|
2020-04-10 21:39:49 +02:00
|
|
|
pkgver=2020.04
|
2020-04-11 14:56:27 +02:00
|
|
|
pkgrel=3
|
2020-03-22 14:47:11 +01:00
|
|
|
pkgdesc="U-Boot for Rock64"
|
|
|
|
arch=('aarch64')
|
|
|
|
url='http://www.denx.de/wiki/U-Boot/WebHome'
|
|
|
|
license=('GPL')
|
|
|
|
backup=('boot/boot.txt' 'boot/boot.scr')
|
2020-04-10 20:30:21 +02:00
|
|
|
makedepends=('bc' 'git' 'python' 'swig' 'dtc')
|
2020-03-22 14:47:11 +01:00
|
|
|
install=${pkgname}.install
|
2020-03-22 15:13:10 +01:00
|
|
|
_commit_rkbin=15a3e065a49ba7981945d725207618e92ebe8ebb
|
2020-04-10 21:39:49 +02:00
|
|
|
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver/rc/-rc}-rc5.tar.bz2"
|
2020-04-11 14:56:27 +02:00
|
|
|
"https://github.com/ARM-software/arm-trusted-firmware/archive/v2.3-rc0.tar.gz"
|
2020-03-22 14:47:11 +01:00
|
|
|
'boot.txt'
|
2020-04-10 20:30:21 +02:00
|
|
|
'mkscr')
|
2020-04-10 21:39:49 +02:00
|
|
|
md5sums=('86f167cfe3a840ac47ddba868d6f1576'
|
2020-04-11 14:56:27 +02:00
|
|
|
'd1a2ae6b8b7a86a661db4079dd08b941'
|
2020-04-11 13:51:51 +02:00
|
|
|
'a4f9a9f05a4e41f54b60a51318ffca36'
|
2020-04-10 20:30:21 +02:00
|
|
|
'021623a04afd29ac3f368977140cfbfd')
|
2020-04-07 16:38:55 +02:00
|
|
|
|
|
|
|
prepare() {
|
2020-04-11 14:56:27 +02:00
|
|
|
cd ${srcdir}/arm-trusted-firmware-2.3-rc0
|
|
|
|
make PLAT=rk3328 all
|
|
|
|
|
2020-04-10 21:39:49 +02:00
|
|
|
mv ${srcdir}/u-boot-${pkgver}{-rc5,}
|
2020-04-10 10:01:36 +02:00
|
|
|
cd ${srcdir}/u-boot-${pkgver/rc/-rc}
|
2020-04-11 14:56:27 +02:00
|
|
|
cp ../arm-trusted-firmware-2.3-rc0/build/rk3328/release/bl31/bl31.elf ./bl31.elf
|
2020-04-10 10:01:36 +02:00
|
|
|
|
2020-04-11 13:51:51 +02:00
|
|
|
# sed -i 's/lpddr3-1600/lpddr3-666/g' arch/arm/dts/rk3328-rock64-u-boot.dtsi
|
|
|
|
sed -i 's/800/600/g' arch/arm/dts/rk3328-sdram-lpddr3-1600.dtsi
|
2020-04-10 20:30:21 +02:00
|
|
|
|
2020-04-07 16:38:55 +02:00
|
|
|
cd ${srcdir}/u-boot-${pkgver/rc/-rc}/configs
|
|
|
|
echo 'CONFIG_CMD_BTRFS=y' >> rock64-rk3328_defconfig
|
|
|
|
echo 'CONFIG_FS_BTRFS=y' >> rock64-rk3328_defconfig
|
2020-04-10 10:01:36 +02:00
|
|
|
# echo 'CONFIG_NETCONSOLE=y' >> rock64-rk3328_defconfig
|
2020-04-07 16:38:55 +02:00
|
|
|
echo 'CONFIG_IDENT_STRING=" Arch Linux ARM"' >> rock64-rk3328_defconfig
|
2020-04-10 10:01:36 +02:00
|
|
|
|
|
|
|
# cd ${srcdir}/u-boot-${pkgver/rc/-rc}/fs/btrfs
|
|
|
|
# patch --forward --strip=3 --input="${srcdir}/btrfs_extentio.patch"
|
2020-04-07 16:38:55 +02:00
|
|
|
}
|
2020-03-22 14:47:11 +01:00
|
|
|
|
|
|
|
build() {
|
2020-04-07 16:38:55 +02:00
|
|
|
cd ${srcdir}/u-boot-${pkgver/rc/-rc}
|
2020-03-22 14:47:11 +01:00
|
|
|
|
|
|
|
unset CLFAGS CXXFLAGS CPPFLAGS LDFLAGS
|
|
|
|
|
2020-04-10 10:01:36 +02:00
|
|
|
# make distclean
|
2020-04-11 14:56:27 +02:00
|
|
|
make rock64-rk3328_defconfig
|
|
|
|
make -j4 EXTRAVERSION=-${pkgrel}
|
|
|
|
make -j4 EXTRAVERSION=-${pkgrel} u-boot.itb
|
2020-03-22 14:47:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd u-boot-${pkgver/rc/-rc}
|
|
|
|
|
|
|
|
mkdir -p "${pkgdir}/boot"
|
|
|
|
|
2020-04-10 10:01:36 +02:00
|
|
|
tools/mkimage -n rk3328 -T rksd -d ./tpl/u-boot-tpl.bin "${pkgdir}/boot/rksd_loader.img"
|
|
|
|
cat ./spl/u-boot-spl.bin >> "${pkgdir}/boot/rksd_loader.img"
|
2020-03-22 14:47:11 +01:00
|
|
|
|
2020-04-10 10:01:36 +02:00
|
|
|
cp ./u-boot.itb "${pkgdir}/boot/u-boot.itb"
|
2020-03-22 14:47:11 +01:00
|
|
|
|
|
|
|
tools/mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d ../boot.txt "${pkgdir}/boot/boot.scr"
|
|
|
|
cp ../{boot.txt,mkscr} "${pkgdir}"/boot
|
|
|
|
}
|
2020-03-22 19:45:17 +01:00
|
|
|
|