* [PATCH v2 2/5] arm: boards: phytec-som-am335x: Add automount script
2017-05-05 14:46 [PATCH v2 1/5] arm: mach-omap: Change mountpoint of boot partitions Daniel Schultz
@ 2017-05-05 14:46 ` Daniel Schultz
2017-05-05 14:46 ` [PATCH v2 3/5] arm: boards: phytec-som-am335x: Update boot scripts Daniel Schultz
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Daniel Schultz @ 2017-05-05 14:46 UTC (permalink / raw)
To: barebox
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 <d.schultz@phytec.de>
---
.../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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 3/5] arm: boards: phytec-som-am335x: Update boot scripts
2017-05-05 14:46 [PATCH v2 1/5] arm: mach-omap: Change mountpoint of boot partitions Daniel Schultz
2017-05-05 14:46 ` [PATCH v2 2/5] arm: boards: phytec-som-am335x: Add automount script Daniel Schultz
@ 2017-05-05 14:46 ` Daniel Schultz
2017-05-05 14:46 ` [PATCH v2 4/5] arm: boards: beaglebone: Delete default env Daniel Schultz
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Daniel Schultz @ 2017-05-05 14:46 UTC (permalink / raw)
To: barebox
Expand the boot scripts with EMMC and add a default file source for
expansions.
Removed "rw" and "rootwait" bootargs from existing boot scripts.
Added "rootflags='data=journal'" bootarg to SD card boot script.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
.../defaultenv-physom-am335x/boot/emmc | 7 +++++++
.../phytec-som-am335x/defaultenv-physom-am335x/boot/mmc | 7 ++++---
.../defaultenv-physom-am335x/boot/nand | 4 +++-
.../phytec-som-am335x/defaultenv-physom-am335x/boot/net | 17 +++++++++++++++++
.../phytec-som-am335x/defaultenv-physom-am335x/boot/spi | 4 +++-
.../defaultenv-physom-am335x/init/bootsource | 16 ++++++++++++----
6 files changed, 46 insertions(+), 9 deletions(-)
create mode 100644 arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/emmc
create mode 100644 arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/net
diff --git a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/emmc b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/emmc
new file mode 100644
index 0000000..6ad5f87
--- /dev/null
+++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/emmc
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+[ -e /env/config-expansions ] && /env/config-expansions
+
+global.bootm.image=/mnt/mmc1.0/linuximage
+global.bootm.oftree=/mnt/mmc1.0/oftree
+global.linux.bootargs.dyn.root="root=/dev/mmcblk1p2 rootflags='data=journal'"
diff --git a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/mmc b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/mmc
index 834669d..0fefeb2 100644
--- a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/mmc
+++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/mmc
@@ -1,6 +1,7 @@
#!/bin/sh
-global.bootm.image=/boot/linuximage
-global.bootm.oftree=/boot/oftree
+[ -e /env/config-expansions ] && /env/config-expansions
-global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rw rootwait"
+global.bootm.image=/mnt/mmc0.0/linuximage
+global.bootm.oftree=/mnt/mmc0.0/oftree
+global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootflags='data=journal'"
diff --git a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/nand b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/nand
index ece44b7..fa695bb 100644
--- a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/nand
+++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/nand
@@ -1,8 +1,10 @@
#!/bin/sh
+[ -e /env/config-expansions ] && /env/config-expansions
+
[ ! -e /dev/nand0.root.ubi ] && ubiattach /dev/nand0.root
global.bootm.image="/dev/nand0.root.ubi.kernel"
global.bootm.oftree="/dev/nand0.root.ubi.oftree"
-global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=root rw rootfstype=ubifs"
+global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=root rootfstype=ubifs"
diff --git a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/net b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/net
new file mode 100644
index 0000000..6dbd2aa
--- /dev/null
+++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/net
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+path="/mnt/tftp"
+
+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="/nfsroot/${global.hostname}"
+bootargs-ip
+
+[ -e /env/config-expansions ] && /env/config-expansions
+
+global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,vers=3,udp"
diff --git a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/spi b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/spi
index 71c5834..2d88626 100644
--- a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/spi
+++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/spi
@@ -1,7 +1,9 @@
#!/bin/sh
+[ -e /env/config-expansions ] && /env/config-expansions
+
global.bootm.image="/dev/m25p0.kernel"
global.bootm.oftree="/dev/m25p0.oftree"
# Use rootfs from NAND
-global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root rw rootfstype=ubifs"
+global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root rootfstype=ubifs"
diff --git a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/bootsource b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/bootsource
index 3f2ff4b..61a0879 100644
--- a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/bootsource
+++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/bootsource
@@ -4,12 +4,20 @@ if [ -n "$nv.boot.default" ]; then
exit
fi
-if [ $bootsource = mmc ]; then
- global.boot.default="mmc nand spi net"
+if [ -e /dev/mmc1.0 ]; then
+ nvmem="emmc"
+else
+ nvmem="nand"
+fi
+
+if [ $bootsource = mmc -a $bootsource_instance = 1 ]; then
+ global.boot.default="emmc mmc spi net"
+elif [ $bootsource = mmc -a $bootsource_instance = 0 ]; then
+ global.boot.default="mmc $nvmem spi net"
elif [ $bootsource = nand ]; then
global.boot.default="nand spi mmc net"
elif [ $bootsource = spi ]; then
- global.boot.default="spi nand mmc net"
+ global.boot.default="spi $nvmem mmc net"
elif [ $bootsource = net ]; then
- global.boot.default="net nand spi mmc"
+ global.boot.default="net $nvmem spi mmc"
fi
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 4/5] arm: boards: beaglebone: Delete default env
2017-05-05 14:46 [PATCH v2 1/5] arm: mach-omap: Change mountpoint of boot partitions Daniel Schultz
2017-05-05 14:46 ` [PATCH v2 2/5] arm: boards: phytec-som-am335x: Add automount script Daniel Schultz
2017-05-05 14:46 ` [PATCH v2 3/5] arm: boards: phytec-som-am335x: Update boot scripts Daniel Schultz
@ 2017-05-05 14:46 ` Daniel Schultz
2017-05-08 12:57 ` Sascha Hauer
2017-05-05 14:46 ` [PATCH v2 5/5] arm: boards: afi-gf: Update SD card boot script Daniel Schultz
2017-05-11 9:14 ` [PATCH v2 1/5] arm: mach-omap: Change mountpoint of boot partitions Sascha Hauer
4 siblings, 1 reply; 9+ messages in thread
From: Daniel Schultz @ 2017-05-05 14:46 UTC (permalink / raw)
To: barebox
The Beaglebone environment should be set from outside with an application
specific environment.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
arch/arm/boards/beaglebone/Makefile | 1 -
arch/arm/boards/beaglebone/board.c | 2 --
arch/arm/boards/beaglebone/defaultenv-beaglebone/boot/sd | 6 ------
.../arm/boards/beaglebone/defaultenv-beaglebone/init/usb-limit-1300 | 5 -----
4 files changed, 14 deletions(-)
delete mode 100644 arch/arm/boards/beaglebone/defaultenv-beaglebone/boot/sd
delete mode 100644 arch/arm/boards/beaglebone/defaultenv-beaglebone/init/usb-limit-1300
diff --git a/arch/arm/boards/beaglebone/Makefile b/arch/arm/boards/beaglebone/Makefile
index 21a1a29..092c31d 100644
--- a/arch/arm/boards/beaglebone/Makefile
+++ b/arch/arm/boards/beaglebone/Makefile
@@ -1,3 +1,2 @@
lwl-y += lowlevel.o
obj-y += board.o
-bbenv-y += defaultenv-beaglebone
diff --git a/arch/arm/boards/beaglebone/board.c b/arch/arm/boards/beaglebone/board.c
index 5717c45..fc16aea 100644
--- a/arch/arm/boards/beaglebone/board.c
+++ b/arch/arm/boards/beaglebone/board.c
@@ -85,8 +85,6 @@ static int beaglebone_devices_init(void)
black = is_beaglebone_black();
- defaultenv_append_directory(defaultenv_beaglebone);
-
globalvar_add_simple("board.variant", black ? "boneblack" : "bone");
printf("detected 'BeagleBone %s'\n", black ? "Black" : "White");
diff --git a/arch/arm/boards/beaglebone/defaultenv-beaglebone/boot/sd b/arch/arm/boards/beaglebone/defaultenv-beaglebone/boot/sd
deleted file mode 100644
index aa94b2f..0000000
--- a/arch/arm/boards/beaglebone/defaultenv-beaglebone/boot/sd
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-global.bootm.image=/boot/uImage
-global.bootm.oftree=/boot/oftree
-#global.bootm.initrd=<path to initrd>
-global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
diff --git a/arch/arm/boards/beaglebone/defaultenv-beaglebone/init/usb-limit-1300 b/arch/arm/boards/beaglebone/defaultenv-beaglebone/init/usb-limit-1300
deleted file mode 100644
index 56313bf..0000000
--- a/arch/arm/boards/beaglebone/defaultenv-beaglebone/init/usb-limit-1300
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-echo -n "changing USB current limit to 1300 mA... "
-i2c_write -b 0 -a 0x24 -r 0x01 0x3e
-echo "done"
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 4/5] arm: boards: beaglebone: Delete default env
2017-05-05 14:46 ` [PATCH v2 4/5] arm: boards: beaglebone: Delete default env Daniel Schultz
@ 2017-05-08 12:57 ` Sascha Hauer
2017-05-09 9:58 ` Daniel Schultz
0 siblings, 1 reply; 9+ messages in thread
From: Sascha Hauer @ 2017-05-08 12:57 UTC (permalink / raw)
To: Daniel Schultz; +Cc: barebox
Hi Daniel,
On Fri, May 05, 2017 at 04:46:57PM +0200, Daniel Schultz wrote:
> The Beaglebone environment should be set from outside with an application
> specific environment.
I don't understand this. What are you trying to archieve and why?
Sascha
>
> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
> ---
> arch/arm/boards/beaglebone/Makefile | 1 -
> arch/arm/boards/beaglebone/board.c | 2 --
> arch/arm/boards/beaglebone/defaultenv-beaglebone/boot/sd | 6 ------
> .../arm/boards/beaglebone/defaultenv-beaglebone/init/usb-limit-1300 | 5 -----
> 4 files changed, 14 deletions(-)
> delete mode 100644 arch/arm/boards/beaglebone/defaultenv-beaglebone/boot/sd
> delete mode 100644 arch/arm/boards/beaglebone/defaultenv-beaglebone/init/usb-limit-1300
>
> diff --git a/arch/arm/boards/beaglebone/Makefile b/arch/arm/boards/beaglebone/Makefile
> index 21a1a29..092c31d 100644
> --- a/arch/arm/boards/beaglebone/Makefile
> +++ b/arch/arm/boards/beaglebone/Makefile
> @@ -1,3 +1,2 @@
> lwl-y += lowlevel.o
> obj-y += board.o
> -bbenv-y += defaultenv-beaglebone
> diff --git a/arch/arm/boards/beaglebone/board.c b/arch/arm/boards/beaglebone/board.c
> index 5717c45..fc16aea 100644
> --- a/arch/arm/boards/beaglebone/board.c
> +++ b/arch/arm/boards/beaglebone/board.c
> @@ -85,8 +85,6 @@ static int beaglebone_devices_init(void)
>
> black = is_beaglebone_black();
>
> - defaultenv_append_directory(defaultenv_beaglebone);
> -
> globalvar_add_simple("board.variant", black ? "boneblack" : "bone");
>
> printf("detected 'BeagleBone %s'\n", black ? "Black" : "White");
> diff --git a/arch/arm/boards/beaglebone/defaultenv-beaglebone/boot/sd b/arch/arm/boards/beaglebone/defaultenv-beaglebone/boot/sd
> deleted file mode 100644
> index aa94b2f..0000000
> --- a/arch/arm/boards/beaglebone/defaultenv-beaglebone/boot/sd
> +++ /dev/null
> @@ -1,6 +0,0 @@
> -#!/bin/sh
> -
> -global.bootm.image=/boot/uImage
> -global.bootm.oftree=/boot/oftree
> -#global.bootm.initrd=<path to initrd>
> -global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
> diff --git a/arch/arm/boards/beaglebone/defaultenv-beaglebone/init/usb-limit-1300 b/arch/arm/boards/beaglebone/defaultenv-beaglebone/init/usb-limit-1300
> deleted file mode 100644
> index 56313bf..0000000
> --- a/arch/arm/boards/beaglebone/defaultenv-beaglebone/init/usb-limit-1300
> +++ /dev/null
> @@ -1,5 +0,0 @@
> -#!/bin/sh
> -
> -echo -n "changing USB current limit to 1300 mA... "
> -i2c_write -b 0 -a 0x24 -r 0x01 0x3e
> -echo "done"
> --
> 1.9.1
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 4/5] arm: boards: beaglebone: Delete default env
2017-05-08 12:57 ` Sascha Hauer
@ 2017-05-09 9:58 ` Daniel Schultz
0 siblings, 0 replies; 9+ messages in thread
From: Daniel Schultz @ 2017-05-09 9:58 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
Hi Sascha,
Am 08.05.2017 um 14:57 schrieb Sascha Hauer:
> Hi Daniel,
>
> On Fri, May 05, 2017 at 04:46:57PM +0200, Daniel Schultz wrote:
>> The Beaglebone environment should be set from outside with an application
>> specific environment.
>
> I don't understand this. What are you trying to archieve and why?
>
I thought you prefer the bootloader spec way without a predefined
environment, but maybe I just had misunderstood you. If so, I will only
change the mount path of the boot partition.
--
Mit freundlichen Grüßen,
With best regards,
Daniel Schultz
> Sascha
>
>>
>> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
>> ---
>> arch/arm/boards/beaglebone/Makefile | 1 -
>> arch/arm/boards/beaglebone/board.c | 2 --
>> arch/arm/boards/beaglebone/defaultenv-beaglebone/boot/sd | 6 ------
>> .../arm/boards/beaglebone/defaultenv-beaglebone/init/usb-limit-1300 | 5 -----
>> 4 files changed, 14 deletions(-)
>> delete mode 100644 arch/arm/boards/beaglebone/defaultenv-beaglebone/boot/sd
>> delete mode 100644 arch/arm/boards/beaglebone/defaultenv-beaglebone/init/usb-limit-1300
>>
>> diff --git a/arch/arm/boards/beaglebone/Makefile b/arch/arm/boards/beaglebone/Makefile
>> index 21a1a29..092c31d 100644
>> --- a/arch/arm/boards/beaglebone/Makefile
>> +++ b/arch/arm/boards/beaglebone/Makefile
>> @@ -1,3 +1,2 @@
>> lwl-y += lowlevel.o
>> obj-y += board.o
>> -bbenv-y += defaultenv-beaglebone
>> diff --git a/arch/arm/boards/beaglebone/board.c b/arch/arm/boards/beaglebone/board.c
>> index 5717c45..fc16aea 100644
>> --- a/arch/arm/boards/beaglebone/board.c
>> +++ b/arch/arm/boards/beaglebone/board.c
>> @@ -85,8 +85,6 @@ static int beaglebone_devices_init(void)
>>
>> black = is_beaglebone_black();
>>
>> - defaultenv_append_directory(defaultenv_beaglebone);
>> -
>> globalvar_add_simple("board.variant", black ? "boneblack" : "bone");
>>
>> printf("detected 'BeagleBone %s'\n", black ? "Black" : "White");
>> diff --git a/arch/arm/boards/beaglebone/defaultenv-beaglebone/boot/sd b/arch/arm/boards/beaglebone/defaultenv-beaglebone/boot/sd
>> deleted file mode 100644
>> index aa94b2f..0000000
>> --- a/arch/arm/boards/beaglebone/defaultenv-beaglebone/boot/sd
>> +++ /dev/null
>> @@ -1,6 +0,0 @@
>> -#!/bin/sh
>> -
>> -global.bootm.image=/boot/uImage
>> -global.bootm.oftree=/boot/oftree
>> -#global.bootm.initrd=<path to initrd>
>> -global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
>> diff --git a/arch/arm/boards/beaglebone/defaultenv-beaglebone/init/usb-limit-1300 b/arch/arm/boards/beaglebone/defaultenv-beaglebone/init/usb-limit-1300
>> deleted file mode 100644
>> index 56313bf..0000000
>> --- a/arch/arm/boards/beaglebone/defaultenv-beaglebone/init/usb-limit-1300
>> +++ /dev/null
>> @@ -1,5 +0,0 @@
>> -#!/bin/sh
>> -
>> -echo -n "changing USB current limit to 1300 mA... "
>> -i2c_write -b 0 -a 0x24 -r 0x01 0x3e
>> -echo "done"
>> --
>> 1.9.1
>>
>>
>> _______________________________________________
>> barebox mailing list
>> barebox@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/barebox
>>
>
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 5/5] arm: boards: afi-gf: Update SD card boot script
2017-05-05 14:46 [PATCH v2 1/5] arm: mach-omap: Change mountpoint of boot partitions Daniel Schultz
` (2 preceding siblings ...)
2017-05-05 14:46 ` [PATCH v2 4/5] arm: boards: beaglebone: Delete default env Daniel Schultz
@ 2017-05-05 14:46 ` Daniel Schultz
2017-05-11 9:14 ` [PATCH v2 1/5] arm: mach-omap: Change mountpoint of boot partitions Sascha Hauer
4 siblings, 0 replies; 9+ messages in thread
From: Daniel Schultz @ 2017-05-05 14:46 UTC (permalink / raw)
To: barebox
The default mount path for SD cards changed from /boot to /mnt/mmc0.0.
Updated paths in SD card boot script.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
arch/arm/boards/afi-gf/defaultenv-gf/boot/sd | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boards/afi-gf/defaultenv-gf/boot/sd b/arch/arm/boards/afi-gf/defaultenv-gf/boot/sd
index aa94b2f..1a6fab5 100644
--- a/arch/arm/boards/afi-gf/defaultenv-gf/boot/sd
+++ b/arch/arm/boards/afi-gf/defaultenv-gf/boot/sd
@@ -1,6 +1,6 @@
#!/bin/sh
-global.bootm.image=/boot/uImage
-global.bootm.oftree=/boot/oftree
+global.bootm.image=/mnt/mmc0.0/uImage
+global.bootm.oftree=/mnt/mmc0.0/oftree
#global.bootm.initrd=<path to initrd>
global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/5] arm: mach-omap: Change mountpoint of boot partitions
2017-05-05 14:46 [PATCH v2 1/5] arm: mach-omap: Change mountpoint of boot partitions Daniel Schultz
` (3 preceding siblings ...)
2017-05-05 14:46 ` [PATCH v2 5/5] arm: boards: afi-gf: Update SD card boot script Daniel Schultz
@ 2017-05-11 9:14 ` Sascha Hauer
2017-05-12 11:20 ` Daniel Schultz
4 siblings, 1 reply; 9+ messages in thread
From: Sascha Hauer @ 2017-05-11 9:14 UTC (permalink / raw)
To: Daniel Schultz; +Cc: barebox
Hi Daniel,
Your series wasn't forgotten. It's only that it took me some time to try
and implement links to directories. With this series I just sent and
"fs: Create automount entries for the default mount pathes" you should
be able to make this series a bit nicer. What I think of is that /boot
becomes a link to /mnt/mmcx.y or whatever provided /boot previously.
Could you give it a try?
Sascha
> If using EMMC and SD as bootsources, mounting the boot partition of both
> devices to /boot makes trouble. Either the correct device is mounted to
> /boot or a remount of /boot has to be performed.
>
> To ensure this problem each MMCn bootsource will be mounted to his own
> path in /mnt/mmcN.0
>
> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
> ---
> arch/arm/mach-omap/omap_generic.c | 31 ++++++++++++++++++++-----------
> 1 file changed, 20 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm/mach-omap/omap_generic.c b/arch/arm/mach-omap/omap_generic.c
> index 1d03eac..aa7424d 100644
> --- a/arch/arm/mach-omap/omap_generic.c
> +++ b/arch/arm/mach-omap/omap_generic.c
> @@ -113,12 +113,15 @@ const char *omap_get_bootmmc_devname(void)
> }
>
> #if defined(CONFIG_ENV_HANDLING)
> -#define ENV_PATH "/boot/barebox.env"
> +static char *envpath = "/mnt/mmc0.0/barebox.env";
> +
> static int omap_env_init(void)
> {
> - char *partname;
> - const char *diskdev;
> int ret;
> + const char *diskdev;
> + char *partname;
> + struct cdev *cdev;
> + const char *rootpath;
>
> if (bootsource_get() != BOOTSOURCE_MMC)
> return 0;
> @@ -129,18 +132,24 @@ static int omap_env_init(void)
> diskdev = "disk0";
>
> device_detect_by_name(diskdev);
> + partname = basprintf("%s.0", diskdev);
> + cdev = cdev_by_name(partname);
> + if (cdev == NULL) {
> + pr_err("Failed to get device %s\n", partname);
> + goto out;
> + }
>
> - partname = basprintf("/dev/%s.0", diskdev);
> -
> - mkdir("/boot", 0666);
> - ret = mount(partname, "fat", "/boot", NULL);
> - if (ret) {
> - pr_err("Failed to load environment: mount %s failed (%d)\n", partname, ret);
> + rootpath = cdev_mount_default(cdev, NULL);
> + if (IS_ERR(rootpath)) {
> + pr_err("Failed to load environment: mount %s failed (%d)\n",
> + cdev->name, IS_ERR(rootpath));
> goto out;
> }
> + envpath = basprintf("%s/barebox.env", rootpath);
>
> - pr_debug("Loading default env from %s on device %s\n", ENV_PATH, partname);
> - default_environment_path_set(ENV_PATH);
> + pr_debug("Loading default env from %s on device %s\n", envpath,
> + partname);
> + default_environment_path_set(envpath);
>
> out:
> free(partname);
> --
> 1.9.1
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/5] arm: mach-omap: Change mountpoint of boot partitions
2017-05-11 9:14 ` [PATCH v2 1/5] arm: mach-omap: Change mountpoint of boot partitions Sascha Hauer
@ 2017-05-12 11:20 ` Daniel Schultz
0 siblings, 0 replies; 9+ messages in thread
From: Daniel Schultz @ 2017-05-12 11:20 UTC (permalink / raw)
To: barebox
Hi,
Am 11.05.2017 um 11:14 schrieb Sascha Hauer:
> Hi Daniel,
>
> Your series wasn't forgotten. It's only that it took me some time to try
> and implement links to directories. With this series I just sent and
> "fs: Create automount entries for the default mount pathes" you should
> be able to make this series a bit nicer. What I think of is that /boot
> becomes a link to /mnt/mmcx.y or whatever provided /boot previously.
>
> Could you give it a try?
I added this to the newest patch series. Now, all AM335x boards can
either boot from /boot or one of the /mnt/ boot partitions. Non Phytec
Boards won't need an environment change. Thanks!
You can decide if you want the 4th path (delete BBB environment).
Daniel
>
> Sascha
>
>> If using EMMC and SD as bootsources, mounting the boot partition of both
>> devices to /boot makes trouble. Either the correct device is mounted to
>> /boot or a remount of /boot has to be performed.
>>
>> To ensure this problem each MMCn bootsource will be mounted to his own
>> path in /mnt/mmcN.0
>>
>> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
>> ---
>> arch/arm/mach-omap/omap_generic.c | 31 ++++++++++++++++++++-----------
>> 1 file changed, 20 insertions(+), 11 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap/omap_generic.c b/arch/arm/mach-omap/omap_generic.c
>> index 1d03eac..aa7424d 100644
>> --- a/arch/arm/mach-omap/omap_generic.c
>> +++ b/arch/arm/mach-omap/omap_generic.c
>> @@ -113,12 +113,15 @@ const char *omap_get_bootmmc_devname(void)
>> }
>>
>> #if defined(CONFIG_ENV_HANDLING)
>> -#define ENV_PATH "/boot/barebox.env"
>> +static char *envpath = "/mnt/mmc0.0/barebox.env";
>> +
>> static int omap_env_init(void)
>> {
>> - char *partname;
>> - const char *diskdev;
>> int ret;
>> + const char *diskdev;
>> + char *partname;
>> + struct cdev *cdev;
>> + const char *rootpath;
>>
>> if (bootsource_get() != BOOTSOURCE_MMC)
>> return 0;
>> @@ -129,18 +132,24 @@ static int omap_env_init(void)
>> diskdev = "disk0";
>>
>> device_detect_by_name(diskdev);
>> + partname = basprintf("%s.0", diskdev);
>> + cdev = cdev_by_name(partname);
>> + if (cdev == NULL) {
>> + pr_err("Failed to get device %s\n", partname);
>> + goto out;
>> + }
>>
>> - partname = basprintf("/dev/%s.0", diskdev);
>> -
>> - mkdir("/boot", 0666);
>> - ret = mount(partname, "fat", "/boot", NULL);
>> - if (ret) {
>> - pr_err("Failed to load environment: mount %s failed (%d)\n", partname, ret);
>> + rootpath = cdev_mount_default(cdev, NULL);
>> + if (IS_ERR(rootpath)) {
>> + pr_err("Failed to load environment: mount %s failed (%d)\n",
>> + cdev->name, IS_ERR(rootpath));
>> goto out;
>> }
>> + envpath = basprintf("%s/barebox.env", rootpath);
>>
>> - pr_debug("Loading default env from %s on device %s\n", ENV_PATH, partname);
>> - default_environment_path_set(ENV_PATH);
>> + pr_debug("Loading default env from %s on device %s\n", envpath,
>> + partname);
>> + default_environment_path_set(envpath);
>>
>> out:
>> free(partname);
>> --
>> 1.9.1
>>
>>
>> _______________________________________________
>> barebox mailing list
>> barebox@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/barebox
>>
>
--
Mit freundlichen Grüßen,
With best regards,
Daniel Schultz
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread