uboot-zynq: use a file to modify the default environment
authorLuis Araneda <[email protected]>
Tue, 4 Sep 2018 01:39:59 +0000 (22:39 -0300)
committerJo-Philipp Wich <[email protected]>
Tue, 18 Dec 2018 16:47:53 +0000 (17:47 +0100)
Follow the strategy of other targets and create a
default environment file, uEnv.txt, to configure the
behavior of U-Boot.
For now, use it to pass bootargs to the kernel

Signed-off-by: Luis Araneda <[email protected]>
(backported from e2a4d14aaa562262dc27963a9f523aa18202cb56)

package/boot/uboot-zynq/Makefile
package/boot/uboot-zynq/files/uEnv-default.txt [new file with mode: 0644]

index 31575d7cae3d8128450992846a0955b70618e762..2e4c6cc0349e6d6640aa9d272beea9d5d24dba13 100644 (file)
@@ -20,6 +20,7 @@ define U-Boot/Default
   BUILD_TARGET:=zynq
   UBOOT_IMAGE:=spl/boot.bin u-boot.img
   UBOOT_CONFIG:=zynq_$(1)
+  UENV:=default
   HIDDEN:=1
 endef
 
@@ -53,6 +54,7 @@ define Build/InstallDev
        $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
        $(CP) $(PKG_BUILD_DIR)/spl/boot.bin $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-boot.bin
        $(CP) $(PKG_BUILD_DIR)/u-boot.img $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-u-boot.img
+       $(CP) ./files/uEnv-$(UENV).txt $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-uEnv.txt
 endef
 
 define Package/u-boot/install/default
diff --git a/package/boot/uboot-zynq/files/uEnv-default.txt b/package/boot/uboot-zynq/files/uEnv-default.txt
new file mode 100644 (file)
index 0000000..5030b07
--- /dev/null
@@ -0,0 +1 @@
+bootargs=console=ttyPS0,115200n8 root=/dev/mmcblk0p2 rootwait earlyprintk