u-boot/0005-tools-zynqmpbif-Add-support-for-loa.patch

76 lines
2.1 KiB
Diff
Raw Normal View History

From c31a2d2fe0e9386ba98bfe64fa3b07cc8f09cc34 Mon Sep 17 00:00:00 2001
Accepting request 607419 from hardware:boot:staging - Conditionalize pine64plus ATF support on uboot_atf_pine64 - u-boot-board.spec.in: Update license - Add poplar - Update to 2018.05 - Update to 2018.05-rc3 - Include u-boot.spec in autogeneration logic - Add support for .bif generation in mkimage - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches added: 0006-tools-zynqmpimage-Add-partition-rea.patch 0007-tools-zynqmpimage-Move-defines-to-h.patch 0008-MAINTAINERS-Declare-tools-zynq-.-c-.patch 0009-tools-zynqmpimage-Add-bif-support.patch 0010-tools-zynqmpbif-Add-support-for-loa.patch - Add generic ZynqMP support - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches added: 0005-zynqmp-Add-generic-target.patch - Update to 2018.05-rc2 - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches dropped: 0004-rpi3-Enable-lan78xx-driver.patch 0005-rpi-Add-identifier-for-the-new-RPi3.patch 0006-efi_loader-Fix-network-DP-with-DM_E.patch 0007-mkimage-do-not-fail-if-there-is-no-.patch 0008-rpi-Allow-to-boot-without-serial.patch 0009-mmc-use-core-clock-frequency-in-bcm.patch 0010-Temp-workaround-for-Chromebook-snow.patch * Patches added: 0004-Temp-workaround-for-Chromebook-snow.patch - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches added: 0010-Temp-workaround-for-Chromebook-snow.patch - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches dropped: 0009-rpi-Allow-to-boot-without-serial.patch 0010-mmc-use-core-clock-frequency-in-bcm.patch * Patches added: 0008-rpi-Allow-to-boot-without-serial.patch 0009-mmc-use-core-clock-frequency-in-bcm.patch - Update to 2018.05-rc1 - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches dropped: 0003-Revert-rockchip-mkimage-remove-plac.patch 0004-rpi-Use-firmware-provided-device-tr.patch 0005-rpi3-Enable-lan78xx-driver.patch 0006-net-Only-access-network-devices-aft.patch 0007-rpi-Add-identifier-for-the-new-RPi3.patch 0008-efi_loader-Fix-network-DP-with-DM_E.patch * Patches added: 0003-rpi-Use-firmware-provided-device-tr.patch 0004-rpi3-Enable-lan78xx-driver.patch 0005-rpi-Add-identifier-for-the-new-RPi3.patch 0006-efi_loader-Fix-network-DP-with-DM_E.patch 0007-mkimage-do-not-fail-if-there-is-no-.patch OBS-URL: https://build.opensuse.org/request/show/607419 OBS-URL: https://build.opensuse.org/package/show/hardware:boot/u-boot?expand=0&rev=16
2018-05-15 11:14:56 +02:00
From: Alexander Graf <agraf@suse.de>
Date: Thu, 26 Apr 2018 13:30:32 +0200
Subject: [PATCH] tools: zynqmpbif: Add support for load=after
Some times it's handy to have a partition loaded immediately after
the end of the previous blob. The most obvious example for this is
a U-Boot binary (coming from .elf) and a device tree file.
This patch adds that logic. With this, the following bif snippet
does what you would expect:
[destination_cpu=a5x-0, exception_level=el-2] u-boot.elf
[load=after] u-boot.dtb
converts to
FSBL payload on CPU a5x-0 (PS):
Offset : 0x00590500
Size : 577768 (0x8d0e8) bytes
Load : 0x08000000
Attributes : EL2
Checksum : 0xefca2cad
FSBL payload on CPU none (PS):
Offset : 0x0061d640
Size : 129760 (0x1fae0) bytes
Load : 0x0808d0e8 (entry=0x00000000)
Attributes : EL3
Checksum : 0xf7dd3d49
Signed-off-by: Alexander Graf <agraf@suse.de>
---
tools/zynqmpbif.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/tools/zynqmpbif.c b/tools/zynqmpbif.c
Accepting request 767934 from hardware:boot:staging - Fix firefly-rk3288 and tinker-rk3288 by using TPL instead of SPL (SPL too big) - Fix mx6qsabrelite build - Update to v2020.01: * Now requires python 3.5+ (2.x support dropped) * Add Orange Pi Zero Plus 2 support * Platfrom fixes: atmel, fsl, imx, Marvell, RPi, rockchip, sunxi, TI * EFI fixes * I2C fixes * MMC fixes * SPI fixes * USB fixes - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2020.01 * Patches dropped: 0009-libfdt-fdt_address_cells-and-fdt_si.patch 0010-libfdt-return-correct-value-if-size.patch 0011-libfdt-Allow-size-cells-of-0.patch 0012-dm-Fix-default-address-cells-return.patch 0013-arm-arm11-allow-unaligned-memory-ac.patch 0014-fdt-fix-bcm283x-dm-pre-reloc-defini.patch 0015-arm-dts-bcm283x-Rename-U-Boot-file.patch 0016-drivers-bcm283x-Set-pre-location-fl.patch 0017-pinctrl-bcm283x-Add-compatible-for-.patch 0018-rpi-push-fw_dtb_pointer-in-the-.dat.patch 0019-ARM-bcm283x-Move-BCM283x_BASE-to-a-.patch 0020-ARM-bcm283x-Set-rpi_bcm283x_base-at.patch 0021-ARM-bcm283x-Set-memory-map-at-run-t.patch 0022-ARM-defconfig-add-unified-config-fo.patch 0023-boo-1144161-Remove-nand-mtd-spi-dfu.patch 0024-rpi-fix-dram-bank-initialization.patch 0025-rpi-Enable-DRAM-bank-initialization.patch 0026-ARM-defconfig-Fix-32bit-config-for-.patch * Patches added: 0009-boo-1144161-Remove-nand-mtd-spi-dfu.patch OBS-URL: https://build.opensuse.org/request/show/767934 OBS-URL: https://build.opensuse.org/package/show/hardware:boot/u-boot?expand=0&rev=76
2020-01-28 10:38:57 +01:00
index 82ce0ac1a5..b4302fa67e 100644
Accepting request 607419 from hardware:boot:staging - Conditionalize pine64plus ATF support on uboot_atf_pine64 - u-boot-board.spec.in: Update license - Add poplar - Update to 2018.05 - Update to 2018.05-rc3 - Include u-boot.spec in autogeneration logic - Add support for .bif generation in mkimage - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches added: 0006-tools-zynqmpimage-Add-partition-rea.patch 0007-tools-zynqmpimage-Move-defines-to-h.patch 0008-MAINTAINERS-Declare-tools-zynq-.-c-.patch 0009-tools-zynqmpimage-Add-bif-support.patch 0010-tools-zynqmpbif-Add-support-for-loa.patch - Add generic ZynqMP support - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches added: 0005-zynqmp-Add-generic-target.patch - Update to 2018.05-rc2 - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches dropped: 0004-rpi3-Enable-lan78xx-driver.patch 0005-rpi-Add-identifier-for-the-new-RPi3.patch 0006-efi_loader-Fix-network-DP-with-DM_E.patch 0007-mkimage-do-not-fail-if-there-is-no-.patch 0008-rpi-Allow-to-boot-without-serial.patch 0009-mmc-use-core-clock-frequency-in-bcm.patch 0010-Temp-workaround-for-Chromebook-snow.patch * Patches added: 0004-Temp-workaround-for-Chromebook-snow.patch - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches added: 0010-Temp-workaround-for-Chromebook-snow.patch - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches dropped: 0009-rpi-Allow-to-boot-without-serial.patch 0010-mmc-use-core-clock-frequency-in-bcm.patch * Patches added: 0008-rpi-Allow-to-boot-without-serial.patch 0009-mmc-use-core-clock-frequency-in-bcm.patch - Update to 2018.05-rc1 - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches dropped: 0003-Revert-rockchip-mkimage-remove-plac.patch 0004-rpi-Use-firmware-provided-device-tr.patch 0005-rpi3-Enable-lan78xx-driver.patch 0006-net-Only-access-network-devices-aft.patch 0007-rpi-Add-identifier-for-the-new-RPi3.patch 0008-efi_loader-Fix-network-DP-with-DM_E.patch * Patches added: 0003-rpi-Use-firmware-provided-device-tr.patch 0004-rpi3-Enable-lan78xx-driver.patch 0005-rpi-Add-identifier-for-the-new-RPi3.patch 0006-efi_loader-Fix-network-DP-with-DM_E.patch 0007-mkimage-do-not-fail-if-there-is-no-.patch OBS-URL: https://build.opensuse.org/request/show/607419 OBS-URL: https://build.opensuse.org/package/show/hardware:boot/u-boot?expand=0&rev=16
2018-05-15 11:14:56 +02:00
--- a/tools/zynqmpbif.c
+++ b/tools/zynqmpbif.c
@@ -42,6 +42,7 @@ enum bif_flag {
BIF_FLAG_PUF_FILE,
BIF_FLAG_AARCH32,
BIF_FLAG_PART_OWNER_UBOOT,
+ BIF_FLAG_LOAD_AFTER,
/* Internal flags */
BIF_FLAG_BIT_FILE,
@@ -151,6 +152,11 @@ static char *parse_load(char *line, struct bif_entry *bf)
{
char *endptr;
+ if (!strncmp(line, "after", strlen("after"))) {
+ bf->flags |= (1ULL << BIF_FLAG_LOAD_AFTER);
+ return line + strlen("after");
+ }
+
bf->load = strtoll(line, &endptr, 0);
return endptr;
@@ -345,6 +351,15 @@ static int bif_add_part(struct bif_entry *bf, const char *data, size_t len)
Accepting request 607419 from hardware:boot:staging - Conditionalize pine64plus ATF support on uboot_atf_pine64 - u-boot-board.spec.in: Update license - Add poplar - Update to 2018.05 - Update to 2018.05-rc3 - Include u-boot.spec in autogeneration logic - Add support for .bif generation in mkimage - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches added: 0006-tools-zynqmpimage-Add-partition-rea.patch 0007-tools-zynqmpimage-Move-defines-to-h.patch 0008-MAINTAINERS-Declare-tools-zynq-.-c-.patch 0009-tools-zynqmpimage-Add-bif-support.patch 0010-tools-zynqmpbif-Add-support-for-loa.patch - Add generic ZynqMP support - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches added: 0005-zynqmp-Add-generic-target.patch - Update to 2018.05-rc2 - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches dropped: 0004-rpi3-Enable-lan78xx-driver.patch 0005-rpi-Add-identifier-for-the-new-RPi3.patch 0006-efi_loader-Fix-network-DP-with-DM_E.patch 0007-mkimage-do-not-fail-if-there-is-no-.patch 0008-rpi-Allow-to-boot-without-serial.patch 0009-mmc-use-core-clock-frequency-in-bcm.patch 0010-Temp-workaround-for-Chromebook-snow.patch * Patches added: 0004-Temp-workaround-for-Chromebook-snow.patch - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches added: 0010-Temp-workaround-for-Chromebook-snow.patch - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches dropped: 0009-rpi-Allow-to-boot-without-serial.patch 0010-mmc-use-core-clock-frequency-in-bcm.patch * Patches added: 0008-rpi-Allow-to-boot-without-serial.patch 0009-mmc-use-core-clock-frequency-in-bcm.patch - Update to 2018.05-rc1 - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches dropped: 0003-Revert-rockchip-mkimage-remove-plac.patch 0004-rpi-Use-firmware-provided-device-tr.patch 0005-rpi3-Enable-lan78xx-driver.patch 0006-net-Only-access-network-devices-aft.patch 0007-rpi-Add-identifier-for-the-new-RPi3.patch 0008-efi_loader-Fix-network-DP-with-DM_E.patch * Patches added: 0003-rpi-Use-firmware-provided-device-tr.patch 0004-rpi3-Enable-lan78xx-driver.patch 0005-rpi-Add-identifier-for-the-new-RPi3.patch 0006-efi_loader-Fix-network-DP-with-DM_E.patch 0007-mkimage-do-not-fail-if-there-is-no-.patch OBS-URL: https://build.opensuse.org/request/show/607419 OBS-URL: https://build.opensuse.org/package/show/hardware:boot/u-boot?expand=0&rev=16
2018-05-15 11:14:56 +02:00
if (r)
return r;
+ if (bf->flags & (1ULL << BIF_FLAG_LOAD_AFTER) &&
+ bif_output.last_part) {
+ struct partition_header *p = bif_output.last_part;
+ uint64_t load = le64_to_cpu(p->load_address);
+
+ load += le32_to_cpu(p->len) * 4;
+ parthdr.load_address = cpu_to_le64(load);
+ }
+
parthdr.offset = cpu_to_le32(bf->offset / 4);
if (bf->flags & (1ULL << BIF_FLAG_BOOTLOADER)) {