Skip to content

Commit

Permalink
chore: add rockpi4c
Browse files Browse the repository at this point in the history
Add rockpi-4c

Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
frezbo committed Apr 6, 2022
1 parent 5bd5fad commit 6691342
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions u-boot/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ steps:
BANANAPI_M64_U_BOOT: bananapi_m64_u-boot
PINE64_U_BOOT: pine64_u-boot
ROCK_PI_4_RK3399_U_BOOT: rock-pi-4-rk3399_u-boot
ROCK_PI_4C_RK3399_U_BOOT: rock-pi-4c-rk3399_u-boot
JETSON_NANO_U_BOOT: jetson-nano_u-boot
prepare:
- |
Expand Down Expand Up @@ -104,6 +105,16 @@ steps:
patch -p1 < /pkg/rockpi4/patches/enable-boot-from-spi-flash.patch
make rock-pi-4-rk3399_defconfig
sed -i "s/CONFIG_TOOLS_LIBCRYPTO=y/# CONFIG_TOOLS_LIBCRYPTO is not set/" .config
# rock-pi-4c-rk3399
- |
mkdir ${ROCK_PI_4C_RK3399_U_BOOT}
tar -xjf u-boot.tar.bz2 --strip-components=1 -C ${ROCK_PI_4C_RK3399_U_BOOT}
cd ${ROCK_PI_4C_RK3399_U_BOOT}
patch -p1 < /pkg/rockpi4/patches/board-rock-pi-4-enable-spi-flash.patch
patch -p1 < /pkg/rockpi4/patches/general-add-xtx-spi-nor-chips.patch
patch -p1 < /pkg/rockpi4/patches/enable-boot-from-spi-flash.patch
make rock-pi-4c-rk3399_defconfig
sed -i "s/CONFIG_TOOLS_LIBCRYPTO=y/# CONFIG_TOOLS_LIBCRYPTO is not set/" .config
# jetson nano
- |
mkdir ${JETSON_NANO_U_BOOT}
Expand Down Expand Up @@ -166,6 +177,18 @@ steps:
cd ${ROCK_PI_4_RK3399_U_BOOT}
make -j $(nproc) HOSTLDLIBS_mkimage="-lssl -lcrypto"
# create spi image
# https://github.com/armbian/build/blob/09e416e31cc01ece4533a65f02a470a4c21b90ea/config/sources/families/include/rockchip64_common.inc#L173-L178
tools/mkimage -n rk3399 -T rkspi -d tpl/u-boot-tpl.bin:spl/u-boot-spl.bin rkspi_tpl_spl.img
dd if=/dev/zero of=rkspi_loader.img count=8128 status=none
dd if=rkspi_tpl_spl.img of=rkspi_loader.img conv=notrunc status=none
dd if=u-boot.itb of=rkspi_loader.img seek=768 conv=notrunc status=none
# rock-pi-4c-rk3399
- |
export BL31=$(pwd)/${RK3399_ARM_TRUSTED_FIRMWARE}/build/rk3399/release/bl31/bl31.elf
cd ${ROCK_PI_4C_RK3399_U_BOOT}
make -j $(nproc) HOSTLDLIBS_mkimage="-lssl -lcrypto"
# create spi image
# https://github.com/armbian/build/blob/09e416e31cc01ece4533a65f02a470a4c21b90ea/config/sources/families/include/rockchip64_common.inc#L173-L178
tools/mkimage -n rk3399 -T rkspi -d tpl/u-boot-tpl.bin:spl/u-boot-spl.bin rkspi_tpl_spl.img
Expand Down Expand Up @@ -205,6 +228,13 @@ steps:
# cp spi image
cp -v ${ROCK_PI_4_RK3399_U_BOOT}/rkspi_loader.img /rootfs/rockpi_4
# rock-pi-4c-rk3399
- |
mkdir -p /rootfs/rockpi_4c
cp -v ${ROCK_PI_4C_RK3399_U_BOOT}/u-boot-rockchip.bin /rootfs/rockpi_4c
# cp spi image
cp -v ${ROCK_PI_4C_RK3399_U_BOOT}/rkspi_loader.img /rootfs/rockpi_4c
# jetson nano
- |
mkdir -p /rootfs/jetson_nano
Expand Down

0 comments on commit 6691342

Please sign in to comment.