-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
khadas-vim3: u-boot: bump to 2025.04-rc5
; boot SD first; enable setexpr
; patch 2025.04 for fileenv
; enable squashfs
support
#8044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
igorpecovnik
merged 1 commit into
armbian:main
from
rpardini:pr/khadas-vim3-u-boot-bump-to-202504-rc5-boot-SD-first-enable-setexpr-patch-202504-for-fileenv-enable-squashfs-support
Apr 25, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 10 additions & 13 deletions
23
...m3/meson64-boot-usb-nvme-scsi-first.patch → ...m3/meson64-boot-usb-nvme-scsi-first.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,29 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Ricardo Pardini <[email protected]> | ||
Date: Sun, 14 Jan 2024 13:44:58 +0100 | ||
Subject: meson64: change `BOOT_TARGET_DEVICES` to try to boot USB, NVME and | ||
SCSI before SD, MMC, PXE, DHCP | ||
Subject: meson64: boot order: SD -> USB -> NVMe -> eMMC | ||
|
||
--- | ||
include/configs/meson64.h | 6 +++--- | ||
1 file changed, 3 insertions(+), 3 deletions(-) | ||
include/configs/meson64.h | 4 +++- | ||
1 file changed, 3 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/include/configs/meson64.h b/include/configs/meson64.h | ||
index efab9a624dc5..32c25098e674 100644 | ||
index 111111111111..222222222222 100644 | ||
--- a/include/configs/meson64.h | ||
+++ b/include/configs/meson64.h | ||
@@ -99,12 +99,12 @@ | ||
@@ -119,10 +119,12 @@ | ||
#define BOOT_TARGET_DEVICES(func) \ | ||
func(ROMUSB, romusb, na) \ | ||
func(USB_DFU, usbdfu, na) \ | ||
- func(MMC, mmc, 0) \ | ||
- func(MMC, mmc, 1) \ | ||
- func(MMC, mmc, 2) \ | ||
- BOOT_TARGET_MMC(func) \ | ||
+ func(MMC, mmc, 0) \ | ||
+ func(MMC, mmc, 1) \ | ||
BOOT_TARGET_DEVICES_USB(func) \ | ||
BOOT_TARGET_NVME(func) \ | ||
BOOT_TARGET_SCSI(func) \ | ||
+ func(MMC, mmc, 0) \ | ||
+ func(MMC, mmc, 1) \ | ||
+ func(MMC, mmc, 2) \ | ||
func(PXE, pxe, na) \ | ||
func(DHCP, dhcp, na) | ||
BOOT_TARGET_PXE(func) \ | ||
BOOT_TARGET_DHCP(func) | ||
#endif | ||
-- | ||
Armbian | ||
|
99 changes: 99 additions & 0 deletions
99
patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Ricardo Pardini <[email protected]> | ||
Date: Fri, 31 Jan 2025 15:52:03 +0100 | ||
Subject: cmd: fileenv: read string from file into env | ||
|
||
- rpardini: adapted from vendor/legacy patch from 2018 | ||
|
||
Signed-off-by: Pascal Vizeli <[email protected]> | ||
Signed-off-by: Stefan Agner <[email protected]> | ||
Signed-off-by: Ricardo Pardini <[email protected]> | ||
--- | ||
cmd/Kconfig | 5 + | ||
cmd/Makefile | 1 + | ||
cmd/fileenv.c | 46 ++++++++++ | ||
3 files changed, 52 insertions(+) | ||
|
||
diff --git a/cmd/Kconfig b/cmd/Kconfig | ||
index 111111111111..222222222222 100644 | ||
--- a/cmd/Kconfig | ||
+++ b/cmd/Kconfig | ||
@@ -1825,6 +1825,11 @@ config CMD_XXD | ||
help | ||
Print file as hexdump to standard output | ||
|
||
+config CMD_FILEENV | ||
+ bool "fileenv" | ||
+ help | ||
+ Read a file into memory and store it to env. | ||
+ | ||
endmenu | ||
|
||
if NET || NET_LWIP | ||
diff --git a/cmd/Makefile b/cmd/Makefile | ||
index 111111111111..222222222222 100644 | ||
--- a/cmd/Makefile | ||
+++ b/cmd/Makefile | ||
@@ -173,6 +173,7 @@ obj-$(CONFIG_CMD_SHA1SUM) += sha1sum.o | ||
obj-$(CONFIG_CMD_SEAMA) += seama.o | ||
obj-$(CONFIG_CMD_SETEXPR) += setexpr.o | ||
obj-$(CONFIG_CMD_SETEXPR_FMT) += printf.o | ||
+obj-$(CONFIG_CMD_FILEENV) += fileenv.o | ||
obj-$(CONFIG_CMD_SPI) += spi.o | ||
obj-$(CONFIG_CMD_STRINGS) += strings.o | ||
obj-$(CONFIG_CMD_SMBIOS) += smbios.o | ||
diff --git a/cmd/fileenv.c b/cmd/fileenv.c | ||
new file mode 100644 | ||
index 000000000000..111111111111 | ||
--- /dev/null | ||
+++ b/cmd/fileenv.c | ||
@@ -0,0 +1,46 @@ | ||
+#include <config.h> | ||
+#include <command.h> | ||
+#include <fs.h> | ||
+#include <linux/ctype.h> | ||
+#include <vsprintf.h> | ||
+ | ||
+static char *fs_argv[5]; | ||
+ | ||
+int do_fileenv(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]) | ||
+{ | ||
+ if (argc < 6) | ||
+ return CMD_RET_USAGE; | ||
+ | ||
+ fs_argv[0] = "fatload"; | ||
+ fs_argv[1] = argv[1]; | ||
+ fs_argv[2] = argv[2]; | ||
+ fs_argv[3] = argv[3]; | ||
+ fs_argv[4] = argv[4]; | ||
+ | ||
+ if (do_fat_fsload(cmdtp, 0, 5, fs_argv) != 0) | ||
+ return 1; | ||
+ | ||
+ char *addr = (char *)simple_strtoul(argv[3], NULL, 16); | ||
+ size_t size = env_get_hex("filesize", 0); | ||
+ | ||
+ // Prepare string | ||
+ addr[size] = 0x00; | ||
+ char *s = addr; | ||
+ while(*s != 0x00) { | ||
+ if (isprint(*s)) { | ||
+ s++; | ||
+ } | ||
+ else { | ||
+ *s = 0x00; | ||
+ } | ||
+ } | ||
rpardini marked this conversation as resolved.
Show resolved
Hide resolved
|
||
+ | ||
+ return env_set(argv[5], addr); | ||
+} | ||
+ | ||
+U_BOOT_CMD( | ||
+ fileenv, 6, 0, do_fileenv, | ||
+ "Read file and store it into env.", | ||
+ "<interface> <dev:part> <addr> <filename> <envname>\n" | ||
+ " - Read file from fat32 and store it as env." | ||
+); | ||
-- | ||
Armbian | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.