From 9faef13b0bb2b26972a2a81d48a557b8bfce7610 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sun, 13 Dec 2020 08:18:31 +0100 Subject: [PATCH] scripts: add board specific 'crust_config' to uboot_helper The sunxi firmware crust needs to be enabled per board, add this as a new optional option. A missing entry indicated that crust is not supported/enabled for the corresponding board. --- scripts/uboot_helper | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/scripts/uboot_helper b/scripts/uboot_helper index 400cf76624..d5c1415a3f 100755 --- a/scripts/uboot_helper +++ b/scripts/uboot_helper @@ -24,7 +24,8 @@ devices = \ 'A64': { 'orangepi-win': { 'dtb': 'sun50i-a64-orangepi-win.dtb', - 'config': 'orangepi_win_defconfig' + 'config': 'orangepi_win_defconfig', + 'crust_config': 'orangepi_win_defconfig', }, 'pine64': { 'dtb': 'sun50i-a64-pine64.dtb', @@ -36,7 +37,8 @@ devices = \ }, 'pine64-plus': { 'dtb': 'sun50i-a64-pine64-plus.dtb', - 'config': 'pine64_plus_defconfig' + 'config': 'pine64_plus_defconfig', + 'crust_config': 'pine64_plus_defconfig', }, }, 'H2-plus': { @@ -64,29 +66,35 @@ devices = \ }, 'orangepi-2': { 'dtb': 'sun8i-h3-orangepi-2.dtb', - 'config': 'orangepi_2_defconfig' + 'config': 'orangepi_2_defconfig', + 'crust_config': 'orangepi_2_defconfig', }, 'orangepi-pc': { 'dtb': 'sun8i-h3-orangepi-pc.dtb', - 'config': 'orangepi_pc_defconfig' + 'config': 'orangepi_pc_defconfig', + 'crust_config': 'orangepi_pc_defconfig', }, 'orangepi-pc-plus': { 'dtb': 'sun8i-h3-orangepi-pc-plus.dtb', - 'config': 'orangepi_pc_plus_defconfig' + 'config': 'orangepi_pc_plus_defconfig', + 'crust_config': 'orangepi_pc_plus_defconfig', }, 'orangepi-plus2e': { 'dtb': 'sun8i-h3-orangepi-plus2e.dtb', - 'config': 'orangepi_plus2e_defconfig' + 'config': 'orangepi_plus2e_defconfig', + 'crust_config': 'orangepi_plus2e_defconfig', }, 'orangepi-plus': { 'dtb': 'sun8i-h3-orangepi-plus.dtb', - 'config': 'orangepi_plus_defconfig' + 'config': 'orangepi_plus_defconfig', + 'crust_config': 'orangepi_plus_defconfig', }, }, 'H5' : { 'orangepi-pc2': { 'dtb': 'sun50i-h5-orangepi-pc2.dtb', - 'config': 'orangepi_pc2_defconfig' + 'config': 'orangepi_pc2_defconfig', + 'crust_config': 'orangepi_pc2_defconfig', }, 'tritium-h5': { 'dtb': 'sun50i-h5-libretech-all-h3-cc.dtb', @@ -100,7 +108,8 @@ devices = \ }, 'orangepi-3': { 'dtb': 'sun50i-h6-orangepi-3.dtb', - 'config': 'orangepi_3_defconfig' + 'config': 'orangepi_3_defconfig', + 'crust_config': 'orangepi_3_defconfig', }, 'orangepi-lite2': { 'dtb': 'sun50i-h6-orangepi-lite2.dtb', @@ -112,7 +121,8 @@ devices = \ }, 'pine-h64': { 'dtb': 'sun50i-h6-pine-h64.dtb', - 'config': 'pine_h64_defconfig' + 'config': 'pine_h64_defconfig', + 'crust_config': 'pine_h64_defconfig', }, 'pine-h64-model-b': { 'dtb': 'sun50i-h6-pine-h64-model-b.dtb', @@ -380,7 +390,7 @@ if len(sys.argv) > 3 and sys.argv[3] not in devices[sys.argv[1]][sys.argv[2]]: if len(sys.argv) == 4: exit_error('Invalid option: must specify dtb or config', PROJECT=sys.argv[1], SOC=sys.argv[2]) -elif len(sys.argv) > 4 and sys.argv[4] not in ['dtb', 'config']: +elif len(sys.argv) > 4 and sys.argv[4] not in ['dtb', 'config', 'crust_config']: exit_error('Invalid option: %s' % sys.argv[4], PROJECT=sys.argv[1], SOC=sys.argv[2]) if len(sys.argv) > 5: @@ -389,7 +399,8 @@ if len(sys.argv) > 5: # Get dtb or u-boot config for a given project, soc, and board # ./scripts/uboot_helper project device board-name dtb|config if len(sys.argv) == 5: - print(devices[sys.argv[1]][sys.argv[2]][sys.argv[3]][sys.argv[4]]) + if sys.argv[4] in devices[sys.argv[1]][sys.argv[2]][sys.argv[3]]: + print(devices[sys.argv[1]][sys.argv[2]][sys.argv[3]][sys.argv[4]]) # List boards supported by a given project and soc # ./scripts/uboot_helper project device