summaryrefslogtreecommitdiffstats
path: root/external/meta-updater-raspberrypi/recipes-bsp/u-boot
diff options
context:
space:
mode:
authorToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
committerToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
commit5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch)
treeb4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/meta-updater-raspberrypi/recipes-bsp/u-boot
parent706ad73eb02caf8532deaf5d38995bd258725cb8 (diff)
agl-basesystem
Diffstat (limited to 'external/meta-updater-raspberrypi/recipes-bsp/u-boot')
-rw-r--r--external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-Enable-FIT-and-bootcount-on-RPi3.patch42
-rw-r--r--external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-Increase-rpi-BOOTM_LEN.patch24
-rw-r--r--external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch82
-rw-r--r--external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend9
-rw-r--r--external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend7
5 files changed, 164 insertions, 0 deletions
diff --git a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-Enable-FIT-and-bootcount-on-RPi3.patch b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-Enable-FIT-and-bootcount-on-RPi3.patch
new file mode 100644
index 00000000..394f0ee6
--- /dev/null
+++ b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-Enable-FIT-and-bootcount-on-RPi3.patch
@@ -0,0 +1,42 @@
+From c849889cce23b41df45cfa4efd9fde8eb682195f Mon Sep 17 00:00:00 2001
+From: Laurent Bonnans <laurent.bonnans@here.com>
+Date: Wed, 5 Jun 2019 18:12:21 +0200
+Subject: [PATCH] Enable FIT and bootcount on RPi3
+
+---
+ configs/rpi_3_32b_defconfig | 6 ++++++
+ configs/rpi_3_defconfig | 6 ++++++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig
+index 9e142cae63..d5d32a202d 100644
+--- a/configs/rpi_3_32b_defconfig
++++ b/configs/rpi_3_32b_defconfig
+@@ -39,3 +39,9 @@ CONFIG_SYS_WHITE_ON_BLACK=y
+ CONFIG_CONSOLE_SCROLL_LINES=10
+ CONFIG_PHYS_TO_BUS=y
+ CONFIG_OF_LIBFDT_OVERLAY=y
++
++CONFIG_FIT=y
++CONFIG_FIT_VERBOSE=y
++
++CONFIG_BOOTCOUNT_LIMIT=y
++CONFIG_BOOTCOUNT_ENV=y
+diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
+index f46e504497..80fb70119e 100644
+--- a/configs/rpi_3_defconfig
++++ b/configs/rpi_3_defconfig
+@@ -39,3 +39,9 @@ CONFIG_SYS_WHITE_ON_BLACK=y
+ CONFIG_CONSOLE_SCROLL_LINES=10
+ CONFIG_PHYS_TO_BUS=y
+ CONFIG_OF_LIBFDT_OVERLAY=y
++
++CONFIG_FIT=y
++CONFIG_FIT_VERBOSE=y
++
++CONFIG_BOOTCOUNT_LIMIT=y
++CONFIG_BOOTCOUNT_ENV=y
+--
+2.20.1
+
+
diff --git a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-Increase-rpi-BOOTM_LEN.patch b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-Increase-rpi-BOOTM_LEN.patch
new file mode 100644
index 00000000..1a6940e0
--- /dev/null
+++ b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-Increase-rpi-BOOTM_LEN.patch
@@ -0,0 +1,24 @@
+From a4a9b71ac4900fee8081c85c630d55e20b233a81 Mon Sep 17 00:00:00 2001
+From: Laurent Bonnans <laurent.bonnans@here.com>
+Date: Wed, 5 Jun 2019 19:22:01 +0200
+Subject: [PATCH] Increase rpi BOOTM_LEN
+
+---
+ include/configs/rpi.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/configs/rpi.h b/include/configs/rpi.h
+index a97550b732..4ce9b2f99e 100644
+--- a/include/configs/rpi.h
++++ b/include/configs/rpi.h
+@@ -56,6 +56,7 @@
+ #define CONFIG_SYS_MEMTEST_START 0x00100000
+ #define CONFIG_SYS_MEMTEST_END 0x00200000
+ #define CONFIG_LOADADDR 0x00200000
++#define CONFIG_SYS_BOOTM_LEN SZ_64M
+
+ /* Devices */
+ /* GPIO */
+--
+2.20.1
+
diff --git a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch
new file mode 100644
index 00000000..44774c0e
--- /dev/null
+++ b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch
@@ -0,0 +1,82 @@
+From 86cc911aaa958fedf2ea9cb04b4af17f5357815d Mon Sep 17 00:00:00 2001
+From: Anton Gerasimov <anton.gerasimov@here.com>
+Date: Fri, 1 Feb 2019 14:39:48 +0100
+Subject: [PATCH] board: raspberrypi: add serial and revision to the device
+ tree
+
+Raspberry Pi bootloader adds this node to fdt, but if u-boot script
+doesn't reuse the tree provided by it, this information is lost.
+
+Revision and serial are displayed in /proc/cpuinfo after boot.
+
+Signed-off-by: Anton Gerasimov <anton.gerasimov@here.com>
+---
+ board/raspberrypi/rpi/rpi.c | 31 +++++++++++++++++++++++++++++--
+ 1 file changed, 29 insertions(+), 2 deletions(-)
+
+diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
+index 35f5939552..114178397e 100644
+--- a/board/raspberrypi/rpi/rpi.c
++++ b/board/raspberrypi/rpi/rpi.c
+@@ -241,6 +241,8 @@ static uint32_t rev_scheme;
+ static uint32_t rev_type;
+ static const struct rpi_model *model;
+
++uint64_t serial;
++
+ #ifdef CONFIG_ARM64
+ static struct mm_region bcm2837_mem_map[] = {
+ {
+@@ -384,8 +386,8 @@ static void set_serial_number(void)
+ return;
+ }
+
+- snprintf(serial_string, sizeof(serial_string), "%016" PRIx64,
+- msg->get_board_serial.body.resp.serial);
++ serial = msg->get_board_serial.body.resp.serial;
++ snprintf(serial_string, sizeof(serial_string), "%016" PRIx64, serial);
+ env_set("serial#", serial_string);
+ }
+
+@@ -478,6 +480,29 @@ void *board_fdt_blob_setup(void)
+ return (void *)fw_dtb_pointer;
+ }
+
++static int ft_add_revision_info(void *blob) {
++ int off;
++ int ret;
++
++ off = fdt_subnode_offset(blob, 0, "system");
++
++ if (off < 0) {
++ off = fdt_add_subnode(blob, 0, "system");
++ if (off < 0)
++ return -1;
++ }
++
++ ret = fdt_setprop_u64(blob, off, "linux,serial", serial);
++ if (ret < 0)
++ return -1;
++
++ ret = fdt_setprop_u32(blob, off, "linux,revision", revision);
++ if (ret < 0)
++ return -1;
++
++ return 0;
++}
++
+ int ft_board_setup(void *blob, bd_t *bd)
+ {
+ /*
+@@ -487,6 +512,8 @@ int ft_board_setup(void *blob, bd_t *bd)
+ */
+ lcd_dt_simplefb_add_node(blob);
+
++ ft_add_revision_info(blob);
++
+ #ifdef CONFIG_EFI_LOADER
+ /* Reserve the spin table */
+ efi_add_memory_map(0, 1, EFI_RESERVED_MEMORY_TYPE, 0);
+--
+2.17.1
+
diff --git a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend
new file mode 100644
index 00000000..77649653
--- /dev/null
+++ b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend
@@ -0,0 +1,9 @@
+
+do_install_append () {
+
+ cat >${D}${sysconfdir}/fw_env.config <<EOF
+
+/mnt/bootpart/uboot.env 0x0000 0x4000
+
+EOF
+}
diff --git a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend
new file mode 100644
index 00000000..32812600
--- /dev/null
+++ b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend
@@ -0,0 +1,7 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI_append = " \
+ file://0001-Enable-FIT-and-bootcount-on-RPi3.patch \
+ file://0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch \
+ file://0001-Increase-rpi-BOOTM_LEN.patch \
+ "