ARCH="aarch64" BOOT_SOC="rk3568" # kernel section KERNEL="https://github.com/armbian/linux-rockchip.git#rk-6.1-rkr3" PRESET_CONFIG="kernel_ok3568_defconfig" DTB="dtbs/rockchip/rk3568-ok3568c" # u-boot section UBOOT="https://github.com/radxa/u-boot.git" UBOOT_VERSION="next-dev-v2024.03" UBOOT_CONFIG="rk3568-ok3568c_defconfig" # cmdline # root=/dev/mmcblk1p2 rootwait rootfstype=ext4 splash=verbose console=ttyS2,1500000 console=tty1 consoleblank=0 loglevel=1 earlycon=uart8250,mmio32,0xfe660000 console=ttyFIQ0 cma=256M androidboot.fwver=bl31-v1.44,uboot-rmbian-201-11/11/2024 CMDLINE="earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 console=tty1 consoleblank=0" EXTRA_PKGS="uboot-tools dracut" # disk section # /boot is vfat partition BOOT_FSTYPE="vfat" BOOT_SIZE="256MB" # / is ext4 partition ROOT_SIZE="1500MB" ROOT_FSTYPE="ext4" # platform section # # put it in blobs dir RK_DDR="rk3568_ddr_1560MHz_v1.23.bin" BL31="rk3568_bl31_v1.44.elf" UBOOT_BUILD="make KCFLAGS='-Wno-error' BL31={BL31} spl/u-boot-spl.bin u-boot.dtb u-boot.itb CROSS_COMPILE='{ARCH}-linux-gnu-'" MKIMAGE_CMD="tools/mkimage -n {BOOT_SOC} -T rksd -d {RK_DDR}:spl/u-boot-spl.bin idbloader.img" # url to download rockchip bootloader blobs BLOBS_URL="https://github.com/rockchip-linux/rkbin/raw/refs/heads/master/bin/rk35/" BOOT_IDB="idbloader.img" BOOT_ITB="u-boot.itb" UINITRD="yes" # make BL31=rk3568_bl31_v1.44.elf spl/u-boot-spl.bin u-boot.dtb u-boot.itb CROSS_COMPILE="aarch64-linux-gnu-" # # dd if=idbloader.img of=/dev/loop1 seek=64 conv=notrunc status=none # dd if=u-boot.itb of=/dev/loop1 seek=16384 conv=notrunc status=none # # sgdisk --zap-all /dev/loop0 # sgdisk --new=1:15M:+256M --typecode=1:8300 /dev/loop0 # sgdisk --new=2:0:0 --typecode=2:8300 /dev/loop0 # # dracut --regenerate-all --force # mkimage -A arm64 -O linux -T ramdisk -C gzip -n uInitrd -d /boot/initramfs-6.1.75.img /boot/uInitrd # mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr