diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2019-05-31 11:47:28 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-06-04 09:54:59 +0200 |
commit | 207c42850e481acf7a6247ae4f34541b0a0142ec (patch) | |
tree | ca384bcdf068095298dab0f0beaa72ef68846a41 /arch/arm/boards | |
parent | 77d192699c65a492b7b7767d4260158d853d225a (diff) | |
download | barebox-207c42850e481acf7a6247ae4f34541b0a0142ec.tar.gz barebox-207c42850e481acf7a6247ae4f34541b0a0142ec.tar.xz |
ARM: zii-imx8mq-dev: add barebox and environment partition
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>
Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards')
-rw-r--r-- | arch/arm/boards/zii-imx8mq-dev/board.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/boards/zii-imx8mq-dev/board.c b/arch/arm/boards/zii-imx8mq-dev/board.c index 94e71f58ce..4dbe23f58c 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); |