[PATCH] xilinx: Enable MBEDTLS/LWIP/WGET and WGET_HTTPS

Michal Simek michal.simek at amd.com
Tue Feb 4 12:26:03 CET 2025



On 2/3/25 10:36, Michal Simek wrote:
> 
> 
> On 1/29/25 16:31, Michal Simek wrote:
>> Enable lwip and https on our platforms to be able to use it in a boot.
>>
>> Signed-off-by: Michal Simek <michal.simek at amd.com>
>> ---
>>
>>   configs/amd_versal2_virt_defconfig       | 11 ++++-------
>>   configs/microblaze-generic_defconfig     |  8 ++++----
>>   configs/xilinx_versal_net_virt_defconfig | 10 +++-------
>>   configs/xilinx_versal_virt_defconfig     | 10 +++-------
>>   configs/xilinx_zynq_virt_defconfig       |  7 ++-----
>>   configs/xilinx_zynqmp_kria_defconfig     | 15 +++------------
>>   configs/xilinx_zynqmp_virt_defconfig     | 17 +++--------------
>>   7 files changed, 22 insertions(+), 56 deletions(-)
>>
>> diff --git a/configs/amd_versal2_virt_defconfig b/configs/ 
>> amd_versal2_virt_defconfig
>> index 57a6a06df7cd..8bee002777a5 100644
>> --- a/configs/amd_versal2_virt_defconfig
>> +++ b/configs/amd_versal2_virt_defconfig
>> @@ -17,6 +17,7 @@ CONFIG_DEBUG_UART=y
>>   CONFIG_SYS_MEMTEST_START=0x00000000
>>   CONFIG_SYS_MEMTEST_END=0x00001000
>>   CONFIG_REMAKE_ELF=y
>> +CONFIG_EFI_HTTP_BOOT=y
>>   CONFIG_FIT=y
>>   CONFIG_FIT_VERBOSE=y
>>   CONFIG_DISTRO_DEFAULTS=y
>> @@ -47,10 +48,7 @@ CONFIG_CMD_SF_TEST=y
>>   CONFIG_CMD_SPI=y
>>   CONFIG_CMD_UFS=y
>>   CONFIG_CMD_USB=y
>> -CONFIG_BOOTP_MAY_FAIL=y
>> -CONFIG_BOOTP_BOOTFILESIZE=y
>> -CONFIG_CMD_TFTPPUT=y
>> -CONFIG_CMD_NFS=y
>> +CONFIG_WGET_HTTPS=y
>>   CONFIG_CMD_CACHE=y
>>   CONFIG_CMD_EFIDEBUG=y
>>   CONFIG_CMD_TIME=y
>> @@ -70,9 +68,7 @@ CONFIG_DTB_RESELECT=y
>>   CONFIG_MULTI_DTB_FIT=y
>>   CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
>>   CONFIG_SYS_RELOC_GD_ENV_ADDR=y
>> -CONFIG_NETCONSOLE=y
>> -CONFIG_IP_DEFRAG=y
>> -CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
>> +CONFIG_NET_LWIP=y
>>   CONFIG_NET_RANDOM_ETHADDR=y
>>   CONFIG_TFTP_BLOCKSIZE=4096
>>   CONFIG_SIMPLE_PM_BUS=y
>> @@ -155,6 +151,7 @@ CONFIG_UFS_AMD_VERSAL2=y
>>   CONFIG_VIRTIO_MMIO=y
>>   CONFIG_VIRTIO_NET=y
>>   CONFIG_VIRTIO_BLK=y
>> +CONFIG_MBEDTLS_LIB=y
>>   CONFIG_TPM=y
>>   # CONFIG_OPTEE_LIB is not set
>>   CONFIG_TOOLS_MKFWUMDATA=y
>> diff --git a/configs/microblaze-generic_defconfig b/configs/microblaze- 
>> generic_defconfig
>> index 87756cb26df5..6075c6a2beed 100644
>> --- a/configs/microblaze-generic_defconfig
>> +++ b/configs/microblaze-generic_defconfig
>> @@ -46,16 +46,15 @@ CONFIG_CMD_MEMINFO=y
>>   CONFIG_CMD_MEMINFO_MAP=y
>>   CONFIG_CMD_GPIO=y
>>   CONFIG_CMD_SAVES=y
>> -CONFIG_BOOTP_BOOTFILESIZE=y
>> -CONFIG_CMD_TFTPPUT=y
>> +CONFIG_CMD_WGET=y
>> +CONFIG_WGET_HTTPS=y
>>   CONFIG_CMD_CACHE=y
>>   CONFIG_SPL_OF_CONTROL=y
>>   CONFIG_OF_EMBED=y
>>   CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
>>   CONFIG_USE_HOSTNAME=y
>>   CONFIG_HOSTNAME="microblaze-generic"
>> -CONFIG_NETCONSOLE=y
>> -CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
>> +CONFIG_NET_LWIP=y
>>   CONFIG_NET_RANDOM_ETHADDR=y
>>   CONFIG_SPL_DM=y
>>   CONFIG_XILINX_GPIO=y
>> @@ -99,3 +98,4 @@ CONFIG_SYSRESET_GPIO=y
>>   CONFIG_SYSRESET_MICROBLAZE=y
>>   CONFIG_WDT=y
>>   CONFIG_XILINX_TB_WATCHDOG=y
>> +CONFIG_MBEDTLS_LIB=y
>> diff --git a/configs/xilinx_versal_net_virt_defconfig b/configs/ 
>> xilinx_versal_net_virt_defconfig
>> index 081ad424a9aa..5ef5fd44fd37 100644
>> --- a/configs/xilinx_versal_net_virt_defconfig
>> +++ b/configs/xilinx_versal_net_virt_defconfig
>> @@ -46,10 +46,7 @@ CONFIG_MMC_SPEED_MODE_SET=y
>>   CONFIG_CMD_MTD=y
>>   CONFIG_CMD_SF_TEST=y
>>   CONFIG_CMD_USB=y
>> -CONFIG_BOOTP_MAY_FAIL=y
>> -CONFIG_BOOTP_BOOTFILESIZE=y
>> -CONFIG_CMD_TFTPPUT=y
>> -CONFIG_CMD_NFS=y
>> +CONFIG_WGET_HTTPS=y
>>   CONFIG_CMD_CACHE=y
>>   CONFIG_CMD_EFIDEBUG=y
>>   CONFIG_CMD_TIME=y
>> @@ -71,9 +68,7 @@ CONFIG_ENV_IS_IN_FAT=y
>>   CONFIG_ENV_IS_IN_SPI_FLASH=y
>>   CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
>>   CONFIG_SYS_RELOC_GD_ENV_ADDR=y
>> -CONFIG_NETCONSOLE=y
>> -CONFIG_IP_DEFRAG=y
>> -CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
>> +CONFIG_NET_LWIP=y
>>   CONFIG_NET_RANDOM_ETHADDR=y
>>   CONFIG_TFTP_BLOCKSIZE=4096
>>   CONFIG_SIMPLE_PM_BUS=y
>> @@ -155,4 +150,5 @@ CONFIG_USB_FUNCTION_THOR=y
>>   CONFIG_VIRTIO_MMIO=y
>>   CONFIG_VIRTIO_NET=y
>>   CONFIG_VIRTIO_BLK=y
>> +CONFIG_MBEDTLS_LIB=y
>>   CONFIG_TPM=y
>> diff --git a/configs/xilinx_versal_virt_defconfig b/configs/ 
>> xilinx_versal_virt_defconfig
>> index 70e73ac7ad45..f228eef7c959 100644
>> --- a/configs/xilinx_versal_virt_defconfig
>> +++ b/configs/xilinx_versal_virt_defconfig
>> @@ -52,10 +52,7 @@ CONFIG_MMC_SPEED_MODE_SET=y
>>   CONFIG_CMD_MTD=y
>>   CONFIG_CMD_SF_TEST=y
>>   CONFIG_CMD_USB=y
>> -CONFIG_BOOTP_MAY_FAIL=y
>> -CONFIG_BOOTP_BOOTFILESIZE=y
>> -CONFIG_CMD_TFTPPUT=y
>> -CONFIG_CMD_NFS=y
>> +CONFIG_WGET_HTTPS=y
>>   CONFIG_CMD_CACHE=y
>>   CONFIG_CMD_EFIDEBUG=y
>>   CONFIG_CMD_TIME=y
>> @@ -75,9 +72,7 @@ CONFIG_ENV_IS_IN_FAT=y
>>   CONFIG_ENV_IS_IN_SPI_FLASH=y
>>   CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
>>   CONFIG_SYS_RELOC_GD_ENV_ADDR=y
>> -CONFIG_NETCONSOLE=y
>> -CONFIG_IP_DEFRAG=y
>> -CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
>> +CONFIG_NET_LWIP=y
>>   CONFIG_NET_RANDOM_ETHADDR=y
>>   CONFIG_TFTP_BLOCKSIZE=4096
>>   CONFIG_SIMPLE_PM_BUS=y
>> @@ -170,5 +165,6 @@ CONFIG_USB_FUNCTION_THOR=y
>>   CONFIG_VIRTIO_MMIO=y
>>   CONFIG_VIRTIO_NET=y
>>   CONFIG_VIRTIO_BLK=y
>> +CONFIG_MBEDTLS_LIB=y
>>   CONFIG_TPM=y
>>   CONFIG_TOOLS_MKFWUMDATA=y
>> diff --git a/configs/xilinx_zynq_virt_defconfig b/configs/ 
>> xilinx_zynq_virt_defconfig
>> index c2422c5b4dcf..fdf8bb361294 100644
>> --- a/configs/xilinx_zynq_virt_defconfig
>> +++ b/configs/xilinx_zynq_virt_defconfig
>> @@ -73,9 +73,6 @@ CONFIG_CMD_MTD=y
>>   CONFIG_CMD_NAND_LOCK_UNLOCK=y
>>   CONFIG_CMD_SF_TEST=y
>>   CONFIG_CMD_USB=y
>> -CONFIG_BOOTP_MAY_FAIL=y
>> -CONFIG_CMD_TFTPPUT=y
>> -CONFIG_CMD_NFS=y
>>   CONFIG_CMD_CACHE=y
>>   CONFIG_CMD_EFIDEBUG=y
>>   CONFIG_CMD_TIME=y
>> @@ -94,8 +91,7 @@ CONFIG_ENV_IS_IN_NAND=y
>>   CONFIG_ENV_IS_IN_SPI_FLASH=y
>>   CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
>>   CONFIG_SYS_RELOC_GD_ENV_ADDR=y
>> -CONFIG_NETCONSOLE=y
>> -CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
>> +CONFIG_NET_LWIP=y
>>   CONFIG_NET_RANDOM_ETHADDR=y
>>   CONFIG_SPL_DM_SEQ_ALIAS=y
>>   CONFIG_SIMPLE_PM_BUS=y
>> @@ -160,4 +156,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x0300
>>   CONFIG_CI_UDC=y
>>   CONFIG_USB_GADGET_DOWNLOAD=y
>>   CONFIG_SYS_TIMER_COUNTS_DOWN=y
>> +CONFIG_MBEDTLS_LIB=y
>>   CONFIG_SPL_GZIP=y
>> diff --git a/configs/xilinx_zynqmp_kria_defconfig b/configs/ 
>> xilinx_zynqmp_kria_defconfig
>> index 2258b59e3edd..1e8ec90ff533 100644
>> --- a/configs/xilinx_zynqmp_kria_defconfig
>> +++ b/configs/xilinx_zynqmp_kria_defconfig
>> @@ -84,11 +84,7 @@ CONFIG_CMD_SDRAM=y
>>   CONFIG_CMD_SF_TEST=y
>>   CONFIG_CMD_SPI=y
>>   CONFIG_CMD_USB=y
>> -CONFIG_CMD_USB_MASS_STORAGE=y
>> -CONFIG_BOOTP_MAY_FAIL=y
>> -CONFIG_BOOTP_BOOTFILESIZE=y
>> -CONFIG_CMD_TFTPPUT=y
>> -CONFIG_CMD_NFS=y
>> +CONFIG_WGET_HTTPS=y
>>   CONFIG_CMD_BMP=y
>>   CONFIG_CMD_CACHE=y
>>   CONFIG_CMD_EFIDEBUG=y
>> @@ -120,8 +116,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
>>   CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
>>   CONFIG_ENV_FAT_DEVICE_AND_PART=":auto"
>>   CONFIG_SYS_RELOC_GD_ENV_ADDR=y
>> -CONFIG_NETCONSOLE=y
>> -CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
>> +CONFIG_NET_LWIP=y
>>   CONFIG_NET_RANDOM_ETHADDR=y
>>   CONFIG_SPL_DM_SEQ_ALIAS=y
>>   CONFIG_SIMPLE_PM_BUS=y
>> @@ -131,7 +126,6 @@ CONFIG_SATA_CEVA=y
>>   CONFIG_BUTTON=y
>>   CONFIG_BUTTON_GPIO=y
>>   CONFIG_CLK_ZYNQMP=y
>> -CONFIG_DFU_TFTP=y
>>   CONFIG_DFU_TIMEOUT=y
>>   CONFIG_DFU_MMC=y
>>   CONFIG_DFU_MTD=y
>> @@ -140,10 +134,6 @@ CONFIG_DFU_SF=y
>>   CONFIG_SYS_DFU_DATA_BUF_SIZE=0x1800000
>>   CONFIG_DMA=y
>>   CONFIG_XILINX_DPDMA=y
>> -CONFIG_USB_FUNCTION_FASTBOOT=y
>> -CONFIG_FASTBOOT_FLASH=y
>> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>> -CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>>   CONFIG_ARM_FFA_TRANSPORT=y
>>   CONFIG_FPGA_XILINX=y
>>   CONFIG_FPGA_ZYNQMPPL=y
>> @@ -231,6 +221,7 @@ CONFIG_VIRTIO_BLK=y
>>   # CONFIG_BINMAN_FDT is not set
>>   CONFIG_BINMAN_DTB="./arch/arm/dts/zynqmp-binman-som.dtb"
>>   CONFIG_PANIC_HANG=y
>> +CONFIG_MBEDTLS_LIB=y
>>   CONFIG_TPM=y
>>   CONFIG_SPL_GZIP=y
>>   CONFIG_TOOLS_MKFWUMDATA=y
>> diff --git a/configs/xilinx_zynqmp_virt_defconfig b/configs/ 
>> xilinx_zynqmp_virt_defconfig
>> index c0721b65fd48..036268c79f77 100644
>> --- a/configs/xilinx_zynqmp_virt_defconfig
>> +++ b/configs/xilinx_zynqmp_virt_defconfig
>> @@ -59,8 +59,6 @@ CONFIG_SPL_ATF=y
>>   CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
>>   CONFIG_CMD_SMBIOS=y
>>   CONFIG_CMD_BOOTMENU=y
>> -CONFIG_CMD_THOR_DOWNLOAD=y
>> -CONFIG_THOR_RESET_OFF=y
>>   CONFIG_CMD_GREPENV=y
>>   CONFIG_CMD_NVEDIT_EFI=y
>>   CONFIG_CMD_MEMINFO=y
>> @@ -86,11 +84,7 @@ CONFIG_CMD_SDRAM=y
>>   CONFIG_CMD_SF_TEST=y
>>   CONFIG_CMD_SPI=y
>>   CONFIG_CMD_USB=y
>> -CONFIG_CMD_USB_MASS_STORAGE=y
>> -CONFIG_BOOTP_MAY_FAIL=y
>> -CONFIG_BOOTP_BOOTFILESIZE=y
>> -CONFIG_CMD_TFTPPUT=y
>> -CONFIG_CMD_NFS=y
>> +CONFIG_WGET_HTTPS=y
>>   CONFIG_CMD_BMP=y
>>   CONFIG_CMD_CACHE=y
>>   CONFIG_CMD_EFIDEBUG=y
>> @@ -121,8 +115,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
>>   CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
>>   CONFIG_ENV_FAT_DEVICE_AND_PART=":auto"
>>   CONFIG_SYS_RELOC_GD_ENV_ADDR=y
>> -CONFIG_NETCONSOLE=y
>> -CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
>> +CONFIG_NET_LWIP=y
>>   CONFIG_NET_RANDOM_ETHADDR=y
>>   CONFIG_SPL_DM_SEQ_ALIAS=y
>>   CONFIG_SIMPLE_PM_BUS=y
>> @@ -132,7 +125,6 @@ CONFIG_SATA_CEVA=y
>>   CONFIG_BUTTON=y
>>   CONFIG_BUTTON_GPIO=y
>>   CONFIG_CLK_ZYNQMP=y
>> -CONFIG_DFU_TFTP=y
>>   CONFIG_DFU_TIMEOUT=y
>>   CONFIG_DFU_MMC=y
>>   CONFIG_DFU_MTD=y
>> @@ -140,10 +132,6 @@ CONFIG_DFU_NAND=y
>>   CONFIG_DFU_RAM=y
>>   CONFIG_DFU_SF=y
>>   CONFIG_SYS_DFU_DATA_BUF_SIZE=0x1800000
>> -CONFIG_USB_FUNCTION_FASTBOOT=y
>> -CONFIG_FASTBOOT_FLASH=y
>> -CONFIG_FASTBOOT_FLASH_MMC_DEV=0
>> -CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
>>   CONFIG_ARM_FFA_TRANSPORT=y
>>   CONFIG_FPGA_XILINX=y
>>   CONFIG_FPGA_ZYNQMPPL=y
>> @@ -247,6 +235,7 @@ CONFIG_VIRTIO_BLK=y
>>   # CONFIG_BINMAN_FDT is not set
>>   CONFIG_BINMAN_DTB="./arch/arm/dts/zynqmp-binman.dtb"
>>   CONFIG_PANIC_HANG=y
>> +CONFIG_MBEDTLS_LIB=y
>>   CONFIG_TPM=y
>>   CONFIG_SPL_GZIP=y
>>   CONFIG_TOOLS_MKFWUMDATA=y
> 
> Applied.
> M

CI throw an error about microblaze that's why I have removed microblaze changes 
in this patch. Support can be enabled later.

Thanks,
Michal



More information about the U-Boot mailing list