mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Merged rock-s0 and rockpi-s boards fully into rockchip64 family (#7382)
Also removed some obsolete board specific boot script tweaks
This commit is contained in:
@@ -1,15 +1,13 @@
|
|||||||
# Rockchip RK3308 quad core 512MB SoC WiFi
|
# Rockchip RK3308 quad core 512MB SoC WiFi
|
||||||
# https://radxa.com/products/rocks/s0
|
# https://radxa.com/products/rocks/s0
|
||||||
|
|
||||||
|
# This board is very similar to the older RockPi-S model
|
||||||
|
source "${SRC}/config/boards/rockpi-s.conf"
|
||||||
|
|
||||||
BOARD_NAME="Rock S0"
|
BOARD_NAME="Rock S0"
|
||||||
BOARDFAMILY="rock-s0"
|
|
||||||
BOARD_MAINTAINER="brentr"
|
BOARD_MAINTAINER="brentr"
|
||||||
|
BOARDFAMILY="rockchip64"
|
||||||
BOOTCONFIG="rock-s0-rk3308_defconfig"
|
BOOTCONFIG="rock-s0-rk3308_defconfig"
|
||||||
DEFAULT_CONSOLE="serial"
|
BOOT_FDT_FILE="rockchip/rk3308-rock-s0.dtb"
|
||||||
SERIALCON="ttyS0"
|
|
||||||
KERNEL_TARGET="current,edge"
|
KERNEL_TARGET="current,edge"
|
||||||
KERNEL_TEST_TARGET="current"
|
KERNEL_TEST_TARGET="current"
|
||||||
BOOT_FDT_FILE="rockchip/rk3308-rock-s0.dtb"
|
|
||||||
MODULES_BLACKLIST="rockchipdrm analogix_dp dw_mipi_dsi dw_hdmi gpu_sched lima hantro_vpu panfrost"
|
|
||||||
HAS_VIDEO_OUTPUT="no"
|
|
||||||
BOOTBRANCH_BOARD="tag:v2022.04"
|
|
||||||
BOOTPATCHDIR="u-boot-rockchip64-v2022.04"
|
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
# Rockchip RK3308 quad core 256-512MB SoC WiFi
|
# Rockchip RK3308 quad core 256-512MB SoC WiFi
|
||||||
|
# https://radaxa.com/products/rockpi/pis
|
||||||
BOARD_NAME="Rockpi S"
|
BOARD_NAME="Rockpi S"
|
||||||
BOARDFAMILY="rockchip64"
|
BOARDFAMILY="rockchip64"
|
||||||
BOARD_MAINTAINER="brentr"
|
BOARD_MAINTAINER="brentr"
|
||||||
BOOTCONFIG="rock-pi-s-rk3308_defconfig"
|
BOOTCONFIG="rock-pi-s-rk3308_defconfig"
|
||||||
|
BOOT_FDT_FILE="rockchip/rk3308-rock-pi-s.dtb"
|
||||||
|
|
||||||
DEFAULT_CONSOLE="serial"
|
DEFAULT_CONSOLE="serial"
|
||||||
MODULES_LEGACY="g_serial"
|
|
||||||
SERIALCON="ttyS0"
|
SERIALCON="ttyS0"
|
||||||
KERNEL_TARGET="current,edge"
|
KERNEL_TARGET="current,edge"
|
||||||
KERNEL_TEST_TARGET="current"
|
KERNEL_TEST_TARGET="current"
|
||||||
BOOT_FDT_FILE="rockchip/rk3308-rock-pi-s.dtb"
|
|
||||||
MODULES_BLACKLIST="rockchipdrm analogix_dp dw_mipi_dsi dw_hdmi gpu_sched lima hantro_vpu panfrost"
|
MODULES_BLACKLIST="rockchipdrm analogix_dp dw_mipi_dsi dw_hdmi gpu_sched lima hantro_vpu panfrost"
|
||||||
HAS_VIDEO_OUTPUT="no"
|
HAS_VIDEO_OUTPUT="no"
|
||||||
BOOTBRANCH_BOARD="tag:v2022.04"
|
BOOTBRANCH_BOARD="tag:v2022.04"
|
||||||
@@ -40,8 +40,7 @@ function post_family_config___uboot_config() {
|
|||||||
display_alert "$BOARD" "u-boot ${BOOTBRANCH_BOARD} overrides" "info"
|
display_alert "$BOARD" "u-boot ${BOOTBRANCH_BOARD} overrides" "info"
|
||||||
unset uboot_custom_postprocess family_tweaks_bsp # disable stuff from rockchip64_common
|
unset uboot_custom_postprocess family_tweaks_bsp # disable stuff from rockchip64_common
|
||||||
|
|
||||||
BOOTSCRIPT=boot-rockpis.cmd:boot.cmd
|
BOOTSCRIPT=boot-rockchip64-ttyS0.cmd:boot.cmd
|
||||||
BOOTENV_FILE='rockpis.txt'
|
|
||||||
|
|
||||||
uboot_custom_postprocess() {
|
uboot_custom_postprocess() {
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
verbosity=1
|
|
||||||
extraargs=swiotlb=1024
|
|
||||||
@@ -4,21 +4,22 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
setenv load_addr "0x9000000"
|
setenv load_addr "0x9000000"
|
||||||
# Ensure the ever expanding kernel never overlaps initial device tree load area
|
|
||||||
setenv fdt_addr_r "0x7800000"
|
|
||||||
setenv overlay_error "false"
|
setenv overlay_error "false"
|
||||||
# default values
|
# default values
|
||||||
setenv rootdev "/dev/mmcblk0p1"
|
setenv rootdev "/dev/mmcblk0p1"
|
||||||
setenv verbosity "1"
|
setenv verbosity "1"
|
||||||
setenv console "both"
|
setenv console "both"
|
||||||
|
setenv bootlogo "false"
|
||||||
setenv rootfstype "ext4"
|
setenv rootfstype "ext4"
|
||||||
setenv docker_optimizations "on"
|
setenv docker_optimizations "on"
|
||||||
setenv earlycon "off"
|
setenv earlycon "off"
|
||||||
|
|
||||||
echo "Boot script loaded from ${devtype} ${devnum}"
|
test -n "${distro_bootpart}" || distro_bootpart=1
|
||||||
|
|
||||||
if test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then
|
echo "Boot script loaded from ${devtype} ${devnum}:${distro_bootpart}"
|
||||||
load ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt
|
|
||||||
|
if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}armbianEnv.txt; then
|
||||||
|
load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}armbianEnv.txt
|
||||||
env import -t ${load_addr} ${filesize}
|
env import -t ${load_addr} ${filesize}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -27,46 +28,53 @@ if test "${logo}" = "disabled"; then setenv logo "logo.nologo"; fi
|
|||||||
if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi
|
if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi
|
||||||
if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "console=ttyS0,1500000 ${consoleargs}"; fi
|
if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "console=ttyS0,1500000 ${consoleargs}"; fi
|
||||||
if test "${earlycon}" = "on"; then setenv consoleargs "earlycon ${consoleargs}"; fi
|
if test "${earlycon}" = "on"; then setenv consoleargs "earlycon ${consoleargs}"; fi
|
||||||
|
if test "${bootlogo}" = "true"; then
|
||||||
|
setenv consoleargs "splash plymouth.ignore-serial-consoles ${consoleargs}"
|
||||||
|
else
|
||||||
|
setenv consoleargs "splash=verbose ${consoleargs}"
|
||||||
|
fi
|
||||||
|
|
||||||
# get PARTUUID of first partition on SD/eMMC the boot script was loaded from
|
# get PARTUUID of first partition on SD/eMMC the boot script was loaded from
|
||||||
if test "${devtype}" = "mmc"; then part uuid mmc ${devnum}:1 partuuid; fi
|
if test "${devtype}" = "mmc"; then part uuid mmc ${devnum}:${distro_bootpart} partuuid; fi
|
||||||
|
|
||||||
setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}"
|
setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}"
|
||||||
|
|
||||||
if test "${docker_optimizations}" = "on"; then setenv bootargs "${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory"; fi
|
if test "${docker_optimizations}" = "on"; then setenv bootargs "${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory"; fi
|
||||||
|
|
||||||
load ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd
|
load ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} ${prefix}uInitrd
|
||||||
load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image
|
load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${prefix}Image
|
||||||
|
|
||||||
load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
|
load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
|
||||||
fdt addr ${fdt_addr_r}
|
fdt addr ${fdt_addr_r}
|
||||||
fdt resize 65536
|
fdt resize 65536
|
||||||
for overlay_file in ${overlays}; do
|
for overlay_file in ${overlays}; do
|
||||||
if load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then
|
if load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then
|
||||||
echo "Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo"
|
echo "Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo"
|
||||||
fdt apply ${load_addr} || setenv overlay_error "true"
|
fdt apply ${load_addr} || setenv overlay_error "true"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
for overlay_file in ${user_overlays}; do
|
for overlay_file in ${user_overlays}; do
|
||||||
if load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then
|
if load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then
|
||||||
echo "Applying user provided DT overlay ${overlay_file}.dtbo"
|
echo "Applying user provided DT overlay ${overlay_file}.dtbo"
|
||||||
fdt apply ${load_addr} || setenv overlay_error "true"
|
fdt apply ${load_addr} || setenv overlay_error "true"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if test "${overlay_error}" = "true"; then
|
if test "${overlay_error}" = "true"; then
|
||||||
echo "Error applying DT overlays, restoring original DT"
|
echo "Error applying DT overlays, restoring original DT"
|
||||||
load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
|
load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
|
||||||
else
|
else
|
||||||
if load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then
|
if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then
|
||||||
|
load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr
|
||||||
echo "Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)"
|
echo "Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)"
|
||||||
source ${load_addr}
|
source ${load_addr}
|
||||||
fi
|
fi
|
||||||
if test -e ${devtype} ${devnum} ${prefix}fixup.scr; then
|
if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}fixup.scr; then
|
||||||
load ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr
|
load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}fixup.scr
|
||||||
echo "Applying user provided fixup script (fixup.scr)"
|
echo "Applying user provided fixup script (fixup.scr)"
|
||||||
source ${load_addr}
|
source ${load_addr}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
|
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
|
||||||
|
|
||||||
# Recompile with:
|
# Recompile with:
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
# DO NOT EDIT THIS FILE
|
|
||||||
#
|
|
||||||
# Please edit /boot/armbianEnv.txt to set supported parameters
|
|
||||||
#
|
|
||||||
|
|
||||||
setenv load_addr "0x9000000"
|
|
||||||
# Ensure the ever expanding kernel never overlaps initial device tree load area
|
|
||||||
setenv fdt_addr_r "0x7800000"
|
|
||||||
setenv overlay_error "false"
|
|
||||||
# default values
|
|
||||||
setenv rootdev "/dev/mmcblk0p1"
|
|
||||||
setenv verbosity "1"
|
|
||||||
setenv console "both"
|
|
||||||
setenv rootfstype "ext4"
|
|
||||||
setenv docker_optimizations "on"
|
|
||||||
setenv earlycon "off"
|
|
||||||
|
|
||||||
echo "Boot script loaded from ${devtype} ${devnum}"
|
|
||||||
|
|
||||||
if test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then
|
|
||||||
load ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt
|
|
||||||
env import -t ${load_addr} ${filesize}
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "${logo}" = "disabled"; then setenv logo "logo.nologo"; fi
|
|
||||||
|
|
||||||
if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi
|
|
||||||
if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "console=ttyS0,1500000 ${consoleargs}"; fi
|
|
||||||
if test "${earlycon}" = "on"; then setenv consoleargs "earlycon ${consoleargs}"; fi
|
|
||||||
|
|
||||||
# get PARTUUID of first partition on SD/eMMC the boot script was loaded from
|
|
||||||
if test "${devtype}" = "mmc"; then part uuid mmc ${devnum}:1 partuuid; fi
|
|
||||||
|
|
||||||
setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}"
|
|
||||||
|
|
||||||
if test "${docker_optimizations}" = "on"; then setenv bootargs "${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory"; fi
|
|
||||||
|
|
||||||
load ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd
|
|
||||||
load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image
|
|
||||||
|
|
||||||
load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
|
|
||||||
fdt addr ${fdt_addr_r}
|
|
||||||
fdt resize 65536
|
|
||||||
for overlay_file in ${overlays}; do
|
|
||||||
if load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then
|
|
||||||
echo "Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo"
|
|
||||||
fdt apply ${load_addr} || setenv overlay_error "true"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
for overlay_file in ${user_overlays}; do
|
|
||||||
if load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then
|
|
||||||
echo "Applying user provided DT overlay ${overlay_file}.dtbo"
|
|
||||||
fdt apply ${load_addr} || setenv overlay_error "true"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test "${overlay_error}" = "true"; then
|
|
||||||
echo "Error applying DT overlays, restoring original DT"
|
|
||||||
load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
|
|
||||||
else
|
|
||||||
if load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then
|
|
||||||
echo "Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)"
|
|
||||||
source ${load_addr}
|
|
||||||
fi
|
|
||||||
if test -e ${devtype} ${devnum} ${prefix}fixup.scr; then
|
|
||||||
load ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr
|
|
||||||
echo "Applying user provided fixup script (fixup.scr)"
|
|
||||||
source ${load_addr}
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
|
|
||||||
|
|
||||||
# Recompile with:
|
|
||||||
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
#
|
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
|
||||||
#
|
|
||||||
# Copyright (c) 2013-2024 Igor Pecovnik, igor@armbian.com
|
|
||||||
#
|
|
||||||
# This file is a part of the Armbian Build Framework
|
|
||||||
# https://github.com/armbian/build/
|
|
||||||
#
|
|
||||||
# shellcheck source=config/sources/families/include/rockchip64_common.inc
|
|
||||||
source "${BASH_SOURCE%/*}/include/rockchip64_common.inc"
|
|
||||||
BOOTENV_FILE='rockpis.txt'
|
|
||||||
OVERLAY_PREFIX='rk3308'
|
|
||||||
BOOTSCRIPT=boot-rock-s0.cmd:boot.cmd
|
|
||||||
|
|
||||||
#comment out line below for an image that will NOT boot from the built-in SDNAND
|
|
||||||
IDBLOADER_BLOB=$SRC/packages/blobs/rockchip/rk3308_idbloader_ddr589MHz_uart0_m0_v2.06.136sd.bin
|
|
||||||
|
|
||||||
#The SDNAND capabilty IDBLOADER_BLOB requires the U-Boot and Linux serial console on UART0
|
|
||||||
#Linux will hang on reboot if the console remains on UART2
|
|
||||||
|
|
||||||
#Note: IDBLOADER_BLOB is derived from
|
|
||||||
# https://dl.radxa.com/rockpis/images/loader/rk3308_loader_ddr589MHz_uart0_m0_v2.06.136sd.bin
|
|
||||||
#by using the rkdeveloptool to "upgrade" the previous DDR_BLOB loader on the SDNAND
|
|
||||||
#To recreate it, build the image with IDBLOADER_BLOB unset and boot Rock PI-S in MASKROM mode
|
|
||||||
#On your host (connected to the RockPi-S's USB-C port):
|
|
||||||
# rdeveloptool db rk3308_loader_ddr589MHz_uart0_m0_v2.06.136sd.bin
|
|
||||||
# rdeveloptool wl 0 newly_built_image.img
|
|
||||||
# rdeveloptool ul rk3308_loader_ddr589MHz_uart0_m0_v2.06.136sd.bin #this writes 280 sectors
|
|
||||||
|
|
||||||
#Then, reset the RockPi-S to boot from SDNAND. Using that running image:
|
|
||||||
# dd if=/dev/mmcblk0 of=rk3308_idbloader_ddr589MHz_uart0_m0_v2.06.136sd.bin skip=64 count=280
|
|
||||||
|
|
||||||
case $BRANCH in
|
|
||||||
legacy)
|
|
||||||
echo "Legacy not supported for rock-s0 board"
|
|
||||||
exit 99
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
prepare_boot_configuration
|
|
||||||
|
|
||||||
uboot_custom_postprocess() {
|
|
||||||
# TODO: remove this diversion from common caused by different loaderimage params
|
|
||||||
loaderimage --pack --uboot ./u-boot-dtb.bin uboot.img 0x600000 --size 1024 1 &&
|
|
||||||
if [ -r "$IDBLOADER_BLOB" ]; then
|
|
||||||
echo "Installing $IDBLOADER_BLOB"
|
|
||||||
echo "Capable of booting from built-in SDNAND"
|
|
||||||
cp $IDBLOADER_BLOB idbloader.bin
|
|
||||||
else
|
|
||||||
[ "$IDBLOADER_BLOB" ] && echo "Missing $IDBLOADER_BLOB"
|
|
||||||
echo "WARNING: This image will not boot from built-in SDNAND"
|
|
||||||
tools/mkimage -n rk3308 -T rksd -d $RKBIN_DIR/$DDR_BLOB idbloader.bin &&
|
|
||||||
cat $RKBIN_DIR/$MINILOADER_BLOB >> idbloader.bin
|
|
||||||
fi &&
|
|
||||||
trust_merger --replace bl31.elf $RKBIN_DIR/$BL31_BLOB trust.ini
|
|
||||||
}
|
|
||||||
|
|
||||||
family_tweaks_bsp() { #Install udev script that derives fixed, unique MAC addresses for net interfaces
|
|
||||||
#that are assigned random ones -- like RockPI-S's WiFi network interfaces
|
|
||||||
bsp=$SRC/packages/bsp/rockpis
|
|
||||||
rules=etc/udev/rules.d
|
|
||||||
|
|
||||||
install -m 755 $bsp/lib/udev/fixEtherAddr $destination/lib/udev &&
|
|
||||||
install -m 644 $bsp/$rules/05-fixMACaddress.rules $destination/$rules
|
|
||||||
}
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
#
|
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
|
||||||
#
|
|
||||||
# Copyright (c) 2013-2023 Igor Pecovnik, igor@armbian.com
|
|
||||||
#
|
|
||||||
# This file is a part of the Armbian Build Framework
|
|
||||||
# https://github.com/armbian/build/
|
|
||||||
#
|
|
||||||
# shellcheck source=config/sources/families/include/rockchip64_common.inc
|
|
||||||
source "${BASH_SOURCE%/*}/include/rockchip64_common.inc"
|
|
||||||
#BOOTPATCHDIR="u-boot-rockchip64"
|
|
||||||
BOOTENV_FILE='rockpis.txt'
|
|
||||||
OVERLAY_PREFIX='rk3308'
|
|
||||||
BOOTSCRIPT=boot-rockpis.cmd:boot.cmd
|
|
||||||
|
|
||||||
#comment out line below for an image that will NOT boot from the built-in SDNAND
|
|
||||||
IDBLOADER_BLOB=$SRC/packages/blobs/rockchip/rk3308_idbloader_ddr589MHz_uart0_m0_v2.06.136sd.bin
|
|
||||||
|
|
||||||
#The SDNAND capabilty IDBLOADER_BLOB requires the U-Boot and Linux serial console on UART0
|
|
||||||
#Linux will hang on reboot if the console remains on UART2
|
|
||||||
|
|
||||||
#Note: IDBLOADER_BLOB is derived from
|
|
||||||
# https://dl.radxa.com/rockpis/images/loader/rk3308_loader_ddr589MHz_uart0_m0_v2.06.136sd.bin
|
|
||||||
#by using the rkdeveloptool to "upgrade" the previous DDR_BLOB loader on the SDNAND
|
|
||||||
#To recreate it, build the image with IDBLOADER_BLOB unset and boot Rock PI-S in MASKROM mode
|
|
||||||
#On your host (connected to the RockPi-S's USB-C port):
|
|
||||||
# rdeveloptool db rk3308_loader_ddr589MHz_uart0_m0_v2.06.136sd.bin
|
|
||||||
# rdeveloptool wl 0 newly_built_image.img
|
|
||||||
# rdeveloptool ul rk3308_loader_ddr589MHz_uart0_m0_v2.06.136sd.bin #this writes 280 sectors
|
|
||||||
|
|
||||||
#Then, reset the RockPi-S to boot from SDNAND. Using that running image:
|
|
||||||
# dd if=/dev/mmcblk0 of=rk3308_idbloader_ddr589MHz_uart0_m0_v2.06.136sd.bin skip=64 count=280
|
|
||||||
|
|
||||||
# Supported branches are 'current' and 'edge', see rockchip64_common.inc
|
|
||||||
|
|
||||||
prepare_boot_configuration
|
|
||||||
|
|
||||||
uboot_custom_postprocess() {
|
|
||||||
# TODO: remove this diversion from common caused by different loaderimage params
|
|
||||||
loaderimage --pack --uboot ./u-boot-dtb.bin uboot.img 0x600000 --size 1024 1 &&
|
|
||||||
if [ -r "$IDBLOADER_BLOB" ]; then
|
|
||||||
echo "Installing $IDBLOADER_BLOB"
|
|
||||||
echo "Capable of booting from built-in SDNAND"
|
|
||||||
cp $IDBLOADER_BLOB idbloader.bin
|
|
||||||
else
|
|
||||||
[ "$IDBLOADER_BLOB" ] && echo "Missing $IDBLOADER_BLOB"
|
|
||||||
echo "WARNING: This image will not boot from built-in SDNAND"
|
|
||||||
tools/mkimage -n rk3308 -T rksd -d $RKBIN_DIR/$DDR_BLOB idbloader.bin &&
|
|
||||||
cat $RKBIN_DIR/$MINILOADER_BLOB >> idbloader.bin
|
|
||||||
fi &&
|
|
||||||
trust_merger --replace bl31.elf $RKBIN_DIR/$BL31_BLOB trust.ini
|
|
||||||
}
|
|
||||||
|
|
||||||
family_tweaks_bsp() { #Install udev script that derives fixed, unique MAC addresses for net interfaces
|
|
||||||
#that are assigned random ones -- like RockPI-S's WiFi network interfaces
|
|
||||||
bsp=$SRC/packages/bsp/rockpis
|
|
||||||
rules=etc/udev/rules.d
|
|
||||||
|
|
||||||
install -m 755 $bsp/lib/udev/fixEtherAddr $destination/lib/udev &&
|
|
||||||
install -m 644 $bsp/$rules/05-fixMACaddress.rules $destination/$rules
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user