mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
scripts/uboot_helper: add formatting to the python object
sort printed output use dashes instead of underscores for board names sort alphabetically
This commit is contained in:
parent
027def8c89
commit
34a4515f06
@ -2,65 +2,180 @@
|
||||
|
||||
import sys
|
||||
|
||||
devices = {
|
||||
# When adding new devices to the list please keep them in alphabetical order
|
||||
# board-name should contain 'dashes' (-) not 'underscores' (_) and shouldn't contain capitals
|
||||
# you can check the formating using an online tool such as https://codebeautify.org/python-formatter-beautifier
|
||||
|
||||
# 'project' : {
|
||||
# 'device' : {
|
||||
# 'board_name' : { 'dtb' : 'board_name.dtb', 'config' : 'board_name_defconfig' },
|
||||
# 'board-name' : {
|
||||
# 'dtb' : 'board-name.dtb',
|
||||
# 'config' : 'board_name_defconfig'
|
||||
# },
|
||||
# },
|
||||
# },
|
||||
'Allwinner' : {
|
||||
'A64' : {
|
||||
'pine64' : { 'dtb' : 'sun50i-a64-pine64.dtb', 'config' : 'pine64_plus_defconfig' },
|
||||
'pine64_plus' : { 'dtb' : 'sun50i-a64-pine64-plus.dtb', 'config' : 'pine64_plus_defconfig' },
|
||||
'pine64_lts' : { 'dtb' : 'sun50i-a64-pine64-lts.dtb', 'config' : 'pine64-lts_defconfig' },
|
||||
'orangepi_win' : { 'dtb' : 'sun50i-a64-orangepi-win.dtb', 'config' : 'orangepi_win_defconfig' },
|
||||
|
||||
devices = \
|
||||
{
|
||||
'Allwinner': {
|
||||
'A64': {
|
||||
'orangepi-win': {
|
||||
'dtb': 'sun50i-a64-orangepi-win.dtb',
|
||||
'config': 'orangepi_win_defconfig'
|
||||
},
|
||||
'pine64': {
|
||||
'dtb': 'sun50i-a64-pine64.dtb',
|
||||
'config': 'pine64_plus_defconfig'
|
||||
},
|
||||
'pine64-lts': {
|
||||
'dtb': 'sun50i-a64-pine64-lts.dtb',
|
||||
'config': 'pine64-lts_defconfig'
|
||||
},
|
||||
'pine64-plus': {
|
||||
'dtb': 'sun50i-a64-pine64-plus.dtb',
|
||||
'config': 'pine64_plus_defconfig'
|
||||
},
|
||||
},
|
||||
'H3' : {
|
||||
'bananapi_m2p' : { 'dtb' : 'sun8i-h3-bananapi-m2-plus.dtb', 'config' : 'bananapi_m2_plus_h3_defconfig' },
|
||||
'beelink_x2' : { 'dtb' : 'sun8i-h3-beelink-x2.dtb', 'config' : 'beelink_x2_defconfig' },
|
||||
'libretech_h3' : { 'dtb' : 'sun8i-h3-libretech-all-h3-cc.dtb', 'config' : 'libretech_all_h3_cc_h3_defconfig' },
|
||||
'nanopi_m1' : { 'dtb' : 'sun8i-h3-nanopi-m1.dtb', 'config' : 'nanopi_m1_defconfig' },
|
||||
'orangepi_2' : { 'dtb' : 'sun8i-h3-orangepi-2.dtb', 'config' : 'orangepi_2_defconfig' },
|
||||
'orangepi_pc': { 'dtb': 'sun8i-h3-orangepi-pc.dtb', 'config': 'orangepi_pc_defconfig' },
|
||||
'orangepi_pc_plus': { 'dtb': 'sun8i-h3-orangepi-pc-plus.dtb', 'config': 'orangepi_pc_plus_defconfig' },
|
||||
'orangepi_plus2e': { 'dtb': 'sun8i-h3-orangepi-plus2e.dtb', 'config': 'orangepi_plus2e_defconfig' },
|
||||
'orangepi_plus': { 'dtb': 'sun8i-h3-orangepi-plus.dtb', 'config': 'orangepi_plus_defconfig' },
|
||||
'H3': {
|
||||
'bananapi-m2p': {
|
||||
'dtb': 'sun8i-h3-bananapi-m2-plus.dtb',
|
||||
'config': 'bananapi_m2_plus_h3_defconfig'
|
||||
},
|
||||
'beelink-x2': {
|
||||
'dtb': 'sun8i-h3-beelink-x2.dtb',
|
||||
'config': 'beelink_x2_defconfig'
|
||||
},
|
||||
'libretech-h3': {
|
||||
'dtb': 'sun8i-h3-libretech-all-h3-cc.dtb',
|
||||
'config': 'libretech_all_h3_cc_h3_defconfig'
|
||||
},
|
||||
'nanopi-m1': {
|
||||
'dtb': 'sun8i-h3-nanopi-m1.dtb',
|
||||
'config': 'nanopi_m1_defconfig'
|
||||
},
|
||||
'orangepi-2': {
|
||||
'dtb': 'sun8i-h3-orangepi-2.dtb',
|
||||
'config': 'orangepi_2_defconfig'
|
||||
},
|
||||
'orangepi-pc': {
|
||||
'dtb': 'sun8i-h3-orangepi-pc.dtb',
|
||||
'config': 'orangepi_pc_defconfig'
|
||||
},
|
||||
'orangepi-pc-plus': {
|
||||
'dtb': 'sun8i-h3-orangepi-pc-plus.dtb',
|
||||
'config': 'orangepi_pc_plus_defconfig'
|
||||
},
|
||||
'orangepi-plus2e': {
|
||||
'dtb': 'sun8i-h3-orangepi-plus2e.dtb',
|
||||
'config': 'orangepi_plus2e_defconfig'
|
||||
},
|
||||
'orangepi-plus': {
|
||||
'dtb': 'sun8i-h3-orangepi-plus.dtb',
|
||||
'config': 'orangepi_plus_defconfig'
|
||||
},
|
||||
},
|
||||
'H6' : {
|
||||
'pine_h64' : { 'dtb' : 'sun50i-h6-pine-h64.dtb', 'config' : 'pine_h64_defconfig' },
|
||||
'orangepi_3' : { 'dtb' : 'sun50i-h6-orangepi-3.dtb', 'config' : 'orangepi_3_defconfig' },
|
||||
'orangepi_one_plus' : { 'dtb' : 'sun50i-h6-orangepi-one-plus.dtb', 'config' : 'orangepi_one_plus_defconfig' },
|
||||
'H6': {
|
||||
'orangepi-3': {
|
||||
'dtb': 'sun50i-h6-orangepi-3.dtb',
|
||||
'config': 'orangepi_3_defconfig'
|
||||
},
|
||||
'orangepi-one-plus': {
|
||||
'dtb': 'sun50i-h6-orangepi-one-plus.dtb',
|
||||
'config': 'orangepi_one_plus_defconfig'
|
||||
},
|
||||
'pine-h64': {
|
||||
'dtb': 'sun50i-h6-pine-h64.dtb',
|
||||
'config': 'pine_h64_defconfig'
|
||||
},
|
||||
},
|
||||
},
|
||||
'Amlogic' : {
|
||||
'AMLGX' : {
|
||||
'box' : { 'dtb' : 'meson-gxl-s905x-p212.dtb', 'config' : 'p212_defconfig' },
|
||||
'lepotato' : { 'dtb' : 'meson-gxl-s905x-libretech-cc.dtb', 'config' : 'libretech-cc_defconfig' },
|
||||
'nanopi-k2' : { 'dtb' : 'meson-gxbb-nanopi-k2.dtb', 'config' : 'nanopi-k2_defconfig' },
|
||||
'odroid-c2' : { 'dtb' : 'meson-gxbb-odroidc2.dtb', 'config' : 'odroid-c2_defconfig' },
|
||||
'Amlogic': {
|
||||
'AMLGX': {
|
||||
'box': {
|
||||
'dtb': 'meson-gxl-s905x-p212.dtb',
|
||||
'config': 'p212_defconfig'
|
||||
},
|
||||
'lepotato': {
|
||||
'dtb': 'meson-gxl-s905x-libretech-cc.dtb',
|
||||
'config': 'libretech-cc_defconfig'
|
||||
},
|
||||
'nanopi-k2': {
|
||||
'dtb': 'meson-gxbb-nanopi-k2.dtb',
|
||||
'config': 'nanopi-k2_defconfig'
|
||||
},
|
||||
'odroid-c2': {
|
||||
'dtb': 'meson-gxbb-odroidc2.dtb',
|
||||
'config': 'odroid-c2_defconfig'
|
||||
},
|
||||
},
|
||||
'AMLG12' : {
|
||||
'box' : { 'dtb' : 'meson-gxl-s905x-p212.dtb', 'config' : 'p212_defconfig' },
|
||||
'AMLG12': {
|
||||
'box': {
|
||||
'dtb': 'meson-gxl-s905x-p212.dtb',
|
||||
'config': 'p212_defconfig'
|
||||
},
|
||||
},
|
||||
},
|
||||
'Rockchip' : {
|
||||
'MiQi' : { 'rk3288' : { 'dtb' : 'rk3288-miqi.dtb', 'config' : 'miqi-rk3288_config' }, },
|
||||
'RK3328' : {
|
||||
'box' : { 'dtb' : 'rk3328-box.dtb', 'config' : 'evb-rk3328_defconfig' },
|
||||
'box-trn9' : { 'dtb' : 'rk3328-box-trn9.dtb', 'config' : 'evb-rk3328_defconfig' },
|
||||
'box-z28' : { 'dtb' : 'rk3328-box-z28.dtb', 'config' : 'evb-rk3328_defconfig' },
|
||||
'roc-cc' : { 'dtb' : 'rk3328-roc-cc.dtb', 'config' : 'evb-rk3328_defconfig' },
|
||||
'rock64' : { 'dtb' : 'rk3328-rock64.dtb', 'config' : 'evb-rk3328_defconfig' },
|
||||
'rockbox' : { 'dtb' : 'rk3328-rockbox.dtb', 'config' : 'evb-rk3328_defconfig' },
|
||||
'Rockchip': {
|
||||
'MiQi': {
|
||||
'rk3288': {
|
||||
'dtb': 'rk3288-miqi.dtb',
|
||||
'config': 'miqi-rk3288_config'
|
||||
},
|
||||
},
|
||||
'RK3399' : {
|
||||
'khadas-edge' : { 'dtb' : 'rk3399-khadas-edge.dtb', 'config' : 'evb-rk3399_config' },
|
||||
'rock960' : { 'dtb' : 'rk3399-rock960.dtb', 'config' : 'evb-rk3399_config' },
|
||||
'rock-pi-4' : { 'dtb' : 'rk3399-rock-pi-4.dtb', 'config' : 'evb-rk3399_config' },
|
||||
'rockpro64' : { 'dtb' : 'rk3399-rockpro64.dtb', 'config' : 'evb-rk3399_config' },
|
||||
'sapphire' : { 'dtb' : 'rk3399-sapphire.dtb', 'config' : 'evb-rk3399_config' },
|
||||
'RK3328': {
|
||||
'box': {
|
||||
'dtb': 'rk3328-box.dtb',
|
||||
'config': 'evb-rk3328_defconfig'
|
||||
},
|
||||
'box-trn9': {
|
||||
'dtb': 'rk3328-box-trn9.dtb',
|
||||
'config': 'evb-rk3328_defconfig'
|
||||
},
|
||||
'box-z28': {
|
||||
'dtb': 'rk3328-box-z28.dtb',
|
||||
'config': 'evb-rk3328_defconfig'
|
||||
},
|
||||
'roc-cc': {
|
||||
'dtb': 'rk3328-roc-cc.dtb',
|
||||
'config': 'evb-rk3328_defconfig'
|
||||
},
|
||||
'rock64': {
|
||||
'dtb': 'rk3328-rock64.dtb',
|
||||
'config': 'evb-rk3328_defconfig'
|
||||
},
|
||||
'rockbox': {
|
||||
'dtb': 'rk3328-rockbox.dtb',
|
||||
'config': 'evb-rk3328_defconfig'
|
||||
},
|
||||
},
|
||||
'RK3399': {
|
||||
'khadas-edge': {
|
||||
'dtb': 'rk3399-khadas-edge.dtb',
|
||||
'config': 'evb-rk3399_config'
|
||||
},
|
||||
'rock960': {
|
||||
'dtb': 'rk3399-rock960.dtb',
|
||||
'config': 'evb-rk3399_config'
|
||||
},
|
||||
'rock-pi-4': {
|
||||
'dtb': 'rk3399-rock-pi-4.dtb',
|
||||
'config': 'evb-rk3399_config'
|
||||
},
|
||||
'rockpro64': {
|
||||
'dtb': 'rk3399-rockpro64.dtb',
|
||||
'config': 'evb-rk3399_config'
|
||||
},
|
||||
'sapphire': {
|
||||
'dtb': 'rk3399-sapphire.dtb',
|
||||
'config': 'evb-rk3399_config'
|
||||
},
|
||||
},
|
||||
'TinkerBoard': {
|
||||
'rk3288': {
|
||||
'dtb': 'rk3288-miniarm.dtb',
|
||||
'config': 'tinker-rk3288_config'
|
||||
},
|
||||
},
|
||||
'TinkerBoard' : { 'rk3288' : { 'dtb' : 'rk3288-miniarm.dtb', 'config' : 'tinker-rk3288_config' }, },
|
||||
},
|
||||
}
|
||||
|
||||
@ -94,7 +209,7 @@ elif len(sys.argv) == 3:
|
||||
if sys.argv[1] in devices:
|
||||
if sys.argv[2] in devices[sys.argv[1]]:
|
||||
boards = []
|
||||
for board in devices[sys.argv[1]][sys.argv[2]]:
|
||||
for board in sorted(devices[sys.argv[1]][sys.argv[2]]):
|
||||
boards.append(board)
|
||||
print(' '.join(boards))
|
||||
sys.exit(0)
|
||||
@ -106,7 +221,7 @@ elif len(sys.argv) == 2:
|
||||
usage()
|
||||
elif sys.argv[1] in devices:
|
||||
socs = []
|
||||
for soc in devices[sys.argv[1]]:
|
||||
for soc in sorted(devices[sys.argv[1]]):
|
||||
socs.append(soc)
|
||||
print(' '.join(socs))
|
||||
sys.exit(0)
|
||||
@ -115,7 +230,7 @@ elif len(sys.argv) == 2:
|
||||
# ./scripts/uboot_helper
|
||||
elif len(sys.argv) == 1:
|
||||
projects = []
|
||||
for project in devices:
|
||||
for project in sorted(devices):
|
||||
projects.append(project)
|
||||
print(' '.join(projects))
|
||||
sys.exit(0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user