[PATCH] rockchip: Restore support for boot scripts in legacy image format

Andy Yan andyshrk at 163.com
Fri Jun 30 03:46:15 CEST 2023







Hi: 











在 2023-06-29 22:07:05,"Jonas Karlman" <jonas at kwiboo.se> 写道:
>Hi Kever,
>
>On 2023-06-29 12:51, Kever Yang wrote:
>> Hi Jonas,
>> 
>>      What is the legacy image format, does these boards really use than?
>> 
>> I think most of the board using linux distro image.
>
>The legacy image format it the normal boot script format,
>in the documentation it is called Legacy U-Boot image, see [1].
>
>i.e. boot scripts compiled with:
>
>  mkimage -T script -n 'Test script' -d boot.txt boot.scr
>
>Such boot scripts are used by some linux distro, e.g. Armbian.
>
>[1] https://u-boot.readthedocs.io/en/latest/usage/cmd/source.html#legacy-u-boot-image

>


Yes, this is a common use case, I also run into this case a few weeks ago on armbian[2]:


The code handle this logic in u-boot  is image_locate_script.


[2 ]https://github.com/armbian/build/blob/main/config/bootscripts/boot-rockchip.cmd


>Regards,
>Jonas
>
>> 
>> 
>> Thanks,
>> 
>> - Kever
>> 
>> On 2023/6/27 03:43, Jonas Karlman wrote:
>>> Use of CONFIG_SPL_FIT_SIGNATURE=y cause CONFIG_LEGACY_IMAGE_FORMAT=n as
>>> default, this prevent boot scripts in legacy image format from working
>>> and was an unintended change in the listed fixes commits:
>>>
>>>    Wrong image format for "source" command
>>>
>>> Add CONFIG_LEGACY_IMAGE_FORMAT=y to defconfig for affected boards to
>>> restore support for boot scripts in legacy image format.
>>>
>>> Fixes: 3bf8e4080763 ("board: rockchip: add Radxa ROCK5B Rk3588 board")
>>> Fixes: cf777572ca31 ("rockchip: rockpro64: Use SDMA to boost eMMC performance")
>>> Fixes: 6e2b8344d60c ("rockchip: rock-pi-4: Use SDMA to boost eMMC performance")
>>> Fixes: 1bf49d5a4a7c ("rockchip: rk3566-radxa-cm3-io: Update defconfig")
>>> Fixes: 703c170b40f2 ("rockchip: rk3568-evb: Update defconfig")
>>> Fixes: 68000f750acd ("rockchip: rk3568-rock-3a: Update defconfig")
>>> Fixes: 6fb02589a608 ("rockchip: rk3588-evb: Update defconfig")
>>> Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
>>> ---
>>>   configs/evb-rk3568_defconfig          | 1 +
>>>   configs/evb-rk3588_defconfig          | 1 +
>>>   configs/radxa-cm3-io-rk3566_defconfig | 1 +
>>>   configs/rock-3a-rk3568_defconfig      | 1 +
>>>   configs/rock-pi-4-rk3399_defconfig    | 1 +
>>>   configs/rock5b-rk3588_defconfig       | 1 +
>>>   configs/rockpro64-rk3399_defconfig    | 1 +
>>>   7 files changed, 7 insertions(+)
>>>
>>> diff --git a/configs/evb-rk3568_defconfig b/configs/evb-rk3568_defconfig
>>> index 07819d105441..5f3fab7304c2 100644
>>> --- a/configs/evb-rk3568_defconfig
>>> +++ b/configs/evb-rk3568_defconfig
>>> @@ -22,6 +22,7 @@ CONFIG_FIT=y
>>>   CONFIG_FIT_VERBOSE=y
>>>   CONFIG_SPL_FIT_SIGNATURE=y
>>>   CONFIG_SPL_LOAD_FIT=y
>>> +CONFIG_LEGACY_IMAGE_FORMAT=y
>>>   CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-evb.dtb"
>>>   # CONFIG_DISPLAY_CPUINFO is not set
>>>   CONFIG_DISPLAY_BOARDINFO_LATE=y
>>> diff --git a/configs/evb-rk3588_defconfig b/configs/evb-rk3588_defconfig
>>> index d5f1c4b9ebc7..f49c2ca686a8 100644
>>> --- a/configs/evb-rk3588_defconfig
>>> +++ b/configs/evb-rk3588_defconfig
>>> @@ -23,6 +23,7 @@ CONFIG_FIT=y
>>>   CONFIG_FIT_VERBOSE=y
>>>   CONFIG_SPL_FIT_SIGNATURE=y
>>>   CONFIG_SPL_LOAD_FIT=y
>>> +CONFIG_LEGACY_IMAGE_FORMAT=y
>>>   CONFIG_OF_BOARD_SETUP=y
>>>   CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-evb1-v10.dtb"
>>>   # CONFIG_DISPLAY_CPUINFO is not set
>>> diff --git a/configs/radxa-cm3-io-rk3566_defconfig b/configs/radxa-cm3-io-rk3566_defconfig
>>> index 56802d85cc25..488723dfaa30 100644
>>> --- a/configs/radxa-cm3-io-rk3566_defconfig
>>> +++ b/configs/radxa-cm3-io-rk3566_defconfig
>>> @@ -22,6 +22,7 @@ CONFIG_FIT=y
>>>   CONFIG_FIT_VERBOSE=y
>>>   CONFIG_SPL_FIT_SIGNATURE=y
>>>   CONFIG_SPL_LOAD_FIT=y
>>> +CONFIG_LEGACY_IMAGE_FORMAT=y
>>>   CONFIG_DEFAULT_FDT_FILE="rockchip/rk3566-radxa-cm3-io.dtb"
>>>   # CONFIG_DISPLAY_CPUINFO is not set
>>>   CONFIG_DISPLAY_BOARDINFO_LATE=y
>>> diff --git a/configs/rock-3a-rk3568_defconfig b/configs/rock-3a-rk3568_defconfig
>>> index 616499f2f82b..753d03914d90 100644
>>> --- a/configs/rock-3a-rk3568_defconfig
>>> +++ b/configs/rock-3a-rk3568_defconfig
>>> @@ -27,6 +27,7 @@ CONFIG_FIT=y
>>>   CONFIG_FIT_VERBOSE=y
>>>   CONFIG_SPL_FIT_SIGNATURE=y
>>>   CONFIG_SPL_LOAD_FIT=y
>>> +CONFIG_LEGACY_IMAGE_FORMAT=y
>>>   CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-rock-3a.dtb"
>>>   # CONFIG_DISPLAY_CPUINFO is not set
>>>   CONFIG_DISPLAY_BOARDINFO_LATE=y
>>> diff --git a/configs/rock-pi-4-rk3399_defconfig b/configs/rock-pi-4-rk3399_defconfig
>>> index 4b984adc6ef8..466868d80b03 100644
>>> --- a/configs/rock-pi-4-rk3399_defconfig
>>> +++ b/configs/rock-pi-4-rk3399_defconfig
>>> @@ -20,6 +20,7 @@ CONFIG_PCI=y
>>>   CONFIG_DEBUG_UART=y
>>>   # CONFIG_ANDROID_BOOT_IMAGE is not set
>>>   CONFIG_SPL_FIT_SIGNATURE=y
>>> +CONFIG_LEGACY_IMAGE_FORMAT=y
>>>   CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock-pi-4a.dtb"
>>>   CONFIG_DISPLAY_BOARDINFO_LATE=y
>>>   CONFIG_MISC_INIT_R=y
>>> diff --git a/configs/rock5b-rk3588_defconfig b/configs/rock5b-rk3588_defconfig
>>> index c1155c20efa8..17205a56cd99 100644
>>> --- a/configs/rock5b-rk3588_defconfig
>>> +++ b/configs/rock5b-rk3588_defconfig
>>> @@ -29,6 +29,7 @@ CONFIG_FIT=y
>>>   CONFIG_FIT_VERBOSE=y
>>>   CONFIG_SPL_FIT_SIGNATURE=y
>>>   CONFIG_SPL_LOAD_FIT=y
>>> +CONFIG_LEGACY_IMAGE_FORMAT=y
>>>   CONFIG_OF_BOARD_SETUP=y
>>>   CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-rock-5b.dtb"
>>>   # CONFIG_DISPLAY_CPUINFO is not set
>>> diff --git a/configs/rockpro64-rk3399_defconfig b/configs/rockpro64-rk3399_defconfig
>>> index f41c03067903..dc4392c7451c 100644
>>> --- a/configs/rockpro64-rk3399_defconfig
>>> +++ b/configs/rockpro64-rk3399_defconfig
>>> @@ -23,6 +23,7 @@ CONFIG_PCI=y
>>>   CONFIG_DEBUG_UART=y
>>>   CONFIG_LTO=y
>>>   CONFIG_SPL_FIT_SIGNATURE=y
>>> +CONFIG_LEGACY_IMAGE_FORMAT=y
>>>   CONFIG_BOOTSTAGE=y
>>>   CONFIG_BOOTSTAGE_REPORT=y
>>>   CONFIG_USE_PREBOOT=y


More information about the U-Boot mailing list