From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.phytec.eu ([217.6.246.34] helo=root.phytec.de) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d6eVz-0005y7-9z for barebox@lists.infradead.org; Fri, 05 May 2017 14:47:30 +0000 Received: from idefix.phytec.de (idefix.phytec.de [172.16.0.10]) by root.phytec.de (Postfix) with ESMTP id 7EAEEA0077D for ; Fri, 5 May 2017 16:47:47 +0200 (CEST) From: Daniel Schultz Date: Fri, 5 May 2017 16:46:55 +0200 Message-Id: <1493995618-7289-2-git-send-email-d.schultz@phytec.de> In-Reply-To: <1493995618-7289-1-git-send-email-d.schultz@phytec.de> References: <1493995618-7289-1-git-send-email-d.schultz@phytec.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v2 2/5] arm: boards: phytec-som-am335x: Add automount script To: barebox@lists.infradead.org Each MMC boot source is mounted to /mnt/mmcN.0. To make the not-mounted boot source available in Barebox, an automount script mounts this device also to /mnt/, if the directory will be accessed. Signed-off-by: Daniel Schultz --- .../defaultenv-physom-am335x/init/automount | 21 +++++++++++++++++++++ 1 file changed, 21 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..53ecbe3 --- /dev/null +++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/automount @@ -0,0 +1,21 @@ +#!/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 + mkdir -p /mnt/mmc0.0 + automount /mnt/mmc0.0 '[ -e /dev/mmc0.0 ] && mount /dev/mmc0.0 /mnt/mmc0.0' +else + mkdir -p /mnt/mmc1.0 + automount /mnt/mmc1.0 '[ -e /dev/mmc1.0 ] && mount /dev/mmc1.0 /mnt/mmc1.0' +fi -- 1.9.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox