Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
b171f1e707 | |||
1346324309 | |||
eed1339b3f | |||
b3c965ead4 | |||
81f2b199ae | |||
a80a3afe28 | |||
|
806465108d | ||
|
dd5c86e65c | ||
|
57e84f6aec | ||
dad7ec2e57 | |||
|
2b0c9e3fcc | ||
|
42d1273517 | ||
|
7abffd5787 | ||
|
cb6d339416 |
17
README.md
17
README.md
@ -1,3 +1,18 @@
|
|||||||
# rock64
|
# rock64
|
||||||
|
|
||||||
changes, Packages, Information
|
|
||||||
|
<h3>commands to flash the files (includes in uboot-rock64.install)</h3>
|
||||||
|
|
||||||
|
dd if=rksd_load.img of=/dev/mmcblk1 seek=64 conv=notrunc\
|
||||||
|
dd if=u-boot.itb of=/dev/mmcblk1 seek=16384 conv=notrunc
|
||||||
|
|
||||||
|
|
||||||
|
<h5>layout, see</h5>
|
||||||
|
|
||||||
|
http://opensource.rock-chips.com/wiki_U-Boot<br>
|
||||||
|
http://opensource.rock-chips.com/wiki_Boot_option
|
||||||
|
|
||||||
|
![alt text](./Rockchip_bootflow.jpg "Partition Layout")
|
||||||
|
|
||||||
|
ARM-Trusted-Firmware:
|
||||||
|
http://opensource.rock-chips.com/wiki_ATF
|
||||||
|
BIN
Rockchip_bootflow.jpg
Normal file
BIN
Rockchip_bootflow.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 127 KiB |
@ -1,7 +0,0 @@
|
|||||||
# H1 How to build your own idbloader.img file
|
|
||||||
|
|
||||||
```
|
|
||||||
$ mkimage -n rk3328 -T rksd -d rk3328_ddr_333MHz_v1.13.bin idbloader.img
|
|
||||||
$ cat rk3328_miniloader_v2.46.bin >> idbloader.img
|
|
||||||
# dd if=idbloader.img of=/dev/sdx seek=64 conv=notrunc
|
|
||||||
```
|
|
BIN
firmwares/bl31.elf
Executable file
BIN
firmwares/bl31.elf
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
images/boot.scr
Normal file
BIN
images/boot.scr
Normal file
Binary file not shown.
22
images/boot.txt
Normal file
22
images/boot.txt
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# 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=UUID=${uuid} rw rootwait earlycon=uart8250,mmio32,0xff130000 audit=0
|
||||||
|
#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.
Binary file not shown.
9
images/mkscr
Executable file
9
images/mkscr
Executable 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
|
BIN
images/rksd_loader.img
Normal file
BIN
images/rksd_loader.img
Normal file
Binary file not shown.
BIN
images/trust.img
BIN
images/trust.img
Binary file not shown.
Binary file not shown.
BIN
images/u-boot.itb
Normal file
BIN
images/u-boot.itb
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
packages/uboot-rock64-2020.07-1-aarch64.pkg.tar.zst
Normal file
BIN
packages/uboot-rock64-2020.07-1-aarch64.pkg.tar.zst
Normal file
Binary file not shown.
@ -1,54 +1,62 @@
|
|||||||
# 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.07
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
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' 'uboot-tools')
|
||||||
install=${pkgname}.install
|
install=${pkgname}.install
|
||||||
_commit_rkbin=15a3e065a49ba7981945d725207618e92ebe8ebb
|
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
|
||||||
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver/rc/-rc}.tar.bz2"
|
"https://github.com/ARM-software/arm-trusted-firmware/archive/v2.3.tar.gz"
|
||||||
"git+https://github.com/rockchip-linux/rkbin.git#commit=$_commit_rkbin"
|
|
||||||
'rk3328trust.ini'
|
|
||||||
'boot.txt'
|
'boot.txt'
|
||||||
'mkscr')
|
'mkscr')
|
||||||
md5sums=('b6b2e0787b6874e6b57da0a065a84f5a'
|
md5sums=('86e51eeccd15e658ad1df943a0edf622'
|
||||||
'SKIP'
|
'06ad72bdf63b922a3f3865d81f5d9ad2'
|
||||||
'48946b910716b90d81f47caafb752fef'
|
'a4f9a9f05a4e41f54b60a51318ffca36'
|
||||||
'c926f318d8fa7a5c89108331cbd3f8e2'
|
|
||||||
'021623a04afd29ac3f368977140cfbfd')
|
'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
|
||||||
|
|
||||||
|
sed -i 's/800/600/g' arch/arm/dts/rk3328-sdram-lpddr3-1600.dtsi
|
||||||
|
|
||||||
|
cd ${srcdir}/u-boot-${pkgver}/configs
|
||||||
|
# echo 'CONFIG_CMD_BTRFS=y' >> rock64-rk3328_defconfig
|
||||||
|
# echo 'CONFIG_FS_BTRFS=y' >> rock64-rk3328_defconfig
|
||||||
|
# echo 'CONFIG_NETCONSOLE=y' >> rock64-rk3328_defconfig
|
||||||
|
echo 'CONFIG_IDENT_STRING=" Arch Linux ARM"' >> rock64-rk3328_defconfig
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd u-boot-${pkgver/rc/-rc}
|
cd ${srcdir}/u-boot-${pkgver}
|
||||||
|
|
||||||
unset CLFAGS CXXFLAGS CPPFLAGS LDFLAGS
|
unset CLFAGS CXXFLAGS CPPFLAGS LDFLAGS
|
||||||
|
|
||||||
make distclean
|
# make distclean
|
||||||
make evb-rk3328_defconfig
|
make rock64-rk3328_defconfig
|
||||||
echo 'CONFIG_IDENT_STRING=" Arch Linux ARM"' >> .config
|
|
||||||
make -j4 EXTRAVERSION=-${pkgrel}
|
make -j4 EXTRAVERSION=-${pkgrel}
|
||||||
|
make -j4 EXTRAVERSION=-${pkgrel} u-boot.itb
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd u-boot-${pkgver/rc/-rc}
|
cd u-boot-${pkgver}
|
||||||
|
|
||||||
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,7 +4,8 @@
|
|||||||
setenv macaddr da 19 c8 7a 6d f4
|
setenv macaddr da 19 c8 7a 6d f4
|
||||||
|
|
||||||
part uuid ${devtype} ${devnum}:${bootpart} uuid
|
part uuid ${devtype} ${devnum}:${bootpart} uuid
|
||||||
setenv bootargs console=ttyS2,1500000 root=PARTUUID=${uuid} rw rootwait earlycon=uart8250,mmio32,0xff130000
|
setenv bootargs console=ttyS2,1500000 root=UUID=${uuid} rw rootwait earlycon=uart8250,mmio32,0xff130000 audit=0
|
||||||
|
#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
|
setenv fdtfile rockchip/rk3328-rock64.dtb
|
||||||
|
|
||||||
if load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /boot/Image; then
|
if load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /boot/Image; then
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
[VERSION]
|
|
||||||
MAJOR=1
|
|
||||||
MINOR=2
|
|
||||||
[BL30_OPTION]
|
|
||||||
SEC=0
|
|
||||||
[BL31_OPTION]
|
|
||||||
SEC=1
|
|
||||||
PATH=../rkbin/bin/rk33/rk322xh_bl31_v1.43.elf
|
|
||||||
ADDR=0x40000
|
|
||||||
[BL32_OPTION]
|
|
||||||
SEC=1
|
|
||||||
PATH=../rkbin/bin/rk33/rk322xh_bl32_v1.54.bin
|
|
||||||
ADDR=0x08400000
|
|
||||||
[BL33_OPTION]
|
|
||||||
SEC=0
|
|
||||||
[OUTPUT]
|
|
||||||
PATH=trust.img
|
|
@ -1,16 +1,14 @@
|
|||||||
flash_uboot() {
|
flash_uboot() {
|
||||||
echo "A new U-Boot version needs to be flashed onto /dev/mmcblk0."
|
echo "A new U-Boot version needs to be flashed onto /dev/mmcblk1."
|
||||||
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/mmcblk1 seek=64 conv=notrunc
|
||||||
dd if=/boot/uboot.img of=/dev/mmcblk0 seek=16384 conv=notrunc
|
dd if=/boot/u-boot.itb of=/dev/mmcblk1 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/mmcblk1 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/mmcblk1 seek=16384 conv=notrunc"
|
||||||
echo "# dd if=/boot/trust.img of=/dev/mmcblk0 seek=24576 conv=notrunc"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,3 +22,5 @@ post_install() {
|
|||||||
post_upgrade() {
|
post_upgrade() {
|
||||||
flash_uboot
|
flash_uboot
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##lsblk -dnpo name /dev/disk/by-partuuid/785dd377-de81-44f8-8cc9-0dcdc9a5c713
|
||||||
|
Loading…
Reference in New Issue
Block a user