- Nov 26, 2024
-
-
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 <jmasson@baylibre.com> Reviewed-by:
Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20241121-bootmeth-android-part-sizes-v1-1-25760bbd0f08@baylibre.com Signed-off-by:
Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
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 <mkorpershoek@baylibre.com> Signed-off-by:
Guillaume La Roque <glaroque@baylibre.com> Link: https://lore.kernel.org/r/20241126-adnroidv2-v4-5-11636106dc69@baylibre.com Signed-off-by:
Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
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 <mkorpershoek@baylibre.com> Acked-by:
Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by:
Guillaume La Roque <glaroque@baylibre.com> Link: https://lore.kernel.org/r/20241126-adnroidv2-v4-4-11636106dc69@baylibre.com Signed-off-by:
Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
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 <mkorpershoek@baylibre.com> Acked-by:
Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by:
Guillaume La Roque <glaroque@baylibre.com> Link: https://lore.kernel.org/r/20241126-adnroidv2-v4-3-11636106dc69@baylibre.com Signed-off-by:
Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
Update android bootmeth to support non-A/B image. Enable AB support only when ANDROID_AB is enabled. Reviewed-by:
Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by:
Guillaume La Roque <glaroque@baylibre.com> Link: https://lore.kernel.org/r/20241126-adnroidv2-v4-2-11636106dc69@baylibre.com Signed-off-by:
Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
Android bootmeth only support boot image v3/4. Add support of Android Boot Image version 2 [1]. Vendor boot image is only supported in version 3 and 4 so don't try to read it when header version is less than 3. [1] https://source.android.com/docs/core/architecture/bootloader/boot-image-header#header-v2 Tested-by:
Julien Masson <jmasson@baylibre.com> Reviewed-by:
Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by:
Guillaume La Roque <glaroque@baylibre.com> Link: https://lore.kernel.org/r/20241126-adnroidv2-v4-1-11636106dc69@baylibre.com Signed-off-by:
Mattijs Korpershoek <mkorpershoek@baylibre.com>
-
- Nov 25, 2024
-
-
Tom Rini authored
Prepare v2025.01-rc3
-
Tom Rini authored
Signed-off-by:
Tom Rini <trini@konsulko.com>
-
https://source.denx.de/u-boot/custodians/u-boot-usbTom Rini authored
- Fix two issues with the asix88179 driver
-
Fix missed rename from SPI_ADVANCE to SPI_STACKED_PARALLEL. This fixes an issue encountered while testing the Zynq-7000 QSPI parallel Flash implementation. Fixes: f896aa65 ("mtd: spi-nor: Rename SPI_ADVANCE to SPI_STACKED_PARALLEL") Reviewed-by:
Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Reviewed-by:
Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by:
Dominik Wernberger <dominik.wernberger@gmx.de>
-
https://source.denx.de/u-boot/custodians/u-boot-usbTom Rini authored
- Support for Microchip USB5744 hub
-
u-boot was crashing in qemu as the modeled hardware enforced overly strict memory reads. While this code will work on existing hardware, fix to avoid future issues. Fixes: 12770d0d ("ast2600: spl: Add boot mode detection") Link: https://gitlab.com/qemu-project/qemu/-/issues/2636 Signed-off-by:
Joel Stanley <joel@jms.id.au>
-
The compiler will ignore it anyway: include/linux/mtd/mtd.h:342:15: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
The ASIX 88179A drops packets when receiving fragmented packets larger than the MTU size due to an insufficient URB buffer size. This change synchronizes the URB buffer size with the configuration used in the Linux kernel, resolving the packet drop issue. To reproduce the issue, set the following configuration: CONFIG_IP_DEFRAG=y CONFIG_TFTP_BLOCKSIZE=16352 Then, run the `tftp` command. It will fail with a timeout error: U-Boot> tftp zero.bin Using ax88179_eth device TFTP from server 10.0.0.196; our IP address is 10.0.0.18 Filename 'zero.bin' Load address: 0x10000000 Loading: T T T T T T T T T T T Retry count exceeded; starting again Signed-off-by:
Khoa Hoang <admin@khoahoang.com> Reviewed-by:
Marek Vasut <marex@denx.de>
-
The ASIX AX88179A locks up when the ADVERTISE_NPAGE bit is set in the MII_ADVERTISE register, suggesting that this feature may be broken or unsupported on this chip. In the Linux kernel, this bit is not set, and enabling it also causes the PHY to lock up and stay in a link-down state. Additionally, the AX88179 and AX88179A variants do not appear to support the ADVERTISE_LPACK bit, as setting it consistently reads back as 0. This patch removes the ADVERTISE_NPAGE and ADVERTISE_LPACK bits from the MII_ADVERTISE register configuration. It also resets the PHY before modifying the MII_ADVERTISE register, then restarts auto-negotiation, following the same flow used in the U-Boot asix.c driver. Signed-off-by:
Khoa Hoang <admin@khoahoang.com> Reviewed-by:
Marek Vasut <marex@denx.de>
-
The .bind function is implemented to bind the correct "half" of the hub that the driver wants to bind, and returning -ENODEV for the other "half". Signed-off-by:
Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Add i2c initialization hook and set usb5744 platform data with function having required i2c initialization sequence. Apart from the USB command attach, prevent the hub from suspend. when the “USB Attach with SMBUS (0xAA56)” command is issued to the hub, the hub is getting enumerated and then it puts in a suspend mode. This causes the hub to NAK any SMBUS access made by the SMBUS Master during this period and not able to see the hub's slave address while running the "i2c probe" command. Prevent the MCU from the putting the HUB in suspend mode through register write. The BYPASS_UDC_SUSPEND bit (Bit 3) of the RuntimeFlags2 register at address 0x411D controls this aspect of the hub. The BYPASS_UDC_SUSPEND bit in register 0x411Dh must be set to ensure that the MCU is always enabled and ready to respond to SMBus runtime commands. This register needs to be written before the USB attach command is issued. The byte sequence is as follows: Slave addr: 0x2d 00 00 05 00 01 41 1D 08 Slave addr: 0x2d 99 37 00 Slave addr: 0x2d AA 56 00 Signed-off-by:
Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Add support for the Microchip USB5744 USB3.0 and USB2.0 Hub. The usb5744 driver trigger hub reset signal after soft reset. The usb5744 hub need to reset after the phy initialization, which toggles the gpio. Signed-off-by:
Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Reviewed-by:
Marek Vasut <marex@denx.de>
-
Don't error out if there is no vdd regulator supply, as these are optional properties. Signed-off-by:
Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Reviewed-by:
Marek Vasut <marex@denx.de>
-
As part of the reset, sets the direction of the pin to output before toggling the pin. Delay of millisecond is added in between low and high to meet the setup and hold time requirement of the reset. Update the usb2514 hub_data with the reset delay and power on delay values. Signed-off-by:
Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Reviewed-by:
Marek Vasut <marex@denx.de>
-
- Nov 24, 2024
-
-
Tom Rini authored
Janne Grunau <j@jannau.net> says: Starting with v2024.10 dev_iommu_dma_unmap calls during device removal trigger a NULL pointer dereference in the Apple dart iommu driver. The iommu device is removed before its user. The sparsely used DM_FLAG_VITAL flag is intended to describe this dependency. Add it to the driver. Adding this flag is unfortunately not enough since the boot routines except the arm one simply remove all drivers. Add and use a new function which calls dm_remove_devioce_flags(DM_REMOVE_ACTIVE_ALL | DM_REMOVE_NON_VITAL); dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL); to ensure this order dependency is head consistently. Link: https://lore.kernel.org/r/20241123-iommu_apple_dart_ordering-v2-0-cc2ade6dde97@jannau.net
-
This replaces dm_remove_devices_flags() calls in all boot implementations to ensure non vital devices are consistently removed first. All boot implementation except arch/arm/lib/bootm.c currently just call dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL). This can result in crashes when dependencies between devices exists. The driver model's design document describes DM_FLAG_VITAL as "indicates that the device is 'vital' to the operation of other devices". Device removal at boot should follow this. Instead of adding dm_remove_devices_flags() with (DM_REMOVE_ACTIVE_ALL | DM_REMOVE_NON_VITAL) everywhere add dm_remove_devices_active() which does this. Fixes a NULL pointer deref in the apple dart IOMMU driver during EFI boot. The xhci-pci (driver which depends on the IOMMU to work) removes its mapping on removal. This explodes when the IOMMU device was removed first. dm_remove_devices_flags() is kept since it is used for testing of device_remove() calls in dm. Signed-off-by:
Janne Grunau <j@jannau.net>
-
Avoids NULL pointer dereferences in apple_dart_unmap when the iommu device is removed before its user. U-boot's device model does not track dependencies between devices. Observed on a M1 Ultra Mac Studio with v2024.10. Acked-by:
Mark Kettenis <kettenis@openbsd.org> Signed-off-by:
Janne Grunau <j@jannau.net>
-
https://source.denx.de/u-boot/custodians/u-boot-efiTom Rini authored
CI: https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/23529 - Documentation: - Document wget syntax enhancements with lwIP network stack - Move README.kconfig to HTML documentation - Remove redundant README.TPL - UEFI: - Simplify efi_tcg2_hash_log_extend_event() - Allow EFI_LOADER_BOUNCE_BUFFER on all architectures - Correctly unmap and free memory on errors - Other: - Enable EFI_LOADER_BOUNCE_BUFFER on StarFive VisionFive 2
-
We never free and unmap the memory on errors and we never unmap it when freeing it. The latter won't cause any problems even on sandbox, but for consistency always use unmap_sysmem() Fixes: commit 22f2c9ed ("efi: memory: use the lmb API's for allocating and freeing memory") Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
https://gitlab.denx.de/u-boot/custodians/u-boot-imxTom Rini authored
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/23523 - Fix a imx8mn clock driver regression where the 32kHz clock can not be found in SPL.
-
- Nov 23, 2024
-
-
Heinrich Schuchardt authored
Our MMC driver for JH7110 boards only supports reading to the low 4 GiB of memory. Booting boards with more memory requires EFI_LOADER_BOUNCE_BUFFER. Reported-by:
E Shattow <lucent@gmail.com> Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Tested-by:
Loic Devulder <ldevulder@suse.com>
-
Heinrich Schuchardt authored
Commit 775f7657 ("Kconfig: clean up the efi configuration status") by mistake revoked commit dcd1b63b ("efi_loader: allow EFI_LOADER_BOUNCE_BUFFER on all architectures"). Fixes: 775f7657 ("Kconfig: clean up the efi configuration status") Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Tested-by:
Loic Devulder <ldevulder@suse.com>
-
The lwIP version of wget supports a different syntax with a URL, in addition to the legacy syntax. Document that. While we're at it, fix a couple of minor issues in the legacy syntax: - hostIPaddr can be a DNS name if CONFIG_CMD_DNS is enabled - path is mandatory Signed-off-by:
Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
Heinrich Schuchardt authored
doc/develop/spl.rst describes SPL, TPL, VPL. Remove the outdated README.TPL document. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
Heinrich Schuchardt authored
* format according to Sphinx style * add link to Linux Kconfig documentation * sort table alphabetically in 'Conversion from boards.cfg to Kconfig' Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
Heinrich Schuchardt authored
The value of variable nt is never used. Just use NULL when calling efi_check_pe(). The API function is not expected to write to the console. Such output might have unwanted side effects on the screen layout of an EFI application. Leave error handling to the caller. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
Marek Vasut authored
Since 50cdd3f7 ("clk: imx: clk-imx8mn Fix nand and spi clock parent"), drivers/clk/imx/clk-imx8mn.c clk_get_by_name(dev, "osc_24m", &osc_24m_clk) fails with error -22 EINVAL in SPL. This is because clk_get_by_name() in the end calls fdtdec_parse_phandle_with_args(), which iterates over all phandles in clock-controller@30380000 { clocks = <&osc_32k>, <&osc_24m>, ... } node 'clocks' property in an attempt to find the "osc_24m" clock, but fails to resolve the &osc_32k phandle and returns with -EINVAL. Include the osc_32k clock in SPL DTs as a low risk fix for v2025.01 release. This way, fdtdec_parse_phandle_with_args() can resolve both the osc_32k and following osc_24m phandle and successfully look up the osc_24m clock. Fixes: 50cdd3f7 ("clk: imx: clk-imx8mn Fix nand and spi clock parent") Signed-off-by:
Marek Vasut <marex@denx.de> Tested-by: Adam Ford <aford173@gmail.com> #imx8mn-beacon
-
- Nov 22, 2024
-
-
Tom Rini authored
- Assorted additional lwIP fixes - Assorted test fixes - Assorted other localized fixes
-
Users might not know what 'CDP' refers to. Provide basic information. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
Provide a unit test for the hextoull() function. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
The dhcp command is supposed to have the following syntax as per "help dhcp": dhcp [loadAddress] [[hostIPaddr:]bootfilename] In other words, any arguments should be passed to an implicit tftpboot command after the DHCP exchange has occurred. Add the missing code to the lwIP version of do_dhcp(). Signed-off-by:
Jerome Forissier <jerome.forissier@linaro.org>
-
We currently provide entropy to mbedTLS using 8b chunks. Take into account the 'len' parameter passed by MBed TLS to the entropy gathering function instead. Note that the current code works because len is always 128 (defined at compile time), therefore mbedtls_hardware_poll() is called repeatedly and the buffer is filled correctly. But passing 'len' to dm_rng_read() is both better and simpler. Reviewed-by:
Jerome Forissier <jerome.forissier@linaro.org> Suggested-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
The lwIP version of wget also supports the legacy syntax. Document it in the help string. Signed-off-by:
Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
The local variables ipstr, maskstr and gwstr in static function get_udev_ipv4_info() cannot be pointers to read-only data, since they may be written to in case the device index is > 0. Therefore make them char arrays allocated on the stack. Reported-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org> Reported-by:
Adriano Cordova <adrianox@gmail.com> Link: https://lists.denx.de/pipermail/u-boot/2024-November/572066.html Signed-off-by:
Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-