[PATCH 1/4] ARM: rdu2: extend environment for netboot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This adds the necessary scripts to clear the seat network
configuration and reset the switch in the development case.

Signed-off-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx>
---
 .../zii-imx6q-rdu2/defaultenv-rdu2/boot/net   | 24 +++++++++++++++++++
 .../zii-imx6q-rdu2/defaultenv-rdu2/boot/nfs   |  7 ++++++
 .../defaultenv-rdu2/boot/rdu-default          |  4 ++++
 .../defaultenv-rdu2/network/eth0-discover     |  4 ++++
 .../defaultenv-rdu2/nv/autoboot_abort_key     |  1 +
 .../defaultenv-rdu2/nv/boot.default           |  2 +-
 6 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/boot/net
 create mode 100644 arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/boot/nfs
 create mode 100644 arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/boot/rdu-default
 create mode 100644 arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/network/eth0-discover
 create mode 100644 arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/nv/autoboot_abort_key

diff --git a/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/boot/net b/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/boot/net
new file mode 100644
index 000000000000..4090c2f4a9ae
--- /dev/null
+++ b/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/boot/net
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+path="/mnt/tftp"
+
+# clear seat network config
+global.linux.bootargs.rdu_network=
+
+global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
+
+oftree="${path}/${global.user}-oftree-${global.hostname}"
+if [ -f "${oftree}" ]; then
+	global.bootm.oftree="$oftree"
+fi
+
+nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
+
+ip_route_get -b ${global.net.server} global.linux.bootargs.dyn.ip
+
+initramfs="${path}/${global.user}-initramfs-${global.hostname}"
+if [ -f "${initramfs}" ]; then
+	global.bootm.initrd="$initramfs"
+else
+	global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
+fi
\ No newline at end of file
diff --git a/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/boot/nfs b/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/boot/nfs
new file mode 100644
index 000000000000..4f9671f9cd20
--- /dev/null
+++ b/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/boot/nfs
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# clear seat network config
+global.linux.bootargs.rdu_network=
+
+backlight0.brightness=0
+boot /mnt/nfs
diff --git a/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/boot/rdu-default b/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/boot/rdu-default
new file mode 100644
index 000000000000..40346f69f4d9
--- /dev/null
+++ b/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/boot/rdu-default
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+backlight0.brightness=0
+boot mmc1
\ No newline at end of file
diff --git a/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/network/eth0-discover b/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/network/eth0-discover
new file mode 100644
index 000000000000..00f312011549
--- /dev/null
+++ b/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/network/eth0-discover
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# reset switch to clear DSA config
+rave_reset_switch
diff --git a/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/nv/autoboot_abort_key b/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/nv/autoboot_abort_key
new file mode 100644
index 000000000000..55920c9a58ca
--- /dev/null
+++ b/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/nv/autoboot_abort_key
@@ -0,0 +1 @@
+ctrl-c
\ No newline at end of file
diff --git a/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/nv/boot.default b/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/nv/boot.default
index 3cfe9bafdca5..9076a1e64eb5 100644
--- a/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/nv/boot.default
+++ b/arch/arm/boards/zii-imx6q-rdu2/defaultenv-rdu2/nv/boot.default
@@ -1 +1 @@
-mmc1
\ No newline at end of file
+rdu-default
\ No newline at end of file
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux