Add eth1-discover script to run USB detection if eth0 is disabled. The eth0 will be automatically disabled if the no on-board switch is detected. Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> --- arch/arm/boards/skov-imx6/Makefile | 1 + arch/arm/boards/skov-imx6/board.c | 3 +++ .../skov-imx6/defaultenv-skov-imx6/network/eth1-discover | 8 ++++++++ 3 files changed, 12 insertions(+) create mode 100644 arch/arm/boards/skov-imx6/defaultenv-skov-imx6/network/eth1-discover diff --git a/arch/arm/boards/skov-imx6/Makefile b/arch/arm/boards/skov-imx6/Makefile index a5e85bc1e1..07b87ff11d 100644 --- a/arch/arm/boards/skov-imx6/Makefile +++ b/arch/arm/boards/skov-imx6/Makefile @@ -1,3 +1,4 @@ obj-y += board.o lwl-y += lowlevel.o obj-pbl-y += version.o +bbenv-y += defaultenv-skov-imx6 diff --git a/arch/arm/boards/skov-imx6/board.c b/arch/arm/boards/skov-imx6/board.c index b91033afc1..cd7b8e208d 100644 --- a/arch/arm/boards/skov-imx6/board.c +++ b/arch/arm/boards/skov-imx6/board.c @@ -5,6 +5,7 @@ #include <bootsource.h> #include <common.h> #include <deep-probe.h> +#include <envfs.h> #include <environment.h> #include <globalvar.h> #include <gpio.h> @@ -651,6 +652,8 @@ static int skov_imx6_probe(struct device_d *dev) skov_init_board(variant); + defaultenv_append_directory(defaultenv_skov_imx6); + return 0; } diff --git a/arch/arm/boards/skov-imx6/defaultenv-skov-imx6/network/eth1-discover b/arch/arm/boards/skov-imx6/defaultenv-skov-imx6/network/eth1-discover new file mode 100644 index 0000000000..e11a3f9006 --- /dev/null +++ b/arch/arm/boards/skov-imx6/defaultenv-skov-imx6/network/eth1-discover @@ -0,0 +1,8 @@ +#!/bin/sh + +# Some boards doesn't have a ETH port, but may have USB network attached +if [ "$eth0.mode" != "disabled" ]; then + exit 0; +fi + +usb -- 2.30.2 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox