From b1c95cc7044e9afbf23e91720a81aa7deacd4a51 Mon Sep 17 00:00:00 2001 From: Moses Christopher Date: Wed, 25 Mar 2020 06:45:44 +0000 Subject: am335x, guardian: fix spl usb-eth boot - On Guardian board, usb-eth boot in SPL stage fails due to certain misconfiguration. Hence, add the same to fix the issue. - configs are set based on the conditional statement present in arch/arm/mach-omap2/am33xx/board.c - disable tiny printf in SPL stage: As the library is optimized, the ability to deal with ethaddr is lost. The following message would be printed on the console, Error: flags type check failure for "ethaddr" <= "80a81144M" (type: m) Error inserting "ethaddr" variable, errno=1 Signed-off-by: Moses Christopher --- include/configs/am335x_guardian.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/configs') diff --git a/include/configs/am335x_guardian.h b/include/configs/am335x_guardian.h index 0e20d6c7289..6b9b6a28e96 100644 --- a/include/configs/am335x_guardian.h +++ b/include/configs/am335x_guardian.h @@ -109,4 +109,9 @@ #endif /* CONFIG_MTD_RAW_NAND */ +#define CONFIG_AM335X_USB0 +#define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL +#define CONFIG_AM335X_USB1 +#define CONFIG_AM335X_USB1_MODE MUSB_HOST + #endif /* ! __CONFIG_AM335X_GUARDIAN_H */ -- cgit v1.2.3 From 9b76b4c23e0107fabce10afde30fa0d2f89f62cb Mon Sep 17 00:00:00 2001 From: Moses Christopher Date: Wed, 25 Mar 2020 06:45:46 +0000 Subject: am335x, guardian: boot count is stored in AM3352 RTC block - Move bootlimit to defconfig - Store bootcount in RTC block Signed-off-by: Moses Christopher --- include/configs/am335x_guardian.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/configs') diff --git a/include/configs/am335x_guardian.h b/include/configs/am335x_guardian.h index 6b9b6a28e96..3c6147a2661 100644 --- a/include/configs/am335x_guardian.h +++ b/include/configs/am335x_guardian.h @@ -46,7 +46,6 @@ AM335XX_BOARD_FDTFILE \ MEM_LAYOUT_ENV_SETTINGS \ BOOTENV \ - "bootlimit=3\0" \ "bootubivol=rootfs\0" \ "altbootcmd=" \ "setenv boot_config \"extlinux-rollback.conf\"; " \ -- cgit v1.2.3 From a31216772a709b39b34af3853d7c62019902233a Mon Sep 17 00:00:00 2001 From: Moses Christopher Date: Wed, 25 Mar 2020 06:45:47 +0000 Subject: am335x, guardian: load env from NAND - As there is a requirement to store certain data, we need a persistent storage in u-boot. Hence, we need to save env in NAND - Add default Guardian environment variables - Update partition table: - Reserve some space for experimentation, this ensures proper backwards compatibility - Update defconfig accordingly Signed-off-by: Moses Christopher --- include/configs/am335x_guardian.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/configs') diff --git a/include/configs/am335x_guardian.h b/include/configs/am335x_guardian.h index 3c6147a2661..1ac5e2e240e 100644 --- a/include/configs/am335x_guardian.h +++ b/include/configs/am335x_guardian.h @@ -42,10 +42,23 @@ #include +#define GUARDIAN_DEFAULT_PROD_ENV \ + "factory_assembly_status=0\0" \ + "main_pcba_part_number=0\0" \ + "main_pcba_supplier=0\0" \ + "main_pcba_timestamp=0\0" \ + "main_pcba_hardware_version=0\0" \ + "main_pcba_id=0\0" \ + "main_pcba_aux_1=0\0" \ + "main_pcba_aux_2=0\0" \ + "main_pcba_aux_3=0\0" \ + "main_pcba_aux_4=0\0" \ + #define CONFIG_EXTRA_ENV_SETTINGS \ AM335XX_BOARD_FDTFILE \ MEM_LAYOUT_ENV_SETTINGS \ BOOTENV \ + GUARDIAN_DEFAULT_PROD_ENV \ "bootubivol=rootfs\0" \ "altbootcmd=" \ "setenv boot_config \"extlinux-rollback.conf\"; " \ -- cgit v1.2.3 From 360ced61bdd9703a07845b76acd3e3b87bc0444d Mon Sep 17 00:00:00 2001 From: Moses Christopher Date: Wed, 25 Mar 2020 06:45:48 +0000 Subject: am335x, guardian: update boot mechanism - Add a boot logic in the distro boot command - Add fallback mechanism in alternate boot command - Keep single boot target -> ubifs0 Signed-off-by: Moses Christopher --- include/configs/am335x_guardian.h | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'include/configs') diff --git a/include/configs/am335x_guardian.h b/include/configs/am335x_guardian.h index 1ac5e2e240e..c34c07a493c 100644 --- a/include/configs/am335x_guardian.h +++ b/include/configs/am335x_guardian.h @@ -34,9 +34,7 @@ "ramdisk_addr_r=0x88080000\0" \ #define BOOT_TARGET_DEVICES(func) \ - func(UBIFS, ubifs, 0) \ - func(PXE, pxe, na) \ - func(DHCP, dhcp, na) + func(UBIFS, ubifs, 0) #define AM335XX_BOARD_FDTFILE "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" @@ -60,9 +58,25 @@ BOOTENV \ GUARDIAN_DEFAULT_PROD_ENV \ "bootubivol=rootfs\0" \ + "distro_bootcmd=" \ + "setenv autoload no; " \ + "setenv rootflags \"bulk_read,chk_data_crc\"; " \ + "setenv ethact usb_ether; " \ + "if test \"${swi_status}\" -eq 1; then " \ + "setenv extrabootargs \"swi_attached\"; " \ + "if dhcp; then " \ + "sleep 1; " \ + "if tftp \"${tftp_load_addr}\" \"bootscript.scr\"; then " \ + "source \"${tftp_load_addr}\"; " \ + "fi; " \ + "fi; " \ + "fi;" \ + "run bootcmd_ubifs0;\0" \ "altbootcmd=" \ - "setenv boot_config \"extlinux-rollback.conf\"; " \ - "run distro_bootcmd\0" + "setenv boot_syslinux_conf \"extlinux/extlinux-rollback.conf\"; " \ + "run distro_bootcmd; " \ + "setenv boot_syslinux_conf \"extlinux/extlinux.conf\"; " \ + "run bootcmd_ubifs0;\0" #endif /* ! CONFIG_SPL_BUILD */ -- cgit v1.2.3