mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-28 15:36:29 +00:00
Unfortunately builds for 32-bit seem to lead to freezes. Conservatively only update to 2020.07 for 64-bit builds. Co-authored-by: Malcolm Lashley <mlashley@gmail.com> Co-authored-by: Malcolm Lashley <mlashley@gmail.com>
This commit is contained in:
parent
245dc7603f
commit
985f3b8e3d
@ -87,7 +87,7 @@ BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y
|
|||||||
BR2_TARGET_UBOOT=y
|
BR2_TARGET_UBOOT=y
|
||||||
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
|
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
|
||||||
BR2_TARGET_UBOOT_CUSTOM_VERSION=y
|
BR2_TARGET_UBOOT_CUSTOM_VERSION=y
|
||||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.01"
|
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07"
|
||||||
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_4"
|
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_4"
|
||||||
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config"
|
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config"
|
||||||
BR2_TARGET_UBOOT_BOOT_SCRIPT=y
|
BR2_TARGET_UBOOT_BOOT_SCRIPT=y
|
||||||
|
@ -0,0 +1,96 @@
|
|||||||
|
From 040a141f84f2f84bf8be18f85b4cdb34bf066df0 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-Id: <040a141f84f2f84bf8be18f85b4cdb34bf066df0.1595086593.git.stefan@agner.ch>
|
||||||
|
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||||
|
Date: Sun, 5 Aug 2018 20:43:03 +0000
|
||||||
|
Subject: [PATCH 1/1] CMD: read string from fileinto env
|
||||||
|
|
||||||
|
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||||
|
---
|
||||||
|
cmd/Kconfig | 5 +++++
|
||||||
|
cmd/Makefile | 1 +
|
||||||
|
cmd/fileenv.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
3 files changed, 51 insertions(+)
|
||||||
|
create mode 100644 cmd/fileenv.c
|
||||||
|
|
||||||
|
diff --git a/cmd/Kconfig b/cmd/Kconfig
|
||||||
|
index 192b3b262f..b44cd64215 100644
|
||||||
|
--- a/cmd/Kconfig
|
||||||
|
+++ b/cmd/Kconfig
|
||||||
|
@@ -1388,6 +1388,11 @@ config CMD_SETEXPR
|
||||||
|
Also supports loading the value at a memory location into a variable.
|
||||||
|
If CONFIG_REGEX is enabled, setexpr also supports a gsub function.
|
||||||
|
|
||||||
|
+config CMD_FILEENV
|
||||||
|
+ bool "fileenv"
|
||||||
|
+ help
|
||||||
|
+ Read a file into memory and store it to env.
|
||||||
|
+
|
||||||
|
endmenu
|
||||||
|
|
||||||
|
menu "Android support commands"
|
||||||
|
diff --git a/cmd/Makefile b/cmd/Makefile
|
||||||
|
index 974ad48b0a..287887e97f 100644
|
||||||
|
--- a/cmd/Makefile
|
||||||
|
+++ b/cmd/Makefile
|
||||||
|
@@ -128,6 +128,7 @@ obj-$(CONFIG_CMD_SF) += sf.o
|
||||||
|
obj-$(CONFIG_CMD_SCSI) += scsi.o disk.o
|
||||||
|
obj-$(CONFIG_CMD_SHA1SUM) += sha1sum.o
|
||||||
|
obj-$(CONFIG_CMD_SETEXPR) += setexpr.o
|
||||||
|
+obj-$(CONFIG_CMD_FILEENV) += fileenv.o
|
||||||
|
obj-$(CONFIG_CMD_SPI) += spi.o
|
||||||
|
obj-$(CONFIG_CMD_STRINGS) += strings.o
|
||||||
|
obj-$(CONFIG_CMD_SMC) += smccc.o
|
||||||
|
diff --git a/cmd/fileenv.c b/cmd/fileenv.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..af24d22d0e
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/cmd/fileenv.c
|
||||||
|
@@ -0,0 +1,45 @@
|
||||||
|
+#include <config.h>
|
||||||
|
+#include <common.h>
|
||||||
|
+#include <command.h>
|
||||||
|
+#include <linux/ctype.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;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ 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."
|
||||||
|
+);
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user