Skip to content

Commit d88d32b

Browse files
rpardiniigorpecovnik
authored andcommitted
khadas-vim3l: u-boot: update v2026.01 u-boot fanciness
- use LWIP for networking - enable some USB network drivers - drop (now-default) kaslrseed as it was redundant - add gpio expander support (for "red" LED) - flash leds once on preboot (incl red one)
1 parent c90b6e3 commit d88d32b

1 file changed

Lines changed: 37 additions & 11 deletions

File tree

config/boards/khadas-vim3l.conf

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,34 +45,60 @@ function post_uboot_custom_postprocess__khadas_vim3l_uboot() {
4545

4646
# Enable extra u-boot .config options, this way we avoid patching defconfig
4747
function post_config_uboot_target__extra_configs_for_khadas_vim3l() {
48-
display_alert "u-boot for ${BOARD}" "u-boot: enable EFI debugging command" "info"
49-
run_host_command_logged scripts/config --enable CMD_EFIDEBUG
50-
run_host_command_logged scripts/config --enable CMD_NVEDIT_EFI
48+
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable preboot & flash user LED in preboot" "info"
49+
run_host_command_logged scripts/config --enable CONFIG_USE_PREBOOT
50+
run_host_command_logged scripts/config --set-str CONFIG_PREBOOT "'led white:status on; led red:status on; sleep 0.1; led white:status off; led red:status off;'" # double quotes required due to run_host_command_logged's quirks
5151

52-
display_alert "u-boot for ${BOARD}" "u-boot: enable I2C support" "info"
52+
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable I2C support" "info"
5353
run_host_command_logged scripts/config --enable CONFIG_DM_I2C
5454
run_host_command_logged scripts/config --enable CONFIG_SYS_I2C_MESON
5555
run_host_command_logged scripts/config --enable CONFIG_CMD_I2C
5656

57+
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable GPIO expander support" "info" # to drive 'red' led
58+
run_host_command_logged scripts/config --enable CONFIG_MAX7320_GPIO
59+
run_host_command_logged scripts/config --enable CONFIG_CMD_PCA953X
60+
run_host_command_logged scripts/config --enable CONFIG_DM_PCA953X
61+
62+
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable EFI debugging commands" "info"
63+
run_host_command_logged scripts/config --enable CMD_EFIDEBUG
64+
run_host_command_logged scripts/config --enable CMD_NVEDIT_EFI
65+
5766
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable more filesystems support" "info"
5867
run_host_command_logged scripts/config --enable CONFIG_CMD_BTRFS
5968

60-
display_alert "u-boot for ${BOARD}" "u-boot: enable more compression support" "info"
69+
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable more compression support" "info"
6170
run_host_command_logged scripts/config --enable CONFIG_LZO
6271
run_host_command_logged scripts/config --enable CONFIG_BZIP2
6372
run_host_command_logged scripts/config --enable CONFIG_ZSTD
6473

65-
display_alert "u-boot for ${BOARD}" "u-boot: enable kaslrseed support" "info"
66-
run_host_command_logged scripts/config --enable CONFIG_CMD_KASLRSEED
67-
68-
display_alert "u-boot for ${BOARD}" "u-boot: enable gpio LED support" "info"
74+
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable gpio LED support" "info"
6975
run_host_command_logged scripts/config --enable CONFIG_LED
7076
run_host_command_logged scripts/config --enable CONFIG_LED_GPIO
7177

72-
display_alert "u-boot for ${BOARD}" "u-boot: enable networking cmds" "info"
78+
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable some USB ethernet drivers" "info"
79+
run_host_command_logged scripts/config --enable CONFIG_USB_HOST_ETHER
80+
run_host_command_logged scripts/config --enable CONFIG_USB_ETHER_ASIX
81+
run_host_command_logged scripts/config --enable CONFIG_USB_ETHER_ASIX88179
82+
run_host_command_logged scripts/config --enable CONFIG_USB_ETHER_MCS7830
83+
run_host_command_logged scripts/config --enable CONFIG_USB_ETHER_RTL8152
84+
run_host_command_logged scripts/config --enable CONFIG_USB_ETHER_SMSC95XX
85+
86+
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable networking cmds" "info"
7387
run_host_command_logged scripts/config --enable CONFIG_CMD_NFS
7488
run_host_command_logged scripts/config --enable CONFIG_CMD_WGET
7589
run_host_command_logged scripts/config --enable CONFIG_CMD_DNS
7690
run_host_command_logged scripts/config --enable CONFIG_PROT_TCP
77-
run_host_command_logged scripts/config --enable CONFIG_PROT_TCP_SACK
91+
92+
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable LWIP (new networking stack)" "info"
93+
run_host_command_logged scripts/config --enable CONFIG_CMD_MII
94+
run_host_command_logged scripts/config --enable CONFIG_NET_LWIP
95+
96+
# UMS, RockUSB, gadget stuff
97+
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable UMS/RockUSB gadget" "info"
98+
declare -a enable_configs=("CONFIG_CMD_USB_MASS_STORAGE" "CONFIG_USB_GADGET" "USB_GADGET_DOWNLOAD" "CONFIG_USB_FUNCTION_ACM")
99+
for config in "${enable_configs[@]}"; do
100+
run_host_command_logged scripts/config --enable "${config}"
101+
done
102+
# Auto-enabled by the above, force off...
103+
run_host_command_logged scripts/config --disable USB_FUNCTION_FASTBOOT
78104
}

0 commit comments

Comments
 (0)