summaryrefslogtreecommitdiffstats
path: root/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx
diff options
context:
space:
mode:
authortakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
committertakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
commit1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch)
treecd70a267a5ef105ba32f200aa088e281fbd85747 /bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx
parent4204309872da5cb401cbb2729d9e2d4869a87f42 (diff)
recipes
Diffstat (limited to 'bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx')
-rw-r--r--bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx/0001-Add-target-to-generate-initial-environment.patch49
-rwxr-xr-xbsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx/0001-tools-allow-to-override-python.patch46
2 files changed, 49 insertions, 46 deletions
diff --git a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx/0001-Add-target-to-generate-initial-environment.patch b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx/0001-Add-target-to-generate-initial-environment.patch
new file mode 100644
index 00000000..c717e029
--- /dev/null
+++ b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx/0001-Add-target-to-generate-initial-environment.patch
@@ -0,0 +1,49 @@
+From bdaa73a5b3923257add182b4ab8058dbfa33421b Mon Sep 17 00:00:00 2001
+From: Stefano Babic <sbabic@denx.de>
+Date: Wed, 13 Mar 2019 09:46:45 +0100
+Subject: [PATCH] Add target to generate initial environment
+
+The initial environment is linked to the u-boot binary. Modifying the
+environment from User Space with the env tools requires that the tools
+are always built together with the bootloader to be sure that they
+contain the initial environment in case no environment is stored into
+persistent storage or when a board boots with just the default
+environment. This makes difficult for distros to provide a general
+package to access the environment. A simpler way is if the tools are
+generic for all boards and a configuration file is given to provide the
+initial environment.
+
+The patch just generates the initial environment by extracting it from
+the compiled object. This file can then be used for tools in user space
+to initialize the environment.
+
+Signed-off-by: Stefano Babic <sbabic@denx.de>
+
+Upstream-Status: Backport [https://github.com/u-boot/u-boot/commit/bdaa73a5b3923257add182b4ab8058dbfa33421b]
+
+Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
+---
+ Makefile | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/Makefile b/Makefile
+index 66a09ac900..f2c7bb6041 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1977,6 +1977,13 @@ endif
+ $(build)=$(build-dir) $(@:.ko=.o)
+ $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
+
++quiet_cmd_genenv = GENENV $@
++cmd_genenv = $(OBJCOPY) --dump-section .rodata.default_environment=$@ env/common.o; \
++ sed --in-place -e 's/\x00/\x0A/g' $@
++
++u-boot-initial-env: u-boot.bin
++ $(call if_changed,genenv)
++
+ # Consistency checks
+ # ---------------------------------------------------------------------------
+
+--
+2.17.1
+
diff --git a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx/0001-tools-allow-to-override-python.patch b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx/0001-tools-allow-to-override-python.patch
deleted file mode 100755
index f96de538..00000000
--- a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx/0001-tools-allow-to-override-python.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From b48bfc74ee410b1e6681c620633ffef32aafaba0 Mon Sep 17 00:00:00 2001
-From: Stefano Babic <sbabic@denx.de>
-Date: Wed, 5 Apr 2017 17:46:41 +0200
-Subject: [PATCH] tools: allow to override python
-
-Not force to use python from PATH. Issue was noted when building with
-Yocto, because python from the distro is always taken instead of
-python-native built during Yocto process.
-
-Signed-off-by: Stefano Babic <sbabic@denx.de>
-CC: Simon Glass <sjg@chromium.org>
-Reviewed-by: Simon Glass <sjg@chromium.org>
----
- Makefile | 2 +-
- tools/Makefile | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 09b597d450..8d4e6050b3 100644
---- a/Makefile
-+++ b/Makefile
-@@ -348,7 +348,7 @@ OBJCOPY = $(CROSS_COMPILE)objcopy
- OBJDUMP = $(CROSS_COMPILE)objdump
- AWK = awk
- PERL = perl
--PYTHON = python
-+PYTHON ?= python
- DTC = dtc
- CHECK = sparse
-
-diff --git a/tools/Makefile b/tools/Makefile
-index fa1b85bdae..2fc4a583d4 100644
---- a/tools/Makefile
-+++ b/tools/Makefile
-@@ -120,7 +120,7 @@ _libfdt.so-sharedobjs += $(LIBFDT_OBJS)
- libfdt:
-
- tools/_libfdt.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) tools/libfdt_wrap.c
-- LDFLAGS="$(HOSTLDFLAGS)" python $(srctree)/lib/libfdt/setup.py \
-+ LDFLAGS="$(HOSTLDFLAGS)" ${PYTHON} $(srctree)/lib/libfdt/setup.py \
- "$(_hostc_flags)" $^
- mv _libfdt.so $@
-
---
-2.17.1
-