2018.01 RC2

This commit is contained in:
Peter Robinson 2017-12-22 01:35:59 +00:00
parent c158ae2d77
commit ad36d48b58
11 changed files with 149 additions and 674 deletions

View File

@ -6,6 +6,8 @@ evb-rk3399
firefly-rk3399
geekbox
hikey
khadas-vim
libretech-cc
mvebu_espressobin-88f3720
mvebu_mcbin-88f8040
nanopi_neo2
@ -14,6 +16,7 @@ orangepi_pc2
orangepi_prime
orangepi_win
orangepi_zero_plus2
p212
p2371-2180
pine64_plus
poplar

View File

@ -1,174 +0,0 @@
From patchwork Fri Nov 3 00:11:27 2017
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [U-Boot] arm64: support running at addr other than linked to
X-Patchwork-Submitter: Stephen Warren <swarren@wwwdotorg.org>
X-Patchwork-Id: 833593
X-Patchwork-Delegate: trini@ti.com
Message-Id: <20171103001127.2055-1-swarren@wwwdotorg.org>
To: Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de, Stephen Warren <swarren@nvidia.com>
Date: Thu, 2 Nov 2017 18:11:27 -0600
From: Stephen Warren <swarren@wwwdotorg.org>
List-Id: U-Boot discussion <u-boot.lists.denx.de>
From: Stephen Warren <swarren@nvidia.com>
This is required in the case where U-Boot is typically loaded and run at
a particular address, but for some reason the RAM at that location is not
available, e.g. due to memory fragmentation loading other boot binaries or
firmware, splitting an SMP complex between various different OSs without
using e.g. the EL2 second-stage page tables to hide the memory asignments,
or due to known ECC failures.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
arch/arm/Kconfig | 16 ++++++++++++++++
arch/arm/cpu/armv8/start.S | 26 ++++++++++++++++++++++++++
arch/arm/include/asm/config.h | 4 ----
arch/arm/lib/crt0_64.S | 8 ++++++++
arch/arm/lib/relocate_64.S | 23 ++++++++++++++++++-----
5 files changed, 68 insertions(+), 9 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 83b7aa51dc2c..294b456414bc 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -9,6 +9,22 @@ config ARM64
select PHYS_64BIT
select SYS_CACHE_SHIFT_6
+if ARM64
+config POSITION_INDEPENDENT
+ bool "Generate position-independent pre-relocation code"
+ help
+ U-Boot expects to be linked to a specific hard-coded address, and to
+ be loaded to and run from that address. This option lifts that
+ restriction, thus allowing the code to be loaded to and executed
+ from almost any address. This logic relies on the relocation
+ information that is embedded into the binary to support U-Boot
+ relocating itself to the top-of-RAM later during execution.
+endif
+
+config STATIC_RELA
+ bool
+ default y if ARM64 && !POSITION_INDEPENDENT
+
config DMA_ADDR_T_64BIT
bool
default y if ARM64
diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
index 5c500be51d1f..03e744e4a673 100644
--- a/arch/arm/cpu/armv8/start.S
+++ b/arch/arm/cpu/armv8/start.S
@@ -57,6 +57,32 @@ reset:
.globl save_boot_params_ret
save_boot_params_ret:
+#if CONFIG_POSITION_INDEPENDENT
+ /*
+ * Fix .rela.dyn relocations. This allows U-Boot to be loaded to and
+ * executed at a different address than it was linked at.
+ */
+pie_fixup:
+ adr x0, _start /* x0 <- Runtime value of _start */
+ ldr x1, _TEXT_BASE /* x1 <- Linked value of _start */
+ sub x9, x0, x1 /* x9 <- Run-vs-link offset */
+ adr x2, __rel_dyn_start /* x2 <- Runtime &__rel_dyn_start */
+ adr x3, __rel_dyn_end /* x3 <- Runtime &__rel_dyn_end */
+pie_fix_loop:
+ ldp x0, x1, [x2], #16 /* (x0, x1) <- (Link location, fixup) */
+ ldr x4, [x2], #8 /* x4 <- addend */
+ cmp w1, #1027 /* relative fixup? */
+ bne pie_skip_reloc
+ /* relative fix: store addend plus offset at dest location */
+ add x0, x0, x9
+ add x4, x4, x9
+ str x4, [x0]
+pie_skip_reloc:
+ cmp x2, x3
+ b.lo pie_fix_loop
+pie_fixup_done:
+#endif
+
#ifdef CONFIG_SYS_RESET_SCTRL
bl reset_sctrl
#endif
diff --git a/arch/arm/include/asm/config.h b/arch/arm/include/asm/config.h
index 5674d37c04df..9f178293818e 100644
--- a/arch/arm/include/asm/config.h
+++ b/arch/arm/include/asm/config.h
@@ -10,10 +10,6 @@
#define CONFIG_LMB
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
-#ifdef CONFIG_ARM64
-#define CONFIG_STATIC_RELA
-#endif
-
#if defined(CONFIG_ARCH_LS1021A) || \
defined(CONFIG_CPU_PXA27X) || \
defined(CONFIG_CPU_MONAHANS) || \
diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S
index 9c46c93ca4c5..da7c62cbe0aa 100644
--- a/arch/arm/lib/crt0_64.S
+++ b/arch/arm/lib/crt0_64.S
@@ -98,6 +98,14 @@ ENTRY(_main)
ldr x18, [x18, #GD_NEW_GD] /* x18 <- gd->new_gd */
adr lr, relocation_return
+#if CONFIG_POSITION_INDEPENDENT
+ /* Add in link-vs-runtime offset */
+ adr x0, _start /* x0 <- Runtime value of _start */
+ ldr x9, _TEXT_BASE /* x9 <- Linked value of _start */
+ sub x9, x9, x0 /* x9 <- Run-vs-link offset */
+ add lr, lr, x9
+#endif
+ /* Add in link-vs-relocation offset */
ldr x9, [x18, #GD_RELOC_OFF] /* x9 <- gd->reloc_off */
add lr, lr, x9 /* new return address after relocation */
ldr x0, [x18, #GD_RELOCADDR] /* x0 <- gd->relocaddr */
diff --git a/arch/arm/lib/relocate_64.S b/arch/arm/lib/relocate_64.S
index fdba004363af..04804524ed65 100644
--- a/arch/arm/lib/relocate_64.S
+++ b/arch/arm/lib/relocate_64.S
@@ -27,11 +27,24 @@ ENTRY(relocate_code)
/*
* Copy u-boot from flash to RAM
*/
- ldr x1, =__image_copy_start /* x1 <- SRC &__image_copy_start */
- subs x9, x0, x1 /* x9 <- relocation offset */
+ adr x1, __image_copy_start /* x1 <- Run &__image_copy_start */
+ subs x9, x0, x1 /* x8 <- Run to copy offset */
b.eq relocate_done /* skip relocation */
- ldr x2, =__image_copy_end /* x2 <- SRC &__image_copy_end */
+ /*
+ * Don't ldr x1, __image_copy_start here, since if the code is already
+ * running at an address other than it was linked to, that instruction
+ * will load the relocated value of __image_copy_start. To
+ * correctly apply relocations, we need to know the linked value.
+ *
+ * Linked &__image_copy_start, which we know was at
+ * CONFIG_SYS_TEXT_BASE, which is stored in _TEXT_BASE, as a non-
+ * relocated value, since it isn't a symbol reference.
+ */
+ ldr x1, _TEXT_BASE /* x1 <- Linked &__image_copy_start */
+ subs x9, x0, x1 /* x9 <- Link to copy offset */
+ adr x1, __image_copy_start /* x1 <- Run &__image_copy_start */
+ adr x2, __image_copy_end /* x2 <- Run &__image_copy_end */
copy_loop:
ldp x10, x11, [x1], #16 /* copy from source address [x1] */
stp x10, x11, [x0], #16 /* copy to target address [x0] */
@@ -42,8 +55,8 @@ copy_loop:
/*
* Fix .rela.dyn relocations
*/
- ldr x2, =__rel_dyn_start /* x2 <- SRC &__rel_dyn_start */
- ldr x3, =__rel_dyn_end /* x3 <- SRC &__rel_dyn_end */
+ adr x2, __rel_dyn_start /* x2 <- Run &__rel_dyn_start */
+ adr x3, __rel_dyn_end /* x3 <- Run &__rel_dyn_end */
fixloop:
ldp x0, x1, [x2], #16 /* (x0,x1) <- (SRC location, fixup) */
ldr x4, [x2], #8 /* x4 <- addend */

View File

@ -1,90 +1,43 @@
From patchwork Tue Jun 20 21:55:25 2017
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [U-Boot,2/2] board/db410c: fix fdt address
From: Rob Clark <robdclark@gmail.com>
X-Patchwork-Id: 778516
Message-Id: <20170620215525.10430-2-robdclark@gmail.com>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Nicolas Dechesne <nicolas.dechesne@linaro.org>,
Stephen Boyd <sboyd@codeaurora.org>
Date: Tue, 20 Jun 2017 17:55:25 -0400
From ce71ddd50a6752b805974893464a88a0f145fe42 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Wed, 20 Dec 2017 08:22:08 +0000
Subject: [PATCH] Dragonboard fixes
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
Maybe there is a better way to not hardcode this? But at least with
the build of lk that I have, the fdt table is at 0x81e00000. I guess
there must be a more robust way to do this, since presumably lk when
booting the linux kernel directly somehow passes the fdt address.
include/configs/dragonboard410c.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h
index 11c842d..3b9932d 100644
--- a/include/configs/dragonboard410c.h
+++ b/include/configs/dragonboard410c.h
@@ -105,7 +105,7 @@ REFLASH(dragonboard/u-boot.img, 8)\
"linux_image=Image\0" \
"kernel_addr_r=0x81000000\0"\
"fdtfile=apq8016-sbc.dtb\0" \
- "fdt_addr_r=0x83000000\0"\
+ "fdt_addr_r=0x81e00000\0"\
"ramdisk_addr_r=0x84000000\0"\
"scriptaddr=0x90000000\0"\
"pxefile_addr_r=0x90100000\0"\
From a2782063c8daf9000d131e85200bc631a16450b4 Mon Sep 17 00:00:00 2001
From: Rob Clark <robdclark@gmail.com>
Date: Wed, 21 Jun 2017 14:21:15 -0400
Subject: [PATCH 01/23] WIP: fix usb
---
common/usb_storage.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/usb_storage.c b/common/usb_storage.c
index df0b057308..b2a3ab49ec 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -996,7 +996,7 @@ static int usb_request_sense(struct scsi_cmd *srb, struct us_data *ss)
static int usb_test_unit_ready(struct scsi_cmd *srb, struct us_data *ss)
{
- int retries = 10;
+ int retries = 20;
do {
memset(&srb->cmd[0], 0, 12);
@@ -1019,7 +1019,7 @@ static int usb_test_unit_ready(struct scsi_cmd *srb, struct us_data *ss)
if ((srb->sense_buf[2] == 0x02) &&
(srb->sense_buf[12] == 0x3a))
return -1;
- mdelay(100);
+ mdelay(250);
} while (retries--);
return -1;
--
2.13.3
From 40b06f8d422efc1d9674f081ef22445904c01f4f Mon Sep 17 00:00:00 2001
From: Rob Clark <robdclark@gmail.com>
Date: Mon, 3 Jul 2017 08:34:37 -0400
Subject: [PATCH 02/23] HACK: disable emmc
Hitting some timeout which makes boot take much longer. And
uefi/boot/rootfs partitions will be on sd-card or usb disk, etc,
so we can just ignore emmc.
---
arch/arm/dts/dragonboard410c.dts | 2 ++
1 file changed, 2 insertions(+)
arch/arm/dts/dragonboard410c.dts | 9 +++++-
board/qualcomm/dragonboard410c/Makefile | 1 +
board/qualcomm/dragonboard410c/dragonboard410c.c | 8 ++++++
board/qualcomm/dragonboard410c/lowlevel_init.S | 36 ++++++++++++++++++++++++
common/usb_storage.c | 4 +--
configs/dragonboard410c_defconfig | 11 ++++++++
include/configs/dragonboard410c.h | 4 +--
7 files changed, 68 insertions(+), 5 deletions(-)
create mode 100644 board/qualcomm/dragonboard410c/lowlevel_init.S
diff --git a/arch/arm/dts/dragonboard410c.dts b/arch/arm/dts/dragonboard410c.dts
index 7746622dda..0d3b7a35f4 100644
index 7746622dda..a47b95264c 100644
--- a/arch/arm/dts/dragonboard410c.dts
+++ b/arch/arm/dts/dragonboard410c.dts
@@ -67,6 +67,7 @@
@@ -23,11 +23,16 @@
reg = <0 0x80000000 0 0x3da00000>;
};
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+ };
+
chosen {
stdout-path = "/soc/serial@78b0000";
};
-
soc {
#address-cells = <0x1>;
#size-cells = <0x1>;
@@ -67,6 +72,7 @@
reg = <0x78d9000 0x400>;
};
@ -92,7 +45,7 @@ index 7746622dda..0d3b7a35f4 100644
sdhci@07824000 {
compatible = "qcom,sdhci-msm-v4";
reg = <0x7824900 0x11c 0x7824000 0x800>;
@@ -76,6 +77,7 @@
@@ -76,6 +82,7 @@
clock = <&clkc 0>;
clock-frequency = <100000000>;
};
@ -100,26 +53,6 @@ index 7746622dda..0d3b7a35f4 100644
sdhci@07864000 {
compatible = "qcom,sdhci-msm-v4";
--
2.13.3
From 7f0491168cf31c9935dede6fb1f560ef33cfb739 Mon Sep 17 00:00:00 2001
From: Rob Clark <robdclark@gmail.com>
Date: Fri, 23 Jun 2017 07:52:08 -0400
Subject: [PATCH 07/23] db410c: use fdt passed from lk
lk patches the fdt to set some device's MAC addresses and more
importantly to patch in the simple-framebuffer node that we want u-boot
to see.
Signed-off-by: Rob Clark <robdclark@gmail.com>
---
board/qualcomm/dragonboard410c/Makefile | 1 +
board/qualcomm/dragonboard410c/dragonboard410c.c | 8 ++++++
board/qualcomm/dragonboard410c/lowlevel_init.S | 36 ++++++++++++++++++++++++
3 files changed, 45 insertions(+)
create mode 100644 board/qualcomm/dragonboard410c/lowlevel_init.S
diff --git a/board/qualcomm/dragonboard410c/Makefile b/board/qualcomm/dragonboard410c/Makefile
index cd678088fa..5082383be4 100644
--- a/board/qualcomm/dragonboard410c/Makefile
@ -131,7 +64,7 @@ index cd678088fa..5082383be4 100644
+obj-y += lowlevel_init.o
extra-y += head.o
diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c
index 37d0b85e0e..1fa4dc1b15 100644
index 848e27848b..da1cd2cbc9 100644
--- a/board/qualcomm/dragonboard410c/dragonboard410c.c
+++ b/board/qualcomm/dragonboard410c/dragonboard410c.c
@@ -27,6 +27,14 @@ int dram_init_banksize(void)
@ -191,88 +124,30 @@ index 0000000000..cdbd8e14db
+
+ /* Returns */
+ b save_boot_params_ret
--
2.13.3
From 9999019fa74908218fd85a51f8c4b45231f9489a Mon Sep 17 00:00:00 2001
From: Rob Clark <robdclark@gmail.com>
Date: Wed, 19 Jul 2017 11:40:15 -0400
Subject: [PATCH 08/23] db410c: add reserved-memory node to dts
If lk lights up display and populates simple-framebuffer node, it will
also setup a reserved-memory node (needed by simplefb on linux). But
it isn't clever enough to cope when the reserved-memory node is not
present.
Signed-off-by: Rob Clark <robdclark@gmail.com>
---
arch/arm/dts/dragonboard410c.dts | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/dragonboard410c.dts b/arch/arm/dts/dragonboard410c.dts
index 0d3b7a35f4..a47b95264c 100644
--- a/arch/arm/dts/dragonboard410c.dts
+++ b/arch/arm/dts/dragonboard410c.dts
@@ -23,11 +23,16 @@
reg = <0 0x80000000 0 0x3da00000>;
};
diff --git a/common/usb_storage.c b/common/usb_storage.c
index a91b1c0d2f..caea87a09f 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -1018,7 +1018,7 @@ static int usb_request_sense(struct scsi_cmd *srb, struct us_data *ss)
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+ };
+
chosen {
stdout-path = "/soc/serial@78b0000";
};
static int usb_test_unit_ready(struct scsi_cmd *srb, struct us_data *ss)
{
- int retries = 10;
+ int retries = 20;
-
soc {
#address-cells = <0x1>;
#size-cells = <0x1>;
--
2.13.3
From 54997f67cc935704cab36025d98d27eaf5a4aa7c Mon Sep 17 00:00:00 2001
From: Rob Clark <robdclark@gmail.com>
Date: Mon, 26 Jun 2017 10:29:40 -0400
Subject: [PATCH 09/23] db410c: on aarch64 the fdtfile is in per-vendor
subdirectory
Signed-off-by: Rob Clark <robdclark@gmail.com>
---
include/configs/dragonboard410c.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h
index d9dc639aeb..626dff8dcd 100644
--- a/include/configs/dragonboard410c.h
+++ b/include/configs/dragonboard410c.h
@@ -104,7 +104,7 @@
"initrd_high=0xffffffffffffffff\0" \
"linux_image=Image\0" \
"kernel_addr_r=0x81000000\0"\
- "fdtfile=apq8016-sbc.dtb\0" \
+ "fdtfile=qcom/apq8016-sbc.dtb\0" \
"fdt_addr_r=0x81e00000\0"\
"ramdisk_addr_r=0x84000000\0"\
"scriptaddr=0x90000000\0"\
--
2.13.3
From 2bf6ff0703fa92755469d8f218a75b07008e9768 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Mon, 18 Sep 2017 09:34:30 +0100
Subject: [PATCH] db410c: config updates
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
configs/dragonboard410c_defconfig | 12 ++++++++++++
1 file changed, 12 insertions(+)
do {
memset(&srb->cmd[0], 0, 12);
@@ -1041,7 +1041,7 @@ static int usb_test_unit_ready(struct scsi_cmd *srb, struct us_data *ss)
if ((srb->sense_buf[2] == 0x02) &&
(srb->sense_buf[12] == 0x3a))
return -1;
- mdelay(100);
+ mdelay(250);
} while (retries--);
return -1;
diff --git a/configs/dragonboard410c_defconfig b/configs/dragonboard410c_defconfig
index 2224b3850a..32efdfa46b 100644
index b71bff7592..4738f3a08b 100644
--- a/configs/dragonboard410c_defconfig
+++ b/configs/dragonboard410c_defconfig
@@ -9,6 +9,7 @@ CONFIG_BOOTARGS="console=ttyMSM0,115200n8"
@ -283,7 +158,7 @@ index 2224b3850a..32efdfa46b 100644
CONFIG_CMD_MD5SUM=y
CONFIG_CMD_MEMINFO=y
CONFIG_CMD_GPIO=y
@@ -20,6 +21,8 @@ CONFIG_CMD_TIMER=y
@@ -21,6 +22,8 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_CLK=y
CONFIG_MSM_GPIO=y
CONFIG_PM8916_GPIO=y
@ -292,7 +167,7 @@ index 2224b3850a..32efdfa46b 100644
CONFIG_LED=y
CONFIG_LED_GPIO=y
CONFIG_DM_MMC=y
@@ -36,10 +39,18 @@ CONFIG_USB_EHCI_HCD=y
@@ -37,10 +40,18 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_MSM=y
CONFIG_USB_ULPI_VIEWPORT=y
CONFIG_USB_ULPI=y
@ -311,5 +186,21 @@ index 2224b3850a..32efdfa46b 100644
+CONFIG_VIDEO_SIMPLE=y
+CONFIG_FAT_WRITE=y
CONFIG_OF_LIBFDT_OVERLAY=y
diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h
index d2447b27d8..5dbd4dcaa1 100644
--- a/include/configs/dragonboard410c.h
+++ b/include/configs/dragonboard410c.h
@@ -92,8 +92,8 @@ REFLASH(dragonboard/u-boot.img, 8)\
"initrd_high=0xffffffffffffffff\0" \
"linux_image=Image\0" \
"kernel_addr_r=0x81000000\0"\
- "fdtfile=apq8016-sbc.dtb\0" \
- "fdt_addr_r=0x83000000\0"\
+ "fdtfile=qcom/apq8016-sbc.dtb\0" \
+ "fdt_addr_r=0x81e00000\0"\
"ramdisk_addr_r=0x84000000\0"\
"scriptaddr=0x90000000\0"\
"pxefile_addr_r=0x90100000\0"\
--
2.13.5
2.14.3

View File

@ -1,68 +0,0 @@
From patchwork Wed Nov 22 03:18:59 2017
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [U-Boot,v2] efi_loader: initialise partition_signature memory
X-Patchwork-Submitter: Jonathan Gray <jsg@jsg.id.au>
X-Patchwork-Id: 840248
Message-Id: <20171122031859.12600-1-jsg@jsg.id.au>
To: u-boot@lists.denx.de
Cc: kettenis@openbsd.org, agraf@suse.de
Date: Wed, 22 Nov 2017 14:18:59 +1100
From: Jonathan Gray <jsg@jsg.id.au>
List-Id: U-Boot discussion <u-boot.lists.denx.de>
Zero partition_signature in the efi_device_path_hard_drive_path
structure when signature_type is 0 (no signature) as required by the
UEFI specification.
This is required so that efi_dp_match() will work as expected
when doing memcmp() comparisons. Previously uninitialised memory
would cause it not match nodes when it should have when the signature
type was not GUID.
Corrects a problem where the loaded image protocol would not return a
device path with MEDIA_DEVICE causing the OpenBSD bootloader to fail
on rpi_3 and other targets.
v2: Also handle signature_type 1 (MBR) as described in the specification
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
---
lib/efi_loader/efi_device_path.c | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index f6e368e029..12a81d311c 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -427,10 +427,27 @@ static void *dp_part_fill(void *buf, struct blk_desc *desc, int part)
hddp->partmap_type = 2;
else
hddp->partmap_type = 1;
- hddp->signature_type = desc->sig_type;
- if (hddp->signature_type != 0)
+
+ switch (desc->sig_type) {
+ case SIG_TYPE_NONE:
+ default:
+ hddp->signature_type = 0;
+ memset(hddp->partition_signature, 0,
+ sizeof(hddp->partition_signature));
+ break;
+ case SIG_TYPE_MBR:
+ hddp->signature_type = 1;
+ memset(hddp->partition_signature, 0,
+ sizeof(hddp->partition_signature));
+ memcpy(hddp->partition_signature, &desc->mbr_sig,
+ sizeof(desc->mbr_sig));
+ break;
+ case SIG_TYPE_GUID:
+ hddp->signature_type = 2;
memcpy(hddp->partition_signature, &desc->guid_sig,
sizeof(hddp->partition_signature));
+ break;
+ }
buf = &hddp[1];
}

View File

@ -1,48 +0,0 @@
From patchwork Tue Nov 14 14:47:18 2017
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [U-Boot] envtools: make sure version/timestamp header file are
available
X-Patchwork-Submitter: Stefan Agner <stefan@agner.ch>
X-Patchwork-Id: 837888
X-Patchwork-Delegate: trini@ti.com
Message-Id: <20171114144718.10213-1-stefan@agner.ch>
To: u-boot@lists.denx.de,
trini@konsulko.com
Cc: Stefan Agner <stefan.agner@toradex.com>,
Marcel Ziswiler <marcel.ziswiler@toradex.com>,
Max Krummenacher <max.krummenacher@toradex.com>
Date: Tue, 14 Nov 2017 15:47:18 +0100
From: Stefan Agner <stefan@agner.ch>
List-Id: U-Boot discussion <u-boot.lists.denx.de>
From: Stefan Agner <stefan.agner@toradex.com>
With commit 84d46e7e8948 ("tools: env: allow to print U-Boot version")
the fw_env utilities need the version.h header file. Building only
the envtools in a pristine build directory will fail due to missing
header files.
Make sure the header files are a dependency of the envtools target.
Fixes: 84d46e7e8948 ("tools: env: allow to print U-Boot version")
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 67f01ad7e4..b93c2fb05b 100644
--- a/Makefile
+++ b/Makefile
@@ -1460,7 +1460,7 @@ checkarmreloc: u-boot
false; \
fi
-envtools: scripts_basic
+envtools: scripts_basic $(version_h) $(timestamp_h)
$(Q)$(MAKE) $(build)=tools/env
tools-only: scripts_basic $(version_h) $(timestamp_h)

View File

@ -1,34 +0,0 @@
From 7c704eb7a615e35fe74bc8ff4ff2e5c71f1473b3 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Thu, 23 Nov 2017 12:44:51 +0000
Subject: [PATCH] omap2: set the ethaddr as well as the usbethaddr env var to
ensure static MAC
The kernel gets the ethernet MAC from the ethaddr variable, the omap boards for
devices with USB based eth adapters just set the usbethaddr which doesn't appear
to get passed to the kernel. The same Raspberry Pi code sets both ethaddr and
usbethaddr so lets do that so linux (tested 4.13 and 4.14) get a static rather
than a random MAC address, while not regressing users of usbethaddr.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
arch/arm/mach-omap2/utils.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/mach-omap2/utils.c b/arch/arm/mach-omap2/utils.c
index 2e8778043b..95f168fee3 100644
--- a/arch/arm/mach-omap2/utils.c
+++ b/arch/arm/mach-omap2/utils.c
@@ -215,6 +215,9 @@ void omap_die_id_usbethaddr(void)
mac[5] = (die_id[0] >> 8) & 0xff;
eth_env_set_enetaddr("usbethaddr", mac);
+
+ if (!env_get("ethaddr"))
+ eth_env_set_enetaddr("ethaddr", mac);
}
}
--
2.14.3

View File

@ -1 +1 @@
SHA512 (u-boot-2017.11.tar.bz2) = 485b9ab7cea0a250d964822bdb99a8426852b4e815b506329dedc4f5a69757c8b1a812998561161d44d98f6fabb9c8937e8250de1244d258fc9f13624b38d643
SHA512 (u-boot-2018.01-rc2.tar.bz2) = b9469b8c5910faba88af6dc8957521c9892c587bd97aeba66d9f16f36e5171c897c1bcd575b66f91fef8a98e0f82620d5181957f0e8d9f740c2512224018f5d5

View File

@ -1,8 +1,8 @@
#global candidate rc4
%global candidate rc2
Name: uboot-tools
Version: 2017.11
Release: 3%{?candidate:.%{candidate}}%{?dist}
Version: 2018.01
Release: 0.1%{?candidate:.%{candidate}}%{?dist}
Summary: U-Boot utilities
License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+
URL: http://www.denx.de/wiki/U-Boot
@ -20,14 +20,10 @@ Patch1: uefi-use-Fedora-specific-path-name.patch
# general fixes
Patch2: uefi-distro-load-FDT-from-any-partition-on-boot-device.patch
Patch3: usb-kbd-fixes.patch
Patch4: fdt-fixes.patch
Patch5: arm64-support-running-at-addr-other-than-linked-to.patch
Patch6: envtools-make-sure-version-timestamp-header-file-are-available.patch
Patch7: efi_loader-initialise-partition_signature-memory.patch
Patch8: omap2-set-the-ethaddr-as-well-as-the-usbethaddr-env-.patch
#Patch4: fdt-fixes.patch
# Board fixes and enablement
Patch10: dragonboard-fixes.patch
#Patch10: dragonboard-fixes.patch
# Patch14: mvebu-enable-generic-distro-boot-config.patch
# Patch15: mx6-Initial-Hummingboard-2-support.patch
@ -287,6 +283,9 @@ cp -p board/warp7/README builds/docs/README.warp7
%endif
%changelog
* Tue Dec 19 2017 Peter Robinson <pbrobinson@fedoraproject.org> 2018.01-0.1.rc2
- 2018.01 RC2
* Thu Nov 23 2017 Peter Robinson <pbrobinson@fedoraproject.org> 2017.11-3
- Newer EFI loader fix patch
- Fix static MAC on omap3/omap4 devices

View File

@ -1,7 +1,7 @@
From 0e68eb4f6fe96edcde4a39ba6e99ac330529b039 Mon Sep 17 00:00:00 2001
From 3ab824aea2ad90cd980986a32c4523fcce778a03 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Thu, 5 Oct 2017 08:40:22 +0100
Subject: [PATCH] distro: load FDT from any partition on boot device
Date: Tue, 5 Dec 2017 00:11:08 +0000
Subject: [PATCH 2/5] distro: load FDT from any partition on boot device
In the EFI_LOADER boot path, we were only checking the FAT partition
containing the EFI payload for dtb files. But this is somewhat of a
@ -20,15 +20,16 @@ can load the FDT based on selected kernel version location (which grub
knows) and SoC/board specific ${fdtfile} (which grub does not know).
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
include/config_distro_bootcmd.h | 34 +++++++++++++++++++++++-----------
1 file changed, 23 insertions(+), 11 deletions(-)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 18da4ff737..63c7bbe29c 100644
index c2822b4d06..b91f2eabe3 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -126,25 +126,37 @@
@@ -130,25 +130,37 @@
"fi\0" \
\
"load_efi_dtb=" \
@ -78,5 +79,5 @@ index 18da4ff737..63c7bbe29c 100644
"fi; " \
"setenv efi_fdtfile\0"
--
2.14.2
2.14.3

View File

@ -1,7 +1,7 @@
From 0b10d2ebcaf9244eba57790ede30fed6bc6c4223 Mon Sep 17 00:00:00 2001
From 74a8239f40092900d83dd5c9632b5652b242e158 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Mon, 18 Sep 2017 09:24:37 +0100
Subject: [PATCH] use Fedora specific EFI path/name
Date: Tue, 5 Dec 2017 00:10:22 +0000
Subject: [PATCH 1/5] use Fedora specific EFI path/name
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
@ -9,7 +9,7 @@ Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index e0d0034ed3..18da4ff737 100644
index 5c469a23fa..c2822b4d06 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -88,7 +88,7 @@
@ -20,8 +20,8 @@ index e0d0034ed3..18da4ff737 100644
+#define BOOTEFI_NAME "grubaa64.efi"
#elif defined(CONFIG_ARM)
#define BOOTEFI_NAME "bootarm.efi"
#endif
@@ -118,7 +118,7 @@
#elif defined(CONFIG_X86_RUN_32BIT)
@@ -122,7 +122,7 @@
"bootefi bootmgr ${fdtcontroladdr};" \
"fi;" \
"load ${devtype} ${devnum}:${distro_bootpart} " \
@ -30,7 +30,7 @@ index e0d0034ed3..18da4ff737 100644
"if fdt addr ${fdt_addr_r}; then " \
"bootefi ${kernel_addr_r} ${fdt_addr_r};" \
"else " \
@@ -141,9 +141,9 @@
@@ -145,9 +145,9 @@
"fi;" \
"done;" \
"if test -e ${devtype} ${devnum}:${distro_bootpart} " \
@ -43,5 +43,5 @@ index e0d0034ed3..18da4ff737 100644
"echo EFI LOAD FAILED: continuing...; " \
"fi; " \
--
2.13.5
2.14.3

View File

@ -1,43 +1,19 @@
From patchwork Wed Sep 27 01:19:37 2017
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [U-Boot] usb: kbd: Don't fail with iomux
X-Patchwork-Submitter: Rob Clark <robdclark@gmail.com>
X-Patchwork-Id: 818881
X-Patchwork-Delegate: marek.vasut@gmail.com
Message-Id: <20170927011939.6610-1-robdclark@gmail.com>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Date: Tue, 26 Sep 2017 21:19:37 -0400
From: Rob Clark <robdclark@gmail.com>
List-Id: U-Boot discussion <u-boot.lists.denx.de>
From 1a8fa60aedff8a2368ac357a51dc15357065fabe Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Tue, 5 Dec 2017 00:11:54 +0000
Subject: [PATCH 3/5] usb kbd fixes
stdin might not be set, which would cause iomux_doenv() to fail
therefore causing probe_usb_keyboard() to fail. Furthermore if we do
have iomux enabled, the sensible thing (in terms of user experience)
would be to simply add ourselves to the list of stdin devices.
This fixes an issue with usbkbd on dragonboard410c with distro-
bootcmd, where stdin is not set (so stdinname is null).
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
Somehow this patch was dropped on the floor. I don't remember
which version # this is up to, search the list if you care. But
this is the latest. I only noticed it was missing because u-boot
crashes when you boot with usb-keyboard plugged in (at least on
db410c) without it. So someone please apply this patch before it
gets lost again.
common/usb_kbd.c | 46 +++++++++++++++++++++++++++++++---------------
common/usb_kbd.c | 66 +++++++++++++++++++++++++++++++++++++++++--------------
include/console.h | 2 --
2 files changed, 31 insertions(+), 17 deletions(-)
2 files changed, 50 insertions(+), 18 deletions(-)
diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index a323d72a36..4c3ad95fca 100644
index 8cbdba6ac2..82ad93f6ca 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -516,23 +516,39 @@ static int probe_usb_keyboard(struct usb_device *dev)
@@ -516,25 +516,59 @@ static int probe_usb_keyboard(struct usb_device *dev)
return error;
stdinname = env_get("stdin");
@ -68,18 +44,22 @@ index a323d72a36..4c3ad95fca 100644
+ error = iomux_doenv(stdin, stdinname);
+ free(newstdin);
+ if (error)
+ return error;
+ goto unregister_stdio;
+ } else {
+ /* Check if this is the standard input device. */
+ if (strcmp(stdinname, DEVNAME))
+ return 1;
+ if (strcmp(stdinname, DEVNAME)) {
+ error = -1;
+ goto unregister_stdio;
+ }
- /* Reassign the console */
- if (overwrite_console())
- return 1;
+ /* Reassign the console */
+ if (overwrite_console())
+ return 1;
+ if (overwrite_console()) {
+ error = -1;
+ goto unregister_stdio;
+ }
- error = console_assign(stdin, DEVNAME);
- if (error)
@ -87,11 +67,36 @@ index a323d72a36..4c3ad95fca 100644
-#endif
+ error = console_assign(stdin, DEVNAME);
+ if (error)
+ return error;
+ goto unregister_stdio;
+ }
+
+ return 0;
+unregister_stdio:
+ /*
+ * If probe fails, the device will be removed.. leaving dangling
+ * pointers if the stdio device is not unregistered. If u-boot
+ * is built without stdio_deregister(), just pretend to succeed
+ * in order to avoid dangling pointers.
+ */
+#if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER)
+ stdio_deregister(DEVNAME, 1);
+ return error;
+#else
return 0;
+#endif
}
#ifndef CONFIG_DM_USB
@@ -640,7 +674,7 @@ static int usb_kbd_remove(struct udevice *dev)
return 0;
err:
- printf("%s: warning, ret=%d", __func__, ret);
+ printf("%s: warning, ret=%d\n", __func__, ret);
return ret;
}
diff --git a/include/console.h b/include/console.h
index cea29ed6dc..7dfd36d7d1 100644
--- a/include/console.h
@ -105,106 +110,6 @@ index cea29ed6dc..7dfd36d7d1 100644
-#endif
#endif
From patchwork Tue Oct 3 17:31:14 2017
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [U-Boot] usb: kbd: Fix dangling pointers on probe fail
X-Patchwork-Submitter: Rob Clark <robdclark@gmail.com>
X-Patchwork-Id: 820970
Message-Id: <20171003173118.32645-1-robdclark@gmail.com>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Date: Tue, 3 Oct 2017 13:31:14 -0400
From: Rob Clark <robdclark@gmail.com>
List-Id: U-Boot discussion <u-boot.lists.denx.de>
If probe fails, we should unregister the stdio device, else we leave
dangling pointers to the parent 'struct usb_device'.
Signed-off-by: Rob Clark <robdclark@gmail.com>
---
I finally got around to debugging why things explode so badly without
fixing usb_kbd vs. iomux[1] (which this patch applies on top of).
[1] https://patchwork.ozlabs.org/patch/818881/
common/usb_kbd.c | 30 ++++++++++++++++++++++++------
1 file changed, 24 insertions(+), 6 deletions(-)
diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index 4c3ad95fca..82ad93f6ca 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -535,22 +535,40 @@ static int probe_usb_keyboard(struct usb_device *dev)
error = iomux_doenv(stdin, stdinname);
free(newstdin);
if (error)
- return error;
+ goto unregister_stdio;
} else {
/* Check if this is the standard input device. */
- if (strcmp(stdinname, DEVNAME))
- return 1;
+ if (strcmp(stdinname, DEVNAME)) {
+ error = -1;
+ goto unregister_stdio;
+ }
/* Reassign the console */
- if (overwrite_console())
- return 1;
+ if (overwrite_console()) {
+ error = -1;
+ goto unregister_stdio;
+ }
error = console_assign(stdin, DEVNAME);
if (error)
- return error;
+ goto unregister_stdio;
}
return 0;
+
+unregister_stdio:
+ /*
+ * If probe fails, the device will be removed.. leaving dangling
+ * pointers if the stdio device is not unregistered. If u-boot
+ * is built without stdio_deregister(), just pretend to succeed
+ * in order to avoid dangling pointers.
+ */
+#if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER)
+ stdio_deregister(DEVNAME, 1);
+ return error;
+#else
+ return 0;
+#endif
}
#ifndef CONFIG_DM_USB
From 47f22a41df082c62411389ab5bf6e9ae26d93083 Mon Sep 17 00:00:00 2001
From: Rob Clark <robdclark@gmail.com>
Date: Wed, 19 Jul 2017 10:39:12 -0400
Subject: [PATCH 13/23] usb: kbd: add missing \n
Signed-off-by: Rob Clark <robdclark@gmail.com>
---
common/usb_kbd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index 703dd748f5..92d5e96d01 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -655,7 +655,7 @@ static int usb_kbd_remove(struct udevice *dev)
return 0;
err:
- printf("%s: warning, ret=%d", __func__, ret);
+ printf("%s: warning, ret=%d\n", __func__, ret);
return ret;
}
--
2.13.3
2.14.3