3 Commits

Author SHA1 Message Date
Tobias Opel dd5c86e65c cleanups 2020-04-10 20:32:22 +02:00
Tobias Opel 57e84f6aec build with lpddr666 2020-04-10 20:30:21 +02:00
Kabbone dad7ec2e57 changes for SPL TPL u-boot 2020-04-10 10:01:36 +02:00
14 changed files with 53 additions and 27 deletions
BIN
View File
Binary file not shown.
+21
View File
@@ -0,0 +1,21 @@
# After modifying, run ./mkscr
# MAC address (use spaces instead of colons)
setenv macaddr da 19 c8 7a 6d f4
#part uuid ${devtype} ${devnum}:${bootpart} uuid
setenv bootargs console=ttyS2,1500000 root=LABEL=ROOTFS rootfstype=btrfs rootflags=subvol=@ rw rootwait earlycon=uart8250,mmio32,0xff130000 audit=0
setenv fdtfile rockchip/rk3328-rock64.dtb
if load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /boot/Image; then
if load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /boot/dtbs/${fdtfile}; then
fdt addr ${fdt_addr_r}
fdt resize
fdt set /ethernet@ff540000 local-mac-address "[${macaddr}]"
if load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} /boot/initramfs-linux.img; then
booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
else
booti ${kernel_addr_r} - ${fdt_addr_r};
fi;
fi;
fi
Binary file not shown.
Executable
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
if [[ ! -x /usr/bin/mkimage ]]; then
echo "mkimage not found. Please install uboot-tools:"
echo " pacman -S uboot-tools"
exit 1
fi
mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d boot.txt boot.scr
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+19 -21
View File
@@ -1,40 +1,41 @@
# U-Boot: Rock64 # U-Boot: Rock64
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org> # Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
buildarch=8
pkgname=uboot-rock64 pkgname=uboot-rock64
pkgver=2020.01 pkgver=2020.01
pkgrel=3 pkgrel=2
pkgdesc="U-Boot for Rock64" pkgdesc="U-Boot for Rock64"
arch=('aarch64') arch=('aarch64')
url='http://www.denx.de/wiki/U-Boot/WebHome' url='http://www.denx.de/wiki/U-Boot/WebHome'
license=('GPL') license=('GPL')
backup=('boot/boot.txt' 'boot/boot.scr') backup=('boot/boot.txt' 'boot/boot.scr')
makedepends=('bc' 'git' 'rockchip-tools' 'python' 'swig' 'dtc') makedepends=('bc' 'git' 'python' 'swig' 'dtc')
install=${pkgname}.install install=${pkgname}.install
_commit_rkbin=15a3e065a49ba7981945d725207618e92ebe8ebb _commit_rkbin=15a3e065a49ba7981945d725207618e92ebe8ebb
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver/rc/-rc}.tar.bz2" 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" "git+https://github.com/rockchip-linux/rkbin.git#commit=$_commit_rkbin"
'rk3328trust.ini'
'boot.txt' 'boot.txt'
'mkscr' 'mkscr')
'btrfs_extentio.patch')
md5sums=('b6b2e0787b6874e6b57da0a065a84f5a' md5sums=('b6b2e0787b6874e6b57da0a065a84f5a'
'SKIP' 'SKIP'
'48946b910716b90d81f47caafb752fef'
'5f1089c471f39b303bccbb9e1fc196f7' '5f1089c471f39b303bccbb9e1fc196f7'
'021623a04afd29ac3f368977140cfbfd' '021623a04afd29ac3f368977140cfbfd')
'51ff4b7c8cf8833df2f208fac7fafde5')
prepare() { prepare() {
cd ${srcdir}/u-boot-${pkgver/rc/-rc}
cp ../rkbin/bin/rk33/rk322xh_bl31_v1.43.elf ./bl31.elf
cp ../rkbin/bin/rk33/rk322xh_bl32_v1.54.bin ./bl32.bin
sed -i 's/lpddr3-1600/lpddr3-666/g' arch/arm/dts/rk3328-rock64-u-boot.dtsi
cd ${srcdir}/u-boot-${pkgver/rc/-rc}/configs cd ${srcdir}/u-boot-${pkgver/rc/-rc}/configs
echo 'CONFIG_CMD_BTRFS=y' >> rock64-rk3328_defconfig echo 'CONFIG_CMD_BTRFS=y' >> rock64-rk3328_defconfig
echo 'CONFIG_FS_BTRFS=y' >> rock64-rk3328_defconfig echo 'CONFIG_FS_BTRFS=y' >> rock64-rk3328_defconfig
echo 'CONFIG_NETCONSOLE=y' >> rock64-rk3328_defconfig # echo 'CONFIG_NETCONSOLE=y' >> rock64-rk3328_defconfig
echo 'CONFIG_IDENT_STRING=" Arch Linux ARM"' >> rock64-rk3328_defconfig echo 'CONFIG_IDENT_STRING=" Arch Linux ARM"' >> rock64-rk3328_defconfig
cd ${srcdir}/u-boot-${pkgver/rc/-rc}/fs/btrfs
patch --forward --strip=3 --input="${srcdir}/btrfs_extentio.patch" # cd ${srcdir}/u-boot-${pkgver/rc/-rc}/fs/btrfs
# patch --forward --strip=3 --input="${srcdir}/btrfs_extentio.patch"
} }
build() { build() {
@@ -42,9 +43,10 @@ build() {
unset CLFAGS CXXFLAGS CPPFLAGS LDFLAGS unset CLFAGS CXXFLAGS CPPFLAGS LDFLAGS
make distclean # make distclean
make rock64-rk3328_defconfig make rock64-rk3328_defconfig
make -j4 EXTRAVERSION=-${pkgrel} make -j4 EXTRAVERSION=-${pkgrel}
make -j4 EXTRAVERSION=-${pkgrel} u-boot.itb
} }
package() { package() {
@@ -52,14 +54,10 @@ package() {
mkdir -p "${pkgdir}/boot" mkdir -p "${pkgdir}/boot"
tools/mkimage -n rk3328 -T rksd -d ../rkbin/bin/rk33/rk3328_ddr_333MHz_v1.16.bin "${pkgdir}/boot/idbloader.img" tools/mkimage -n rk3328 -T rksd -d ./tpl/u-boot-tpl.bin "${pkgdir}/boot/rksd_loader.img"
cat ../rkbin/bin/rk33/rk322xh_miniloader_v2.50.bin >> "${pkgdir}/boot/idbloader.img" cat ./spl/u-boot-spl.bin >> "${pkgdir}/boot/rksd_loader.img"
loaderimage --pack --uboot u-boot-dtb.bin "${pkgdir}/boot/uboot.img" 0x200000 cp ./u-boot.itb "${pkgdir}/boot/u-boot.itb"
trust_merger ../rk3328trust.ini
cp u-boot-dtb.bin trust.img "${pkgdir}/boot"
tools/mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d ../boot.txt "${pkgdir}/boot/boot.scr" 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 cp ../{boot.txt,mkscr} "${pkgdir}"/boot
+4 -6
View File
@@ -3,14 +3,12 @@ flash_uboot() {
echo "Do you want to do this now? [y|N]" echo "Do you want to do this now? [y|N]"
read -r shouldwe read -r shouldwe
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
dd if=/boot/idbloader.img of=/dev/mmcblk0 seek=64 conv=notrunc dd if=/boot/rksd_loader.img of=/dev/mmcblk0 seek=64 conv=notrunc
dd if=/boot/uboot.img of=/dev/mmcblk0 seek=16384 conv=notrunc dd if=/boot/u-boot.itb of=/dev/mmcblk0 seek=16384 conv=notrunc
dd if=/boot/trust.img of=/dev/mmcblk0 seek=24576 conv=notrunc
else else
echo "You can do this later by running:" 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/rksd_loader.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/u-boot.itb of=/dev/mmcblk0 seek=16384 conv=notrunc"
echo "# dd if=/boot/trust.img of=/dev/mmcblk0 seek=24576 conv=notrunc"
fi fi
} }