[PATCH v2 1/5] Convert CONFIG_KEEP_SERVERADDR to Kconfig

This converts the following to Kconfig: CONFIG_KEEP_SERVERADDR
Drop the preprocessor usage also.
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
README | 5 ----- include/configs/sandbox.h | 1 - net/Kconfig | 9 +++++++++ net/arp.c | 5 ++--- scripts/config_whitelist.txt | 1 - 5 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/README b/README index 056b717557b..79843787eeb 100644 --- a/README +++ b/README @@ -1193,11 +1193,6 @@ The following options need to be configured: server to contact when using the "tftboot" command. (Environment variable "serverip")
- CONFIG_KEEP_SERVERADDR - - Keeps the server's MAC address, in the env 'serveraddr' - for passing to bootargs (like Linux's netconsole option) - - Gateway IP address: CONFIG_GATEWAYIP
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index cd7d99ec69c..1dd21d5e925 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -25,7 +25,6 @@ #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ 115200}
-#define CONFIG_KEEP_SERVERADDR #define CONFIG_UDP_CHECKSUM #define CONFIG_TIMESTAMP #define CONFIG_BOOTP_SERVERIP diff --git a/net/Kconfig b/net/Kconfig index 7a2d1450188..fb6420f9bbe 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -98,4 +98,13 @@ config SERVERIP_FROM_PROXYDHCP_DELAY_MS receiving response from main DHCP server. Has no effect if SERVERIP_FROM_PROXYDHCP is false.
+config KEEP_SERVERADDR + bool "Write the server's MAC address to 'serveraddr'" + default y if SANDBOX + help + Keeps the server's MAC address, in the env 'serveraddr' + for passing to bootargs (like Linux's netconsole option). If this is + enabled, when an ARP reply is received, the server's IP address is + written there. + endif # if NET diff --git a/net/arp.c b/net/arp.c index 1d06ed25722..0b086dc8d21 100644 --- a/net/arp.c +++ b/net/arp.c @@ -196,13 +196,12 @@ void arp_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len) if (!arp_is_waiting()) break;
-#ifdef CONFIG_KEEP_SERVERADDR - if (net_server_ip.s_addr == net_arp_wait_packet_ip.s_addr) { + if (IS_ENABLED(CONFIG_KEEP_SERVERADDR) && + net_server_ip.s_addr == net_arp_wait_packet_ip.s_addr) { char buf[20]; sprintf(buf, "%pM", &arp->ar_sha); env_set("serveraddr", buf); } -#endif
reply_ip_addr = net_read_ip(&arp->ar_spa);
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 6d961ccb3e6..3285d3cd30e 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -639,7 +639,6 @@ CONFIG_JFFS2_PART_SIZE CONFIG_JFFS2_SUMMARY CONFIG_JRSTARTR_JR0 CONFIG_JTAG_CONSOLE -CONFIG_KEEP_SERVERADDR CONFIG_KEY_REVOCATION CONFIG_KIRKWOOD_EGIGA_INIT CONFIG_KIRKWOOD_GPIO

This converts the following to Kconfig: CONFIG_UDP_CHECKSUM
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
configs/M5208EVBE_defconfig | 1 + configs/M53017EVB_defconfig | 1 + configs/M5329AFEE_defconfig | 1 + configs/M5329BFEE_defconfig | 1 + configs/M5373EVB_defconfig | 1 + include/configs/M5208EVBE.h | 2 -- include/configs/M53017EVB.h | 2 -- include/configs/M5329EVB.h | 2 -- include/configs/M5373EVB.h | 2 -- include/configs/sandbox.h | 1 - net/Kconfig | 7 +++++++ net/net.c | 4 +--- scripts/config_whitelist.txt | 1 - 13 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/configs/M5208EVBE_defconfig b/configs/M5208EVBE_defconfig index cc307ce43b2..e79791cdfd0 100644 --- a/configs/M5208EVBE_defconfig +++ b/configs/M5208EVBE_defconfig @@ -19,6 +19,7 @@ CONFIG_CMD_CACHE=y CONFIG_ENV_IS_IN_FLASH=y CONFIG_ENV_ADDR=0x2000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_UDP_CHECKSUM=y CONFIG_SYS_I2C_LEGACY=y CONFIG_SYS_I2C_FSL=y CONFIG_SYS_FSL_I2C_OFFSET=0x58000 diff --git a/configs/M53017EVB_defconfig b/configs/M53017EVB_defconfig index 1cd48d6c4ae..b8292fdccff 100644 --- a/configs/M53017EVB_defconfig +++ b/configs/M53017EVB_defconfig @@ -21,6 +21,7 @@ CONFIG_CMD_CACHE=y CONFIG_CMD_DATE=y CONFIG_ENV_IS_IN_FLASH=y CONFIG_ENV_ADDR=0x40000 +CONFIG_UDP_CHECKSUM=y CONFIG_SYS_I2C_LEGACY=y CONFIG_SYS_I2C_FSL=y CONFIG_SYS_FSL_I2C_OFFSET=0x58000 diff --git a/configs/M5329AFEE_defconfig b/configs/M5329AFEE_defconfig index 8a7a2d64f54..a6896650b19 100644 --- a/configs/M5329AFEE_defconfig +++ b/configs/M5329AFEE_defconfig @@ -22,6 +22,7 @@ CONFIG_CMD_CACHE=y CONFIG_CMD_DATE=y CONFIG_ENV_ADDR=0x4000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_UDP_CHECKSUM=y CONFIG_SYS_I2C_LEGACY=y CONFIG_SYS_I2C_FSL=y CONFIG_SYS_FSL_I2C_OFFSET=0x58000 diff --git a/configs/M5329BFEE_defconfig b/configs/M5329BFEE_defconfig index f40e86ff222..c640a3c38e8 100644 --- a/configs/M5329BFEE_defconfig +++ b/configs/M5329BFEE_defconfig @@ -22,6 +22,7 @@ CONFIG_CMD_CACHE=y CONFIG_CMD_DATE=y CONFIG_ENV_ADDR=0x4000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_UDP_CHECKSUM=y CONFIG_SYS_I2C_LEGACY=y CONFIG_SYS_I2C_FSL=y CONFIG_SYS_FSL_I2C_OFFSET=0x58000 diff --git a/configs/M5373EVB_defconfig b/configs/M5373EVB_defconfig index 8e61b72887d..c5aa3fd5e46 100644 --- a/configs/M5373EVB_defconfig +++ b/configs/M5373EVB_defconfig @@ -22,6 +22,7 @@ CONFIG_CMD_CACHE=y CONFIG_CMD_DATE=y CONFIG_ENV_ADDR=0x4000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_UDP_CHECKSUM=y CONFIG_SYS_I2C_LEGACY=y CONFIG_SYS_I2C_FSL=y CONFIG_SYS_FSL_I2C_OFFSET=0x58000 diff --git a/include/configs/M5208EVBE.h b/include/configs/M5208EVBE.h index 6a69ac45aee..a9febe47a4c 100644 --- a/include/configs/M5208EVBE.h +++ b/include/configs/M5208EVBE.h @@ -41,8 +41,6 @@ /* I2C */ #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR
-#define CONFIG_UDP_CHECKSUM - #ifdef CONFIG_MCFFEC # define CONFIG_IPADDR 192.162.1.2 # define CONFIG_NETMASK 255.255.255.0 diff --git a/include/configs/M53017EVB.h b/include/configs/M53017EVB.h index 7b33677c551..cda6cbf14e9 100644 --- a/include/configs/M53017EVB.h +++ b/include/configs/M53017EVB.h @@ -56,8 +56,6 @@ /* I2C */ #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR
-#define CONFIG_UDP_CHECKSUM - #ifdef CONFIG_MCFFEC # define CONFIG_IPADDR 192.162.1.2 # define CONFIG_NETMASK 255.255.255.0 diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h index 19d8cfe3217..f12edcc32f2 100644 --- a/include/configs/M5329EVB.h +++ b/include/configs/M5329EVB.h @@ -50,8 +50,6 @@ /* I2C */ #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR
-#define CONFIG_UDP_CHECKSUM - #ifdef CONFIG_MCFFEC # define CONFIG_IPADDR 192.162.1.2 # define CONFIG_NETMASK 255.255.255.0 diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h index e2ddc4893e7..c6a3f71ec63 100644 --- a/include/configs/M5373EVB.h +++ b/include/configs/M5373EVB.h @@ -52,8 +52,6 @@ /* I2C */ #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR
-#define CONFIG_UDP_CHECKSUM - #ifdef CONFIG_MCFFEC # define CONFIG_IPADDR 192.162.1.2 # define CONFIG_NETMASK 255.255.255.0 diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index 1dd21d5e925..2cb8a90f5ea 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -25,7 +25,6 @@ #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ 115200}
-#define CONFIG_UDP_CHECKSUM #define CONFIG_TIMESTAMP #define CONFIG_BOOTP_SERVERIP
diff --git a/net/Kconfig b/net/Kconfig index fb6420f9bbe..3d3329912da 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -107,4 +107,11 @@ config KEEP_SERVERADDR enabled, when an ARP reply is received, the server's IP address is written there.
+config UDP_CHECKSUM + bool "Check the UDP checksum" + help + Enable this to verify the checksum on UDP packets. If the checksum + is wrong then the packet is discussed and an error is shown, like + "UDP wrong checksum 29374a23 30ff3826" + endif # if NET diff --git a/net/net.c b/net/net.c index c2992a0908b..43e230aeb92 100644 --- a/net/net.c +++ b/net/net.c @@ -1264,8 +1264,7 @@ void net_process_received_packet(uchar *in_packet, int len) "received UDP (to=%pI4, from=%pI4, len=%d)\n", &dst_ip, &src_ip, len);
-#ifdef CONFIG_UDP_CHECKSUM - if (ip->udp_xsum != 0) { + if (IS_ENABLED(CONFIG_UDP_CHECKSUM) && ip->udp_xsum != 0) { ulong xsum; u8 *sumptr; ushort sumlen; @@ -1298,7 +1297,6 @@ void net_process_received_packet(uchar *in_packet, int len) return; } } -#endif
#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD) nc_input_packet((uchar *)ip + IP_UDP_HDR_SIZE, diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 3285d3cd30e..f0715614895 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -2946,7 +2946,6 @@ CONFIG_UBI_SIZE CONFIG_UBOOTPATH CONFIG_UBOOT_SECTOR_COUNT CONFIG_UBOOT_SECTOR_START -CONFIG_UDP_CHECKSUM CONFIG_UEC_ETH CONFIG_UEC_ETH1 CONFIG_UEC_ETH2

On Sat, Dec 18, 2021 at 11:27:49AM -0700, Simon Glass wrote:
This converts the following to Kconfig: CONFIG_UDP_CHECKSUM
Signed-off-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

This converts the following to Kconfig: CONFIG_TIMESTAMP
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
arch/Kconfig | 1 + arch/arm/Kconfig | 1 + arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 1 + arch/powerpc/cpu/mpc85xx/Kconfig | 2 ++ boot/Kconfig | 11 +++++++++++ configs/am335x_boneblack_vboot_defconfig | 1 + configs/am335x_evm_defconfig | 1 + configs/am335x_evm_spiboot_defconfig | 1 + configs/am335x_guardian_defconfig | 1 + configs/am335x_hs_evm_defconfig | 1 + configs/am335x_hs_evm_uart_defconfig | 1 + configs/am335x_shc_defconfig | 1 + configs/am335x_shc_ict_defconfig | 1 + configs/am335x_shc_netboot_defconfig | 1 + configs/am335x_shc_sdboot_defconfig | 1 + configs/am335x_sl50_defconfig | 1 + configs/chiliboard_defconfig | 1 + configs/cm_t335_defconfig | 1 + configs/colibri_pxa270_defconfig | 1 + configs/imgtec_xilfpga_defconfig | 1 + configs/imx28_xea_defconfig | 1 + configs/k2e_evm_defconfig | 1 + configs/k2e_hs_evm_defconfig | 1 + configs/k2g_evm_defconfig | 1 + configs/k2g_hs_evm_defconfig | 1 + configs/k2hk_evm_defconfig | 1 + configs/k2hk_hs_evm_defconfig | 1 + configs/k2l_evm_defconfig | 1 + configs/k2l_hs_evm_defconfig | 1 + configs/pic32mzdask_defconfig | 1 + configs/socfpga_arria10_defconfig | 1 + configs/socfpga_arria5_defconfig | 1 + configs/socfpga_cyclone5_defconfig | 1 + configs/socfpga_dbm_soc1_defconfig | 1 + configs/socfpga_de0_nano_soc_defconfig | 1 + configs/socfpga_de10_nano_defconfig | 1 + configs/socfpga_de1_soc_defconfig | 1 + configs/socfpga_is1_defconfig | 1 + configs/socfpga_mcvevk_defconfig | 1 + configs/socfpga_sockit_defconfig | 1 + configs/socfpga_sr1500_defconfig | 1 + configs/socfpga_vining_fpga_defconfig | 1 + configs/stmark2_defconfig | 1 + configs/tools-only_defconfig | 1 + configs/uniphier_ld4_sld8_defconfig | 1 + configs/uniphier_v7_defconfig | 1 + configs/uniphier_v8_defconfig | 1 + include/configs/am335x_evm.h | 4 ---- include/configs/am335x_guardian.h | 4 ---- include/configs/am335x_shc.h | 4 ---- include/configs/am335x_sl50.h | 4 ---- include/configs/chiliboard.h | 4 ---- include/configs/cm_t335.h | 1 - include/configs/colibri_pxa270.h | 1 - include/configs/ids8313.h | 1 - include/configs/imgtec_xilfpga.h | 1 - include/configs/m53menlo.h | 2 -- include/configs/pic32mzdask.h | 1 - include/configs/sandbox.h | 1 - include/configs/socfpga_common.h | 2 -- include/configs/socrates.h | 2 -- include/configs/stmark2.h | 2 -- include/configs/ti_armv7_keystone2.h | 1 - include/configs/uniphier.h | 2 -- include/configs/xea.h | 2 -- net/Kconfig | 1 + scripts/config_whitelist.txt | 1 - 67 files changed, 59 insertions(+), 40 deletions(-)
diff --git a/arch/Kconfig b/arch/Kconfig index 39156067b2c..3e8b745ea11 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -252,6 +252,7 @@ config X86 imply ACPIGEN if !QEMU imply SYSINFO if GENERATE_SMBIOS_TABLE imply SYSINFO_SMBIOS if GENERATE_SMBIOS_TABLE + imply TIMESTAMP
# Thing to enable for when SPL/TPL are enabled: SPL imply SPL_DM diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index eed27af74e8..fee2b1614c8 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1856,6 +1856,7 @@ config ARCH_STM32MP imply OF_LIBFDT_OVERLAY imply ENV_VARS_UBOOT_RUNTIME_CONFIG imply USE_PREBOOT + imply TIMESTAMP help Support for STM32MP SoC family developed by STMicroelectronics, MPUs based on ARM cortex A core diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig index a6ac897ab30..e4c071da173 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig @@ -21,6 +21,7 @@ config ARCH_LS1012A select SYS_I2C_MXC_I2C1 if !DM_I2C select SYS_I2C_MXC_I2C2 if !DM_I2C imply PANIC_HANG + imply TIMESTAMP
config ARCH_LS1028A bool diff --git a/arch/powerpc/cpu/mpc85xx/Kconfig b/arch/powerpc/cpu/mpc85xx/Kconfig index 836aeddbe29..f189b988fb0 100644 --- a/arch/powerpc/cpu/mpc85xx/Kconfig +++ b/arch/powerpc/cpu/mpc85xx/Kconfig @@ -379,6 +379,7 @@ config ARCH_P1010 imply CMD_PCI imply CMD_REGINFO imply FSL_SATA + imply TIMESTAMP
config ARCH_P1011 bool @@ -510,6 +511,7 @@ config ARCH_P2020 imply CMD_EEPROM imply CMD_NAND imply CMD_REGINFO + imply TIMESTAMP
config ARCH_P2041 bool diff --git a/boot/Kconfig b/boot/Kconfig index d3a12be2281..f1cff2837cb 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -25,6 +25,17 @@ config FIT multiple configurations, verification through hashing and also verified boot (secure boot using RSA).
+config TIMESTAMP + bool "Show image date and time when displaying image information" + default y if CMD_DATE + help + When CONFIG_TIMESTAMP is selected, the timestamp (date and time) of + an image is printed by image commands like bootm or iminfo. This + is shown as 'Timestamp: xxx' and 'Created: xxx'. If this option is + enabled, then U-Boot requires FITs to have a timestamp. If a FIT is + loaded that does not, the message 'Wrong FIT format: no timestamp' + is shown. + if FIT
config FIT_EXTERNAL_OFFSET diff --git a/configs/am335x_boneblack_vboot_defconfig b/configs/am335x_boneblack_vboot_defconfig index f0b197a0501..aec38b0e1b9 100644 --- a/configs/am335x_boneblack_vboot_defconfig +++ b/configs/am335x_boneblack_vboot_defconfig @@ -9,6 +9,7 @@ CONFIG_AM33XX=y CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0x280000 CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y CONFIG_SYS_EXTRA_OPTIONS="EMMC_BOOT" diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig index 4dc5d0fe347..98dadf824ff 100644 --- a/configs/am335x_evm_defconfig +++ b/configs/am335x_evm_defconfig @@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="am335x-evm" CONFIG_AM33XX=y CONFIG_SPL=y CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y CONFIG_SPL_LOAD_FIT=y # CONFIG_USE_SPL_FIT_GENERATOR is not set CONFIG_OF_BOARD_SETUP=y diff --git a/configs/am335x_evm_spiboot_defconfig b/configs/am335x_evm_spiboot_defconfig index a85645793ee..f8acb7e1a97 100644 --- a/configs/am335x_evm_spiboot_defconfig +++ b/configs/am335x_evm_spiboot_defconfig @@ -11,6 +11,7 @@ CONFIG_SPL=y CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y CONFIG_SPL_LOAD_FIT=y CONFIG_OF_BOARD_SETUP=y CONFIG_BOOTCOMMAND="run findfdt; run init_console; run finduuid; run distro_bootcmd" diff --git a/configs/am335x_guardian_defconfig b/configs/am335x_guardian_defconfig index 9d9d6283e05..8b3bd48b6c1 100644 --- a/configs/am335x_guardian_defconfig +++ b/configs/am335x_guardian_defconfig @@ -18,6 +18,7 @@ CONFIG_BOOTSTAGE_STASH_ADDR=0x0 CONFIG_ENV_OFFSET_REDUND=0x540000 CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y CONFIG_BOOTDELAY=0 CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n" diff --git a/configs/am335x_hs_evm_defconfig b/configs/am335x_hs_evm_defconfig index 21ef885aaf2..993fbbcd397 100644 --- a/configs/am335x_hs_evm_defconfig +++ b/configs/am335x_hs_evm_defconfig @@ -8,6 +8,7 @@ CONFIG_DEFAULT_DEVICE_TREE="am335x-evm" CONFIG_AM33XX=y CONFIG_SPL=y CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y CONFIG_FIT_IMAGE_POST_PROCESS=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y diff --git a/configs/am335x_hs_evm_uart_defconfig b/configs/am335x_hs_evm_uart_defconfig index bca18897d30..ecb0526c338 100644 --- a/configs/am335x_hs_evm_uart_defconfig +++ b/configs/am335x_hs_evm_uart_defconfig @@ -11,6 +11,7 @@ CONFIG_SPL=y # CONFIG_SPL_FS_FAT is not set # CONFIG_SPL_LIBDISK_SUPPORT is not set CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y CONFIG_FIT_IMAGE_POST_PROCESS=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y diff --git a/configs/am335x_shc_defconfig b/configs/am335x_shc_defconfig index f2a61080a74..7be215107cf 100644 --- a/configs/am335x_shc_defconfig +++ b/configs/am335x_shc_defconfig @@ -17,6 +17,7 @@ CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SERIES=y CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y CONFIG_SHOW_BOOT_PROGRESS=y CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_PROMPT="Enter 'shc' to enter prompt (times out) %d \nEnter 'noautoboot' to enter prompt without timeout\n" diff --git a/configs/am335x_shc_ict_defconfig b/configs/am335x_shc_ict_defconfig index 49e18d87398..106cf2694a3 100644 --- a/configs/am335x_shc_ict_defconfig +++ b/configs/am335x_shc_ict_defconfig @@ -18,6 +18,7 @@ CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SHC_ICT=y CONFIG_SERIES=y CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y CONFIG_SHOW_BOOT_PROGRESS=y CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_PROMPT="Enter 'shc' to enter prompt (times out) %d \nEnter 'noautoboot' to enter prompt without timeout\n" diff --git a/configs/am335x_shc_netboot_defconfig b/configs/am335x_shc_netboot_defconfig index c63ffb72486..504c9323df1 100644 --- a/configs/am335x_shc_netboot_defconfig +++ b/configs/am335x_shc_netboot_defconfig @@ -18,6 +18,7 @@ CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SHC_NETBOOT=y CONFIG_SERIES=y CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y CONFIG_SHOW_BOOT_PROGRESS=y CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_PROMPT="Enter 'shc' to enter prompt (times out) %d \nEnter 'noautoboot' to enter prompt without timeout\n" diff --git a/configs/am335x_shc_sdboot_defconfig b/configs/am335x_shc_sdboot_defconfig index 24409b8db45..64a5f48d4af 100644 --- a/configs/am335x_shc_sdboot_defconfig +++ b/configs/am335x_shc_sdboot_defconfig @@ -18,6 +18,7 @@ CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SHC_SDBOOT=y CONFIG_SERIES=y CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y CONFIG_SHOW_BOOT_PROGRESS=y CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_PROMPT="Enter 'shc' to enter prompt (times out) %d \nEnter 'noautoboot' to enter prompt without timeout\n" diff --git a/configs/am335x_sl50_defconfig b/configs/am335x_sl50_defconfig index aa1e196d408..b65f9608ce0 100644 --- a/configs/am335x_sl50_defconfig +++ b/configs/am335x_sl50_defconfig @@ -15,6 +15,7 @@ CONFIG_ENV_OFFSET_REDUND=0x20000 CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y CONFIG_SYS_EXTRA_OPTIONS="EMMC_BOOT" CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n" diff --git a/configs/chiliboard_defconfig b/configs/chiliboard_defconfig index 023cd196103..a50e732aef3 100644 --- a/configs/chiliboard_defconfig +++ b/configs/chiliboard_defconfig @@ -16,6 +16,7 @@ CONFIG_ENV_OFFSET_REDUND=0x22000 CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y CONFIG_BOOTDELAY=1 CONFIG_BOOTCOMMAND="run mmcboot; run nandboot; run netboot" CONFIG_DEFAULT_FDT_FILE="am335x-chiliboard.dtb" diff --git a/configs/cm_t335_defconfig b/configs/cm_t335_defconfig index 0600bf555de..7a65683a418 100644 --- a/configs/cm_t335_defconfig +++ b/configs/cm_t335_defconfig @@ -14,6 +14,7 @@ CONFIG_SPL=y CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y # CONFIG_USE_BOOTCOMMAND is not set CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_SPL_FS_EXT4=y diff --git a/configs/colibri_pxa270_defconfig b/configs/colibri_pxa270_defconfig index f13170c09e3..0116cfa6f85 100644 --- a/configs/colibri_pxa270_defconfig +++ b/configs/colibri_pxa270_defconfig @@ -10,6 +10,7 @@ CONFIG_ENV_SIZE=0x40000 CONFIG_ENV_SECT_SIZE=0x40000 CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_SYS_LOAD_ADDR=0xa0000000 +CONFIG_TIMESTAMP=y CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=tty0 console=ttyS0,115200" CONFIG_USE_BOOTCOMMAND=y diff --git a/configs/imgtec_xilfpga_defconfig b/configs/imgtec_xilfpga_defconfig index 3ded3a07391..576d68cdaec 100644 --- a/configs/imgtec_xilfpga_defconfig +++ b/configs/imgtec_xilfpga_defconfig @@ -10,6 +10,7 @@ CONFIG_MIPS_CACHE_DISABLE=y # CONFIG_MIPS_BOOT_ENV_LEGACY is not set CONFIG_MIPS_BOOT_FDT=y CONFIG_SYS_LOAD_ADDR=0x80500000 +CONFIG_TIMESTAMP=y CONFIG_BOOTDELAY=5 # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_HUSH_PARSER=y diff --git a/configs/imx28_xea_defconfig b/configs/imx28_xea_defconfig index 249bdd6d83e..eb5fc0b7c63 100644 --- a/configs/imx28_xea_defconfig +++ b/configs/imx28_xea_defconfig @@ -23,6 +23,7 @@ CONFIG_SPL_SPI=y CONFIG_SPL_PAYLOAD="u-boot.img" CONFIG_SYS_LOAD_ADDR=0x42000000 CONFIG_FIT=y +CONFIG_TIMESTAMP=y CONFIG_OF_BOARD_SETUP=y CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyAMA0,115200n8" diff --git a/configs/k2e_evm_defconfig b/configs/k2e_evm_defconfig index 2c49187b01a..eb8b945fa48 100644 --- a/configs/k2e_evm_defconfig +++ b/configs/k2e_evm_defconfig @@ -21,6 +21,7 @@ CONFIG_SPL=y CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y CONFIG_OF_BOARD_SETUP=y CONFIG_BOOTCOMMAND="run init_${boot}; run get_mon_${boot} run_mon; run get_kern_${boot}; run init_fw_rd_${boot}; run get_fdt_${boot}; run run_kern" CONFIG_SYS_CONSOLE_INFO_QUIET=y diff --git a/configs/k2e_hs_evm_defconfig b/configs/k2e_hs_evm_defconfig index 7d739de6293..45b6644f698 100644 --- a/configs/k2e_hs_evm_defconfig +++ b/configs/k2e_hs_evm_defconfig @@ -14,6 +14,7 @@ CONFIG_ENV_SIZE=0x40000 CONFIG_ENV_OFFSET=0x100000 CONFIG_DEFAULT_DEVICE_TREE="keystone-k2e-evm" CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y CONFIG_FIT_IMAGE_POST_PROCESS=y CONFIG_OF_BOARD_SETUP=y CONFIG_BOOTCOMMAND="run run_mon_hs; run init_${boot}; run get_fit_${boot}; bootm ${addr_fit}#${name_fdt}" diff --git a/configs/k2g_evm_defconfig b/configs/k2g_evm_defconfig index f0a7d839f4e..81fbf1da2b8 100644 --- a/configs/k2g_evm_defconfig +++ b/configs/k2g_evm_defconfig @@ -20,6 +20,7 @@ CONFIG_SPL=y CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y CONFIG_OF_BOARD_SETUP=y CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run get_mon_${boot} run_mon; run set_name_pmmc get_pmmc_${boot} run_pmmc; run get_kern_${boot}; run init_fw_rd_${boot}; run get_fdt_${boot}; run run_kern" CONFIG_SYS_CONSOLE_INFO_QUIET=y diff --git a/configs/k2g_hs_evm_defconfig b/configs/k2g_hs_evm_defconfig index a5ebb426b6e..c91f5c27035 100644 --- a/configs/k2g_hs_evm_defconfig +++ b/configs/k2g_hs_evm_defconfig @@ -13,6 +13,7 @@ CONFIG_TARGET_K2G_EVM=y CONFIG_ENV_SIZE=0x40000 CONFIG_DEFAULT_DEVICE_TREE="keystone-k2g-evm" CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y CONFIG_FIT_IMAGE_POST_PROCESS=y CONFIG_OF_BOARD_SETUP=y CONFIG_BOOTCOMMAND="run findfdt; run envboot; run run_mon_hs; run init_${boot}; run get_fit_${boot}; bootm ${addr_fit}#${name_fdt}" diff --git a/configs/k2hk_evm_defconfig b/configs/k2hk_evm_defconfig index a2d92015be8..dfe0291ab6a 100644 --- a/configs/k2hk_evm_defconfig +++ b/configs/k2hk_evm_defconfig @@ -21,6 +21,7 @@ CONFIG_SPL=y CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y CONFIG_OF_BOARD_SETUP=y CONFIG_BOOTCOMMAND="run init_${boot}; run get_mon_${boot} run_mon; run get_kern_${boot}; run init_fw_rd_${boot}; run get_fdt_${boot}; run run_kern" CONFIG_SYS_CONSOLE_INFO_QUIET=y diff --git a/configs/k2hk_hs_evm_defconfig b/configs/k2hk_hs_evm_defconfig index c3ef1a7e26b..e1b98a612e1 100644 --- a/configs/k2hk_hs_evm_defconfig +++ b/configs/k2hk_hs_evm_defconfig @@ -14,6 +14,7 @@ CONFIG_ENV_SIZE=0x40000 CONFIG_ENV_OFFSET=0x100000 CONFIG_DEFAULT_DEVICE_TREE="keystone-k2hk-evm" CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y CONFIG_FIT_IMAGE_POST_PROCESS=y CONFIG_OF_BOARD_SETUP=y CONFIG_BOOTCOMMAND="run run_mon_hs; run init_${boot}; run get_fit_${boot}; bootm ${addr_fit}#${name_fdt}" diff --git a/configs/k2l_evm_defconfig b/configs/k2l_evm_defconfig index 6ef1de7d829..d800ea15d8a 100644 --- a/configs/k2l_evm_defconfig +++ b/configs/k2l_evm_defconfig @@ -21,6 +21,7 @@ CONFIG_SPL=y CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_DISTRO_DEFAULTS=y +CONFIG_TIMESTAMP=y CONFIG_OF_BOARD_SETUP=y CONFIG_BOOTCOMMAND="run init_${boot}; run get_mon_${boot} run_mon; run get_kern_${boot}; run init_fw_rd_${boot}; run get_fdt_${boot}; run run_kern" CONFIG_SYS_CONSOLE_INFO_QUIET=y diff --git a/configs/k2l_hs_evm_defconfig b/configs/k2l_hs_evm_defconfig index 718ceff9943..1776217e942 100644 --- a/configs/k2l_hs_evm_defconfig +++ b/configs/k2l_hs_evm_defconfig @@ -13,6 +13,7 @@ CONFIG_TARGET_K2L_EVM=y CONFIG_ENV_SIZE=0x40000 CONFIG_ENV_OFFSET=0x100000 CONFIG_DEFAULT_DEVICE_TREE="keystone-k2l-evm" +CONFIG_TIMESTAMP=y CONFIG_FIT_IMAGE_POST_PROCESS=y CONFIG_OF_BOARD_SETUP=y CONFIG_USE_BOOTCOMMAND=y diff --git a/configs/pic32mzdask_defconfig b/configs/pic32mzdask_defconfig index ff6be7871d4..9d5aa3a4bb8 100644 --- a/configs/pic32mzdask_defconfig +++ b/configs/pic32mzdask_defconfig @@ -12,6 +12,7 @@ CONFIG_MACH_PIC32=y CONFIG_MIPS_BOOT_FDT=y CONFIG_DISTRO_DEFAULTS=y CONFIG_SYS_LOAD_ADDR=0x88500000 +CONFIG_TIMESTAMP=y CONFIG_BOOTDELAY=5 CONFIG_BOOTCOMMAND="run distro_bootcmd || run legacy_bootcmd" CONFIG_SYS_PROMPT="dask # " diff --git a/configs/socfpga_arria10_defconfig b/configs/socfpga_arria10_defconfig index d6b74447503..cd1c68a3b6a 100644 --- a/configs/socfpga_arria10_defconfig +++ b/configs/socfpga_arria10_defconfig @@ -12,6 +12,7 @@ CONFIG_IDENT_STRING="socfpga_arria10" CONFIG_SPL_FS_FAT=y CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y +CONFIG_TIMESTAMP=y CONFIG_SPL_FIT=y # CONFIG_USE_SPL_FIT_GENERATOR is not set CONFIG_USE_BOOTARGS=y diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig index 92bee765752..60f48db73a4 100644 --- a/configs/socfpga_arria5_defconfig +++ b/configs/socfpga_arria5_defconfig @@ -9,6 +9,7 @@ CONFIG_SPL_TEXT_BASE=0xFFFF0000 CONFIG_TARGET_SOCFPGA_ARRIA5_SOCDK=y CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y +CONFIG_TIMESTAMP=y # CONFIG_USE_BOOTCOMMAND is not set CONFIG_DEFAULT_FDT_FILE="socfpga_arria5_socdk.dtb" CONFIG_SYS_CONSOLE_IS_IN_ENV=y diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig index c0a450f1a5e..90717b553af 100644 --- a/configs/socfpga_cyclone5_defconfig +++ b/configs/socfpga_cyclone5_defconfig @@ -9,6 +9,7 @@ CONFIG_SPL_TEXT_BASE=0xFFFF0000 CONFIG_TARGET_SOCFPGA_CYCLONE5_SOCDK=y CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y +CONFIG_TIMESTAMP=y # CONFIG_USE_BOOTCOMMAND is not set CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_socdk.dtb" CONFIG_SYS_CONSOLE_IS_IN_ENV=y diff --git a/configs/socfpga_dbm_soc1_defconfig b/configs/socfpga_dbm_soc1_defconfig index baae2f2e480..15652a17ea5 100644 --- a/configs/socfpga_dbm_soc1_defconfig +++ b/configs/socfpga_dbm_soc1_defconfig @@ -8,6 +8,7 @@ CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_dbm_soc1" CONFIG_SPL_TEXT_BASE=0xFFFF0000 CONFIG_TARGET_SOCFPGA_DEVBOARDS_DBM_SOC1=y CONFIG_FIT=y +CONFIG_TIMESTAMP=y CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200" CONFIG_USE_BOOTCOMMAND=y diff --git a/configs/socfpga_de0_nano_soc_defconfig b/configs/socfpga_de0_nano_soc_defconfig index 826b14ebdd7..09b51e1baf5 100644 --- a/configs/socfpga_de0_nano_soc_defconfig +++ b/configs/socfpga_de0_nano_soc_defconfig @@ -9,6 +9,7 @@ CONFIG_SPL_TEXT_BASE=0xFFFF0000 CONFIG_TARGET_SOCFPGA_TERASIC_DE0_NANO=y CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y +CONFIG_TIMESTAMP=y # CONFIG_USE_BOOTCOMMAND is not set CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de0_nano_soc.dtb" CONFIG_SYS_CONSOLE_IS_IN_ENV=y diff --git a/configs/socfpga_de10_nano_defconfig b/configs/socfpga_de10_nano_defconfig index b374df50e75..28f7224f08d 100644 --- a/configs/socfpga_de10_nano_defconfig +++ b/configs/socfpga_de10_nano_defconfig @@ -9,6 +9,7 @@ CONFIG_SPL_TEXT_BASE=0xFFFF0000 CONFIG_TARGET_SOCFPGA_TERASIC_DE10_NANO=y CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y +CONFIG_TIMESTAMP=y # CONFIG_USE_BOOTCOMMAND is not set CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de10_nano.dtb" CONFIG_SYS_CONSOLE_IS_IN_ENV=y diff --git a/configs/socfpga_de1_soc_defconfig b/configs/socfpga_de1_soc_defconfig index 9ada0941666..36c411dd923 100644 --- a/configs/socfpga_de1_soc_defconfig +++ b/configs/socfpga_de1_soc_defconfig @@ -9,6 +9,7 @@ CONFIG_SPL_TEXT_BASE=0xFFFF0000 CONFIG_TARGET_SOCFPGA_TERASIC_DE1_SOC=y CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y +CONFIG_TIMESTAMP=y # CONFIG_USE_BOOTCOMMAND is not set CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de1_soc.dtb" CONFIG_SYS_CONSOLE_IS_IN_ENV=y diff --git a/configs/socfpga_is1_defconfig b/configs/socfpga_is1_defconfig index 7b27bcca76c..2124a08d21e 100644 --- a/configs/socfpga_is1_defconfig +++ b/configs/socfpga_is1_defconfig @@ -11,6 +11,7 @@ CONFIG_SYS_BOOTCOUNT_ADDR=0xfffffff8 CONFIG_TARGET_SOCFPGA_IS1=y CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y +CONFIG_TIMESTAMP=y CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200" # CONFIG_USE_BOOTCOMMAND is not set diff --git a/configs/socfpga_mcvevk_defconfig b/configs/socfpga_mcvevk_defconfig index 2a2899d93ec..d31c3f5e77e 100644 --- a/configs/socfpga_mcvevk_defconfig +++ b/configs/socfpga_mcvevk_defconfig @@ -9,6 +9,7 @@ CONFIG_SPL_TEXT_BASE=0xFFFF0000 CONFIG_TARGET_SOCFPGA_ARIES_MCVEVK=y CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y +CONFIG_TIMESTAMP=y CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200" CONFIG_BOOTCOMMAND="run mmc_mmc" diff --git a/configs/socfpga_sockit_defconfig b/configs/socfpga_sockit_defconfig index 649faa4852f..1a301ce76be 100644 --- a/configs/socfpga_sockit_defconfig +++ b/configs/socfpga_sockit_defconfig @@ -9,6 +9,7 @@ CONFIG_SPL_TEXT_BASE=0xFFFF0000 CONFIG_TARGET_SOCFPGA_TERASIC_SOCKIT=y CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y +CONFIG_TIMESTAMP=y # CONFIG_USE_BOOTCOMMAND is not set CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_sockit.dtb" CONFIG_SYS_CONSOLE_IS_IN_ENV=y diff --git a/configs/socfpga_sr1500_defconfig b/configs/socfpga_sr1500_defconfig index c400cbc66b7..a7a48a0ef25 100644 --- a/configs/socfpga_sr1500_defconfig +++ b/configs/socfpga_sr1500_defconfig @@ -14,6 +14,7 @@ CONFIG_TARGET_SOCFPGA_SR1500=y CONFIG_ENV_OFFSET_REDUND=0xF0000 CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y +CONFIG_TIMESTAMP=y # CONFIG_USE_BOOTCOMMAND is not set CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_sr1500.dtb" CONFIG_SYS_CONSOLE_IS_IN_ENV=y diff --git a/configs/socfpga_vining_fpga_defconfig b/configs/socfpga_vining_fpga_defconfig index 258aaf2171e..72a8dcf6008 100644 --- a/configs/socfpga_vining_fpga_defconfig +++ b/configs/socfpga_vining_fpga_defconfig @@ -11,6 +11,7 @@ CONFIG_TARGET_SOCFPGA_SOFTING_VINING_FPGA=y CONFIG_ENV_OFFSET_REDUND=0x110000 CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y +CONFIG_TIMESTAMP=y CONFIG_BOOTDELAY=5 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200" diff --git a/configs/stmark2_defconfig b/configs/stmark2_defconfig index 39efda6145a..895178a0e8e 100644 --- a/configs/stmark2_defconfig +++ b/configs/stmark2_defconfig @@ -7,6 +7,7 @@ CONFIG_ENV_SECT_SIZE=0x10000 CONFIG_DEFAULT_DEVICE_TREE="stmark2" CONFIG_TARGET_STMARK2=y CONFIG_SYS_LOAD_ADDR=0x40010000 +CONFIG_TIMESTAMP=y CONFIG_SYS_EXTRA_OPTIONS="CF_SBF,SYS_SERIAL_BOOT,SYS_INPUT_CLKSRC=30000000" CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 rw rootfstype=ramfs rdinit=/bin/init devtmpfs.mount=1" diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig index 5ffc625b0dd..abb00241fe2 100644 --- a/configs/tools-only_defconfig +++ b/configs/tools-only_defconfig @@ -5,6 +5,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sandbox" CONFIG_SYS_LOAD_ADDR=0x0 CONFIG_ANDROID_BOOT_IMAGE=y CONFIG_FIT=y +CONFIG_TIMESTAMP=y CONFIG_FIT_SIGNATURE=y CONFIG_USE_BOOTCOMMAND=y CONFIG_BOOTCOMMAND="run distro_bootcmd" diff --git a/configs/uniphier_ld4_sld8_defconfig b/configs/uniphier_ld4_sld8_defconfig index 97ee693334b..304d6a8e547 100644 --- a/configs/uniphier_ld4_sld8_defconfig +++ b/configs/uniphier_ld4_sld8_defconfig @@ -11,6 +11,7 @@ CONFIG_SPL_SERIAL=y CONFIG_SPL=y CONFIG_MICRO_SUPPORT_CARD=y CONFIG_SYS_LOAD_ADDR=0x85000000 +CONFIG_TIMESTAMP=y # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set CONFIG_BOOTCOMMAND="run ${bootdev}script; run ${bootdev}boot" CONFIG_USE_PREBOOT=y diff --git a/configs/uniphier_v7_defconfig b/configs/uniphier_v7_defconfig index 9089be0190c..87eb939fe2f 100644 --- a/configs/uniphier_v7_defconfig +++ b/configs/uniphier_v7_defconfig @@ -11,6 +11,7 @@ CONFIG_SPL_SERIAL=y CONFIG_SPL=y CONFIG_MICRO_SUPPORT_CARD=y CONFIG_SYS_LOAD_ADDR=0x85000000 +CONFIG_TIMESTAMP=y # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set CONFIG_BOOTCOMMAND="run ${bootdev}script; run ${bootdev}boot" CONFIG_USE_PREBOOT=y diff --git a/configs/uniphier_v8_defconfig b/configs/uniphier_v8_defconfig index e684291a3f9..b9e2d9ba790 100644 --- a/configs/uniphier_v8_defconfig +++ b/configs/uniphier_v8_defconfig @@ -10,6 +10,7 @@ CONFIG_DEFAULT_DEVICE_TREE="uniphier-ld20-ref" CONFIG_ARCH_UNIPHIER_V8_MULTI=y CONFIG_MICRO_SUPPORT_CARD=y CONFIG_SYS_LOAD_ADDR=0x85000000 +CONFIG_TIMESTAMP=y # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set CONFIG_BOOTCOMMAND="run ${bootdev}script; run ${bootdev}boot" CONFIG_USE_PREBOOT=y diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 7fb1b3a3e3f..cbdca976074 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -19,10 +19,6 @@ #include <configs/ti_am335x_common.h> #include <linux/sizes.h>
-#ifndef CONFIG_SPL_BUILD -# define CONFIG_TIMESTAMP -#endif - #define CONFIG_SYS_BOOTM_LEN SZ_16M
/* Clock Defines */ diff --git a/include/configs/am335x_guardian.h b/include/configs/am335x_guardian.h index a1f24bb2d11..10a95a10a0e 100644 --- a/include/configs/am335x_guardian.h +++ b/include/configs/am335x_guardian.h @@ -12,10 +12,6 @@
#include <configs/ti_am335x_common.h>
-#ifndef CONFIG_SPL_BUILD -#define CONFIG_TIMESTAMP -#endif - #define CONFIG_SYS_BOOTM_LEN (16 << 20)
/* Clock Defines */ diff --git a/include/configs/am335x_shc.h b/include/configs/am335x_shc.h index c7a7a18dc85..5ed4eb3b3c2 100644 --- a/include/configs/am335x_shc.h +++ b/include/configs/am335x_shc.h @@ -16,10 +16,6 @@
/* settings we don;t want on this board */
-#ifndef CONFIG_SPL_BUILD -# define CONFIG_TIMESTAMP -#endif - #define CONFIG_SYS_BOOTM_LEN (16 << 20)
/* Clock Defines */ diff --git a/include/configs/am335x_sl50.h b/include/configs/am335x_sl50.h index 7fbf421149d..0da98975adf 100644 --- a/include/configs/am335x_sl50.h +++ b/include/configs/am335x_sl50.h @@ -10,10 +10,6 @@
#include <configs/ti_am335x_common.h>
-#ifndef CONFIG_SPL_BUILD -# define CONFIG_TIMESTAMP -#endif - #define CONFIG_SYS_BOOTM_LEN (16 << 20)
/* Clock Defines */ diff --git a/include/configs/chiliboard.h b/include/configs/chiliboard.h index afddedd2eb7..fe496272630 100644 --- a/include/configs/chiliboard.h +++ b/include/configs/chiliboard.h @@ -8,10 +8,6 @@
#include <configs/ti_am335x_common.h>
-#ifndef CONFIG_SPL_BUILD -# define CONFIG_TIMESTAMP -#endif - /* Clock Defines */ #define V_OSCK 24000000 /* Clock output from T2 */ #define V_SCLK (V_OSCK) diff --git a/include/configs/cm_t335.h b/include/configs/cm_t335.h index 7e187a4e869..ad2e8818907 100644 --- a/include/configs/cm_t335.h +++ b/include/configs/cm_t335.h @@ -57,7 +57,6 @@ NANDARGS #endif /* CONFIG_SPL_BUILD */
-#define CONFIG_TIMESTAMP #define CONFIG_SYS_AUTOLOAD "no"
/* Serial console configuration */ diff --git a/include/configs/colibri_pxa270.h b/include/configs/colibri_pxa270.h index 22eab7779b0..e0c94b1abf1 100644 --- a/include/configs/colibri_pxa270.h +++ b/include/configs/colibri_pxa270.h @@ -19,7 +19,6 @@ /* * Environment settings */ -#define CONFIG_TIMESTAMP
/* * Serial Console Configuration diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h index 49f5d68892e..b5dd0ca4788 100644 --- a/include/configs/ids8313.h +++ b/include/configs/ids8313.h @@ -231,7 +231,6 @@ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
#define CONFIG_LOADS_ECHO -#define CONFIG_TIMESTAMP #undef CONFIG_SYS_LOADS_BAUD_CHANGE
#define CONFIG_JFFS2_NAND diff --git a/include/configs/imgtec_xilfpga.h b/include/configs/imgtec_xilfpga.h index fc27ca4fe6f..19d65f54e3b 100644 --- a/include/configs/imgtec_xilfpga.h +++ b/include/configs/imgtec_xilfpga.h @@ -46,6 +46,5 @@ /* --------------------------------------------------------------------- * Board boot configuration */ -#define CONFIG_TIMESTAMP /* Print image info with timestamp */
#endif /* __XILFPGA_CONFIG_H */ diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h index 2844553067c..c4abe340d5d 100644 --- a/include/configs/m53menlo.h +++ b/include/configs/m53menlo.h @@ -13,8 +13,6 @@
#define CONFIG_SYS_FSL_CLK
-#define CONFIG_TIMESTAMP /* Print image info with timestamp */ - /* * Memory configurations */ diff --git a/include/configs/pic32mzdask.h b/include/configs/pic32mzdask.h index cc2e6a7ae89..b8659f9ee68 100644 --- a/include/configs/pic32mzdask.h +++ b/include/configs/pic32mzdask.h @@ -70,7 +70,6 @@ /* --------------------------------------------------------------------- * Board boot configuration */ -#define CONFIG_TIMESTAMP /* Print image info with timestamp */
#define MEM_LAYOUT_ENV_SETTINGS \ "kernel_addr_r="__stringify(CONFIG_SYS_LOAD_ADDR)"\0" \ diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index 2cb8a90f5ea..5c2f3d84c3b 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -25,7 +25,6 @@ #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ 115200}
-#define CONFIG_TIMESTAMP #define CONFIG_BOOTP_SERVERIP
#ifndef SANDBOX_NO_SDL diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h index 31f95f52f8c..8a77d192c90 100644 --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -12,8 +12,6 @@ */ #define CONFIG_CLOCKS
-#define CONFIG_TIMESTAMP /* Print image info with timestamp */ - /* * Memory configurations */ diff --git a/include/configs/socrates.h b/include/configs/socrates.h index b7296daa374..07364fa787f 100644 --- a/include/configs/socrates.h +++ b/include/configs/socrates.h @@ -174,8 +174,6 @@ #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
-#define CONFIG_TIMESTAMP /* Print image info with ts */ - /* * BOOTP options */ diff --git a/include/configs/stmark2.h b/include/configs/stmark2.h index 1a5cf6b7811..e502fe72bdf 100644 --- a/include/configs/stmark2.h +++ b/include/configs/stmark2.h @@ -15,8 +15,6 @@ #define LDS_BOARD_TEXT \ board/sysam/stmark2/sbf_dram_init.o (.text*)
-#define CONFIG_TIMESTAMP - #define CONFIG_EXTRA_ENV_SETTINGS \ "kern_size=0x700000\0" \ "loadaddr=0x40001000\0" \ diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h index 4a329bf6eca..0243016fcde 100644 --- a/include/configs/ti_armv7_keystone2.h +++ b/include/configs/ti_armv7_keystone2.h @@ -108,7 +108,6 @@ DFU_ALT_INFO_MMC \
/* U-Boot general configuration */ -#define CONFIG_TIMESTAMP
/* EDMA3 */
diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index b91b0db2c47..1960a8004d2 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -39,8 +39,6 @@ #define BOOTENV #endif
-#define CONFIG_TIMESTAMP - #define CONFIG_SYS_MONITOR_BASE 0 #define CONFIG_SYS_MONITOR_LEN 0x00200000 /* 2MB */
diff --git a/include/configs/xea.h b/include/configs/xea.h index 5b968f0820c..0b29d3b63d0 100644 --- a/include/configs/xea.h +++ b/include/configs/xea.h @@ -14,8 +14,6 @@
#include <linux/sizes.h>
-#define CONFIG_TIMESTAMP /* Print image info with timestamp */ - /* SPL */ #define CONFIG_SPL_STACK 0x20000
diff --git a/net/Kconfig b/net/Kconfig index 3d3329912da..1983506bb8e 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -109,6 +109,7 @@ config KEEP_SERVERADDR
config UDP_CHECKSUM bool "Check the UDP checksum" + default y if SANDBOX help Enable this to verify the checksum on UDP packets. If the checksum is wrong then the packet is discussed and an error is shown, like diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index f0715614895..72ebcda1d4f 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -2918,7 +2918,6 @@ CONFIG_TFTP_FILE_NAME_MAX_LEN CONFIG_TFTP_PORT CONFIG_THOR_RESET_OFF CONFIG_THUNDERX -CONFIG_TIMESTAMP CONFIG_TIZEN CONFIG_TMU_TIMER CONFIG_TPL_PAD_TO

On Sat, Dec 18, 2021 at 11:27:50AM -0700, Simon Glass wrote:
This converts the following to Kconfig: CONFIG_TIMESTAMP
Signed-off-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

This converts the following to Kconfig: CONFIG_BOOTP_SERVERIP
Signed-off-by: Simon Glass sjg@chromium.org ---
Changes in v2: - Send the correct series
README | 3 --- arch/arm/mach-stm32mp/Kconfig | 1 + configs/adp-ae3xx_defconfig | 1 + configs/adp-ag101p_defconfig | 1 + configs/bitmain_antminer_s9_defconfig | 1 + configs/sandbox64_defconfig | 1 + configs/sandbox_defconfig | 1 + configs/sandbox_flattree_defconfig | 1 + configs/sandbox_noinst_defconfig | 1 + configs/sandbox_spl_defconfig | 1 + include/configs/adp-ae3xx.h | 2 -- include/configs/adp-ag101p.h | 2 -- include/configs/bitmain_antminer_s9.h | 2 -- include/configs/sandbox.h | 2 -- include/configs/stm32mp15_common.h | 1 - net/Kconfig | 7 +++++++ scripts/config_whitelist.txt | 1 - 17 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/README b/README index 79843787eeb..f1b541a796d 100644 --- a/README +++ b/README @@ -1258,9 +1258,6 @@ The following options need to be configured: CONFIG_BOOTP_VENDOREX CONFIG_BOOTP_MAY_FAIL
- CONFIG_BOOTP_SERVERIP - TFTP server will be the serverip - environment variable, not the BOOTP server. - CONFIG_BOOTP_MAY_FAIL - If the DHCP server is not found after the configured retry count, the call will fail instead of starting over. This can be used to fail over diff --git a/arch/arm/mach-stm32mp/Kconfig b/arch/arm/mach-stm32mp/Kconfig index a6c7fc5bfde..06ac349e2e7 100644 --- a/arch/arm/mach-stm32mp/Kconfig +++ b/arch/arm/mach-stm32mp/Kconfig @@ -173,6 +173,7 @@ config STM32_ETZPC bool "STM32 Extended TrustZone Protection" depends on STM32MP15x default y + imply BOOTP_SERVERIP help Say y to enable STM32 Extended TrustZone Protection
diff --git a/configs/adp-ae3xx_defconfig b/configs/adp-ae3xx_defconfig index 3fa00fb4cc4..89f2a153b1d 100644 --- a/configs/adp-ae3xx_defconfig +++ b/configs/adp-ae3xx_defconfig @@ -30,6 +30,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_BOOTP_SEND_HOSTNAME=y CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_BOOTP_SERVERIP=y CONFIG_DM=y CONFIG_CLK=y CONFIG_MMC=y diff --git a/configs/adp-ag101p_defconfig b/configs/adp-ag101p_defconfig index cc6541b1e3b..b9d1117ff7d 100644 --- a/configs/adp-ag101p_defconfig +++ b/configs/adp-ag101p_defconfig @@ -28,6 +28,7 @@ CONFIG_ENV_IS_IN_FLASH=y CONFIG_ENV_ADDR=0x80140000 CONFIG_BOOTP_SEND_HOSTNAME=y CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_BOOTP_SERVERIP=y CONFIG_DM=y CONFIG_MMC=y CONFIG_FTSDC010=y diff --git a/configs/bitmain_antminer_s9_defconfig b/configs/bitmain_antminer_s9_defconfig index 4cd6a7c102d..f6563333360 100644 --- a/configs/bitmain_antminer_s9_defconfig +++ b/configs/bitmain_antminer_s9_defconfig @@ -56,6 +56,7 @@ CONFIG_ENV_IS_IN_FAT=y CONFIG_ENV_IS_IN_NAND=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_BOOTP_SERVERIP=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_BOOTCOUNT_LIMIT=y CONFIG_FPGA_XILINX=y diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig index d849989cf61..bdf805ad197 100644 --- a/configs/sandbox64_defconfig +++ b/configs/sandbox64_defconfig @@ -96,6 +96,7 @@ CONFIG_ENV_IMPORT_FDT=y CONFIG_BOOTP_SEND_HOSTNAME=y CONFIG_NETCONSOLE=y CONFIG_IP_DEFRAG=y +CONFIG_BOOTP_SERVERIP=y CONFIG_DM_DMA=y CONFIG_REGMAP=y CONFIG_SYSCON=y diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index c390afe9de5..36461b21b39 100644 --- a/configs/sandbox_defconfig +++ b/configs/sandbox_defconfig @@ -121,6 +121,7 @@ CONFIG_ENV_IMPORT_FDT=y CONFIG_BOOTP_SEND_HOSTNAME=y CONFIG_NETCONSOLE=y CONFIG_IP_DEFRAG=y +CONFIG_BOOTP_SERVERIP=y CONFIG_DM_DMA=y CONFIG_DEVRES=y CONFIG_DEBUG_DEVRES=y diff --git a/configs/sandbox_flattree_defconfig b/configs/sandbox_flattree_defconfig index f184723a899..7d2130dd89c 100644 --- a/configs/sandbox_flattree_defconfig +++ b/configs/sandbox_flattree_defconfig @@ -76,6 +76,7 @@ CONFIG_ENV_EXT4_DEVICE_AND_PART="0:0" CONFIG_BOOTP_SEND_HOSTNAME=y CONFIG_NETCONSOLE=y CONFIG_IP_DEFRAG=y +CONFIG_BOOTP_SERVERIP=y CONFIG_DM_DMA=y CONFIG_REGMAP=y CONFIG_SYSCON=y diff --git a/configs/sandbox_noinst_defconfig b/configs/sandbox_noinst_defconfig index 490368e768f..6679c4335b2 100644 --- a/configs/sandbox_noinst_defconfig +++ b/configs/sandbox_noinst_defconfig @@ -96,6 +96,7 @@ CONFIG_ENV_EXT4_DEVICE_AND_PART="0:0" CONFIG_BOOTP_SEND_HOSTNAME=y CONFIG_NETCONSOLE=y CONFIG_IP_DEFRAG=y +CONFIG_BOOTP_SERVERIP=y CONFIG_SPL_DM=y CONFIG_DM_DMA=y CONFIG_REGMAP=y diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig index f1a54ace9bc..fddf132dfed 100644 --- a/configs/sandbox_spl_defconfig +++ b/configs/sandbox_spl_defconfig @@ -98,6 +98,7 @@ CONFIG_ENV_EXT4_DEVICE_AND_PART="0:0" CONFIG_BOOTP_SEND_HOSTNAME=y CONFIG_NETCONSOLE=y CONFIG_IP_DEFRAG=y +CONFIG_BOOTP_SERVERIP=y CONFIG_SPL_DM=y CONFIG_DM_DMA=y CONFIG_REGMAP=y diff --git a/include/configs/adp-ae3xx.h b/include/configs/adp-ae3xx.h index 973033d6b4d..497db49297b 100644 --- a/include/configs/adp-ae3xx.h +++ b/include/configs/adp-ae3xx.h @@ -19,8 +19,6 @@
#define CONFIG_ARCH_MAP_SYSMEM
-#define CONFIG_BOOTP_SERVERIP - #ifdef CONFIG_SKIP_LOWLEVEL_INIT #ifdef CONFIG_OF_CONTROL #undef CONFIG_OF_SEPARATE diff --git a/include/configs/adp-ag101p.h b/include/configs/adp-ag101p.h index f533ada73f4..be1d95ee49e 100644 --- a/include/configs/adp-ag101p.h +++ b/include/configs/adp-ag101p.h @@ -17,8 +17,6 @@
#define CONFIG_ARCH_MAP_SYSMEM
-#define CONFIG_BOOTP_SERVERIP - #ifndef CONFIG_SKIP_LOWLEVEL_INIT #define CONFIG_MEM_REMAP #endif diff --git a/include/configs/bitmain_antminer_s9.h b/include/configs/bitmain_antminer_s9.h index a9f45f19295..2bcd0e1a989 100644 --- a/include/configs/bitmain_antminer_s9.h +++ b/include/configs/bitmain_antminer_s9.h @@ -9,8 +9,6 @@ #define CONFIG_SYS_SDRAM_BASE 0x00000000 #define CONFIG_SYS_SDRAM_SIZE 0x40000000
-#define CONFIG_BOOTP_SERVERIP - #define CONFIG_EXTRA_ENV_SETTINGS \ "autoload=no\0" \ "pxefile_addr_r=0x2000000\0" \ diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index 5c2f3d84c3b..9e0e8c7056f 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -25,8 +25,6 @@ #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ 115200}
-#define CONFIG_BOOTP_SERVERIP - #ifndef SANDBOX_NO_SDL #define CONFIG_SANDBOX_SDL #endif diff --git a/include/configs/stm32mp15_common.h b/include/configs/stm32mp15_common.h index dab679f71e3..2bbc8def820 100644 --- a/include/configs/stm32mp15_common.h +++ b/include/configs/stm32mp15_common.h @@ -57,7 +57,6 @@ /* Ethernet need */ #ifdef CONFIG_DWC_ETH_QOS #define CONFIG_SERVERIP 192.168.1.1 -#define CONFIG_BOOTP_SERVERIP #define CONFIG_SYS_AUTOLOAD "no" #endif
diff --git a/net/Kconfig b/net/Kconfig index 1983506bb8e..2643b79c468 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -115,4 +115,11 @@ config UDP_CHECKSUM is wrong then the packet is discussed and an error is shown, like "UDP wrong checksum 29374a23 30ff3826"
+config BOOTP_SERVERIP + bool "Use the 'serverip' env var for tftp, not bootp" + help + Enable this if the TFTP server will be the 'serverip' environment + variable, not the BOOTP server. This affects the operation of both + bootp and tftp. + endif # if NET diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 72ebcda1d4f..75c176fdbc9 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -78,7 +78,6 @@ CONFIG_BOOTP_ID_CACHE_SIZE CONFIG_BOOTP_MAY_FAIL CONFIG_BOOTP_NISDOMAIN CONFIG_BOOTP_RANDOM_DELAY -CONFIG_BOOTP_SERVERIP CONFIG_BOOTP_TIMEOFFSET CONFIG_BOOTP_VENDOREX CONFIG_BOOTROM_ERR_REG

On Sat, Dec 18, 2021 at 11:27:51AM -0700, Simon Glass wrote:
This converts the following to Kconfig: CONFIG_BOOTP_SERVERIP
Signed-off-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

Use IS_ENABLED() instead, to reduce the number of build paths.
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
cmd/net.c | 4 +--- net/bootp.c | 5 +++-- net/net.c | 24 ++++++++++++------------ 3 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/cmd/net.c b/cmd/net.c index 651c1411f4d..3619c843d83 100644 --- a/cmd/net.c +++ b/cmd/net.c @@ -152,16 +152,14 @@ static void netboot_update_env(void) ip_to_string(net_ip, tmp); env_set("ipaddr", tmp); } -#if !defined(CONFIG_BOOTP_SERVERIP) /* * Only attempt to change serverip if net/bootp.c:store_net_params() * could have set it */ - if (net_server_ip.s_addr) { + if (!IS_ENABLED(CONFIG_BOOTP_SERVERIP) && net_server_ip.s_addr) { ip_to_string(net_server_ip, tmp); env_set("serverip", tmp); } -#endif if (net_dns_server.s_addr) { ip_to_string(net_dns_server, tmp); env_set("dnsip", tmp); diff --git a/net/bootp.c b/net/bootp.c index 58e30cd6b0c..d83e4eb0ba9 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -148,10 +148,12 @@ static int check_reply_packet(uchar *pkt, unsigned dest, unsigned src,
static void store_bootp_params(struct bootp_hdr *bp) { -#if !defined(CONFIG_BOOTP_SERVERIP) struct in_addr tmp_ip; bool overwrite_serverip = true;
+ if (IS_ENABLED(CONFIG_BOOTP_SERVERIP)) + return; + #if defined(CONFIG_BOOTP_PREFER_SERVERIP) overwrite_serverip = false; #endif @@ -179,7 +181,6 @@ static void store_bootp_params(struct bootp_hdr *bp) */ if (*net_boot_file_name) env_set("bootfile", net_boot_file_name); -#endif }
/* diff --git a/net/net.c b/net/net.c index 43e230aeb92..072a82d8f9c 100644 --- a/net/net.c +++ b/net/net.c @@ -302,12 +302,12 @@ void net_auto_load(void) if (s != NULL && strcmp(s, "NFS") == 0) { if (net_check_prereq(NFS)) { /* We aren't expecting to get a serverip, so just accept the assigned IP */ -#ifdef CONFIG_BOOTP_SERVERIP - net_set_state(NETLOOP_SUCCESS); -#else - printf("Cannot autoload with NFS\n"); - net_set_state(NETLOOP_FAIL); -#endif + if (IS_ENABLED(CONFIG_BOOTP_SERVERIP)) { + net_set_state(NETLOOP_SUCCESS); + } else { + printf("Cannot autoload with NFS\n"); + net_set_state(NETLOOP_FAIL); + } return; } /* @@ -327,12 +327,12 @@ void net_auto_load(void) } if (net_check_prereq(TFTPGET)) { /* We aren't expecting to get a serverip, so just accept the assigned IP */ -#ifdef CONFIG_BOOTP_SERVERIP - net_set_state(NETLOOP_SUCCESS); -#else - printf("Cannot autoload with TFTPGET\n"); - net_set_state(NETLOOP_FAIL); -#endif + if (IS_ENABLED(CONFIG_BOOTP_SERVERIP)) { + net_set_state(NETLOOP_SUCCESS); + } else { + printf("Cannot autoload with TFTPGET\n"); + net_set_state(NETLOOP_FAIL); + } return; } tftp_start(TFTPGET);

On Sat, Dec 18, 2021 at 8:28 PM Simon Glass sjg@chromium.org wrote:
Use IS_ENABLED() instead, to reduce the number of build paths.
Signed-off-by: Simon Glass sjg@chromium.org
(no changes since v1)
cmd/net.c | 4 +--- net/bootp.c | 5 +++-- net/net.c | 24 ++++++++++++------------ 3 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/cmd/net.c b/cmd/net.c index 651c1411f4d..3619c843d83 100644 --- a/cmd/net.c +++ b/cmd/net.c @@ -152,16 +152,14 @@ static void netboot_update_env(void) ip_to_string(net_ip, tmp); env_set("ipaddr", tmp); } -#if !defined(CONFIG_BOOTP_SERVERIP) /* * Only attempt to change serverip if net/bootp.c:store_net_params() * could have set it */
if (net_server_ip.s_addr) {
if (!IS_ENABLED(CONFIG_BOOTP_SERVERIP) && net_server_ip.s_addr) { ip_to_string(net_server_ip, tmp); env_set("serverip", tmp); }
-#endif if (net_dns_server.s_addr) { ip_to_string(net_dns_server, tmp); env_set("dnsip", tmp); diff --git a/net/bootp.c b/net/bootp.c index 58e30cd6b0c..d83e4eb0ba9 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -148,10 +148,12 @@ static int check_reply_packet(uchar *pkt, unsigned dest, unsigned src,
static void store_bootp_params(struct bootp_hdr *bp) { -#if !defined(CONFIG_BOOTP_SERVERIP) struct in_addr tmp_ip; bool overwrite_serverip = true;
if (IS_ENABLED(CONFIG_BOOTP_SERVERIP))
return;
#if defined(CONFIG_BOOTP_PREFER_SERVERIP) overwrite_serverip = false; #endif @@ -179,7 +181,6 @@ static void store_bootp_params(struct bootp_hdr *bp) */ if (*net_boot_file_name) env_set("bootfile", net_boot_file_name); -#endif }
/* diff --git a/net/net.c b/net/net.c index 43e230aeb92..072a82d8f9c 100644 --- a/net/net.c +++ b/net/net.c @@ -302,12 +302,12 @@ void net_auto_load(void) if (s != NULL && strcmp(s, "NFS") == 0) { if (net_check_prereq(NFS)) { /* We aren't expecting to get a serverip, so just accept the assigned IP */ -#ifdef CONFIG_BOOTP_SERVERIP
net_set_state(NETLOOP_SUCCESS);
-#else
printf("Cannot autoload with NFS\n");
net_set_state(NETLOOP_FAIL);
-#endif
if (IS_ENABLED(CONFIG_BOOTP_SERVERIP)) {
net_set_state(NETLOOP_SUCCESS);
} else {
printf("Cannot autoload with NFS\n");
net_set_state(NETLOOP_FAIL);
} return; } /*
@@ -327,12 +327,12 @@ void net_auto_load(void) } if (net_check_prereq(TFTPGET)) { /* We aren't expecting to get a serverip, so just accept the assigned IP */ -#ifdef CONFIG_BOOTP_SERVERIP
net_set_state(NETLOOP_SUCCESS);
-#else
printf("Cannot autoload with TFTPGET\n");
net_set_state(NETLOOP_FAIL);
-#endif
if (IS_ENABLED(CONFIG_BOOTP_SERVERIP)) {
net_set_state(NETLOOP_SUCCESS);
} else {
printf("Cannot autoload with TFTPGET\n");
net_set_state(NETLOOP_FAIL);
} return; } tftp_start(TFTPGET);
-- 2.34.1.173.g76aa8bc2d0-goog
Reviewed-by: Ramon Fried rfried.dev@gmail.com

On Sat, Dec 18, 2021 at 11:27:52AM -0700, Simon Glass wrote:
Use IS_ENABLED() instead, to reduce the number of build paths.
Signed-off-by: Simon Glass sjg@chromium.org Reviewed-by: Ramon Fried rfried.dev@gmail.com
Applied to u-boot/master, thanks!

On Sat, Dec 18, 2021 at 11:27:48AM -0700, Simon Glass wrote:
This converts the following to Kconfig: CONFIG_KEEP_SERVERADDR
Drop the preprocessor usage also.
Signed-off-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!
participants (3)
-
Ramon Fried
-
Simon Glass
-
Tom Rini