mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Daniel Schultz <d.schultz@phytec.de>
To: barebox@lists.infradead.org
Subject: [PATCH 4/7] arm: boards: phytec-som-am335x: Add automount script
Date: Fri, 28 Apr 2017 14:46:05 +0200	[thread overview]
Message-ID: <1493383568-27798-4-git-send-email-d.schultz@phytec.de> (raw)
In-Reply-To: <1493383568-27798-1-git-send-email-d.schultz@phytec.de>

Each boot source is mounted to either /mnt/mmc or /mnt/emmc. To make the
not-mounted boot source available in Barebox, an automount script mounts
this device to /mnt/{mmc, emmc}, if the directory will be accessed.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
 .../defaultenv-physom-am335x/init/automount           | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/automount

diff --git a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/automount b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/automount
new file mode 100644
index 0000000..3d109ec
--- /dev/null
+++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/automount
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# automount tftp server based on $eth0.serverip
+
+mkdir -p /mnt/tftp
+automount /mnt/tftp 'ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp'
+
+# automount nfs server's nfsroot
+
+mkdir -p /mnt/nfs
+automount /mnt/nfs 'ifup eth0 && mount -t nfs ${eth0.serverip}:/home/${global.user}/nfsroot/${global.hostname} /mnt/nfs'
+
+#automount SD card and EMMC boot partitions
+
+if [ $bootsource = mmc -a $bootsource_instance = 1 ]; then
+	automount /mnt/mmc '[ -e /dev/mmc0.0 ] && mount /dev/mmc0.0 /mnt/mmc'
+else
+	automount /mnt/emmc '[ -e /dev/mmc1.0 ] && mount /dev/mmc1.0 /mnt/emmc'
+fi
-- 
1.9.1


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

  parent reply	other threads:[~2017-04-28 12:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-28 12:46 [PATCH 1/7] arm: mach-omap: Change file flags in emmc handler Daniel Schultz
2017-04-28 12:46 ` [PATCH 2/7] arm: boards: Add MLO handler for EMMC devices Daniel Schultz
2017-04-28 12:46 ` [PATCH 3/7] arm: mach-omap: Change mountpoint of boot partitions Daniel Schultz
2017-05-02  6:52   ` Sascha Hauer
2017-04-28 12:46 ` Daniel Schultz [this message]
2017-04-28 12:46 ` [PATCH 5/7] arm: boards: phytec-som-am335x: Update boot scripts Daniel Schultz
2017-04-28 12:46 ` [PATCH 6/7] arm: boards: beaglebone: " Daniel Schultz
2017-05-02  7:11   ` Sascha Hauer
2017-04-28 12:46 ` [PATCH 7/7] arm: boards: afi-gf: Update SD card boot script Daniel Schultz
2017-05-05  7:03 ` [PATCH 1/7] arm: mach-omap: Change file flags in emmc handler 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=1493383568-27798-4-git-send-email-d.schultz@phytec.de \
    --to=d.schultz@phytec.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