Skip to content

Commit

Permalink
chore: bump u-boot v2022.04
Browse files Browse the repository at this point in the history
Bump u-boot to v2022.04

Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
frezbo committed May 15, 2022
1 parent 7add479 commit cd05ae8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 59 deletions.
90 changes: 34 additions & 56 deletions u-boot/jetson_nano/patches/tegra.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1755,7 +1755,7 @@ index 0000000000..c3149026a5
+ return 0;
+}
diff --git boot/pxe_utils.c boot/pxe_utils.c
index a7a84f26c1..b7375c5d4f 100644
index 0c24becae3..85ec21394d 100644
--- boot/pxe_utils.c
+++ boot/pxe_utils.c
@@ -1,7 +1,7 @@
Expand All @@ -1767,7 +1767,7 @@ index a7a84f26c1..b7375c5d4f 100644
*/

#include <common.h>
@@ -25,6 +25,9 @@
@@ -30,6 +30,9 @@

#include "menu.h"
#include "cli.h"
Expand All @@ -1777,7 +1777,7 @@ index a7a84f26c1..b7375c5d4f 100644

#include "pxe_utils.h"

@@ -319,17 +322,16 @@ static int label_localboot(struct pxe_label *label)
@@ -385,17 +388,16 @@ err:
*/
#ifdef CONFIG_OF_LIBFDT_OVERLAY
static void label_boot_fdtoverlay(struct pxe_context *ctx,
Expand All @@ -1797,7 +1797,7 @@ index a7a84f26c1..b7375c5d4f 100644
working_fdt = map_sysmem(fdt_addr, 0);
err = fdt_check_header(working_fdt);
if (err)
@@ -437,7 +439,9 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
@@ -503,7 +505,9 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
int len = 0;
ulong kernel_addr_r;
void *buf;
Expand All @@ -1808,7 +1808,7 @@ index a7a84f26c1..b7375c5d4f 100644
label_print(label);

label->attempted = 1;
@@ -455,13 +459,11 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
@@ -521,13 +525,11 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
}

if (label->initrd) {
Expand All @@ -1824,7 +1824,7 @@ index a7a84f26c1..b7375c5d4f 100644
}

initrd_addr_str = env_get("ramdisk_addr_r");
@@ -499,6 +501,10 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
@@ -565,6 +567,10 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
if ((label->ipappend & 0x3) || label->append) {
char bootargs[CONFIG_SYS_CBSIZE] = "";
char finalbootargs[CONFIG_SYS_CBSIZE];
Expand All @@ -1835,7 +1835,7 @@ index a7a84f26c1..b7375c5d4f 100644

if (strlen(label->append ?: "") +
strlen(ip_str) + strlen(mac_str) + 1 > sizeof(bootargs)) {
@@ -515,10 +521,34 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
@@ -581,10 +587,34 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
strcat(bootargs, ip_str);
strcat(bootargs, mac_str);

Expand All @@ -1862,36 +1862,16 @@ index a7a84f26c1..b7375c5d4f 100644
env_set("bootargs", finalbootargs);
printf("append: %s\n", finalbootargs);
+#ifdef CONFIG_HUSH_PARSER
+ if (hush_bootpart && !distro_bootpart)
+ env_set("distro_bootpart", NULL);
+ if (hush_devnum && !env_devnum)
+ env_set("devnum", NULL);
+ if (hush_bootpart && !distro_bootpart)
+ env_set("distro_bootpart", NULL);
+ if (hush_devnum && !env_devnum)
+ env_set("devnum", NULL);
+#endif
}

kernel_addr = env_get("kernel_addr_r");
@@ -541,8 +571,8 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
* It handles the following scenarios.
*
* Scenario 1: If fdt_addr_r specified and "fdt" or "fdtdir" label is
- * defined in pxe file, retrieve fdt blob from server. Pass fdt_addr_r to
- * bootm, and adjust argc appropriately.
+ * defined in pxe file, retrieve fdt blob from server. Pass fdt_addr_r
+ * to bootm, and adjust argc appropriately.
*
* If retrieve fails and no exact fdt blob is specified in pxe file with
* "fdt" label, try Scenario 2.
@@ -550,7 +580,7 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
* Scenario 2: If there is an fdt_addr specified, pass it along to
* bootm, and adjust argc appropriately.
*
- * Scenario 3: fdt blob is not available.
+ * Scenario 3: fdt blob is not available, boot without it.
*/
bootm_argv[3] = env_get("fdt_addr_r");

@@ -629,8 +659,9 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
}
@@ -701,8 +731,9 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
label_boot_kaslrseed();

#ifdef CONFIG_OF_LIBFDT_OVERLAY
+ fdt_addr = (ulong)simple_strtol(bootm_argv[3], NULL, 16);
Expand All @@ -1901,21 +1881,21 @@ index a7a84f26c1..b7375c5d4f 100644
#endif
} else {
bootm_argv[3] = NULL;
@@ -652,9 +683,15 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
@@ -727,9 +758,15 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
if (!bootm_argv[3])
bootm_argv[3] = env_get("fdt_addr");

- if (bootm_argv[3]) {
+ if (bootm_argv[3]) { /* fdt_addr exists */
+ if (bootm_argv[3]) { /* fdt_addr exists */
+#ifdef CONFIG_OF_LIBFDT_OVERLAY
+ fdt_addr = (ulong)simple_strtol(bootm_argv[3], NULL, 16);
+ /* apply any FDT overlays to in-RAM DTB (@ fdt_addr) */
+ if (label->fdtoverlays)
+ label_boot_fdtoverlay(ctx, label, fdt_addr);
+ fdt_addr = (ulong)simple_strtol(bootm_argv[3], NULL, 16);
+ /* apply any FDT overlays to in-RAM DTB (@ fdt_addr) */
+ if (label->fdtoverlays)
+ label_boot_fdtoverlay(ctx, label, fdt_addr);
+#endif
if (!bootm_argv[2])
- bootm_argv[2] = "-";
+ bootm_argv[2] = "-"; /* skip initrd */
+ bootm_argv[2] = "-"; /* skip initrd */
bootm_argc = 4;
}

Expand Down Expand Up @@ -3984,18 +3964,18 @@ index 4c3da224c6..b17d674845 100644

/* Crystal is 38.4MHz. clk_m runs at half that rate */
diff --git include/configs/p3450-0000.h include/configs/p3450-0000.h
index 7f05bebbcd..0e08181fb3 100644
index b03d3a433b..be0736c0c3 100644
--- include/configs/p3450-0000.h
+++ include/configs/p3450-0000.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
- * (C) Copyright 2018-2019 NVIDIA Corporation.
+ * (C) Copyright 2018-2020 NVIDIA Corporation.
+ * (C) * (C) Copyright 2018-2019 NVIDIA Corporation.
*/

#ifndef _P3450_0000_H
@@ -10,16 +10,29 @@
@@ -10,27 +10,66 @@

#include "tegra210-common.h"

Expand All @@ -4006,19 +3986,20 @@ index 7f05bebbcd..0e08181fb3 100644
#define CONFIG_TEGRA_ENABLE_UARTA

+#ifdef CONFIG_P3450_EMMC
+#define CONFIG_TEGRA_BOARD_STRING "NVIDIA P3450-0002"
+#define CONFIG_TEGRA_BOARD_STRING "NVIDIA P3450-0002"
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 0) \
+ func(USB, usb, 0) \
+ func(NVME, nvme, 0) \
+ func(PXE, pxe, na) \
+ func(DHCP, dhcp, na)
+#define CONFIG_SYS_MMC_ENV_DEV 0
+#define CONFIG_SYS_MMC_ENV_PART 2
+#define DEFAULT_MMC_DEV "0"
+#define CONFIG_SYS_MMC_ENV_DEV 0
+#define CONFIG_SYS_MMC_ENV_PART 2
+#define DEFAULT_MMC_DEV "0"
+#else
+/* High-level configuration options */
+#define CONFIG_TEGRA_BOARD_STRING "NVIDIA P3450-0000"
+#define CONFIG_TEGRA_BOARD_STRING "NVIDIA P3450-0000"
+
+
/* Only MMC/PXE/DHCP for now, add USB back in later when supported */
#define BOOT_TARGET_DEVICES(func) \
Expand All @@ -4029,15 +4010,11 @@ index 7f05bebbcd..0e08181fb3 100644
func(PXE, pxe, na) \
func(DHCP, dhcp, na)

@@ -27,14 +40,39 @@
#define CONFIG_ENV_SPI_MAX_HZ 48000000
#define CONFIG_ENV_SPI_MODE SPI_MODE_0
/* Environment at end of QSPI, in the VER partition */
#define CONFIG_SPI_FLASH_SIZE (4 << 20)
+#define DEFAULT_MMC_DEV "1"
+#define DEFAULT_MMC_DEV "1"
+#endif

#define CONFIG_PREBOOT

+
+#ifdef CONFIG_FIT
+#undef CONFIG_BOOTCOMMAND
+/* FIT Image environment settings */
Expand All @@ -4059,7 +4036,7 @@ index 7f05bebbcd..0e08181fb3 100644
+#else
+#define FITIMAGE_ENV_SETTINGS
+#endif /* CONFIG_FIT */
+
#define BOARD_EXTRA_ENV_SETTINGS \
- "preboot=if test -e mmc 1:1 /u-boot-preboot.scr; then " \
- "load mmc 1:1 ${scriptaddr} /u-boot-preboot.scr; " \
Expand All @@ -4072,6 +4049,7 @@ index 7f05bebbcd..0e08181fb3 100644

/* General networking support */
#include "tegra-common-usb-gadget.h"

diff --git include/configs/p3541-0000.h include/configs/p3541-0000.h
new file mode 100644
index 0000000000..193b7da1b7
Expand Down
6 changes: 3 additions & 3 deletions u-boot/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ steps:
destination: arm-trusted-firmware.tar.gz
sha256: 3905a6d6affa84fb629d1565a4e4bdc82812bba49a457b8249ab445eeb28011b
sha512: 8b20964b1b672898268e27424984af0ef9e95b38f426370ed4b802f67fc204db5f467886707dce77e4560548e01777a6c36d4eb801842c7d1f2ff6ca5d9b7dd1
- url: https://ftp.denx.de/pub/u-boot/u-boot-2022.01.tar.bz2
- url: https://ftp.denx.de/pub/u-boot/u-boot-2022.04.tar.bz2
destination: u-boot.tar.bz2
sha256: 81b4543227db228c03f8a1bf5ddbc813b0bb8f6555ce46064ef721a6fc680413
sha512: d83c62bd8f0f51664d2aca329a3ce1379cfd1dfff439dccd6cfc2cb33cfef89a2b01855c97716f591b5550bfdf99e2f3aef7efa33f2e7834c820648f9eef3825
sha256: 68e065413926778e276ec3abd28bb32fa82abaa4a6898d570c1f48fbdb08bcd0
sha512: 113056e542db049eea3b1d1ccbbe52c79539a2f9bb6129d284ec9200dcffec7bd5969821913a9899631575b80991c84ad01bc845b4bba614e42e54466d9f0d64
env:
SUN50I_A64_ARM_TRUSTED_FIRMWARE: sun50i_a64_arm-trusted-firmware
RPI_4_A64_ARM_TRUSTED_FIRMWARE: rpi_4_a64_arm-trusted-firmware
Expand Down

0 comments on commit cd05ae8

Please sign in to comment.