* [PATCH 1/3] ARM: zii-imx8mq-dev: add barebox and environment partition
@ 2019-05-31 9:47 Lucas Stach
2019-05-31 9:47 ` [PATCH 2/3] ARM: zii-imx8mq-dev: add defaultenv with simple boot configuration Lucas Stach
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Lucas Stach @ 2019-05-31 9:47 UTC (permalink / raw)
To: barebox
While barebox itself should be on the eMMC boot partitions eventually
it's nice to have this set up, so one can dd a prebuilt SD card image
to the eMMC and have something working. A working Barebox env is also
very convinient to have around during development.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
arch/arm/boards/zii-imx8mq-dev/board.c | 6 +++++
arch/arm/dts/imx8mq-zii-ultra.dtsi | 37 ++++++++++++++++++++++++++
2 files changed, 43 insertions(+)
diff --git a/arch/arm/boards/zii-imx8mq-dev/board.c b/arch/arm/boards/zii-imx8mq-dev/board.c
index 94e71f58ceb7..4dbe23f58ce2 100644
--- a/arch/arm/boards/zii-imx8mq-dev/board.c
+++ b/arch/arm/boards/zii-imx8mq-dev/board.c
@@ -4,6 +4,7 @@
* Author: Andrey Smirnov <andrew.smirnov@gmail.com>
*/
+#include <bootsource.h>
#include <common.h>
#include <init.h>
#include <asm/memory.h>
@@ -19,6 +20,11 @@ static int zii_imx8mq_dev_init(void)
imx8mq_bbu_internal_mmcboot_register_handler("eMMC", "/dev/mmc0", 0);
+ if (bootsource_get_instance() == 0)
+ of_device_enable_path("/chosen/environment-emmc");
+ else
+ of_device_enable_path("/chosen/environment-sd");
+
return 0;
}
device_initcall(zii_imx8mq_dev_init);
diff --git a/arch/arm/dts/imx8mq-zii-ultra.dtsi b/arch/arm/dts/imx8mq-zii-ultra.dtsi
index ccf80d3de838..53679b0d3c40 100644
--- a/arch/arm/dts/imx8mq-zii-ultra.dtsi
+++ b/arch/arm/dts/imx8mq-zii-ultra.dtsi
@@ -10,6 +10,17 @@
/ {
chosen {
stdout-path = &uart1;
+
+ environment-emmc {
+ compatible = "barebox,environment";
+ device-path = &usdhc1, "partname:barebox-environment";
+ status = "disabled";
+ };
+ environment-sd {
+ compatible = "barebox,environment";
+ device-path = &usdhc2, "partname:barebox-environment";
+ status = "disabled";
+ };
};
mdio0: bitbang-mdio {
@@ -348,6 +359,19 @@
no-sd;
no-sdio;
status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "barebox";
+ reg = <0x0 0xe0000>;
+ };
+
+ partition@e0000 {
+ label = "barebox-environment";
+ reg = <0xe0000 0x20000>;
+ };
};
&usdhc2 {
@@ -358,6 +382,19 @@
cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
vmmc-supply = <®_usdhc2_vmmc>;
status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "barebox";
+ reg = <0x0 0xe0000>;
+ };
+
+ partition@e0000 {
+ label = "barebox-environment";
+ reg = <0xe0000 0x20000>;
+ };
};
&iomuxc {
--
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 2/3] ARM: zii-imx8mq-dev: add defaultenv with simple boot configuration
2019-05-31 9:47 [PATCH 1/3] ARM: zii-imx8mq-dev: add barebox and environment partition Lucas Stach
@ 2019-05-31 9:47 ` Lucas Stach
2019-05-31 9:47 ` [PATCH 3/3] ARM: rdu3: disable i210 network interface Lucas Stach
2019-06-04 7:55 ` [PATCH 1/3] ARM: zii-imx8mq-dev: add barebox and environment partition Sascha Hauer
2 siblings, 0 replies; 5+ messages in thread
From: Lucas Stach @ 2019-05-31 9:47 UTC (permalink / raw)
To: barebox
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
arch/arm/boards/zii-imx8mq-dev/Makefile | 1 +
arch/arm/boards/zii-imx8mq-dev/board.c | 3 +++
.../defaultenv-imx8mq-zii-dev/boot/net | 24 +++++++++++++++++++
.../defaultenv-imx8mq-zii-dev/boot/nfs | 6 +++++
.../boot/rdu-default | 7 ++++++
.../nv/autoboot_abort_key | 1 +
.../defaultenv-imx8mq-zii-dev/nv/boot.default | 1 +
7 files changed, 43 insertions(+)
create mode 100644 arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/boot/net
create mode 100644 arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/boot/nfs
create mode 100644 arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/boot/rdu-default
create mode 100644 arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/nv/autoboot_abort_key
create mode 100644 arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/nv/boot.default
diff --git a/arch/arm/boards/zii-imx8mq-dev/Makefile b/arch/arm/boards/zii-imx8mq-dev/Makefile
index 2995f06f0fd9..d0148b506752 100644
--- a/arch/arm/boards/zii-imx8mq-dev/Makefile
+++ b/arch/arm/boards/zii-imx8mq-dev/Makefile
@@ -1,2 +1,3 @@
obj-y += board.o
lwl-y += lowlevel.o ddr_init.o ddrphy_train.o
+bbenv-y += defaultenv-imx8mq-zii-dev
diff --git a/arch/arm/boards/zii-imx8mq-dev/board.c b/arch/arm/boards/zii-imx8mq-dev/board.c
index 4dbe23f58ce2..144adb9cef18 100644
--- a/arch/arm/boards/zii-imx8mq-dev/board.c
+++ b/arch/arm/boards/zii-imx8mq-dev/board.c
@@ -6,6 +6,7 @@
#include <bootsource.h>
#include <common.h>
+#include <envfs.h>
#include <init.h>
#include <asm/memory.h>
#include <linux/sizes.h>
@@ -25,6 +26,8 @@ static int zii_imx8mq_dev_init(void)
else
of_device_enable_path("/chosen/environment-sd");
+ defaultenv_append_directory(defaultenv_imx8mq_zii_dev);
+
return 0;
}
device_initcall(zii_imx8mq_dev_init);
diff --git a/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/boot/net b/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/boot/net
new file mode 100644
index 000000000000..4090c2f4a9ae
--- /dev/null
+++ b/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/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-imx8mq-dev/defaultenv-imx8mq-zii-dev/boot/nfs b/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/boot/nfs
new file mode 100644
index 000000000000..cd3a545409cb
--- /dev/null
+++ b/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/boot/nfs
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# clear seat network config
+global.linux.bootargs.rdu_network=
+
+boot /mnt/nfs
diff --git a/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/boot/rdu-default b/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/boot/rdu-default
new file mode 100644
index 000000000000..f5d8fe2125d0
--- /dev/null
+++ b/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/boot/rdu-default
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [ "$bootsource_instance" = "0" ]; then
+ boot mmc0
+else
+ boot mmc1
+fi
diff --git a/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/nv/autoboot_abort_key b/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/nv/autoboot_abort_key
new file mode 100644
index 000000000000..55920c9a58ca
--- /dev/null
+++ b/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/nv/autoboot_abort_key
@@ -0,0 +1 @@
+ctrl-c
\ No newline at end of file
diff --git a/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/nv/boot.default b/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/nv/boot.default
new file mode 100644
index 000000000000..9076a1e64eb5
--- /dev/null
+++ b/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/nv/boot.default
@@ -0,0 +1 @@
+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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/3] ARM: rdu3: disable i210 network interface
2019-05-31 9:47 [PATCH 1/3] ARM: zii-imx8mq-dev: add barebox and environment partition Lucas Stach
2019-05-31 9:47 ` [PATCH 2/3] ARM: zii-imx8mq-dev: add defaultenv with simple boot configuration Lucas Stach
@ 2019-05-31 9:47 ` Lucas Stach
2019-05-31 15:08 ` Vivien Didelot
2019-06-04 7:55 ` [PATCH 1/3] ARM: zii-imx8mq-dev: add barebox and environment partition Sascha Hauer
2 siblings, 1 reply; 5+ messages in thread
From: Lucas Stach @ 2019-05-31 9:47 UTC (permalink / raw)
To: barebox
This causes large timeouts when trying to bring it up. The FEC interface
is good enough for NFS booting.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
.../zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/nv/dev.eth1.mode | 1 +
1 file changed, 1 insertion(+)
create mode 100644 arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/nv/dev.eth1.mode
diff --git a/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/nv/dev.eth1.mode b/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/nv/dev.eth1.mode
new file mode 100644
index 000000000000..87e7bdaaecfc
--- /dev/null
+++ b/arch/arm/boards/zii-imx8mq-dev/defaultenv-imx8mq-zii-dev/nv/dev.eth1.mode
@@ -0,0 +1 @@
+disabled
\ No newline at end of file
--
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 3/3] ARM: rdu3: disable i210 network interface
2019-05-31 9:47 ` [PATCH 3/3] ARM: rdu3: disable i210 network interface Lucas Stach
@ 2019-05-31 15:08 ` Vivien Didelot
0 siblings, 0 replies; 5+ messages in thread
From: Vivien Didelot @ 2019-05-31 15:08 UTC (permalink / raw)
To: Lucas Stach; +Cc: barebox
On Fri, 31 May 2019 11:47:30 +0200, Lucas Stach <l.stach@pengutronix.de> wrote:
> This causes large timeouts when trying to bring it up. The FEC interface
> is good enough for NFS booting.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Makes sense, I pushed a similar patch for the Dev Boards.
Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
_______________________________________________
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 1/3] ARM: zii-imx8mq-dev: add barebox and environment partition
2019-05-31 9:47 [PATCH 1/3] ARM: zii-imx8mq-dev: add barebox and environment partition Lucas Stach
2019-05-31 9:47 ` [PATCH 2/3] ARM: zii-imx8mq-dev: add defaultenv with simple boot configuration Lucas Stach
2019-05-31 9:47 ` [PATCH 3/3] ARM: rdu3: disable i210 network interface Lucas Stach
@ 2019-06-04 7:55 ` Sascha Hauer
2 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2019-06-04 7:55 UTC (permalink / raw)
To: Lucas Stach; +Cc: barebox
On Fri, May 31, 2019 at 11:47:28AM +0200, Lucas Stach wrote:
> While barebox itself should be on the eMMC boot partitions eventually
> it's nice to have this set up, so one can dd a prebuilt SD card image
> to the eMMC and have something working. A working Barebox env is also
> very convinient to have around during development.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> arch/arm/boards/zii-imx8mq-dev/board.c | 6 +++++
> arch/arm/dts/imx8mq-zii-ultra.dtsi | 37 ++++++++++++++++++++++++++
> 2 files changed, 43 insertions(+)
Applied, thanks
Sascha
>
> diff --git a/arch/arm/boards/zii-imx8mq-dev/board.c b/arch/arm/boards/zii-imx8mq-dev/board.c
> index 94e71f58ceb7..4dbe23f58ce2 100644
> --- a/arch/arm/boards/zii-imx8mq-dev/board.c
> +++ b/arch/arm/boards/zii-imx8mq-dev/board.c
> @@ -4,6 +4,7 @@
> * Author: Andrey Smirnov <andrew.smirnov@gmail.com>
> */
>
> +#include <bootsource.h>
> #include <common.h>
> #include <init.h>
> #include <asm/memory.h>
> @@ -19,6 +20,11 @@ static int zii_imx8mq_dev_init(void)
>
> imx8mq_bbu_internal_mmcboot_register_handler("eMMC", "/dev/mmc0", 0);
>
> + if (bootsource_get_instance() == 0)
> + of_device_enable_path("/chosen/environment-emmc");
> + else
> + of_device_enable_path("/chosen/environment-sd");
> +
> return 0;
> }
> device_initcall(zii_imx8mq_dev_init);
> diff --git a/arch/arm/dts/imx8mq-zii-ultra.dtsi b/arch/arm/dts/imx8mq-zii-ultra.dtsi
> index ccf80d3de838..53679b0d3c40 100644
> --- a/arch/arm/dts/imx8mq-zii-ultra.dtsi
> +++ b/arch/arm/dts/imx8mq-zii-ultra.dtsi
> @@ -10,6 +10,17 @@
> / {
> chosen {
> stdout-path = &uart1;
> +
> + environment-emmc {
> + compatible = "barebox,environment";
> + device-path = &usdhc1, "partname:barebox-environment";
> + status = "disabled";
> + };
> + environment-sd {
> + compatible = "barebox,environment";
> + device-path = &usdhc2, "partname:barebox-environment";
> + status = "disabled";
> + };
> };
>
> mdio0: bitbang-mdio {
> @@ -348,6 +359,19 @@
> no-sd;
> no-sdio;
> status = "okay";
> +
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + partition@0 {
> + label = "barebox";
> + reg = <0x0 0xe0000>;
> + };
> +
> + partition@e0000 {
> + label = "barebox-environment";
> + reg = <0xe0000 0x20000>;
> + };
> };
>
> &usdhc2 {
> @@ -358,6 +382,19 @@
> cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
> vmmc-supply = <®_usdhc2_vmmc>;
> status = "okay";
> +
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + partition@0 {
> + label = "barebox";
> + reg = <0x0 0xe0000>;
> + };
> +
> + partition@e0000 {
> + label = "barebox-environment";
> + reg = <0xe0000 0x20000>;
> + };
> };
>
> &iomuxc {
> --
> 2.20.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] 5+ messages in thread
end of thread, other threads:[~2019-06-04 7:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-31 9:47 [PATCH 1/3] ARM: zii-imx8mq-dev: add barebox and environment partition Lucas Stach
2019-05-31 9:47 ` [PATCH 2/3] ARM: zii-imx8mq-dev: add defaultenv with simple boot configuration Lucas Stach
2019-05-31 9:47 ` [PATCH 3/3] ARM: rdu3: disable i210 network interface Lucas Stach
2019-05-31 15:08 ` Vivien Didelot
2019-06-04 7:55 ` [PATCH 1/3] ARM: zii-imx8mq-dev: add barebox and environment partition Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox