]> Git Repo - J-u-boot.git/log
J-u-boot.git
8 weeks agoMerge patch series "Add OPP_LOW support for J7200"
Tom Rini [Wed, 4 Dec 2024 20:30:25 +0000 (14:30 -0600)]
Merge patch series "Add OPP_LOW support for J7200"

Aniket Limaye <[email protected]> says:

This series adds OPP_LOW spec data in k3_avs driver and enables a config
option to select the OPP_LOW performance point.

J7200 SOC supports OPP_LOW and OPP_NOM as two Operating Performance
Points as per (7.5 Operating Performance Points) section in the
Datasheet [0].
- A72SS/MSMC at 2 GHz/1GHz operation must use OPP_NOM.
- A72SS/MSMC at 1 GHz/500 MHz operation can use OPP_NOM or OPP_LOW
  voltage (though OPP_LOW voltage is recommended to reduce power
  consumption).

The actual OPP voltage for the device is read from the efuse and
updated in k3_avs_probe().

The default j7200 devicetree and k3_avs driver set OPP_NOM spec
frequency and voltage.

In the board init file, if K3_OPP_LOW config is enabled, Check if
OPP_LOW AVS voltage read from efuse is valid and update frequency (A72
and MSMC) and voltage (VDD_CPU) as per the OPP_LOW spec.

[0]: https://www.ti.com/lit/gpn/dra821u  (J7200 Datasheet)

Test logs:
https://gist.github.com/aniket-l/328ad93ed60c2419ed7be9f85e6b6075
- With series applied on master and CONFIG_K3_OPP_LOW enabled in
  j7200_evm_r5_defconfig
- Logs shown with and without efuse register programmed for OPP_0
  (Errors out if OPP_0 not found, programs OPP_LOW spec if found)
- Voltage update verified using 'i2c md 0x4c 0xe' in u-boot
- Frequency update verified using 'k3conf clock dump' in linux

Link: https://lore.kernel.org/r/[email protected]
8 weeks agoconfigs: j7200_evm_r5_defconfig: Define K3_OPP_LOW
Reid Tonking [Tue, 19 Nov 2024 00:32:59 +0000 (06:02 +0530)]
configs: j7200_evm_r5_defconfig: Define K3_OPP_LOW

Define new CONFIG_K3_OPP_LOW under arm/mach-k3/r5/Kconfig and add
default value to j7200_evm_r5_defconfig

Signed-off-by: Reid Tonking <[email protected]>
Signed-off-by: Aniket Limaye <[email protected]>
8 weeks agoarm: mach-k3: j721e-init.c: Add support for CONFIG_K3_OPP_LOW
Aniket Limaye [Tue, 19 Nov 2024 00:32:58 +0000 (06:02 +0530)]
arm: mach-k3: j721e-init.c: Add support for CONFIG_K3_OPP_LOW

The default j7200 devicetree and k3_avs driver set 2GHz/1GHz frequency
for A72/MSMC clks and the OPP_NOM voltage.

J7200 SOCs may support OPP_LOW Operating Performance Point:
1GHz/500MHz clks for A72/MSMC and OPP_LOW AVS voltage read from efuse.

Hence, add a config check in board_init_f() to select OPP_LOW specs:
- Check if OPP_LOW AVS voltage read from efuse is valid.
- Use the device IDs and clock IDs (TISCI docs [0]) to find the A72 and
  MSMC clock frequencies in the devicetree.
- Fixup the clock frequencies in devicetree as per OPP_LOW spec.

k3_avs driver programs the OPP_LOW AVS voltage for VDD_CPU through
k3_avs_notify_freq() callback from clk_k3.

[0]: https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/j7200/clocks.html

Signed-off-by: Aniket Limaye <[email protected]>
Reviewed-by: Manorit Chawdhry <[email protected]>
8 weeks agomisc: k3_avs: Check validity of efuse voltage data
Reid Tonking [Tue, 19 Nov 2024 00:32:57 +0000 (06:02 +0530)]
misc: k3_avs: Check validity of efuse voltage data

k3_avs driver checks opp_ids when probing and overwrites the voltage
values in vd_data for the respective board. The new k3_avs_check_opp()
can be called from board files to check the efuse data and returns 0 if
valid.

Also add the same check in k3_avs_program_voltage() to error out if
the efuse data was not valid.

Signed-off-by: Reid Tonking <[email protected]>
Signed-off-by: Aniket Limaye <[email protected]>
Reviewed-by: Manorit Chawdhry <[email protected]>
8 weeks agomisc: k3_avs: Add OPP_LOW voltage and frequency to vd_data
Reid Tonking [Tue, 19 Nov 2024 00:32:56 +0000 (06:02 +0530)]
misc: k3_avs: Add OPP_LOW voltage and frequency to vd_data

J7200 SOC supports OPP_LOW and OPP_NOM as two Operating Performance
Points as per (7.5 Operating Performance Points) section in the
Datasheet [0].
- A72SS/MSMC at 2 GHz/1GHz operation must use OPP_NOM.
- A72SS/MSMC at 1 GHz/500 MHz operation can use OPP_NOM or OPP_LOW
  voltage (though OPP_LOW voltage is recommended to reduce power
  consumption).

Add OPP_LOW frequency->voltage entry to vd_data.

The actual OPP voltage for the device is read from the efuse and
updated in k3_avs_probe().
OPP_NOM corresponds to OPP_1 and OPP_LOW to OPP_0 efuse register
fields, as described in the Datasheet [0]
The register offsets and fields are described in the TRM (5.2.6.1.5
WKUP_VTM_VD_OPPVID_j Register) [1].

[0]: https://www.ti.com/lit/gpn/dra821u (J7200 Datasheet)
[1]: https://www.ti.com/lit/pdf/spruiu1 (J7200 TRM)

Signed-off-by: Reid Tonking <[email protected]>
Signed-off-by: Aniket Limaye <[email protected]>
8 weeks agoarm: dts: k3-j7200-r5-common: Add msmc clk to a72 node
Reid Tonking [Tue, 19 Nov 2024 00:32:55 +0000 (06:02 +0530)]
arm: dts: k3-j7200-r5-common: Add msmc clk to a72 node

The j7200 SOC has a single DDR controller and hence no need for
configuring the MSMC interleaver. Hence we do not have an explicit node
for MSMC in j7200 DT, unlike j721s2/j784s4.

Also, MSMC clk id is described under A72SS0_CORE0 Device in TISCI
documentation [0].

Considering the above, define the MSMC clk in the a72 node.

[0]: https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/j7200/clocks.html#clocks-for-a72ss0-core0-device

Signed-off-by: Reid Tonking <[email protected]>
Signed-off-by: Aniket Limaye <[email protected]>
Reviewed-by: Manorit Chawdhry <[email protected]>
8 weeks agoMerge patch series "Enable AVS support for AM68, AM69 and J784S4"
Tom Rini [Wed, 4 Dec 2024 20:29:11 +0000 (14:29 -0600)]
Merge patch series "Enable AVS support for AM68, AM69 and J784S4"

Neha Malcom Francis <[email protected]> says:

This series adds AVS support for AM68 SK, AM69 SK and J784S4 EVM.

Boot logs:
https://gist.github.com/nehamalcom/db5dbf98357ebac46f648c24ad1a17e2

Link: https://lore.kernel.org/r/[email protected]
8 weeks agoconfigs: am68_sk_r5: Add AVS Configs
Udit Kumar [Mon, 18 Nov 2024 10:57:14 +0000 (16:27 +0530)]
configs: am68_sk_r5: Add AVS Configs

Add AVS and PMIC regulator configs

Signed-off-by: Udit Kumar <[email protected]>
Reviewed-by: Manorit Chawdhry <[email protected]>
8 weeks agoconfigs: j784s4_evm_r5_defconfig: Enable AVS
Neha Malcom Francis [Mon, 18 Nov 2024 10:57:13 +0000 (16:27 +0530)]
configs: j784s4_evm_r5_defconfig: Enable AVS

Enable AVS support on J784S4 along with regulator.

Signed-off-by: Neha Malcom Francis <[email protected]>
Reviewed-by: Manorit Chawdhry <[email protected]>
8 weeks agoarch: arm: mach-k3: j784s4_init: Probe AVS driver
Neha Malcom Francis [Mon, 18 Nov 2024 10:57:12 +0000 (16:27 +0530)]
arch: arm: mach-k3: j784s4_init: Probe AVS driver

Probe the AVS driver to set the AVS voltage.

Signed-off-by: Neha Malcom Francis <[email protected]>
Reviewed-by: Manorit Chawdhry <[email protected]>
8 weeks agoarm: dts: k3-am68-sk-r5-base-board: Add VTM node to R5 stage
Neha Malcom Francis [Mon, 18 Nov 2024 10:57:11 +0000 (16:27 +0530)]
arm: dts: k3-am68-sk-r5-base-board: Add VTM node to R5 stage

Add the VTM node to the R5 boot stage so that AVS is correctly
configured for AM68 SK.

Signed-off-by: Neha Malcom Francis <[email protected]>
Reviewed-by: Manorit Chawdhry <[email protected]>
8 weeks agoarm: dts: k3-j784s4-r5: Add VTM node to R5 stage
Neha Malcom Francis [Mon, 18 Nov 2024 10:57:10 +0000 (16:27 +0530)]
arm: dts: k3-j784s4-r5: Add VTM node to R5 stage

Add VTM node to R5 boot stage so that AVS gets correctly configured for
J784S4 EVM and AM69 SK.

Signed-off-by: Neha Malcom Francis <[email protected]>
Reviewed-by: Manorit Chawdhry <[email protected]>
8 weeks agoarm: dts: k3-am68: Enable OSPI boot
Udit Kumar [Tue, 19 Nov 2024 09:47:23 +0000 (15:17 +0530)]
arm: dts: k3-am68: Enable OSPI boot

Enable OSPI node to allow OSPI boot on AM68

Signed-off-by: Udit Kumar <[email protected]>
8 weeks agodm: gpio: Return error when pull up/down is requested but set_flags ops is not implme...
Zixun LI [Mon, 21 Oct 2024 15:04:51 +0000 (17:04 +0200)]
dm: gpio: Return error when pull up/down is requested but set_flags ops is not implmentated

Currently in _dm_gpio_set_flags() when set_flags ops is not implemented
direction_output()/_input() is used, but pull up/down is not supported by
these ops.

Signed-off-by: Zixun LI <[email protected]>
8 weeks agobutton: gpio: handle broken controller
Caleb Connolly [Wed, 13 Nov 2024 04:59:24 +0000 (05:59 +0100)]
button: gpio: handle broken controller

Avoid crashing U-Boot when the GPIO controller for a button is disabled
or failed to probe. We also need to check the priv data for each button
since even if a button fails to probe it will still be polled by the
core code.

Signed-off-by: Caleb Connolly <[email protected]>
8 weeks agoboard: phytec: common: Introduce CONFIG_PHYTEC_K3_DDR_PATCH
Garrett Giordano [Tue, 12 Nov 2024 20:40:23 +0000 (12:40 -0800)]
board: phytec: common: Introduce CONFIG_PHYTEC_K3_DDR_PATCH

Introduce CONFIG_PHYTEC_K3_DDR_PATCH to make DDR timing patch code
optional for PHYTEC K3 boards. This allows better control over which
boards receive DDR timing patches, rather than compiling the code for
all boards with K3_DDRSS enabled.

Also enable the feature by default for PHYCORE_AM62X_R5.

Signed-off-by: Garrett Giordano <[email protected]>
Reviewed-by: Wadim Egorov <[email protected]>
8 weeks agoeeprom: at24: add ST M24256E Additional Write lockable page support
Marek Vasut [Fri, 8 Nov 2024 18:52:26 +0000 (19:52 +0100)]
eeprom: at24: add ST M24256E Additional Write lockable page support

The ST M24256E behaves as a regular M24C256, except for the E variant
which uses up another I2C address for Additional Write lockable page.
This page is 64 Bytes long and can contain additional data. Add entry
for it, so users can describe that page in DT. Note that users still
have to describe the main M24C256 area separately as that is on separate
I2C address from this page.

Unlike M24C32-D and M24C64-D, this part is specifically ST and does not
have any comparable M24* counterparts from other vendors, hence the st,
vendor prefix. Furthermore, the part name is M24256E without C between
the 24 and 256, this is not a typo. Finally, there is M24C256-D part,
which does contain 32 Bytes long Additional Write lockable page, which
is a different part and not supported by this patch.

Datasheet: https://www.st.com/resource/en/datasheet/m24256e-f.pdf

From Linux kernel commit:
339cb28b9ee6 ("eeprom: at24: add ST M24256E Additional Write lockable page support")

Signed-off-by: Marek Vasut <[email protected]>
8 weeks agoarm: sunxi: Use "imply" for USB without further guards
Tom Rini [Fri, 15 Nov 2024 16:53:59 +0000 (10:53 -0600)]
arm: sunxi: Use "imply" for USB without further guards

Given that ARCH_SUNXI already implies that USB_GADGET should be enable,
we should also imply USB being enabled.

Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
8 weeks agoefi_loader: Fix Kconfig logic around OF_LIBFDT
Tom Rini [Fri, 15 Nov 2024 16:53:58 +0000 (10:53 -0600)]
efi_loader: Fix Kconfig logic around OF_LIBFDT

Given that OF_LIBFDT is library functionality, the feature of EFI_LOADER
needs to select OF_LIBFDT rather than depend on it being already
enabled.

Acked-by: Heinrich Schuchardt <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
8 weeks agoaspeed: Fix Kconfig logic on "DM_RESET" and ASPEED_AST2500
Tom Rini [Fri, 15 Nov 2024 16:53:57 +0000 (10:53 -0600)]
aspeed: Fix Kconfig logic on "DM_RESET" and ASPEED_AST2500

It is not the case that we can only pick ASPEED_AST2500 if DM_RESET
is enabled, but rather choosing ASPEED_AST2500 means we must select
DM_RESET.

Signed-off-by: Tom Rini <[email protected]>
8 weeks agoMerge tag 'efi-next-2024-12-04' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Wed, 4 Dec 2024 15:32:28 +0000 (09:32 -0600)]
Merge tag 'efi-next-2024-12-04' of https://source.denx.de/u-boot/custodians/u-boot-efi into next

CI: https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/23707

With this pull request support for the EFI_HTTP_PROTOCOL and
EFI_IP4_CONFIG2 protocols are added. This allows EFI applications
to load files via HTTP.

UEFI:
      add efi_dp_from_ipv4 function
      add efi_net_set_addr, efi_net_get_addr functions
      add support for HTTP device path
      set EFI bootdevice device path to HTTP when loaded from wget
      add support to send http requests and parse http headers
      provide EFI_IP4_CONFIG2_PROTOCOL
      provide EFI_HTTP_PROTOCOL
      support IPv4() in device path to text protocol
      provide unit tests for the HTTP and IPv4 Config2 protocols

Network:
      zero terminate string with headers in wget_fill_info()
      zero terminate string with headers in wget_lwip_fill_info()
      pass port and server_name via wget_ctx in lwIP network stack
      let wget_with_dns work with dns disabled

Others:
      Add HTTP and IPV4 Config II protocols to UUID library functions.

8 weeks agoefi_selftest: add test for IPv4 Config2 protocol
Adriano Cordova [Wed, 4 Dec 2024 03:05:29 +0000 (00:05 -0300)]
efi_selftest: add test for IPv4 Config2 protocol

Add a test for the EFI_IP4_CONFIG2_PROTOCOL. The test sets the ip
policy to static, adds an ip address, and then reads the current
ip address and checks for it to be the same as the one that was set.

Signed-off-by: Adriano Cordova <[email protected]>
8 weeks agoefi_selftest: add test for HTTP protocol
Adriano Cordova [Wed, 4 Dec 2024 03:05:28 +0000 (00:05 -0300)]
efi_selftest: add test for HTTP protocol

Add a test for the EFI_HTTP_PROTOCOL and
EFI_SEVICE_BINDING_PROTOCOL.

Signed-off-by: Adriano Cordova <[email protected]>
8 weeks agolib: uuid: display HTTP and IPV4 Config II protocols
Heinrich Schuchardt [Wed, 4 Dec 2024 03:05:27 +0000 (00:05 -0300)]
lib: uuid: display HTTP and IPV4 Config II protocols

Add long texts for

* EFI HTTP Protocol
* EFI HTTP Service Binding Protocol
* EFI IPv4 Configuration II Protocol

to the uuid library.

Signed-off-by: Adriano Cordova <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
8 weeks agoefi_loader: efi_net: add EFI_HTTP_PROTOCOL
Adriano Cordova [Wed, 4 Dec 2024 03:05:26 +0000 (00:05 -0300)]
efi_loader: efi_net: add EFI_HTTP_PROTOCOL

Add an EFI HTTP driver. This commit implements the
EFI_HTTP_PROTOCOL and the EFI_HTTP_SERVICE_BINDING_PROTOCOL.
The latter is attached to the handle of th efi network
device. This is the same handle where snp, pxe, and ipconfig
are attached to.

Signed-off-by: Adriano Cordova <[email protected]>
8 weeks agoefi_loader: efi_net: add EFI_IP4_CONFIG2_PROTOCOL
Adriano Cordova [Wed, 4 Dec 2024 03:05:25 +0000 (00:05 -0300)]
efi_loader: efi_net: add EFI_IP4_CONFIG2_PROTOCOL

Add an implementation of the EFI_IP4_CONFIG2_PROTOCOL. The protocol
is attached to the handle of the efi network device. This is the same
handle where snp and pxe are attached to.

Signed-off-by: Adriano Cordova <[email protected]>
8 weeks agoefi_loader: net: add support to send http requests and parse http headers
Adriano Cordova [Wed, 4 Dec 2024 03:05:24 +0000 (00:05 -0300)]
efi_loader: net: add support to send http requests and parse http headers

Add network-stack agnostic way to send an http request and
parse http headers from efi drivers. This uses wget as a
backend and communicates with it via efi_wget_info.

The function efi_net_do_request allocates a buffer on behalf of an
efi application using efi_alloc and passes it to wget to receive
the data. If the method is GET and the buffer is too small, it
re-allocates the buffer based on the last received Content-Length
header and tries again. If the method is HEAD it just issues one
request. So issuing a HEAD request (to update Content-Length) and
then a GET request is preferred but not required.

The function efi_net_parse_headers parses a raw buffer containing
an http header into an array of EFI specific 'http_header' structs.

Signed-off-by: Adriano Cordova <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
8 weeks agoefi_loader: net: set EFI bootdevice device path to HTTP when loaded from wget
Adriano Cordova [Wed, 4 Dec 2024 03:05:23 +0000 (00:05 -0300)]
efi_loader: net: set EFI bootdevice device path to HTTP when loaded from wget

Set the device path of the efi boot device to an HTTP device path
(as formed by efi_dp_from_http) when the next boot stage is loaded
using wget (i.e., when wget is used with wget_info.set_bootdev=1).

When loaded from HTTP, the device path should account for it so that
the next boot stage is aware (e.g. grub only loads its http stack if
it itself was loaded from http, and it checks this from its device path).

Signed-off-by: Adriano Cordova <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
8 weeks agoefi_loader: device_path: add support for HTTP device path
Adriano Cordova [Wed, 4 Dec 2024 03:05:22 +0000 (00:05 -0300)]
efi_loader: device_path: add support for HTTP device path

Add efi_dp_from_http to form a device path from HTTP. The
device path is the concatenation of the device path returned
by efi_dp_from_ipv4 together with an URI node and an END node.

Signed-off-by: Adriano Cordova <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
8 weeks agoefi_loader: efi_net: add efi_net_set_addr, efi_net_get_addr
Adriano Cordova [Wed, 4 Dec 2024 03:05:21 +0000 (00:05 -0300)]
efi_loader: efi_net: add efi_net_set_addr, efi_net_get_addr

Add the functions efi_net_set_addr and  efi_net_get_addr to set
and get the ip address from efi code in a network agnostic way.
This could also go in net_common, or be compiled conditionally
for each network stack.

Signed-off-by: Adriano Cordova <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
8 weeks agoefi_api: add definitions for HTTP and IP4_CONFIG2 protocols
Adriano Cordova [Wed, 4 Dec 2024 03:05:20 +0000 (00:05 -0300)]
efi_api: add definitions for HTTP and IP4_CONFIG2 protocols

Add EFI definitions for EFI_IP4_CONFIG2_PROTOCOL,
EFI_HTTP_SERVICE_BINDING_PROTOCOL, and EFI_HTTP_PROTOCOL.
According to UEFI spec 2.10.

Signed-off-by: Adriano Cordova <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
Acked-by: Ilias Apalodimas <[email protected]>
8 weeks agoefi_loader: add IPv4() to device path to text protocol
Heinrich Schuchardt [Wed, 4 Dec 2024 03:05:19 +0000 (00:05 -0300)]
efi_loader: add IPv4() to device path to text protocol

Implement Ipv4() node support in the device path to text protocol.

Signed-off-by: Adriano Cordova <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
8 weeks agoefi_loader: device_path: add efi_dp_from_ipv4
Adriano Cordova [Wed, 4 Dec 2024 03:05:18 +0000 (00:05 -0300)]
efi_loader: device_path: add efi_dp_from_ipv4

Add efi_dp_from_ipv4 to form a device path from an ipv4 address.

Signed-off-by: Adriano Cordova <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
8 weeks agoefi_loader: device_path: add definition of DEVICE_PATH_SUB_TYPE_MSG_IPV4
Adriano Cordova [Wed, 4 Dec 2024 03:05:17 +0000 (00:05 -0300)]
efi_loader: device_path: add definition of DEVICE_PATH_SUB_TYPE_MSG_IPV4

Add definition for DEVICE_PATH_SUB_TYPE_MSG_IPV4 device path
subtype.

Signed-off-by: Adriano Cordova <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
8 weeks agonet: wget: let wget_with_dns work with dns disabled
Adriano Cordova [Wed, 4 Dec 2024 03:05:16 +0000 (00:05 -0300)]
net: wget: let wget_with_dns work with dns disabled

This was marked as TODO in the code:
 - Enable use of wget_with_dns even if CMD_DNS is disabled if
   the given uri has the ip address for the http server.
 - Move the check for CMD_DNS inside wget_with_dns.
 - Rename wget_with_dns to wget_do_request

Signed-off-by: Adriano Cordova <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Jerome Forissier <[email protected]>
8 weeks agonet-lwip: zero terminate string with headers in wget_lwip_fill_info()
Adriano Cordova [Tue, 26 Nov 2024 16:19:21 +0000 (13:19 -0300)]
net-lwip: zero terminate string with headers in wget_lwip_fill_info()

    This patch comes as a companion to the same patch but for the legacy
    net stack. Commit 1327c2a8d6 ("net/lwip: wget: integrate struct wget_info
    into wget code") introduced function wget_fill_info() which retrieves
    the headers from the HTTP server response. As we want to parse the
    string in later patches we need to ensure that it is NUL terminated.

    We must further check that wget_info->headers in not NULL.
    Otherwise a crash occurs.

Signed-off-by: Adriano Cordova <[email protected]>
8 weeks agonet: zero terminate string with headers in wget_fill_info()
Heinrich Schuchardt [Tue, 26 Nov 2024 16:19:20 +0000 (13:19 -0300)]
net: zero terminate string with headers in wget_fill_info()

Commit 2dd076a9c1b4 ("net: wget: integrate struct wget_info into legacy
wget code") introduced function wget_fill_info() which retrieves the
headers from the HTTP server response. As we want to parse the string in
later patches we need to ensure that it is NUL terminated.

We must further check that wget_info->headers in not NULL.
Otherwise a crash occurs.

Fixes: 2dd076a9c1b4 ("net: wget: integrate struct wget_info into legacy wget code")
Signed-off-by: Adriano Cordova <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
8 weeks agolwip: wget: pass port and server_name via wget_ctx
Adriano Cordova [Tue, 3 Dec 2024 12:55:34 +0000 (09:55 -0300)]
lwip: wget: pass port and server_name via wget_ctx

Commit 5907c81 ("net: lwip: Enable https:// support for wget") was not
  correctly rebased on top of the changes introduced by Commit 6cc4d04
  ("net/lwip: wget: put server_name and port into wget_ctx") in next.
  This commit re-applies a  couple of lines from 6cc4d04.

Fixes: Commit 5907c81 ("net: lwip: Enable https:// support for wget")
Signed-off-by: Adriano Cordova <[email protected]>
8 weeks agoMerge tag 'xilinx-for-v2025.04-rc1' of https://gitlab.denx.de/u-boot/custodians/u...
Tom Rini [Tue, 3 Dec 2024 21:51:56 +0000 (15:51 -0600)]
Merge tag 'xilinx-for-v2025.04-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze into next

AMD/Xilinx changes for v2025.04-rc1

binman:
- Separate binman description from main DT

zynqmp:
- Enable binman for ZynqMP platforms
- DT sync with Linux v6.12
- Update usb5744 hub for SOMs

common:
- Drop SPL_FIT_GENERATOR support

versal2
- Enable OPTEE layers

ospi:
- Refactor the flash reset functionality

pytest:
- Fix tcminit mode handling

8 weeks agoMerge patch series "CI: Set up for an arm64 runner"
Tom Rini [Mon, 2 Dec 2024 22:36:06 +0000 (16:36 -0600)]
Merge patch series "CI: Set up for an arm64 runner"

Tom Rini <[email protected]> says:

Hey all,

This is picking up Simon's v5 of the above-named series and making a few
more changes so that the follow-up series I have leads to arm64 being
supported for almost all jobs. To quote Simon's cover letter:

All gitlab runners are currently amd64 machines. This series attempts to
create a docker image which can also support arm64 so that sandbox tests
can be run on it.

The TARGET_... environment variables for grub could perhaps be adjusted,
using the new variables, but I have not done that for now.

Adding to what Simon said, we now build grub for all architectures as
the reason to install it was to be able to use the binaries in QEMU.
That won't provide us with amd64 binaries on arm64 hosts so we can't use
that shortcut anymore.

Link: https://lore.kernel.org/r/[email protected]
8 weeks agoCI: Add platform variable
Simon Glass [Wed, 27 Nov 2024 17:17:30 +0000 (11:17 -0600)]
CI: Add platform variable

Add a list of possible platforms that can be used by gitlab runners.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
8 weeks agodocker: Install toolchains on arm64 host
Simon Glass [Wed, 27 Nov 2024 17:17:29 +0000 (11:17 -0600)]
docker: Install toolchains on arm64 host

Refactor the code to support downloading toolchains for arm64 as well as
x86_64

There doesn't seem to be an xtensa toolchain for arm64 at the same
location, so download that only on x86

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
8 weeks agodocker: Fix LegacyKeyValueFormat warning with PYTHONPATH
Simon Glass [Wed, 27 Nov 2024 17:17:28 +0000 (11:17 -0600)]
docker: Fix LegacyKeyValueFormat warning with PYTHONPATH

Fix a warning due to the syntax used for PYTHONPATH:

   LegacyKeyValueFormat: "ENV key=value" should be used instead of
      legacy "ENV key value" format (line 304)

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
8 weeks agodocker: Adjust installed packages slightly
Simon Glass [Wed, 27 Nov 2024 17:17:27 +0000 (11:17 -0600)]
docker: Adjust installed packages slightly

We no longer need to install libc6-i386 so we can drop that. Switch to
installing linux-image-generic as that will be available on all hosts,
to provide the /boot/vmlinu* file that's requires for various tools.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
8 weeks agodocker: Support building for multiple architectures
Simon Glass [Wed, 27 Nov 2024 17:17:26 +0000 (11:17 -0600)]
docker: Support building for multiple architectures

Add instructions on how to build the file for multiple architectures.
Add a message indicating what is happening.

Update the documentation as well.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
8 weeks agodocker: Use cache mounts for apt
Tom Rini [Wed, 27 Nov 2024 17:17:25 +0000 (11:17 -0600)]
docker: Use cache mounts for apt

Instead of deleting /var/lib/apt/lists after each relevant RUN line, use
a cache mount as is the current best practices.

Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
8 weeks agodocker: Build grub for all architectures
Tom Rini [Wed, 27 Nov 2024 17:17:24 +0000 (11:17 -0600)]
docker: Build grub for all architectures

For consistency now, and future ease of testing with non-amd64 hosts,
build grub for all architectures rather than relying on host binaries
for i386/x86_64.

Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
8 weeks agodocker: Update to grub-2.12
Tom Rini [Wed, 27 Nov 2024 17:17:23 +0000 (11:17 -0600)]
docker: Update to grub-2.12

The current release of grub is 2.12 and it will be good to pick this up
now so that we can update other parts of our stack.

Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
8 weeks agodocker: Use "make -j$(nproc)" when invoking make
Tom Rini [Wed, 27 Nov 2024 17:17:22 +0000 (11:17 -0600)]
docker: Use "make -j$(nproc)" when invoking make

We had a few places that were not using "make -j$(nproc)" but instead
just plain "make" and so slowing down the overall build.

Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
8 weeks agodocker: Add kernel.org x86_64 toolchain
Tom Rini [Wed, 27 Nov 2024 17:17:21 +0000 (11:17 -0600)]
docker: Add kernel.org x86_64 toolchain

Add in the x86_64 toolchain, but do not enforce using it for sandbox.

Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
8 weeks agotest: Adjust print_ut test to use unsigned char
Simon Glass [Wed, 27 Nov 2024 17:17:20 +0000 (11:17 -0600)]
test: Adjust print_ut test to use unsigned char

Since char is unsigned on arm64, this test currently fails. It seems
better to use unsigned anyway, since 0xff is written into the string at
the start. Update the terminator-assert to use a character instead of a
byte.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
Changes in v6:
- Re-introduce

Changes in v2:
- Use '\0' instead of 0

test/print_ut.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

8 weeks agosandbox: efi_loader: Correct use of addresses as pointers
Simon Glass [Wed, 27 Nov 2024 17:17:19 +0000 (11:17 -0600)]
sandbox: efi_loader: Correct use of addresses as pointers

The cache-flush function is incorrect which causes a crash in the
remoteproc tests with arm64.

Fix both problems by using map_sysmem() to convert an address to a
pointer and map_to_sysmem() to convert a pointer to an address.

Also update the image-loader's cache-flushing logic.

Signed-off-by: Simon Glass <[email protected]>
Fixes: 3286d223fd7 ("sandbox: implement invalidate_icache_all()")
Acked-by: Heinrich Schuchardt <[email protected]>
Changes in v6:
- Re-introduce

Changes in v2:
- Drop message about EFI_LOADER

arch/sandbox/cpu/cache.c              |  8 +++++++-
 drivers/remoteproc/rproc-elf-loader.c | 18 +++++++++++-------
 lib/efi_loader/efi_image_loader.c     |  3 ++-
 3 files changed, 20 insertions(+), 9 deletions(-)

Reviewed-by: Heinrich Schuchardt <[email protected]>
2 months agotest: add command to 'Boot fail' message
Heinrich Schuchardt [Sat, 23 Nov 2024 21:29:22 +0000 (22:29 +0100)]
test: add command to 'Boot fail' message

When a timeout occurs while executing a command a 'Boot fail' message is
written and testing is stopped. The user is left in the dark about the
failure cause.

    ! _pytest.outcomes.Exit: Boot fail: Marking connection bad - no other tests will run !

Add the executed command to the message.

Signed-off-by: Heinrich Schuchardt <[email protected]>
2 months agotest: add command to 'Lab failure' timeout message
Heinrich Schuchardt [Sat, 23 Nov 2024 21:29:21 +0000 (22:29 +0100)]
test: add command to 'Lab failure' timeout message

When a timeout occurs while executing a command a 'Lab failure' message is
written and testing is stopped. The user is left in the dark about the
failure cause.

    ! _pytest.outcomes.Exit: Lab failure: Marking connection bad - no other tests will run !

Add the word 'Timeout' and the executed command to the message.

Signed-off-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
2 months agocmd: add a fetch utility
Caleb Connolly [Fri, 15 Nov 2024 00:47:29 +0000 (01:47 +0100)]
cmd: add a fetch utility

Add a small utility for displaying some information about U-Boot and the
hardware it's running on in a similar fashion to the popular neofetch
tool for Linux [1].

While the output is meant to be useful, it should also be pleasing to
look at and perhaps entertaining. The ufetch command aims to bring this
to U-Boot, featuring a colorful ASCII art version of the U-Boot logo.

[1]: https://en.wikipedia.org/wiki/Neofetch

Reviewed-by: Simon Glass <[email protected]>
Acked-by: Ilias Apalodimas <[email protected]>
Tested-by: Mattijs Korpershoek <[email protected]> # vim3
Tested-by: Neil Armstrong <[email protected]> # on SM8560-QRD
Acked-by: Heinrich Schuchardt <[email protected]>
Tested-by: Tony Dinh <[email protected]>
Signed-off-by: Caleb Connolly <[email protected]>
2 months agoMerge patch series "test: Avoid needing sudo for image-creation"
Tom Rini [Fri, 29 Nov 2024 20:37:13 +0000 (14:37 -0600)]
Merge patch series "test: Avoid needing sudo for image-creation"

Simon Glass <[email protected]> says:

This series rebases and tidies up a series sent by Richard Weinberger
to use unprivileged code to build the test images.

Link: https://patchwork.ozlabs.org/project/uboot/list/?series=417786&state=*
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Tom Rini <[email protected]>
2 months agobootstd: Remove prepared images
Simon Glass [Thu, 21 Nov 2024 22:32:14 +0000 (15:32 -0700)]
bootstd: Remove prepared images

These are no-longer used. Drop them.

Signed-off-by: Simon Glass <[email protected]>
2 months agotest_ut: Drop support for fallback files
Simon Glass [Thu, 21 Nov 2024 22:32:13 +0000 (15:32 -0700)]
test_ut: Drop support for fallback files

We don't need the fallback anymore. Remove the code which uses these
files.

Signed-off-by: Simon Glass <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
2 months agotest_ut: Use the built mkimage
Simon Glass [Thu, 21 Nov 2024 22:32:12 +0000 (15:32 -0700)]
test_ut: Use the built mkimage

The mkimage tool is not present in the docker image. Use the one in the
build directory.

Signed-off-by: Simon Glass <[email protected]>
2 months agotest_ut: Drop exeception handling
Simon Glass [Thu, 21 Nov 2024 22:32:11 +0000 (15:32 -0700)]
test_ut: Drop exeception handling

We don't need the fallback anymore. As a first step to removing it,
drop the try...except clauses and unindent the code.

This produces a large diff but there are no other code changes.

Signed-off-by: Simon Glass <[email protected]>
2 months agotest_ut: Allow running unprivileged
Richard Weinberger [Thu, 21 Nov 2024 22:32:10 +0000 (15:32 -0700)]
test_ut: Allow running unprivileged

Like for test_fs, no need to mess with loop mounts.

Tweaks to reduce diff (keep mnt variable):

Signed-off-by: Richard Weinberger <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
2 months agotest_ut: Add an image size to setup_image()
Simon Glass [Thu, 21 Nov 2024 22:32:09 +0000 (15:32 -0700)]
test_ut: Add an image size to setup_image()

Add a parameter to indicate the size of the image to build.

Signed-off-by: Simon Glass <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
2 months agotest_fs: Rename mount dir to scratch
Richard Weinberger [Thu, 21 Nov 2024 22:32:08 +0000 (15:32 -0700)]
test_fs: Rename mount dir to scratch

Since no mounting happens anymore, rename the "mnt"
directory to "scratch" and the related variables.

Signed-off-by: Richard Weinberger <[email protected]>
Reviewed-by: Mattijs Korpershoek <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
2 months agotest_fs: Allow running unprivileged
Richard Weinberger [Thu, 21 Nov 2024 22:32:07 +0000 (15:32 -0700)]
test_fs: Allow running unprivileged

There is no need to mount the filesystem on the host side.
All filesystem tools offer some way to fill the fs without mounting.

So, create the content on the host side, create and fill the fs
without mounting.
No more sudo or guestmount needed.

This new approach works because the tests don't care about user IDs
and no device files are needed.
If user IDs start to matter it's still possible to use wrapper
tools like fakeroot in future while filling the fs.

Signed-off-by: Richard Weinberger <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
Tested-by: Mattijs Korpershoek <[email protected]>
2 months agoMerge tag 'u-boot-at91-2025.04-a' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Fri, 29 Nov 2024 13:47:02 +0000 (07:47 -0600)]
Merge tag 'u-boot-at91-2025.04-a' of https://source.denx.de/u-boot/custodians/u-boot-at91 into next

- at91 gpio driver function alternate mode for pins
- assorted fixes.

2 months agoarm64: zynqmp: Update the usb5744 hub node as per binding
Venkatesh Yadav Abbarapu [Fri, 29 Nov 2024 11:06:31 +0000 (16:36 +0530)]
arm64: zynqmp: Update the usb5744 hub node as per binding

Updating the usb5744 hub node as per the latest upstream DT binding
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
tree/Documentation/devicetree/bindings/usb/microchip,usb5744.yaml?h=v6.8.8

Signed-off-by: Venkatesh Yadav Abbarapu <[email protected]>
Acked-by: Michal Simek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michal Simek <[email protected]>
2 months agoarm64: zynqmp: Sync with v6.12 kernel
Michal Simek [Thu, 28 Nov 2024 14:49:14 +0000 (15:49 +0100)]
arm64: zynqmp: Sync with v6.12 kernel

Sync zynqmp* DTS files with v6.12 Linux kernel.

Signed-off-by: Michal Simek <[email protected]>
Link: https://lore.kernel.org/r/cf37760117765c4cece94736dc2a7b583d5987de.1732805351.git.michal.simek@amd.com
2 months agotest/py: zynqmp_rpu: Fix tcminit mode value
Love Kumar [Fri, 15 Nov 2024 12:02:02 +0000 (17:32 +0530)]
test/py: zynqmp_rpu: Fix tcminit mode value

Update the tcminit value to string and number both as per commit
342ccba5586a ("arm64: zynqmp: Fix tcminit mode value based on argv") and
also adds negative cases based on invalid command sequences.

Signed-off-by: Love Kumar <[email protected]>
Link: https://lore.kernel.org/r/48f75577f6735a0d14105658e89b625d45537bb1.1731672024.git.love.kumar@amd.com
Signed-off-by: Michal Simek <[email protected]>
2 months agocadence_qspi: Refactor the flash reset functionality
Venkatesh Yadav Abbarapu [Fri, 8 Nov 2024 06:35:37 +0000 (12:05 +0530)]
cadence_qspi: Refactor the flash reset functionality

As the flash reset is handled in spi nor core, removing the
flash reset functionality. As the configuration like tristate
and hysterisis need to be enabled by the cdo. Handle the flash
reset only for mini u-boot case.

Rename the "cadence_qspi_versal_flash_reset" to generic name
"cadence_qspi_flash_reset" as this can be used by other platforms
as well.

Signed-off-by: Venkatesh Yadav Abbarapu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michal Simek <[email protected]>
2 months agoconfigs: versal2: Enable OPTEE support
Venkatesh Yadav Abbarapu [Wed, 27 Nov 2024 04:37:45 +0000 (10:07 +0530)]
configs: versal2: Enable OPTEE support

Add OPTEE support for versal2 platform.

Signed-off-by: Venkatesh Yadav Abbarapu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michal Simek <[email protected]>
2 months agoconfigs: zynqmp_kria: Enable the USB onboard hub
Venkatesh Yadav Abbarapu [Tue, 26 Nov 2024 04:12:38 +0000 (09:42 +0530)]
configs: zynqmp_kria: Enable the USB onboard hub

USB host support on ZYNQMP KRIA SOM needs onboard USB
hub driver for handling reset GPIO and for i2c initialization
sequence.

Signed-off-by: Venkatesh Yadav Abbarapu <[email protected]>
Acked-by: Michal Simek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michal Simek <[email protected]>
2 months agomtd: nand: raw: atmel: Remove redundant PMECC probe
Alexander Dahl [Mon, 11 Mar 2024 15:23:06 +0000 (16:23 +0100)]
mtd: nand: raw: atmel: Remove redundant PMECC probe

Always probing pmecc in the generic nand controller probe function and
bailing out if pmecc is missing, prevents the driver to be usable for
SoCs which do not have a pmecc hardware ecc engine like older sam9 SoCs,
for example at91sam9g20.  Tested on sam9x60 that the call, which the
comment was moved to, is sufficient to probe the pmecc.

Signed-off-by: Alexander Dahl <[email protected]>
2 months agogpio: at91: Implement ops get_flags
Zixun LI [Wed, 13 Nov 2024 10:11:09 +0000 (11:11 +0100)]
gpio: at91: Implement ops get_flags

Add ops get_dir_flags() to read status from GPIO registers.

Signed-off-by: Zixun LI <[email protected]>
2 months agogpio: at91: Implement ops set_flags
Zixun LI [Wed, 13 Nov 2024 10:10:54 +0000 (11:10 +0100)]
gpio: at91: Implement ops set_flags

Support GPIO configuration with following flags:
- in, out, out_active
- open_drain, pull_up

Signed-off-by: Zixun LI <[email protected]>
2 months agogpio: at91: Implement GPIOF_FUNC in get_function()
Zixun LI [Wed, 13 Nov 2024 10:10:22 +0000 (11:10 +0100)]
gpio: at91: Implement GPIOF_FUNC in get_function()

This patch adds support for determining whether a gpio pin is mapped as
peripheral function.

Signed-off-by: Zixun LI <[email protected]>
2 months agodrivers/mtd/ubispl/ubispl.c: Fix error message
Benedikt Spranger [Fri, 18 Oct 2024 08:30:03 +0000 (10:30 +0200)]
drivers/mtd/ubispl/ubispl.c: Fix error message

The bad CRC error message has transposed characters, which render the
output useless:

"bad CRC at record 213: #08x, not #08x" instead of
"bad CRC at record 213: #00000000, not #4be31f4d"

Fix the error message.

Signed-off-by: Benedikt Spranger <[email protected]>
Reviewed-by: John Ogness <[email protected]>
2 months agotiny-printf: Handle NULL pointer argument to %s
Benedikt Spranger [Fri, 18 Oct 2024 08:30:02 +0000 (10:30 +0200)]
tiny-printf: Handle NULL pointer argument to %s

A NULL pointer argument to %s causes a NULL pointer dereference in the
fixed width numerical printout code, since p is overwritten with NULL.
In case of %s width is 0. Check width before dereferencing the pointer.

Signed-off-by: Benedikt Spranger <[email protected]>
Reviewed-by: John Ogness <[email protected]>
2 months agoarm64: zynqmp: Also generate images with single DT
Michal Simek [Wed, 20 Nov 2024 08:05:27 +0000 (09:05 +0100)]
arm64: zynqmp: Also generate images with single DT

Create u-boot-single.itb where only actual DTB is used not really multiple
of DTS from OF_LIST. This results in small files without option to change
DT.

Signed-off-by: Michal Simek <[email protected]>
Link: https://lore.kernel.org/r/9362da506c13382da0c0d41ad8a111d9c1150f08.1732089924.git.michal.simek@amd.com
2 months agoMakefile: Drop SPL_FIT_GENERATOR support
Marek Vasut [Fri, 1 Nov 2024 09:18:00 +0000 (10:18 +0100)]
Makefile: Drop SPL_FIT_GENERATOR support

The SPL_FIT_GENERATOR is long superseded by binman, drop SPL_FIT_GENERATOR
support as there are no more users.

Signed-off-by: Marek Vasut <[email protected]>
Reviewed-by: Peter Robinson <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
Link: https://lore.kernel.org/r/22109373594b6a5d1110be9420ccd8fbb93a61d3.1730452668.git.michal.simek@amd.com
2 months agoarm64: zynqmp: Remove mkimage fit script
Michal Simek [Fri, 1 Nov 2024 09:17:59 +0000 (10:17 +0100)]
arm64: zynqmp: Remove mkimage fit script

Platform has been switched to binman that's why there is no need for this
script and also Kconfig symbols.

Signed-off-by: Michal Simek <[email protected]>
Link: https://lore.kernel.org/r/cf438091e43c4c9d535a9cfa2886673aa42a4370.1730452668.git.michal.simek@amd.com
2 months agoarm64: zynqmp: Generate u-boot.itb and QSPI image via binman
Michal Simek [Fri, 1 Nov 2024 09:17:58 +0000 (10:17 +0100)]
arm64: zynqmp: Generate u-boot.itb and QSPI image via binman

u-boot.itb has been generated via mkimage_fit_atf.sh but it is on the way
out that's why convert it's description to binman.
Compare to script binman description is not able to configure BL31 and BL32
load/entry addresses which should be done separately.

Signed-off-by: Michal Simek <[email protected]>
Link: https://lore.kernel.org/r/90b613796aee38158252c8bb1dfc3da0420f089d.1730452668.git.michal.simek@amd.com
2 months agoarm64: zynqmp: Add binman description for SOM
Michal Simek [Fri, 1 Nov 2024 09:17:57 +0000 (10:17 +0100)]
arm64: zynqmp: Add binman description for SOM

There is necessary to do some steps to compose boot images. These steps
were in scripts in layers for a while. That's why introduce description via
binman to simplify wiring and remove all scripting around.
This should make sure that everybody is up2date with the latest versions.

The first step is to create fit image with DTBs with descriptions in
configuration node which is written as regular expression to match all SOM
versions.
Description is there for k24 and k26 in spite of low level psu_init
configuration is different. The reason is that it goes to u-boot.itb image
which is the same for k24 and k26.
u-boot.itb is another image which is generated. It is normally generated
via arch/arm/mach-zynqmp/mkimage_fit_atf.sh but this script is supposed to
be deprecated.
FIT image by purpose is using 64bit addresses to have default option to
move images to high DDR (above 4GB). TF-A and TEE are optional components
but in the most cases TF-A is present all the time and TEE(OP-TEE) is used
by some configurations too.

3rd generated image is boot.bin with updated user field which contains
version number. This image can be used with updated Image Selector
which supports A/B update mechanisms with rollback protection.

4th image is image.bin which binary file which contains boot.bin and
u-boot.itb together and can be programmed via origin Image Selector.
This image can be also used for creating one capsule which contains both
boot images (in SPL boot flow).

Signed-off-by: Michal Simek <[email protected]>
Link: https://lore.kernel.org/r/35bc47a4a4799c5f5dbea56a45340a2810538330.1730452668.git.michal.simek@amd.com
2 months agoarm64: zynqmp: Describe empty binman node
Michal Simek [Fri, 1 Nov 2024 09:17:56 +0000 (10:17 +0100)]
arm64: zynqmp: Describe empty binman node

For enabling binman by default there is a need to have at least empty node
present that's why create -u-boot.dtsi with empty node to cover all ZynqMP
platforms.

Signed-off-by: Michal Simek <[email protected]>
Link: https://lore.kernel.org/r/14d874ad4568fa8e3178e893224fecc5c676f04c.1730452668.git.michal.simek@amd.com
2 months agocommon: binman: Calling initr_binman() when BINMAN_FDT
Michal Simek [Fri, 1 Nov 2024 09:17:55 +0000 (10:17 +0100)]
common: binman: Calling initr_binman() when BINMAN_FDT

Calling empty function when BINMAN_FDT is adding +64B for nothing which is
not helping on size sensitive configurations as Xilinx mini configurations.

Signed-off-by: Michal Simek <[email protected]>
Link: https://lore.kernel.org/r/f79dc1fbf796dd5ad290f6080608ee68d7652cfc.1730452668.git.michal.simek@amd.com
2 months agobinman: Add option for pointing to separate description
Michal Simek [Fri, 1 Nov 2024 09:17:54 +0000 (10:17 +0100)]
binman: Add option for pointing to separate description

Adding binman node with target images description can be unwanted feature
but as of today there is no way to disable it.
Also on size constrained systems it is not useful to add binman description
to DTB.
Introduce BINMAN_DTB Kconfig symbol which allows separate DTB for target
from DTB for binman itself.

Signed-off-by: Michal Simek <[email protected]>
Link: https://lore.kernel.org/r/f1379d2587f9bf279a7a75c318aabbc1b35ee0c6.1730452668.git.michal.simek@amd.com
2 months agobootstd: Remove prepared images
Simon Glass [Thu, 21 Nov 2024 22:32:14 +0000 (15:32 -0700)]
bootstd: Remove prepared images

These are no-longer used. Drop them.

Signed-off-by: Simon Glass <[email protected]>
2 months agotest_ut: Drop support for fallback files
Simon Glass [Thu, 21 Nov 2024 22:32:13 +0000 (15:32 -0700)]
test_ut: Drop support for fallback files

We don't need the fallback anymore. Remove the code which uses these
files.

Signed-off-by: Simon Glass <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
2 months agotest_ut: Use the built mkimage
Simon Glass [Thu, 21 Nov 2024 22:32:12 +0000 (15:32 -0700)]
test_ut: Use the built mkimage

The mkimage tool is not present in the docker image. Use the one in the
build directory.

Signed-off-by: Simon Glass <[email protected]>
2 months agotest_ut: Drop exeception handling
Simon Glass [Thu, 21 Nov 2024 22:32:11 +0000 (15:32 -0700)]
test_ut: Drop exeception handling

We don't need the fallback anymore. As a first step to removing it,
drop the try...except clauses and unindent the code.

This produces a large diff but there are no other code changes.

Signed-off-by: Simon Glass <[email protected]>
2 months agotest_ut: Allow running unprivileged
Richard Weinberger [Thu, 21 Nov 2024 22:32:10 +0000 (15:32 -0700)]
test_ut: Allow running unprivileged

Like for test_fs, no need to mess with loop mounts.

Signed-off-by: Richard Weinberger <[email protected]>
Tweaks to reduce diff (keep mnt variable):
Signed-off-by: Simon Glass <[email protected]>
2 months agotest_ut: Add an image size to setup_image()
Simon Glass [Thu, 21 Nov 2024 22:32:09 +0000 (15:32 -0700)]
test_ut: Add an image size to setup_image()

Add a parameter to indicate the size of the image to build.

Signed-off-by: Simon Glass <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
2 months agotest_fs: Rename mount dir to scratch
Richard Weinberger [Thu, 21 Nov 2024 22:32:08 +0000 (15:32 -0700)]
test_fs: Rename mount dir to scratch

Since no mounting happens anymore, rename the "mnt"
directory to "scratch" and the related variables.

Signed-off-by: Richard Weinberger <[email protected]>
Reviewed-by: Mattijs Korpershoek <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
2 months agotest_fs: Allow running unprivileged
Richard Weinberger [Thu, 21 Nov 2024 22:32:07 +0000 (15:32 -0700)]
test_fs: Allow running unprivileged

There is no need to mount the filesystem on the host side.
All filesystem tools offer some way to fill the fs without mounting.

So, create the content on the host side, create and fill the fs
without mounting.
No more sudo or guestmount needed.

This new approach works because the tests don't care about user IDs
and no device files are needed.
If user IDs start to matter it's still possible to use wrapper
tools like fakeroot in future while filling the fs.

Signed-off-by: Richard Weinberger <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
Tested-by: Mattijs Korpershoek <[email protected]>
2 months agoMerge tag 'u-boot-dfu-next-20241126' of https://source.denx.de/u-boot/custodians...
Tom Rini [Tue, 26 Nov 2024 16:50:05 +0000 (10:50 -0600)]
Merge tag 'u-boot-dfu-next-20241126' of https://source.denx.de/u-boot/custodians/u-boot-dfu into next

CI: https://source.denx.de/u-boot/custodians/u-boot-dfu/-/pipelines/23573

Android:
- bootstd: Implement bootimage v2 support
- bootstd: Support non-A/B in bootmeth_android
- Migrate VIM3 and VIM3L to use bootmeth_android
- bootstd: Additional test for bootimage v2
- bootstd: Optimize load time when reading partitions

2 months agoMerge tag 'u-boot-imx-next-20241126' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Tue, 26 Nov 2024 16:49:44 +0000 (10:49 -0600)]
Merge tag 'u-boot-imx-next-20241126' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/23563

- Make Siemens i.MX8 Capricorn board to boot U-Boot mainline again.
- Add support for phycore-imx93 2GB LPDDR4X variant.
- Add phycore-imx8mm EEPROM detection initialisation.

2 months agobootstd: android: don't read whole partition sizes
Julien Masson [Thu, 21 Nov 2024 10:59:55 +0000 (11:59 +0100)]
bootstd: android: don't read whole partition sizes

The current implementation is reading the whole partition for boot and
vendor_boot image which can be long following the size of the
partition or the time to read blocks (driver/SoC specific).

For example with mediatek mt8365 EVK board, we have a 64MiB boot
partition and the boot image flashed in this partition is only 42MiB.
It takes ~8-9 secs to read the boot partition.

Instead we can retrieved the boot image and vendor boot image size
with these new functions:
- android_image_get_bootimg_size
- android_image_get_vendor_bootimg_size
Use these information and read only the necessary.

By doing this with mt8365 EVK board, we read boot image in ~5 secs.

Signed-off-by: Julien Masson <[email protected]>
Reviewed-by: Mattijs Korpershoek <[email protected]>
Link: https://lore.kernel.org/r/20241121-bootmeth-android-part-sizes-v1-1-25760bbd0f08@baylibre.com
Signed-off-by: Mattijs Korpershoek <[email protected]>
2 months agobootstd: Add test for Android boot image v2
Guillaume La Roque [Tue, 26 Nov 2024 08:06:13 +0000 (09:06 +0100)]
bootstd: Add test for Android boot image v2

Rename actual android bootmethod test to specify it's for boot image
version 4.
Add a unit test for testing the Android bootmethod with boot image
version 2.

This requires another mmc image (mmc8) to contain the following
partitions:
- misc: contains the Bootloader Control Block (BCB)
- boot_a: contains a fake generic kernel image

we can test this with:

$ ./test/py/test.py --bd sandbox --build -k test_ut # build the mmc8.img
$ ./test/py/test.py --bd sandbox --build -k bootflow_android

Reviewed-by: Mattijs Korpershoek <[email protected]>
Signed-off-by: Guillaume La Roque <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mattijs Korpershoek <[email protected]>
2 months agoconfigs: khadas-vim3_android{_ab}: move on bootmeth android
Guillaume La Roque [Tue, 26 Nov 2024 08:06:12 +0000 (09:06 +0100)]
configs: khadas-vim3_android{_ab}: move on bootmeth android

Actually khadas vim3 use distro command to boot android image.
Move on new bootmeth android for A/B and non-A/B vim3 android.

Reviewed-by: Mattijs Korpershoek <[email protected]>
Acked-by: Neil Armstrong <[email protected]>
Signed-off-by: Guillaume La Roque <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mattijs Korpershoek <[email protected]>
2 months agoconfigs: khadas-vim3l_android{_ab}: move on bootmeth android
Guillaume La Roque [Tue, 26 Nov 2024 08:06:11 +0000 (09:06 +0100)]
configs: khadas-vim3l_android{_ab}: move on bootmeth android

Actually khadas vim3l use distro command to boot android image.
Move on new bootmeth android for A/B and non-A/B vim3l android.

Reviewed-by: Mattijs Korpershoek <[email protected]>
Acked-by: Neil Armstrong <[email protected]>
Signed-off-by: Guillaume La Roque <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mattijs Korpershoek <[email protected]>
2 months agobootstd: android: add non-A/B image support
Guillaume La Roque [Tue, 26 Nov 2024 08:06:10 +0000 (09:06 +0100)]
bootstd: android: add non-A/B image support

Update android bootmeth to support non-A/B image.
Enable AB support only when ANDROID_AB is enabled.

Reviewed-by: Mattijs Korpershoek <[email protected]>
Signed-off-by: Guillaume La Roque <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mattijs Korpershoek <[email protected]>
This page took 0.090058 seconds and 4 git commands to generate.