uboot: split the patches apart and disable the verbose logging
logging still has *some* verbosity. i may turn it down further.
This commit is contained in:
parent
09cb37dee2
commit
61ff0eae4b
|
@ -14,8 +14,10 @@
|
||||||
|
|
||||||
# NixOS defaults to grub: we don't want that.
|
# NixOS defaults to grub: we don't want that.
|
||||||
boot.loader.grub.enable = false;
|
boot.loader.grub.enable = false;
|
||||||
# Enables the generation of /boot/extlinux/extlinux.conf
|
# raspberryPi boot loader creates extlinux.conf.
|
||||||
boot.loader.generic-extlinux-compatible.enable = true;
|
# otherwise, enable the generic-extlinux-compatible loader below.
|
||||||
|
# note: THESE ARE MUTUALLY EXCLUSIVE. generic-extlinux-compatible causes uboot to not be built
|
||||||
|
# boot.loader.generic-extlinux-compatible.enable = true;
|
||||||
boot.loader.raspberryPiColin.enable = true;
|
boot.loader.raspberryPiColin.enable = true;
|
||||||
boot.loader.raspberryPiColin.uboot.enable = true;
|
boot.loader.raspberryPiColin.uboot.enable = true;
|
||||||
boot.loader.raspberryPiColin.version = 4;
|
boot.loader.raspberryPiColin.version = 4;
|
||||||
|
|
32
pkgs/ubootRaspberryPi4_64bit/01-skip-lba-check.patch
Normal file
32
pkgs/ubootRaspberryPi4_64bit/01-skip-lba-check.patch
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
diff --git a/disk/part_efi.c b/disk/part_efi.c
|
||||||
|
index 829ccb6bd1..5f3f0ae042 100644
|
||||||
|
--- a/disk/part_efi.c
|
||||||
|
+++ b/disk/part_efi.c
|
||||||
|
@@ -133,12 +133,12 @@ static int validate_gpt_header(gpt_header *gpt_h, lbaint_t lba,
|
||||||
|
* Check that the first_usable_lba and that the last_usable_lba are
|
||||||
|
* within the disk.
|
||||||
|
*/
|
||||||
|
- if (le64_to_cpu(gpt_h->first_usable_lba) > lastlba) {
|
||||||
|
+ if (le64_to_cpu(gpt_h->first_usable_lba) > lastlba && lastlba != 0) {
|
||||||
|
printf("GPT: first_usable_lba incorrect: %llX > " LBAF "\n",
|
||||||
|
le64_to_cpu(gpt_h->first_usable_lba), lastlba);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
- if (le64_to_cpu(gpt_h->last_usable_lba) > lastlba) {
|
||||||
|
+ if (le64_to_cpu(gpt_h->last_usable_lba) > lastlba && lastlba != 0) {
|
||||||
|
printf("GPT: last_usable_lba incorrect: %llX > " LBAF "\n",
|
||||||
|
le64_to_cpu(gpt_h->last_usable_lba), lastlba);
|
||||||
|
return -1;
|
||||||
|
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
|
||||||
|
index 7a5f0851b5..01545f7480 100644
|
||||||
|
--- a/include/configs/rpi.h
|
||||||
|
+++ b/include/configs/rpi.h
|
||||||
|
@@ -15,6 +15,8 @@
|
||||||
|
|
||||||
|
/* Architecture, CPU, etc.*/
|
||||||
|
|
||||||
|
+#define CONFIG_SYS_64BIT_LBA
|
||||||
|
+
|
||||||
|
/* Use SoC timer for AArch32, but architected timer for AArch64 */
|
||||||
|
#ifndef CONFIG_ARM64
|
||||||
|
#define CONFIG_SYS_TIMER_RATE 1000000
|
16
pkgs/ubootRaspberryPi4_64bit/02-extra-cmds.patch
Normal file
16
pkgs/ubootRaspberryPi4_64bit/02-extra-cmds.patch
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig
|
||||||
|
index eae03bf023..2ded4123ce 100644
|
||||||
|
--- a/configs/rpi_4_defconfig
|
||||||
|
+++ b/configs/rpi_4_defconfig
|
||||||
|
@@ -63,3 +63,11 @@ CONFIG_VIDEO_BCM2835=y
|
||||||
|
CONFIG_CONSOLE_SCROLL_LINES=10
|
||||||
|
CONFIG_PHYS_TO_BUS=y
|
||||||
|
CONFIG_OF_LIBFDT_OVERLAY=y
|
||||||
|
+CONFIG_CMD_CONFIG=y
|
||||||
|
+CONFIG_CMD_EFIDEBUG=y
|
||||||
|
+CONFIG_CMD_GPT=y
|
||||||
|
+CONFIG_CMD_LOG=y
|
||||||
|
+CONFIG_CMD_READ=y
|
||||||
|
+CONFIG_CMD_USB_MASS_STORAGE=y
|
||||||
|
+CONFIG_LOG_MAX_LEVEL=8
|
||||||
|
+CONFIG_CMD_LSBLK=y
|
|
@ -1,19 +1,3 @@
|
||||||
diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig
|
|
||||||
index eae03bf023..2ded4123ce 100644
|
|
||||||
--- a/configs/rpi_4_defconfig
|
|
||||||
+++ b/configs/rpi_4_defconfig
|
|
||||||
@@ -63,3 +63,11 @@ CONFIG_VIDEO_BCM2835=y
|
|
||||||
CONFIG_CONSOLE_SCROLL_LINES=10
|
|
||||||
CONFIG_PHYS_TO_BUS=y
|
|
||||||
CONFIG_OF_LIBFDT_OVERLAY=y
|
|
||||||
+CONFIG_CMD_CONFIG=y
|
|
||||||
+CONFIG_CMD_EFIDEBUG=y
|
|
||||||
+CONFIG_CMD_GPT=y
|
|
||||||
+CONFIG_CMD_LOG=y
|
|
||||||
+CONFIG_CMD_READ=y
|
|
||||||
+CONFIG_CMD_USB_MASS_STORAGE=y
|
|
||||||
+CONFIG_LOG_MAX_LEVEL=8
|
|
||||||
+CONFIG_CMD_LSBLK=y
|
|
||||||
diff --git a/disk/part.c b/disk/part.c
|
diff --git a/disk/part.c b/disk/part.c
|
||||||
index 79955c7fb0..c1d469cebb 100644
|
index 79955c7fb0..c1d469cebb 100644
|
||||||
--- a/disk/part.c
|
--- a/disk/part.c
|
||||||
|
@ -32,21 +16,6 @@ diff --git a/disk/part_efi.c b/disk/part_efi.c
|
||||||
index 829ccb6bd1..5f3f0ae042 100644
|
index 829ccb6bd1..5f3f0ae042 100644
|
||||||
--- a/disk/part_efi.c
|
--- a/disk/part_efi.c
|
||||||
+++ b/disk/part_efi.c
|
+++ b/disk/part_efi.c
|
||||||
@@ -133,12 +133,12 @@ static int validate_gpt_header(gpt_header *gpt_h, lbaint_t lba,
|
|
||||||
* Check that the first_usable_lba and that the last_usable_lba are
|
|
||||||
* within the disk.
|
|
||||||
*/
|
|
||||||
- if (le64_to_cpu(gpt_h->first_usable_lba) > lastlba) {
|
|
||||||
+ if (le64_to_cpu(gpt_h->first_usable_lba) > lastlba && lastlba != 0) {
|
|
||||||
printf("GPT: first_usable_lba incorrect: %llX > " LBAF "\n",
|
|
||||||
le64_to_cpu(gpt_h->first_usable_lba), lastlba);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
- if (le64_to_cpu(gpt_h->last_usable_lba) > lastlba) {
|
|
||||||
+ if (le64_to_cpu(gpt_h->last_usable_lba) > lastlba && lastlba != 0) {
|
|
||||||
printf("GPT: last_usable_lba incorrect: %llX > " LBAF "\n",
|
|
||||||
le64_to_cpu(gpt_h->last_usable_lba), lastlba);
|
|
||||||
return -1;
|
|
||||||
@@ -1044,6 +1044,8 @@ static int is_gpt_valid(struct blk_desc *dev_desc, u64 lba,
|
@@ -1044,6 +1044,8 @@ static int is_gpt_valid(struct blk_desc *dev_desc, u64 lba,
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
@ -78,19 +47,6 @@ index 21c5209bb6..6ce03d8d09 100644
|
||||||
if (!ops->read)
|
if (!ops->read)
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
|
|
||||||
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
|
|
||||||
index 7a5f0851b5..01545f7480 100644
|
|
||||||
--- a/include/configs/rpi.h
|
|
||||||
+++ b/include/configs/rpi.h
|
|
||||||
@@ -15,6 +15,8 @@
|
|
||||||
|
|
||||||
/* Architecture, CPU, etc.*/
|
|
||||||
|
|
||||||
+#define CONFIG_SYS_64BIT_LBA
|
|
||||||
+
|
|
||||||
/* Use SoC timer for AArch32, but architected timer for AArch64 */
|
|
||||||
#ifndef CONFIG_ARM64
|
|
||||||
#define CONFIG_SYS_TIMER_RATE 1000000
|
|
||||||
diff --git a/include/log.h b/include/log.h
|
diff --git a/include/log.h b/include/log.h
|
||||||
index 8f35c10abb..afd2d704f4 100644
|
index 8f35c10abb..afd2d704f4 100644
|
||||||
--- a/include/log.h
|
--- a/include/log.h
|
|
@ -3,7 +3,10 @@
|
||||||
(pkgs.ubootRaspberryPi4_64bit.overrideAttrs (upstream: {
|
(pkgs.ubootRaspberryPi4_64bit.overrideAttrs (upstream: {
|
||||||
patches = (upstream.patches or []) ++ [
|
patches = (upstream.patches or []) ++ [
|
||||||
# enable booting from > 2 TiB drives
|
# enable booting from > 2 TiB drives
|
||||||
./01-enable-large-gpt.patch
|
./01-skip-lba-check.patch
|
||||||
|
# enable some builtin commands to aid in debugging, while we're here
|
||||||
|
./02-extra-cmds.patch
|
||||||
|
# ./03-verbose-log.patch
|
||||||
];
|
];
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user