From a8f2c75ad7f37519c1d883df63446e38b09597bd Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Fri, 16 Mar 2018 12:25:12 -0500 Subject: [PATCH] am335x_evm: uEnv.txt, bootz, n fixes Signed-off-by: Robert Nelson --- board/ti/am335x/board.c | 120 +++++++++++---- board/ti/am335x/board.h | 48 +++++- board/ti/am335x/mux.c | 18 ++- configs/am335x_boneblack_defconfig | 7 +- configs/am335x_evm_defconfig | 44 +++--- env/Kconfig | 1 + env/common.c | 2 + include/configs/am335x_evm.h | 101 ++++++++++++- include/configs/ti_am335x_common.h | 2 + include/configs/ti_armv7_common.h | 299 +++++++++++++++++++++++++++++++++++++ include/environment/ti/mmc.h | 67 +++++++-- 11 files changed, 631 insertions(+), 78 deletions(-) diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index b144fd1821..32d5752881 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -84,6 +84,8 @@ struct serial_device *default_serial_console(void) { if (board_is_icev2()) return &eserial4_device; + else if (board_is_beaglelogic()) + return &eserial5_device; else return &eserial1_device; } @@ -264,7 +266,7 @@ const struct dpll_params *get_dpll_ddr_params(void) if (board_is_evm_sk()) return &dpll_ddr3_303MHz[ind]; - else if (board_is_bone_lt() || board_is_icev2()) + else if (board_is_pb() || board_is_bone_lt() || board_is_icev2() || board_is_beaglelogic()) return &dpll_ddr3_400MHz[ind]; else if (board_is_evm_15_or_later()) return &dpll_ddr3_303MHz[ind]; @@ -274,7 +276,7 @@ const struct dpll_params *get_dpll_ddr_params(void) static u8 bone_not_connected_to_ac_power(void) { - if (board_is_bone()) { + if (board_is_bone() && !board_is_pb()) { uchar pmic_status_reg; if (tps65217_reg_read(TPS65217_STATUS, &pmic_status_reg)) @@ -295,7 +297,7 @@ const struct dpll_params *get_dpll_mpu_params(void) if (bone_not_connected_to_ac_power()) freq = MPUPLL_M_600; - if (board_is_bone_lt()) + if (board_is_pb() || board_is_bone_lt() || board_is_beaglelogic()) freq = MPUPLL_M_1000; switch (freq) { @@ -324,7 +326,7 @@ static void scale_vcores_bone(int freq) * Only perform PMIC configurations if board rev > A1 * on Beaglebone White */ - if (board_is_bone() && !strncmp(board_ti_get_rev(), "00A1", 4)) + if (!board_is_pb() && board_is_bone() && !strncmp(board_ti_get_rev(), "00A1", 4)) return; if (i2c_probe(TPS65217_CHIP_PM)) @@ -341,7 +343,7 @@ static void scale_vcores_bone(int freq) * Override what we have detected since we know if we have * a Beaglebone Black it supports 1GHz. */ - if (board_is_bone_lt()) + if (board_is_pb() || board_is_bone_lt() || board_is_beaglelogic()) freq = MPUPLL_M_1000; switch (freq) { @@ -387,9 +389,10 @@ static void scale_vcores_bone(int freq) /* * Set LDO3, LDO4 output voltage to 3.3V for Beaglebone. - * Set LDO3 to 1.8V and LDO4 to 3.3V for Beaglebone Black. + * Set LDO3 to 1.8V and LDO4 to 3.3V for Beaglebone Black + * and PocketBeagle. */ - if (board_is_bone()) { + if (board_is_bone() && !board_is_pb()) { if (tps65217_reg_write(TPS65217_PROT_LEVEL_2, TPS65217_DEFLS1, TPS65217_LDO_VOLTAGE_OUT_3_3, @@ -472,7 +475,11 @@ void scale_vcores(void) void set_uart_mux_conf(void) { #if CONFIG_CONS_INDEX == 1 - enable_uart0_pin_mux(); + if (board_is_beaglelogic()) + enable_uart4_pin_mux(); + else + enable_uart0_pin_mux(); + #elif CONFIG_CONS_INDEX == 2 enable_uart1_pin_mux(); #elif CONFIG_CONS_INDEX == 3 @@ -542,7 +549,7 @@ void sdram_init(void) if (board_is_evm_sk()) config_ddr(303, &ioregs_evmsk, &ddr3_data, &ddr3_cmd_ctrl_data, &ddr3_emif_reg_data, 0); - else if (board_is_bone_lt()) + else if (board_is_pb() || board_is_bone_lt() || board_is_beaglelogic()) config_ddr(400, &ioregs_bonelt, &ddr3_beagleblack_data, &ddr3_beagleblack_cmd_ctrl_data, @@ -612,6 +619,24 @@ static struct clk_synth cdce913_data = { */ int board_init(void) { + u32 sys_reboot; + + sys_reboot = readl(PRM_RSTST); + if (sys_reboot & (1 << 9)) + puts("Reset Source: IcePick reset has occurred.\n"); + + if (sys_reboot & (1 << 5)) + puts("Reset Source: Global external warm reset has occurred.\n"); + + if (sys_reboot & (1 << 4)) + puts("Reset Source: watchdog reset has occurred.\n"); + + if (sys_reboot & (1 << 1)) + puts("Reset Source: Global warm SW reset has occurred.\n"); + + if (sys_reboot & (1 << 0)) + puts("Reset Source: Power-on reset has occurred.\n"); + #if defined(CONFIG_HW_WATCHDOG) hw_watchdog_init(); #endif @@ -708,6 +733,8 @@ int board_late_init(void) char *name = NULL; if (board_is_bone_lt()) { + puts("Board: BeagleBone Black\n"); + name = "A335BNLT"; /* BeagleBoard.org BeagleBone Black Wireless: */ if (!strncmp(board_ti_get_rev(), "BWA", 3)) { name = "BBBW"; @@ -720,10 +747,29 @@ int board_late_init(void) if (!strncmp(board_ti_get_rev(), "BLA", 3)) { name = "BBBL"; } + /* SanCloud BeagleBone Enhanced */ + if (!strncmp(board_ti_get_rev(), "SE", 2)) { + puts("Model: SanCloud BeagleBone Enhanced\n"); + name = "SBBE"; + } + /* Octavo Systems OSD3358-SM-RED */ + if (!strncmp(board_ti_get_rev(), "OS00", 4)) { + puts("Model: Octavo Systems OSD3358-SM-RED\n"); + name = "OS00"; + } } if (board_is_bbg1()) name = "BBG1"; + + if (board_is_pb()) { + puts("Model: BeagleBoard.org PocketBeagle\n"); + } + + if (board_is_beaglelogic()) { + puts("Model: BeagleLogic\n"); + } + set_board_info_env(name); /* @@ -859,28 +905,33 @@ int board_eth_init(bd_t *bis) (defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD)) #ifdef CONFIG_DRIVER_TI_CPSW - if (board_is_bone() || board_is_bone_lt() || - board_is_idk()) { - writel(MII_MODE_ENABLE, &cdev->miisel); - cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if = - PHY_INTERFACE_MODE_MII; - } else if (board_is_icev2()) { - writel(RMII_MODE_ENABLE | RMII_CHIPCKL_ENABLE, &cdev->miisel); - cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RMII; - cpsw_slaves[1].phy_if = PHY_INTERFACE_MODE_RMII; - cpsw_slaves[0].phy_addr = 1; - cpsw_slaves[1].phy_addr = 3; - } else { - writel((RGMII_MODE_ENABLE | RGMII_INT_DELAY), &cdev->miisel); - cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if = - PHY_INTERFACE_MODE_RGMII; - } + if (!board_is_pb()) { + if (board_is_bone() || (board_is_bone_lt() && !board_is_bone_lt_enhanced() && !board_is_m10a()) || + board_is_idk() || board_is_beaglelogic()) { + puts("eth0: MII MODE\n"); + writel(MII_MODE_ENABLE, &cdev->miisel); + cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if = + PHY_INTERFACE_MODE_MII; + } else if (board_is_icev2()) { + puts("eth0: icev2: RGMII MODE\n"); + writel(RMII_MODE_ENABLE | RMII_CHIPCKL_ENABLE, &cdev->miisel); + cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RMII; + cpsw_slaves[1].phy_if = PHY_INTERFACE_MODE_RMII; + cpsw_slaves[0].phy_addr = 1; + cpsw_slaves[1].phy_addr = 3; + } else { + puts("eth0: RGMII MODE\n"); + writel((RGMII_MODE_ENABLE | RGMII_INT_DELAY), &cdev->miisel); + cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if = + PHY_INTERFACE_MODE_RGMII; + } - rv = cpsw_register(&cpsw_data); - if (rv < 0) - printf("Error %d registering CPSW switch\n", rv); - else - n += rv; + rv = cpsw_register(&cpsw_data); + if (rv < 0) + printf("Error %d registering CPSW switch\n", rv); + else + n += rv; + } #endif /* @@ -895,7 +946,7 @@ int board_eth_init(bd_t *bis) #define AR8051_DEBUG_RGMII_CLK_DLY_REG 0x5 #define AR8051_RGMII_TX_CLK_DLY 0x100 - if (board_is_evm_sk() || board_is_gp_evm()) { + if (board_is_evm_sk() || board_is_gp_evm() || board_is_bone_lt_enhanced() || board_is_m10a()) { const char *devname; devname = miiphy_get_current_dev(); @@ -925,8 +976,15 @@ int board_eth_init(bd_t *bis) #ifdef CONFIG_SPL_LOAD_FIT int board_fit_config_name_match(const char *name) { + //FIME: we currently dont use this, yet... if (board_is_gp_evm() && !strcmp(name, "am335x-evm")) return 0; + else if (board_is_pb() && !strcmp(name, "am335x-pocketbeagle")) + return 0; + else if (board_is_beaglelogic() && !strcmp(name, "am335x-beaglelogic")) + return 0; + else if (board_is_os00() && !strcmp(name, "am335x-boneblack")) + return 0; else if (board_is_bone() && !strcmp(name, "am335x-bone")) return 0; else if (board_is_bone_lt() && !strcmp(name, "am335x-boneblack")) diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h index e13fcff02a..6f96532bac 100644 --- a/board/ti/am335x/board.h +++ b/board/ti/am335x/board.h @@ -24,6 +24,16 @@ #define EMIF_OCP_CONFIG_BEAGLEBONE_BLACK 0x00141414 #define EMIF_OCP_CONFIG_AM335X_EVM 0x003d3d3d +static inline int board_is_pb(void) +{ + return board_ti_is("A335PBGL"); +} + +static inline int board_is_beaglelogic(void) +{ + return board_ti_is("A335BLGC"); +} + static inline int board_is_bone(void) { return board_ti_is("A335BONE"); @@ -34,14 +44,50 @@ static inline int board_is_bone_lt(void) return board_ti_is("A335BNLT"); } +static inline int board_is_bbbw(void) +{ + return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "BW", 2); +} + +static inline int board_is_blue(void) +{ + return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "BLA", 3); +} + static inline int board_is_bbg1(void) { return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "BBG1", 4); } +static inline int board_is_bone_lt_enhanced(void) +{ + return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "SE", 2); +} + +static inline int board_is_m10a(void) +{ + return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "M10A", 4); +} + +//Element14 BeagleBone Black Industrial: +static inline int board_is_e14bbbi(void) +{ + return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "EIA0", 4); +} + +static inline int board_is_marsboard(void) +{ + return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "00A5", 4); +} + +static inline int board_is_os00(void) +{ + return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "OS00", 4); +} + static inline int board_is_beaglebonex(void) { - return board_is_bone() || board_is_bone_lt() || board_is_bbg1(); + return board_is_pb() || board_is_bone() || (board_is_bone_lt() && !board_is_marsboard()) || board_is_e14bbbi() || board_is_bbg1() || board_is_beaglelogic() || board_is_os00(); } static inline int board_is_evm_sk(void) diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c index ad85b3a19a..2b10b64d3a 100644 --- a/board/ti/am335x/mux.c +++ b/board/ti/am335x/mux.c @@ -341,7 +341,14 @@ static unsigned short detect_daughter_board_profile(void) void enable_board_pin_mux(void) { /* Do board-specific muxes. */ - if (board_is_bone()) { + if (board_is_pb()) { + configure_module_pin_mux(mii1_pin_mux); + configure_module_pin_mux(mmc0_pin_mux); + } else if (board_is_beaglelogic()) { + /* BeagleLogic pinmux */ + configure_module_pin_mux(mii1_pin_mux); + configure_module_pin_mux(mmc0_pin_mux); + } else if (board_is_bone()) { /* Beaglebone pinmux */ configure_module_pin_mux(mii1_pin_mux); configure_module_pin_mux(mmc0_pin_mux); @@ -381,7 +388,14 @@ void enable_board_pin_mux(void) configure_module_pin_mux(mmc0_pin_mux_sk_evm); } else if (board_is_bone_lt()) { /* Beaglebone LT pinmux */ - configure_module_pin_mux(mii1_pin_mux); + if(board_is_bone_lt_enhanced() || board_is_m10a()) { + /* SanCloud Beaglebone LT Enhanced pinmux */ + configure_module_pin_mux(rgmii1_pin_mux); + } + else { + /* Beaglebone LT pinmux */ + configure_module_pin_mux(mii1_pin_mux); + } configure_module_pin_mux(mmc0_pin_mux); #if defined(CONFIG_NAND) && defined(CONFIG_EMMC_BOOT) configure_module_pin_mux(nand_pin_mux); diff --git a/configs/am335x_boneblack_defconfig b/configs/am335x_boneblack_defconfig index ed430e7130..fca193e9b2 100644 --- a/configs/am335x_boneblack_defconfig +++ b/configs/am335x_boneblack_defconfig @@ -4,8 +4,9 @@ CONFIG_TI_COMMON_CMD_OPTIONS=y CONFIG_AM33XX=y # CONFIG_SPL_NAND_SUPPORT is not set CONFIG_DISTRO_DEFAULTS=y -CONFIG_SYS_EXTRA_OPTIONS="EMMC_BOOT" CONFIG_BOOTCOMMAND="if test ${boot_fit} -eq 1; then run update_to_fit; fi; run findfdt; run init_console; run envboot; run distro_bootcmd" +# CONFIG_ENV_IS_IN_FAT is not set +CONFIG_ENV_IS_NOWHERE=y CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_VERSION_VARIABLE=y CONFIG_ARCH_MISC_INIT=y @@ -20,7 +21,6 @@ CONFIG_FASTBOOT=y CONFIG_CMD_SPL=y # CONFIG_CMD_FLASH is not set # CONFIG_CMD_SETEXPR is not set -CONFIG_ENV_IS_IN_MMC=y CONFIG_BOOTCOUNT_LIMIT=y CONFIG_DFU_TFTP=y CONFIG_DFU_MMC=y @@ -42,6 +42,9 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0451 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 CONFIG_USB_ETHER=y CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00" +CONFIG_FS_BTRFS=y +CONFIG_CMD_BTRFS=y CONFIG_LZO=y CONFIG_OF_LIBFDT=y CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_PHY_MSCC=y diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig index 60120bf163..e6007520a8 100644 --- a/configs/am335x_evm_defconfig +++ b/configs/am335x_evm_defconfig @@ -2,54 +2,43 @@ CONFIG_ARM=y CONFIG_ARCH_OMAP2PLUS=y CONFIG_TI_COMMON_CMD_OPTIONS=y CONFIG_AM33XX=y -CONFIG_DEFAULT_DEVICE_TREE="am335x-evm" +# CONFIG_SPL_NAND_SUPPORT is not set CONFIG_DISTRO_DEFAULTS=y -CONFIG_SPL_LOAD_FIT=y CONFIG_BOOTCOMMAND="if test ${boot_fit} -eq 1; then run update_to_fit; fi; run findfdt; run init_console; run envboot; run distro_bootcmd" CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_VERSION_VARIABLE=y CONFIG_ARCH_MISC_INIT=y CONFIG_SPL=y -CONFIG_SPL_MTD_SUPPORT=y CONFIG_SPL_MUSB_NEW_SUPPORT=y CONFIG_SPL_OS_BOOT=y +CONFIG_AUTOBOOT_KEYED=y +CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n" +CONFIG_AUTOBOOT_DELAY_STR="d" +CONFIG_AUTOBOOT_STOP_STR=" " CONFIG_FASTBOOT=y CONFIG_CMD_SPL=y -CONFIG_CMD_SPL_NAND_OFS=0x00080000 # CONFIG_CMD_FLASH is not set -CONFIG_CMD_NAND=y -# CONFIG_CMD_SETEXPR is not set -CONFIG_CMD_MTDPARTS=y -CONFIG_MTDIDS_DEFAULT="nand0=nand.0" -CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),1m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)" -# CONFIG_SPL_ISO_PARTITION is not set -# CONFIG_SPL_EFI_PARTITION is not set -CONFIG_OF_CONTROL=y -CONFIG_OF_LIST="am335x-evm am335x-bone am335x-boneblack am335x-evmsk am335x-bonegreen am335x-icev2" -# CONFIG_BLK is not set +CONFIG_CMD_SETEXPR=y +CONFIG_CMD_BTRFS=y +# CONFIG_ENV_IS_IN_FAT is not set +CONFIG_ENV_IS_IN_EXT4=y +CONFIG_ENV_EXT4_INTERFACE="mmc" +CONFIG_ENV_EXT4_DEVICE_AND_PART="0:1" +CONFIG_ENV_EXT4_FILE="/boot/uboot.env" CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_DFU_TFTP=y CONFIG_DFU_MMC=y -CONFIG_DFU_NAND=y CONFIG_DFU_RAM=y -CONFIG_DM_I2C=y -CONFIG_MISC=y -CONFIG_DM_MMC=y CONFIG_MMC_OMAP_HS=y -CONFIG_NAND=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_WINBOND=y CONFIG_PHYLIB=y -CONFIG_DM_ETH=y -CONFIG_PHY_GIGE=y +CONFIG_PHY_MSCC=y CONFIG_SYS_NS16550=y CONFIG_OMAP3_SPI=y -CONFIG_TIMER=y -CONFIG_OMAP_TIMER=y CONFIG_USB=y -CONFIG_DM_USB=y CONFIG_USB_MUSB_HOST=y CONFIG_USB_MUSB_GADGET=y -CONFIG_USB_MUSB_TI=y CONFIG_USB_MUSB_DSPS=y CONFIG_USB_STORAGE=y CONFIG_USB_GADGET=y @@ -57,7 +46,8 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0451 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 CONFIG_USB_ETHER=y -CONFIG_DYNAMIC_CRC_TABLE=y -CONFIG_RSA=y +CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00" +CONFIG_FS_BTRFS=y CONFIG_LZO=y +CONFIG_OF_LIBFDT=y CONFIG_OF_LIBFDT_OVERLAY=y diff --git a/env/Kconfig b/env/Kconfig index a3c6298273..083ea79049 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -4,6 +4,7 @@ config ENV_IS_NOWHERE bool "Environment is not stored" depends on !ENV_IS_IN_EEPROM depends on !ENV_IS_IN_FAT + depends on !ENV_IS_IN_EXT4 depends on !ENV_IS_IN_FLASH depends on !ENV_IS_IN_MMC depends on !ENV_IS_IN_NAND diff --git a/env/common.c b/env/common.c index f21ff70096..8554badad2 100644 --- a/env/common.c +++ b/env/common.c @@ -204,6 +204,7 @@ int env_import_redund(const char *buf1, int buf1_read_fail, /* Export the environment and generate CRC for it. */ int env_export(env_t *env_out) { +#if !defined(CONFIG_SPL_BUILD) char *res; ssize_t len; @@ -218,6 +219,7 @@ int env_export(env_t *env_out) #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT env_out->flags = ++env_flags; /* increase the serial */ +#endif #endif return 0; diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 158b7d4e8e..5582a66fa7 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -60,9 +60,14 @@ #define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \ "bootcmd_" #devtypel #instance "=" \ + "gpio clear 56; " \ + "gpio clear 55; " \ + "gpio clear 54; " \ + "gpio set 53; " \ + "setenv devtype mmc; " \ "setenv mmcdev " #instance"; "\ - "setenv bootpart " #instance":2 ; "\ - "run mmcboot\0" + "setenv bootpart " #instance":1 ; "\ + "run boot\0" #define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance) \ #devtypel #instance " " @@ -79,7 +84,6 @@ func(LEGACY_MMC, legacy_mmc, 0) \ func(MMC, mmc, 1) \ func(LEGACY_MMC, legacy_mmc, 1) \ - func(NAND, nand, 0) \ func(PXE, pxe, na) \ func(DHCP, dhcp, na) @@ -96,6 +100,7 @@ "bootpart=0:2\0" \ "bootdir=/boot\0" \ "bootfile=zImage\0" \ + "board_eeprom_header=undefined\0" \ "fdtfile=undefined\0" \ "console=ttyO0,115200n8\0" \ "partitions=" \ @@ -128,11 +133,66 @@ "ramboot=echo Booting from ramdisk ...; " \ "run ramargs; " \ "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \ + "pb_eeprom_hdr=" \ + "mw 82001000 ee3355aa; " \ + "mw 82001004 35333341; " \ + "mw 82001008 4c474250\0" \ + "serverip=192.168.1.1\0" \ + "ipaddr=192.168.1.2\0" \ + "if_netconsole=ping $serverip\0" \ + "start_netconsole=" \ + "setenv ncip $serverip; " \ + "setenv bootdelay 10; " \ + "setenv stdin serial,nc; " \ + "setenv stdout serial,nc; " \ + "setenv stderr serial,nc; " \ + "version\0" \ + "preboot=run if_netconsole start_netconsole\0"\ + "eeprom_program="\ + "if test $board_eeprom_header = bbb_blank; then " \ + "run eeprom_dump; run eeprom_blank; run eeprom_bbb_header; run eeprom_dump; reset; fi; " \ + "if test $board_eeprom_header = bbbl_blank; then " \ + "run eeprom_dump; run eeprom_blank; run eeprom_bbb_header; run eeprom_bbbl_footer; run eeprom_dump; reset; fi; " \ + "if test $board_eeprom_header = bbbw_blank; then " \ + "run eeprom_dump; run eeprom_blank; run eeprom_bbb_header; run eeprom_bbbw_footer; run eeprom_dump; reset; fi; " \ + "if test $board_eeprom_header = os00_blank; then " \ + "run eeprom_dump; run eeprom_blank; run eeprom_bbb_header; run eeprom_os00_footer; run eeprom_dump; reset; fi; " \ + "if test $board_eeprom_header = beaglelogic_blank; then " \ + "run eeprom_dump; run eeprom_blank; run eeprom_beaglelogic; run eeprom_dump; reset; fi; \0" \ "findfdt="\ + "echo board_name=[$board_name] ...; " \ + "if test $board_name = A335PBGL; then " \ + "setenv fdtfile am335x-pocketbeagle.dtb; fi; " \ + "if test $board_name = A335BLGC; then " \ + "setenv fdtfile am335x-beaglelogic.dtb; fi; " \ "if test $board_name = A335BONE; then " \ "setenv fdtfile am335x-bone.dtb; fi; " \ "if test $board_name = A335BNLT; then " \ - "setenv fdtfile am335x-boneblack.dtb; fi; " \ + "echo board_rev=[$board_rev] ...; " \ + "if test $board_rev = GH01; then " \ + "setenv fdtfile am335x-boneblack.dtb; " \ + "elif test $board_rev = BBG1; then " \ + "setenv fdtfile am335x-bonegreen.dtb; " \ + "elif test $board_rev = BP00; then " \ + "setenv fdtfile am335x-pocketbone.dtb; " \ + "elif test $board_rev = GW1A; then " \ + "setenv fdtfile am335x-bonegreen-wireless.dtb; " \ + "elif test $board_rev = AIA0; then " \ + "setenv fdtfile am335x-abbbi.dtb; " \ + "elif test $board_rev = EIA0; then " \ + "setenv fdtfile am335x-boneblack.dtb; " \ + "elif test $board_rev = SE0A; then " \ + "setenv fdtfile am335x-sancloud-bbe.dtb; " \ + "elif test $board_rev = ME06; then " \ + "setenv fdtfile am335x-bonegreen.dtb; " \ + "elif test $board_rev = M10A; then " \ + "setenv fdtfile am335x-vsc8531bbb.dtb; " \ + "elif test $board_rev = OS00; then " \ + "setenv fdtfile am335x-osd3358-sm-red.dtb; " \ + "else " \ + "setenv fdtfile am335x-boneblack.dtb; " \ + "fi; " \ + "fi; " \ "if test $board_name = BBBW; then " \ "setenv fdtfile am335x-boneblack-wireless.dtb; fi; " \ "if test $board_name = BBG1; then " \ @@ -141,6 +201,10 @@ "setenv fdtfile am335x-bonegreen-wireless.dtb; fi; " \ "if test $board_name = BBBL; then " \ "setenv fdtfile am335x-boneblue.dtb; fi; " \ + "if test $board_name = SBBE; then " \ + "setenv fdtfile am335x-sancloud-bbe.dtb; fi; " \ + "if test $board_name = OS00; then " \ + "setenv fdtfile am335x-osd3358-sm-red.dtb; fi; " \ "if test $board_name = A33515BB; then " \ "setenv fdtfile am335x-evm.dtb; fi; " \ "if test $board_name = A335X_SK; then " \ @@ -148,13 +212,22 @@ "if test $board_name = A335_ICE; then " \ "setenv fdtfile am335x-icev2.dtb; fi; " \ "if test $fdtfile = undefined; then " \ - "echo WARNING: Could not determine device tree to use; fi; \0" \ + "setenv board_name A335BNLT; " \ + "setenv board_rev EMMC; " \ + "setenv fdtfile am335x-boneblack-emmc-overlay.dtb; " \ + "fi; \0" \ "init_console=" \ "if test $board_name = A335_ICE; then "\ "setenv console ttyO3,115200n8;" \ + "elif test $board_name = A335BLGC; then " \ + "setenv console ttyO4,115200n8;" \ "else " \ "setenv console ttyO0,115200n8;" \ "fi;\0" \ + EEWIKI_NFS \ + EEWIKI_BOOT \ + EEWIKI_UNAME_BOOT \ + EEPROM_PROGRAMMING \ NANDARGS \ NETARGS \ DFUARGS \ @@ -228,9 +301,14 @@ */ #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT #define CONFIG_AM335X_USB0 -#define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL #define CONFIG_AM335X_USB1 +#ifdef CONFIG_AM335X_USB_SWAP +#define CONFIG_AM335X_USB0_MODE MUSB_HOST +#define CONFIG_AM335X_USB1_MODE MUSB_PERIPHERAL +#else +#define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL #define CONFIG_AM335X_USB1_MODE MUSB_HOST +#endif /* * Disable MMC DM for SPL build and can be re-enabled after adding @@ -283,6 +361,17 @@ #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) #define CONFIG_SYS_REDUNDAND_ENVIRONMENT #define CONFIG_SYS_MMC_MAX_DEVICE 2 +#elif defined(CONFIG_SD_BOOT) +#define CONFIG_ENV_IS_IN_FAT +#define FAT_ENV_INTERFACE "mmc" +#define FAT_ENV_DEVICE_AND_PART "0:1" +#define FAT_ENV_FILE "uboot.env" +#ifndef CONFIG_FAT_WRITE +#define CONFIG_FAT_WRITE +#endif +#define FAT_ENV_DEVICE 0 +#define FAT_ENV_PART 1 +#define CONFIG_BOOT_PARTITION_ACCESS #elif defined(CONFIG_NOR_BOOT) #define CONFIG_ENV_SECT_SIZE (128 << 10) /* 128 KiB */ #define CONFIG_ENV_OFFSET (512 << 10) /* 512 KiB */ diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h index 8251ceb63f..8692970939 100644 --- a/include/configs/ti_am335x_common.h +++ b/include/configs/ti_am335x_common.h @@ -36,7 +36,9 @@ #define CONFIG_MII /* Required in net/eth.c */ #endif +#ifndef CONFIG_DISABLE_CPSW #define CONFIG_DRIVER_TI_CPSW /* Driver for IP block */ +#endif /* * SPL related defines. The Public RAM memory map the ROM defines the * area between 0x402F0400 and 0x4030B800 as a download area and diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h index 4771e74940..32f5ddaad6 100644 --- a/include/configs/ti_armv7_common.h +++ b/include/configs/ti_armv7_common.h @@ -125,6 +125,305 @@ /* Boot Argument Buffer Size */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE +#define EEPROM_PROGRAMMING \ + "eeprom_dump=i2c dev 0; " \ + "i2c md 0x50 0x00.2 20; " \ + "\0" \ + "eeprom_blank=i2c dev 0; " \ + "i2c mw 0x50 0x00.2 ff; " \ + "i2c mw 0x50 0x01.2 ff; " \ + "i2c mw 0x50 0x02.2 ff; " \ + "i2c mw 0x50 0x03.2 ff; " \ + "i2c mw 0x50 0x04.2 ff; " \ + "i2c mw 0x50 0x05.2 ff; " \ + "i2c mw 0x50 0x06.2 ff; " \ + "i2c mw 0x50 0x07.2 ff; " \ + "i2c mw 0x50 0x08.2 ff; " \ + "i2c mw 0x50 0x09.2 ff; " \ + "i2c mw 0x50 0x0a.2 ff; " \ + "i2c mw 0x50 0x0b.2 ff; " \ + "i2c mw 0x50 0x0c.2 ff; " \ + "i2c mw 0x50 0x0d.2 ff; " \ + "i2c mw 0x50 0x0e.2 ff; " \ + "i2c mw 0x50 0x0f.2 ff; " \ + "i2c mw 0x50 0x10.2 ff; " \ + "i2c mw 0x50 0x11.2 ff; " \ + "i2c mw 0x50 0x12.2 ff; " \ + "i2c mw 0x50 0x13.2 ff; " \ + "i2c mw 0x50 0x14.2 ff; " \ + "i2c mw 0x50 0x15.2 ff; " \ + "i2c mw 0x50 0x16.2 ff; " \ + "i2c mw 0x50 0x17.2 ff; " \ + "i2c mw 0x50 0x18.2 ff; " \ + "i2c mw 0x50 0x19.2 ff; " \ + "i2c mw 0x50 0x1a.2 ff; " \ + "i2c mw 0x50 0x1b.2 ff; " \ + "i2c mw 0x50 0x1c.2 ff; " \ + "i2c mw 0x50 0x1d.2 ff; " \ + "i2c mw 0x50 0x1e.2 ff; " \ + "i2c mw 0x50 0x1f.2 ff; " \ + "\0" \ + "eeprom_bbb_header=i2c dev 0; " \ + "i2c mw 0x50 0x00.2 aa; " \ + "i2c mw 0x50 0x01.2 55; " \ + "i2c mw 0x50 0x02.2 33; " \ + "i2c mw 0x50 0x03.2 ee; " \ + "i2c mw 0x50 0x04.2 41; " \ + "i2c mw 0x50 0x05.2 33; " \ + "i2c mw 0x50 0x06.2 33; " \ + "i2c mw 0x50 0x07.2 35; " \ + "i2c mw 0x50 0x08.2 42; " \ + "i2c mw 0x50 0x09.2 4e; " \ + "i2c mw 0x50 0x0a.2 4c; " \ + "i2c mw 0x50 0x0b.2 54; " \ + "\0" \ + "eeprom_bbbl_footer= " \ + "i2c mw 0x50 0x0c.2 42; " \ + "i2c mw 0x50 0x0d.2 4c; " \ + "i2c mw 0x50 0x0e.2 41; " \ + "i2c mw 0x50 0x0f.2 32; " \ + "\0" \ + "eeprom_bbbw_footer= " \ + "i2c mw 0x50 0x0c.2 42; " \ + "i2c mw 0x50 0x0d.2 57; " \ + "i2c mw 0x50 0x0e.2 41; " \ + "i2c mw 0x50 0x0f.2 35; " \ + "\0" \ + "eeprom_os00_footer= " \ + "i2c mw 0x50 0x0c.2 4F; " \ + "i2c mw 0x50 0x0d.2 53; " \ + "i2c mw 0x50 0x0e.2 30; " \ + "i2c mw 0x50 0x0f.2 30; " \ + "\0" \ + "eeprom_beaglelogic= " \ + "i2c mw 0x50 0x00.2 aa; " \ + "i2c mw 0x50 0x01.2 55; " \ + "i2c mw 0x50 0x02.2 33; " \ + "i2c mw 0x50 0x03.2 ee; " \ + "i2c mw 0x50 0x04.2 41; " \ + "i2c mw 0x50 0x05.2 33; " \ + "i2c mw 0x50 0x06.2 33; " \ + "i2c mw 0x50 0x07.2 35; " \ + "i2c mw 0x50 0x08.2 42; " \ + "i2c mw 0x50 0x09.2 4c; " \ + "i2c mw 0x50 0x0a.2 47; " \ + "i2c mw 0x50 0x0b.2 43; " \ + "i2c mw 0x50 0x0c.2 30; " \ + "i2c mw 0x50 0x0d.2 30; " \ + "i2c mw 0x50 0x0e.2 30; " \ + "i2c mw 0x50 0x0f.2 41; " \ + "\0" \ + + +#define EEWIKI_NFS \ + "server_ip=192.168.1.100\0" \ + "gw_ip=192.168.1.1\0" \ + "netmask=255.255.255.0\0" \ + "hostname=\0" \ + "device=eth0\0" \ + "autoconf=off\0" \ + "root_dir=/home/userid/targetNFS\0" \ + "tftp_dir=\0" \ + "nfs_options=,vers=3\0" \ + "nfsrootfstype=ext4 rootwait fixrtc\0" \ + "nfsargs=setenv bootargs console=${console} " \ + "${optargs} " \ + "${cape_disable} " \ + "${cape_enable} " \ + "${cape_uboot} " \ + "root=/dev/nfs rw " \ + "rootfstype=${nfsrootfstype} " \ + "nfsroot=${nfsroot} " \ + "ip=${ip} " \ + "${cmdline}\0" \ + "nfsboot=echo Booting from ${server_ip} ...; " \ + "setenv nfsroot ${server_ip}:${root_dir}${nfs_options}; " \ + "setenv ip ${client_ip}:${server_ip}:${gw_ip}:${netmask}:${hostname}:${device}:${autoconf}; " \ + "setenv autoload no; " \ + "setenv serverip ${server_ip}; " \ + "setenv ipaddr ${client_ip}; " \ + "tftp ${loadaddr} ${tftp_dir}${bootfile}; " \ + "tftp ${fdtaddr} ${tftp_dir}dtbs/${fdtfile}; " \ + "run nfsargs; " \ + "bootz ${loadaddr} - ${fdtaddr}\0" \ + "nfsboot_uname_r=echo Booting from ${server_ip} ...; " \ + "setenv nfsroot ${server_ip}:${root_dir}${nfs_options}; " \ + "setenv ip ${client_ip}:${server_ip}:${gw_ip}:${netmask}:${hostname}:${device}:${autoconf}; " \ + "setenv autoload no; " \ + "setenv serverip ${server_ip}; " \ + "setenv ipaddr ${client_ip}; " \ + "tftp ${loadaddr} ${tftp_dir}vmlinuz-${uname_r}; " \ + "tftp ${fdtaddr} ${tftp_dir}dtbs/${uname_r}/${fdtfile}; " \ + "run nfsargs; " \ + "bootz ${loadaddr} - ${fdtaddr}\0" \ + +#define EEWIKI_BOOT \ + "boot=${devtype} dev ${mmcdev}; " \ + "if ${devtype} rescan; then " \ + "gpio set 54;" \ + "setenv bootpart ${mmcdev}:1; " \ + "if test -e ${devtype} ${bootpart} /etc/fstab; then " \ + "setenv mmcpart 1;" \ + "fi; " \ + "echo Checking for: /uEnv.txt ...;" \ + "if test -e ${devtype} ${bootpart} /uEnv.txt; then " \ + "if run loadbootenv; then " \ + "gpio set 55;" \ + "echo Loaded environment from /uEnv.txt;" \ + "run importbootenv;" \ + "fi;" \ + "echo Checking if uenvcmd is set ...;" \ + "if test -n ${uenvcmd}; then " \ + "gpio set 56; " \ + "echo Running uenvcmd ...;" \ + "run uenvcmd;" \ + "fi;" \ + "echo Checking if client_ip is set ...;" \ + "if test -n ${client_ip}; then " \ + "if test -n ${dtb}; then " \ + "setenv fdtfile ${dtb};" \ + "echo using ${fdtfile} ...;" \ + "fi;" \ + "gpio set 56; " \ + "if test -n ${uname_r}; then " \ + "echo Running nfsboot_uname_r ...;" \ + "run nfsboot_uname_r;" \ + "fi;" \ + "echo Running nfsboot ...;" \ + "run nfsboot;" \ + "fi;" \ + "fi; " \ + "echo Checking for: /${script} ...;" \ + "if test -e ${devtype} ${bootpart} /${script}; then " \ + "gpio set 55;" \ + "setenv scriptfile ${script};" \ + "run loadbootscript;" \ + "echo Loaded script from ${scriptfile};" \ + "gpio set 56; " \ + "run bootscript;" \ + "fi; " \ + "echo Checking for: /boot/${script} ...;" \ + "if test -e ${devtype} ${bootpart} /boot/${script}; then " \ + "gpio set 55;" \ + "setenv scriptfile /boot/${script};" \ + "run loadbootscript;" \ + "echo Loaded script from ${scriptfile};" \ + "gpio set 56; " \ + "run bootscript;" \ + "fi; " \ + "echo Checking for: /boot/uEnv.txt ...;" \ + "for i in 1 2 3 4 5 6 7 ; do " \ + "setenv mmcpart ${i};" \ + "setenv bootpart ${mmcdev}:${mmcpart};" \ + "if test -e ${devtype} ${bootpart} /boot/uEnv.txt; then " \ + "gpio set 55;" \ + "load ${devtype} ${bootpart} ${loadaddr} /boot/uEnv.txt;" \ + "env import -t ${loadaddr} ${filesize};" \ + "echo Loaded environment from /boot/uEnv.txt;" \ + "if test -n ${dtb}; then " \ + "echo debug: [dtb=${dtb}] ... ;" \ + "setenv fdtfile ${dtb};" \ + "echo Using: dtb=${fdtfile} ...;" \ + "fi;" \ + "echo Checking if uname_r is set in /boot/uEnv.txt...;" \ + "if test -n ${uname_r}; then " \ + "gpio set 56; " \ + "setenv oldroot /dev/mmcblk${mmcdev}p${mmcpart};" \ + "echo Running uname_boot ...;" \ + "run uname_boot;" \ + "fi;" \ + "fi;" \ + "done;" \ + "fi;\0" \ + +#define EEWIKI_UNAME_BOOT \ + "uname_boot="\ + "setenv bootdir /boot; " \ + "setenv bootfile vmlinuz-${uname_r}; " \ + "if test -e ${devtype} ${bootpart} ${bootdir}/${bootfile}; then " \ + "echo loading ${bootdir}/${bootfile} ...; "\ + "run loadimage;" \ + "setenv fdtdir /boot/dtbs/${uname_r}; " \ + "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \ + "run loadfdt;" \ + "else " \ + "setenv fdtdir /usr/lib/linux-image-${uname_r}; " \ + "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \ + "run loadfdt;" \ + "else " \ + "setenv fdtdir /lib/firmware/${uname_r}/device-tree; " \ + "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \ + "run loadfdt;" \ + "else " \ + "setenv fdtdir /boot/dtb-${uname_r}; " \ + "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \ + "run loadfdt;" \ + "else " \ + "setenv fdtdir /boot/dtbs; " \ + "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \ + "run loadfdt;" \ + "else " \ + "setenv fdtdir /boot/dtb; " \ + "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \ + "run loadfdt;" \ + "else " \ + "setenv fdtdir /boot; " \ + "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \ + "run loadfdt;" \ + "else " \ + "if test -e ${devtype} ${bootpart} ${fdtfile}; then " \ + "run loadfdt;" \ + "else " \ + "echo; echo unable to find [dtb=${fdtfile}] did you name it correctly? ...; " \ + "run failumsboot;" \ + "fi;" \ + "fi;" \ + "fi;" \ + "fi;" \ + "fi;" \ + "fi;" \ + "fi;" \ + "fi; " \ + "setenv rdfile initrd.img-${uname_r}; " \ + "if test -e ${devtype} ${bootpart} ${bootdir}/${rdfile}; then " \ + "echo loading ${bootdir}/${rdfile} ...; "\ + "run loadrd;" \ + "if test -n ${netinstall_enable}; then " \ + "run args_netinstall; run message;" \ + "echo debug: [${bootargs}] ... ;" \ + "echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}] ... ;" \ + "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \ + "fi;" \ + "if test -n ${uenv_root}; then " \ + "run args_uenv_root;" \ + "echo debug: [${bootargs}] ... ;" \ + "echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}] ... ;" \ + "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \ + "fi;" \ + "if test -n ${uuid}; then " \ + "run args_mmc_uuid;" \ + "echo debug: [${bootargs}] ... ;" \ + "echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}] ... ;" \ + "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \ + "fi;" \ + "run args_mmc_old;" \ + "echo debug: [${bootargs}] ... ;" \ + "echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}] ... ;" \ + "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \ + "else " \ + "if test -n ${uenv_root}; then " \ + "run args_uenv_root;" \ + "echo debug: [${bootargs}] ... ;" \ + "echo debug: [bootz ${loadaddr} - ${fdtaddr}] ... ;" \ + "bootz ${loadaddr} - ${fdtaddr}; " \ + "fi;" \ + "run args_mmc_old;" \ + "echo debug: [${bootargs}] ... ;" \ + "echo debug: [bootz ${loadaddr} - ${fdtaddr}] ... ;" \ + "bootz ${loadaddr} - ${fdtaddr}; " \ + "fi;" \ + "fi;\0" \ + /* * When we have SPI, NOR or NAND flash we expect to be making use of * mtdparts, both for ease of use in U-Boot and for passing information diff --git a/include/environment/ti/mmc.h b/include/environment/ti/mmc.h index 4305ebdaaf..0364f62c3d 100644 --- a/include/environment/ti/mmc.h +++ b/include/environment/ti/mmc.h @@ -12,20 +12,65 @@ #define DEFAULT_MMC_TI_ARGS \ "mmcdev=0\0" \ "mmcrootfstype=ext4 rootwait\0" \ - "finduuid=part uuid mmc ${bootpart} uuid\0" \ + "finduuid=part uuid ${devtype} ${bootpart} uuid\0" \ "args_mmc=run finduuid;setenv bootargs console=${console} " \ + "${cape_disable} " \ + "${cape_enable} " \ + "${cape_uboot} " \ + "root=PARTUUID=${uuid} ro " \ + "rootfstype=${mmcrootfstype} " \ + "${uboot_detected_capes} " \ + "${cmdline}\0" \ + "args_mmc_old=setenv bootargs console=${console} " \ "${optargs} " \ - "root=PARTUUID=${uuid} rw " \ - "rootfstype=${mmcrootfstype}\0" \ - "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ - "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ + "${cape_disable} " \ + "${cape_enable} " \ + "${cape_uboot} " \ + "root=${oldroot} ro " \ + "rootfstype=${mmcrootfstype} " \ + "${uboot_detected_capes} " \ + "${cmdline}\0" \ + "args_mmc_uuid=setenv bootargs console=${console} " \ + "${optargs} " \ + "${cape_disable} " \ + "${cape_enable} " \ + "${cape_uboot} " \ + "root=UUID=${uuid} ro " \ + "rootfstype=${mmcrootfstype} " \ + "${uboot_detected_capes} " \ + "${cmdline}\0" \ + "args_uenv_root=setenv bootargs console=${console} " \ + "${optargs} " \ + "${cape_disable} " \ + "${cape_enable} " \ + "${cape_uboot} " \ + "root=${uenv_root} ro " \ + "rootfstype=${mmcrootfstype} " \ + "${uboot_detected_capes} " \ + "${cmdline}\0" \ + "args_netinstall=setenv bootargs ${netinstall_bootargs} " \ + "${optargs} " \ + "${cape_disable} " \ + "${cape_enable} " \ + "${cape_uboot} " \ + "root=/dev/ram rw " \ + "${uboot_detected_capes} " \ + "${cmdline}\0" \ + "script=boot.scr\0" \ + "scriptfile=${script}\0" \ + "loadbootscript=load ${devtype} ${bootpart} ${loadaddr} ${scriptfile};\0" \ + "bootscript=echo Running bootscript from mmc${bootpart} ...; " \ "source ${loadaddr}\0" \ "bootenvfile=uEnv.txt\0" \ - "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \ + "bootenv=uEnv.txt\0" \ + "importbootenv=echo Importing environment from ${devtype} ...; " \ "env import -t ${loadaddr} ${filesize}\0" \ - "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \ + "loadbootenv=load ${devtype} ${bootpart} ${loadaddr} ${bootenvfile}\0" \ "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ - "loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ + "loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}; setenv rdsize ${filesize}\0" \ + "loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}\0" \ + "failumsboot=echo; echo FAILSAFE: U-Boot UMS (USB Mass Storage) enabled, media now available over the usb slave port ...; " \ + "ums 0 ${devtype} 1;\0" \ "envboot=mmc dev ${mmcdev}; " \ "if mmc rescan; then " \ "echo SD/MMC found on device ${mmcdev};" \ @@ -45,7 +90,11 @@ "mmcloados=run args_mmc; " \ "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ "if run loadfdt; then " \ - "bootz ${loadaddr} - ${fdtaddr}; " \ + "if test -n ${uname_r}; then " \ + "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \ + "else " \ + "bootz ${loadaddr} - ${fdtaddr}; " \ + "fi; " \ "else " \ "if test ${boot_fdt} = try; then " \ "bootz; " \ -- 2.16.2