mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/4] ARM: rdu2: extend environment for netboot
Date: Fri, 31 May 2019 12:31:13 +0200	[thread overview]
Message-ID: <20190531103116.27378-1-l.stach@pengutronix.de> (raw)

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@pengutronix.de>
---
 .../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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2019-05-31 10:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 10:31 Lucas Stach [this message]
2019-05-31 10:31 ` [PATCH 2/4] ARM: rdu2: disable i210 network interface Lucas Stach
2019-05-31 10:31 ` [PATCH 3/4] ARM: rdu2: extend boot script for eMMC boot Lucas Stach
2019-05-31 10:31 ` [PATCH 4/4] ARM: rdu2: reserve pstore memory region Lucas Stach
2019-06-04  8:02 ` [PATCH 1/4] ARM: rdu2: extend environment for netboot Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190531103116.27378-1-l.stach@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox