From d07974f0ccd6adc4127a65c266dfe433462967df Mon Sep 17 00:00:00 2001 From: Alex Bee Date: Sat, 11 Feb 2023 09:44:11 +0100 Subject: [PATCH] Rockchip: bootloader: allow ROCKCHIP_LEGACY_BOOT to be passed from command line Also document that option in README.md and drop the non-required U_BOOT_CONFIG form bootloader/install script --- projects/Rockchip/README.md | 8 ++++++-- projects/Rockchip/bootloader/firmware | 3 ++- projects/Rockchip/bootloader/install | 1 - 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/projects/Rockchip/README.md b/projects/Rockchip/README.md index def46069f0..003b5af88e 100644 --- a/projects/Rockchip/README.md +++ b/projects/Rockchip/README.md @@ -29,12 +29,16 @@ This project is for Rockchip SoC devices * [ROC-RK3399-PC-PLUS](devices/RK3399) * [Rockchip Sapphire Board](devices/RK3399) -**My single-board computer is not listed, will it be added in the future?**
+**My single-board computer is not listed, will it be added in the future?**
If your single-board computer uses a current generation SoC listed on http://opensource.rock-chips.com/wiki_Main_Page the odds are in your favor. -**My Android device is not listed, will it be added in the future?**
+**My Android device is not listed, will it be added in the future?**
You may have luck if your device vendor is open source friendly, otherwise keep using Android for best support. +**My device does not boot and I don't understand why.**
+If your device has Android or any sort of vendor u-boot preinstalled in EMMC or SPI, make sure to add `ROCKCHIP_LEGACY_BOOT=1` when building an image. +This is done automatically for supported devices, which are known to come with Android preinstalled. + ## Links * http://opensource.rock-chips.com diff --git a/projects/Rockchip/bootloader/firmware b/projects/Rockchip/bootloader/firmware index 38684ce3f9..7c2c6072bf 100644 --- a/projects/Rockchip/bootloader/firmware +++ b/projects/Rockchip/bootloader/firmware @@ -1,4 +1,5 @@ -export ROCKCHIP_LEGACY_BOOT=$("${ROOT}"/"${SCRIPTS}"/uboot_helper "${PROJECT}" "${DEVICE}" "${UBOOT_SYSTEM}" rockchip_legacy_boot) || "${ROCKCHIP_LEGACY_BOOT:-}" + +[ -z "${ROCKCHIP_LEGACY_BOOT}" ] && export ROCKCHIP_LEGACY_BOOT=$("${ROOT}/${SCRIPTS}/uboot_helper" "${PROJECT}" "${DEVICE}" "${UBOOT_SYSTEM}" rockchip_legacy_boot) if [ "${ROCKCHIP_LEGACY_BOOT}" = "1" ]; then export UBOOT_TARGET="u-boot-dtb.bin" diff --git a/projects/Rockchip/bootloader/install b/projects/Rockchip/bootloader/install index 06b6e995d7..af8e3992df 100644 --- a/projects/Rockchip/bootloader/install +++ b/projects/Rockchip/bootloader/install @@ -3,7 +3,6 @@ PKG_RKBIN="$(get_build_dir rkbin)" PKG_SOC="${DEVICE/RK/rk}" -UBOOT_CONFIG=$("${ROOT}"/"${SCRIPTS}"/uboot_helper "${PROJECT}" "${DEVICE}" "${UBOOT_SYSTEM}" config) if [ "${ROCKCHIP_LEGACY_BOOT}" = "1" ]; then echo "install: building Rockchip legacy boot chain ..."