From a9b4686e391edfcc4d33c0a51bf149bec32648b9 Mon Sep 17 00:00:00 2001 From: Hector Fernandez Date: Thu, 18 Jun 2020 11:49:06 +0200 Subject: IGEP0046: Added environment for hardware test. Created 2 new defconfigs. --- board/isee/igep0046/Kconfig | 5 ++ configs/igep0046_imx6dl_2G_test_defconfig | 19 ++++++ configs/igep0046_imx6q_2G_test_defconfig | 18 +++++ include/configs/igep0046.h | 105 ++++++++++++++++++++++++++++-- 4 files changed, 143 insertions(+), 4 deletions(-) create mode 100644 configs/igep0046_imx6dl_2G_test_defconfig create mode 100644 configs/igep0046_imx6q_2G_test_defconfig diff --git a/board/isee/igep0046/Kconfig b/board/isee/igep0046/Kconfig index 0e6820e..fe50871 100644 --- a/board/isee/igep0046/Kconfig +++ b/board/isee/igep0046/Kconfig @@ -22,4 +22,9 @@ config FALCON_RAMDISK bool "FALCON mode with INITRD RAMDISK support" help Builds IGEP i.MX6 boards FALCON mode with INITRD RAMDISK support + +config HWTEST + bool "ENABLE HWTEST" + default false + endif diff --git a/configs/igep0046_imx6dl_2G_test_defconfig b/configs/igep0046_imx6dl_2G_test_defconfig new file mode 100644 index 0000000..9791e23 --- /dev/null +++ b/configs/igep0046_imx6dl_2G_test_defconfig @@ -0,0 +1,19 @@ +CONFIG_ARM=y +CONFIG_ARCH_MX6=y +CONFIG_TARGET_IGEP0046=y +CONFIG_SYS_MALLOC_F=y +CONFIG_SYS_MALLOC_F_LEN=0x400 +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/isee/igep0046/mx6dl_igep0046_4x512_nt.cfg,MX6DL" +CONFIG_BOOTDELAY=3 +CONFIG_OF_LIBFDT=y +CONFIG_CMD_FDT=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_USB=y +CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_SPLASH_SCREEN=n +CONFIG_DEFAULT_FDT_FILE="imx6dl-igep-base0040rd102.dtb" +CONFIG_BASE0040=y +CONFIG_HUSH_PARSER=y +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HWTEST=y \ No newline at end of file diff --git a/configs/igep0046_imx6q_2G_test_defconfig b/configs/igep0046_imx6q_2G_test_defconfig new file mode 100644 index 0000000..3d4ba52 --- /dev/null +++ b/configs/igep0046_imx6q_2G_test_defconfig @@ -0,0 +1,18 @@ +CONFIG_ARM=y +CONFIG_ARCH_MX6=y +CONFIG_TARGET_IGEP0046=y +CONFIG_SYS_MALLOC_F=y +CONFIG_SYS_MALLOC_F_LEN=0x400 +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/isee/igep0046/mx6q_igep0046_4x512_nt.cfg,MX6Q" +CONFIG_BOOTDELAY=3 +CONFIG_OF_LIBFDT=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_USB=y +CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_SPLASH_SCREEN=n +CONFIG_DEFAULT_FDT_FILE="imx6q-igep-base0040rd102.dtb" +CONFIG_BASE0040=y +CONFIG_HUSH_PARSER=y +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HWTEST=y \ No newline at end of file diff --git a/include/configs/igep0046.h b/include/configs/igep0046.h index 21b68df..9d28418 100644 --- a/include/configs/igep0046.h +++ b/include/configs/igep0046.h @@ -209,7 +209,15 @@ else #define VIDEO_ARGS_SCRIPT "run video_args_script; " #endif + +#ifndef CONFIG_HWTEST + +/* --------------- Production Environment --------------- */ + +/* --------------- IGEP0046 Dual --------------- */ + #if defined(CONFIG_MX6DL) + #define CONFIG_EXTRA_ENV_SETTINGS \ "bootenv=uEnv.txt\0" \ "image=zImage\0" \ @@ -357,9 +365,11 @@ else "fi; " \ "fi; " \ "run netboot;" -#endif -#if defined(CONFIG_MX6Q) +/* --------------- IGEP0046 Quad --------------- */ + +#elif defined(CONFIG_MX6Q) + #define CONFIG_EXTRA_ENV_SETTINGS \ "bootenv=uEnv.txt\0" \ "bootdir=\0" \ @@ -512,12 +522,99 @@ else "fi; " \ "fi; " \ "run netboot;" -#endif -#endif /* __IGEP0046_CONFIG_H */ +#endif +#else /* defined CONFIG_HWTEST */ + +/* ------------------ Hardware Test Environment ------------------ */ + +#define ENV_NFS_ROOTFS \ + "netmask=255.255.255.0\0" \ + "dnsserver=8.8.8.8\0" \ + "machinename=noname\0" \ + "ipaddr=0.0.0.0\0" \ + "serverip=0.0.0.0\0" \ + "gateway=0.0.0.0\0" \ + "rootnfs=/\0" \ + "ipconf=setenv setup_ip ${ipaddr}:${serverip}:${gateway}:${netmask}:${machinename}:eth0:off:${dnsserver}::${serverip}\0" \ + "netload=if tftpboot ${loadaddr} ${bootfile}; then " \ + "if tftpboot ${fdt_addr} ${dtbfile}; then " \ + "bootz ${loadaddr} - ${fdt_addr}; " \ + "else " \ + "echo Failed to get DTB file from TFTP; " \ + "run errorstate; " \ + "fi; " \ + "else " \ + "echo Failed to get kernel image from TFTP; " \ + "run errorstate; " \ + "fi\0" \ + "netargs=run ipconf; " \ + "setenv bootargs console=${console},${baudrate} root=/dev/nfs rw ip=${setup_ip} " \ + "nfsroot=${serverip}:${rootnfs},v3,tcp fec.macaddr=${ethaddr} " \ + VIDEO_ARGS \ + "${kparams} \0" \ + "netboot=echo Booting from net ...; " \ + "run netargs; " \ + "run netload \0" + +#define ENV_ERRORSTATE \ + "errorstate=led 0 off; " \ + "led 1 on; " \ + "sleep 60; " \ + "reset;" + + +#define ENV_LOAD_UENV_SD_TEST \ + "sduenvboot=mmc dev ${mmcdev};" \ + "if mmc rescan; then " \ + "if fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootenv}; then " \ + "echo Loaded ${bootenv} file in RAM...; " \ + "run importbootenv; " \ + "else " \ + "echo Not found ${bootenv} file in USB...; " \ + "run errorstate; " \ + "fi; " \ + "else " \ + "echo No USB device found; " \ + "run errorstate; " \ + "fi;\0 " +#define CONFIG_EXTRA_ENV_SETTINGS \ + "console=" CONSOLE_DEV "\0" \ + "bootenv=uEnv.txt\0" \ + "bootfile=zImage\0" \ + "mmcdev=0\0" \ + "mmcpart=1\0" \ + "ethaddr=\0" \ + "dtbfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ + "fdt_high=0xffffffff\0" \ + "initrd_high=0xffffffff\0" \ + "fdt_addr=0x18000000\0" \ + "importbootenv= echo Importing uEnv.txt variables...; " \ + "env import -t ${loadaddr} ${filesize}\0" \ + "video_args_hdmi=setenv video_args $video_args " \ + "video=mxcfb${fb}:dev=hdmi,1920x1080M@60,if=RGB24\0" \ + "video_args_lvds=setenv video_args $video_args " \ + "video=mxcfb${fb}:dev=ldb,1280x720M@60,if=RGB24\0" \ + "fb=0\0" \ + "video_interfaces=hdmi lvds\0" \ + "video_args_script=" \ + "for v in ${video_interfaces}; do " \ + "run video_args_${v}; " \ + "setexpr fb $fb + 1; " \ + "done\0" \ + ENV_NFS_ROOTFS \ + ENV_LOAD_UENV_SD_TEST \ + ENV_ERRORSTATE +#define CONFIG_BOOTCOMMAND \ + "led 0 on;" \ + "run sduenvboot;" \ + VIDEO_ARGS_SCRIPT \ + "run netboot" +#endif /*CONFIG_HWTEST*/ +#endif /* __IGEP0046_CONFIG_H */ -- cgit v1.1