* [PATCH v2 1/2] ARM: zii-vf610-dev: fix boot from SD
@ 2019-01-23 15:16 Vivien Didelot
2019-01-23 15:16 ` [PATCH v2 2/2] ARM: zii-vf610-dev: boot initrd " Vivien Didelot
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Vivien Didelot @ 2019-01-23 15:16 UTC (permalink / raw)
To: barebox; +Cc: Andrey Smirnov, Vivien Didelot
Since 5f99a8d40305 ("dts: VFxxx: Add aliases for ESDHC controllers"),
the SD card slot has a consistent name across all ZII Dev platforms,
including CFU1. They all use mmc1 instead of mci0 or mci1.
This allows us to completely drop the init scripts from the default
ZII VF610 Dev environment, and fix the boot/sd script.
Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
---
.../zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd | 8 ++++++--
.../defaultenv-zii-vf610-dev/init/automount-sd | 13 -------------
.../defaultenv-zii-vf610-dev/init/choose-dtb | 4 ----
3 files changed, 6 insertions(+), 19 deletions(-)
delete mode 100644 arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/init/automount-sd
delete mode 100644 arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/init/choose-dtb
diff --git a/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd b/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd
index cf8eec363..92dfae0ab 100644
--- a/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd
+++ b/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd
@@ -1,4 +1,8 @@
#!/bin/sh
-global.bootm.image=/mnt/sd/zImage
-global.bootm.oftree=/mnt/sd/${global.bootm.oftree}
+detect mmc1
+
+path="/mnt/mmc1.0"
+
+global.bootm.image="${path}/zImage"
+global.bootm.oftree="${path}/vf610-zii-${global.hostname}.dtb"
diff --git a/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/init/automount-sd b/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/init/automount-sd
deleted file mode 100644
index f44dab34e..000000000
--- a/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/init/automount-sd
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-if [ x${global.hostname} = xdev-rev-b -o x${global.hostname} = xdev-rev-c ];
-then
- global sd=0
-else
- global sd=1
-fi
-
-mkdir -p /mnt/sd
-automount /mnt/sd 'mci${global.sd}.probe=1 && mount /dev/disk${global.sd}.0 /mnt/sd'
-
-exit 0
diff --git a/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/init/choose-dtb b/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/init/choose-dtb
deleted file mode 100644
index 41a74c3a9..000000000
--- a/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/init/choose-dtb
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-global.bootm.oftree=vf610-zii-${global.hostname}.dtb
-
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] ARM: zii-vf610-dev: boot initrd from SD
2019-01-23 15:16 [PATCH v2 1/2] ARM: zii-vf610-dev: fix boot from SD Vivien Didelot
@ 2019-01-23 15:16 ` Vivien Didelot
2019-01-24 3:21 ` Andrey Smirnov
2019-01-24 3:20 ` [PATCH v2 1/2] ARM: zii-vf610-dev: fix boot " Andrey Smirnov
2019-01-24 7:37 ` Sascha Hauer
2 siblings, 1 reply; 5+ messages in thread
From: Vivien Didelot @ 2019-01-23 15:16 UTC (permalink / raw)
To: barebox; +Cc: Andrey Smirnov, Vivien Didelot
As for tftp, make use of the initramfs if one is present on the SD card.
Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
---
.../boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd b/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd
index 92dfae0ab..dd8e99ba6 100644
--- a/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd
+++ b/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd
@@ -6,3 +6,8 @@ path="/mnt/mmc1.0"
global.bootm.image="${path}/zImage"
global.bootm.oftree="${path}/vf610-zii-${global.hostname}.dtb"
+
+initramfs="${path}/initramfs"
+if [ -f "${initramfs}" ]; then
+ global.bootm.initrd="$initramfs"
+fi
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/2] ARM: zii-vf610-dev: boot initrd from SD
2019-01-23 15:16 ` [PATCH v2 2/2] ARM: zii-vf610-dev: boot initrd " Vivien Didelot
@ 2019-01-24 3:21 ` Andrey Smirnov
0 siblings, 0 replies; 5+ messages in thread
From: Andrey Smirnov @ 2019-01-24 3:21 UTC (permalink / raw)
To: Vivien Didelot; +Cc: Barebox List
On Wed, Jan 23, 2019 at 7:16 AM Vivien Didelot <vivien.didelot@gmail.com> wrote:
>
> As for tftp, make use of the initramfs if one is present on the SD card.
>
Makes sense:
Reviewed-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
> ---
> .../boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd b/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd
> index 92dfae0ab..dd8e99ba6 100644
> --- a/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd
> +++ b/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd
> @@ -6,3 +6,8 @@ path="/mnt/mmc1.0"
>
> global.bootm.image="${path}/zImage"
> global.bootm.oftree="${path}/vf610-zii-${global.hostname}.dtb"
> +
> +initramfs="${path}/initramfs"
> +if [ -f "${initramfs}" ]; then
> + global.bootm.initrd="$initramfs"
> +fi
> --
> 2.20.1
>
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] ARM: zii-vf610-dev: fix boot from SD
2019-01-23 15:16 [PATCH v2 1/2] ARM: zii-vf610-dev: fix boot from SD Vivien Didelot
2019-01-23 15:16 ` [PATCH v2 2/2] ARM: zii-vf610-dev: boot initrd " Vivien Didelot
@ 2019-01-24 3:20 ` Andrey Smirnov
2019-01-24 7:37 ` Sascha Hauer
2 siblings, 0 replies; 5+ messages in thread
From: Andrey Smirnov @ 2019-01-24 3:20 UTC (permalink / raw)
To: Vivien Didelot; +Cc: Barebox List
On Wed, Jan 23, 2019 at 7:16 AM Vivien Didelot <vivien.didelot@gmail.com> wrote:
>
> Since 5f99a8d40305 ("dts: VFxxx: Add aliases for ESDHC controllers"),
> the SD card slot has a consistent name across all ZII Dev platforms,
> including CFU1. They all use mmc1 instead of mci0 or mci1.
>
> This allows us to completely drop the init scripts from the default
> ZII VF610 Dev environment, and fix the boot/sd script.
>
Looks good to me:
Reviewed-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
> ---
> .../zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd | 8 ++++++--
> .../defaultenv-zii-vf610-dev/init/automount-sd | 13 -------------
> .../defaultenv-zii-vf610-dev/init/choose-dtb | 4 ----
> 3 files changed, 6 insertions(+), 19 deletions(-)
> delete mode 100644 arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/init/automount-sd
> delete mode 100644 arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/init/choose-dtb
>
> diff --git a/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd b/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd
> index cf8eec363..92dfae0ab 100644
> --- a/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd
> +++ b/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd
> @@ -1,4 +1,8 @@
> #!/bin/sh
>
> -global.bootm.image=/mnt/sd/zImage
> -global.bootm.oftree=/mnt/sd/${global.bootm.oftree}
> +detect mmc1
> +
> +path="/mnt/mmc1.0"
> +
> +global.bootm.image="${path}/zImage"
> +global.bootm.oftree="${path}/vf610-zii-${global.hostname}.dtb"
> diff --git a/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/init/automount-sd b/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/init/automount-sd
> deleted file mode 100644
> index f44dab34e..000000000
> --- a/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/init/automount-sd
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -#!/bin/sh
> -
> -if [ x${global.hostname} = xdev-rev-b -o x${global.hostname} = xdev-rev-c ];
> -then
> - global sd=0
> -else
> - global sd=1
> -fi
> -
> -mkdir -p /mnt/sd
> -automount /mnt/sd 'mci${global.sd}.probe=1 && mount /dev/disk${global.sd}.0 /mnt/sd'
> -
> -exit 0
> diff --git a/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/init/choose-dtb b/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/init/choose-dtb
> deleted file mode 100644
> index 41a74c3a9..000000000
> --- a/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/init/choose-dtb
> +++ /dev/null
> @@ -1,4 +0,0 @@
> -#!/bin/sh
> -
> -global.bootm.oftree=vf610-zii-${global.hostname}.dtb
> -
> --
> 2.20.1
>
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] ARM: zii-vf610-dev: fix boot from SD
2019-01-23 15:16 [PATCH v2 1/2] ARM: zii-vf610-dev: fix boot from SD Vivien Didelot
2019-01-23 15:16 ` [PATCH v2 2/2] ARM: zii-vf610-dev: boot initrd " Vivien Didelot
2019-01-24 3:20 ` [PATCH v2 1/2] ARM: zii-vf610-dev: fix boot " Andrey Smirnov
@ 2019-01-24 7:37 ` Sascha Hauer
2 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2019-01-24 7:37 UTC (permalink / raw)
To: Vivien Didelot; +Cc: Andrey Smirnov, barebox
On Wed, Jan 23, 2019 at 10:16:19AM -0500, Vivien Didelot wrote:
> Since 5f99a8d40305 ("dts: VFxxx: Add aliases for ESDHC controllers"),
> the SD card slot has a consistent name across all ZII Dev platforms,
> including CFU1. They all use mmc1 instead of mci0 or mci1.
>
> This allows us to completely drop the init scripts from the default
> ZII VF610 Dev environment, and fix the boot/sd script.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
> ---
> .../zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd | 8 ++++++--
> .../defaultenv-zii-vf610-dev/init/automount-sd | 13 -------------
> .../defaultenv-zii-vf610-dev/init/choose-dtb | 4 ----
> 3 files changed, 6 insertions(+), 19 deletions(-)
> delete mode 100644 arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/init/automount-sd
> delete mode 100644 arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/init/choose-dtb
Applied, thanks
Sascha
--
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] 5+ messages in thread
end of thread, other threads:[~2019-01-24 7:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-23 15:16 [PATCH v2 1/2] ARM: zii-vf610-dev: fix boot from SD Vivien Didelot
2019-01-23 15:16 ` [PATCH v2 2/2] ARM: zii-vf610-dev: boot initrd " Vivien Didelot
2019-01-24 3:21 ` Andrey Smirnov
2019-01-24 3:20 ` [PATCH v2 1/2] ARM: zii-vf610-dev: fix boot " Andrey Smirnov
2019-01-24 7:37 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox