alarm/uboot-rock64 to 2020.07-1 (#1823)

Signed-off-by: Kabbone <tobias@opel-online.de>
This commit is contained in:
Kabbone 2020-08-18 03:36:13 +02:00 committed by GitHub
parent 4b52b8a7e8
commit f2bf6fae06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 41 deletions

View file

@ -4,50 +4,55 @@
buildarch=8
pkgname=uboot-rock64
pkgver=2018.03
pkgver=2020.07
pkgrel=1
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')
makedepends=('bc' 'git' 'rockchip-tools')
makedepends=('bc' 'git' 'python' 'swig' 'dtc' 'uboot-tools')
install=${pkgname}.install
_commit_rkbin=f64ded672836b47db3f6a0d04d8ccb4180fb3d55
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver/rc/-rc}.tar.bz2"
"git+https://github.com/rockchip-linux/rkbin.git#commit=$_commit_rkbin"
'rk3328trust.ini'
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
"https://github.com/ARM-software/arm-trusted-firmware/archive/v2.3.tar.gz"
'boot.txt'
'mkscr')
md5sums=('02922bdf0ee003fe25bfc32749ffdeab'
'SKIP'
'15d010d12cb4bbaa5488505cc5c14147'
md5sums=('86e51eeccd15e658ad1df943a0edf622'
'06ad72bdf63b922a3f3865d81f5d9ad2'
'c926f318d8fa7a5c89108331cbd3f8e2'
'021623a04afd29ac3f368977140cfbfd')
prepare() {
cd ${srcdir}/arm-trusted-firmware-2.3
make PLAT=rk3328 all
cd ${srcdir}/u-boot-${pkgver}
cp ../arm-trusted-firmware-2.3/build/rk3328/release/bl31/bl31.elf ./bl31.elf
cd ${srcdir}/u-boot-${pkgver}/configs
echo 'CONFIG_IDENT_STRING=" Arch Linux ARM"' >> rock64-rk3328_defconfig
}
build() {
cd u-boot-${pkgver/rc/-rc}
cd ${srcdir}/u-boot-${pkgver}
unset CLFAGS CXXFLAGS CPPFLAGS LDFLAGS
make evb-rk3328_defconfig
echo 'CONFIG_IDENT_STRING=" Arch Linux ARM"' >> .config
make rock64-rk3328_defconfig
make EXTRAVERSION=-${pkgrel}
make EXTRAVERSION=-${pkgrel} u-boot.itb
}
package() {
cd u-boot-${pkgver/rc/-rc}
cd u-boot-${pkgver}
mkdir -p "${pkgdir}/boot"
tools/mkimage -n rk3328 -T rksd -d ../rkbin/rk33/rk3328_ddr_786MHz_v1.06.bin "${pkgdir}/boot/idbloader.img"
cat ../rkbin/rk33/rk3328_miniloader_v2.43.bin >> "${pkgdir}/boot/idbloader.img"
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"
loaderimage --pack --uboot u-boot-dtb.bin "${pkgdir}/boot/uboot.img" 0x200000
trust_merger ../rk3328trust.ini
cp u-boot-dtb.bin trust.img "${pkgdir}/boot"
cp ./u-boot.itb "${pkgdir}/boot/u-boot.itb"
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

View file

@ -1,15 +0,0 @@
[VERSION]
MAJOR=1
MINOR=2
[BL30_OPTION]
SEC=0
[BL31_OPTION]
SEC=1
PATH=../rkbin/rk33/rk3328_bl31_v1.34.bin
ADDR=0x10000
[BL32_OPTION]
SEC=0
[BL33_OPTION]
SEC=0
[OUTPUT]
PATH=trust.img

View file

@ -3,14 +3,13 @@ flash_uboot() {
echo "Do you want to do this now? [y|N]"
read -r shouldwe
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
dd if=/boot/idbloader.img of=/dev/mmcblk0 seek=64 conv=notrunc
dd if=/boot/uboot.img of=/dev/mmcblk0 seek=16384 conv=notrunc
dd if=/boot/trust.img of=/dev/mmcblk0 seek=24576 conv=notrunc
dd if=/boot/rksd_loader.img of=/dev/mmcblk0 seek=64 conv=notrunc
dd if=/boot/u-boot.itb of=/dev/mmcblk0 seek=16384 conv=notrunc
else
echo "You can do this later by running:"
echo "# dd if=/boot/idbloader.img of=/dev/mmcblk0 seek=64 conv=notrunc"
echo "# dd if=/boot/uboot.img of=/dev/mmcblk0 seek=16384 conv=notrunc"
echo "# dd if=/boot/trust.img of=/dev/mmcblk0 seek=24576 conv=notrunc"
echo "# dd if=/boot/rksd_loader.img of=/dev/mmcblk0 seek=64 conv=notrunc"
echo "# dd if=/boot/u-boot.itb of=/dev/mmcblk0 seek=16384 conv=notrunc"
echo "# if you are using the emmc interface, take care to use the correct device identifier! (probably mmcblk1)"
fi
}