Hello forum.
We have a board based on the TI-AM355X processor that is booting fine. However, it is using an old u-boot boot-loader:
U-Boot 2015.10 (Jun 14 2016 - 16:09:45 +0200) Watchdog enabled I2C: ready DRAM: 256 MiB Reset Source: Power-on reset has occurred. MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 Net: cpsw Hit any key to stop autoboot: 0 =>
This old u-boot was provided in a microSD with the development kit.
We decided upgrading this u-boot to a newest version. This version:
Based on version: 2021.01
URL: git.ti.com/ti-u-boot/ti-u-boot.git
Branch: ti-u-boot-2021.01
uBoot Tag: 08.02.00.006
Commit ID: 44a87e3ab85c6d64044f0b5ad677008316baad70
We have used this porting guide to generate a custom am335x_cct_defconfig based on the am335x_evm_defconfig. This is the content of the am335x_cct_defconfig:
CONFIG_ARM=y
CONFIG_ARCH_CPU_INIT=y
CONFIG_ARCH_OMAP2PLUS=y
CONFIG_TI_COMMON_CMD_OPTIONS=y
CONFIG_AM33XX=y
CONFIG_TARGET_AM335X_CCT=y
CONFIG_SPL=y
CONFIG_DEFAULT_DEVICE_TREE="am335x-cct"
CONFIG_DISTRO_DEFAULTS=y
CONFIG_SPL_LOAD_FIT=y
# CONFIG_USE_SPL_FIT_GENERATOR is not set
CONFIG_OF_BOARD_SETUP=y
CONFIG_BOOTCOMMAND="if test ${boot_fit} -eq 1; then run update_to_fit; fi; run findfdt; run init_console; run envboot; run finduuid; run distro_bootcmd"
CONFIG_LOGLEVEL=3
CONFIG_SYS_CONSOLE_INFO_QUIET=y
CONFIG_ARCH_MISC_INIT=y
CONFIG_SPL_FIT_IMAGE_TINY=y
CONFIG_SPL_ETH_SUPPORT=y
# CONFIG_SPL_FS_EXT4 is not set
CONFIG_SPL_MTD_SUPPORT=y
CONFIG_SPL_MUSB_NEW_SUPPORT=y
CONFIG_SPL_NAND_DRIVERS=y
CONFIG_SPL_NAND_ECC=y
CONFIG_SPL_NAND_BASE=y
CONFIG_SPL_NET_SUPPORT=y
CONFIG_SPL_NET_VCI_STRING="AM335x U-Boot SPL"
CONFIG_SPL_OS_BOOT=y
CONFIG_SPL_USB_GADGET=y
CONFIG_SPL_USB_ETHER=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_BOOTP_DNS2=y
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_EFI_PARTITION is not set
CONFIG_OF_CONTROL=y
CONFIG_OF_LIST="am335x-cct am335x-bone am335x-boneblack am335x-evmsk am335x-bonegreen am335x-icev2 am335x-pocketbeagle"
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_SPL_ENV_IS_NOWHERE=y
CONFIG_VERSION_VARIABLE=y
CONFIG_BOOTP_SEND_HOSTNAME=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_CLK=y
CONFIG_CLK_CDCE9XX=y
CONFIG_DFU_TFTP=y
CONFIG_DFU_MMC=y
CONFIG_DFU_NAND=y
CONFIG_DFU_RAM=y
CONFIG_USB_FUNCTION_FASTBOOT=y
CONFIG_FASTBOOT_FLASH=y
CONFIG_FASTBOOT_FLASH_MMC_DEV=1
CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
CONFIG_DM_I2C=y
CONFIG_MISC=y
CONFIG_DM_MMC=y
# CONFIG_MMC_HW_PARTITIONING is not set
CONFIG_MMC_OMAP_HS=y
CONFIG_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SF_DEFAULT_SPEED=24000000
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_PHY_ATHEROS=y
CONFIG_PHY_SMSC=y
CONFIG_DM_ETH=y
CONFIG_MII=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_TIMER=y
CONFIG_OMAP_TIMER=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_DM_USB_GADGET=y
CONFIG_SPL_DM_USB_GADGET=y
CONFIG_USB_MUSB_HOST=y
CONFIG_USB_MUSB_GADGET=y
CONFIG_USB_MUSB_TI=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
CONFIG_USB_GADGET_VENDOR_NUM=0x0451
CONFIG_USB_GADGET_PRODUCT_NUM=0xd022
CONFIG_USB_ETHER=y
CONFIG_WDT=y
# CONFIG_SPL_WDT is not set
CONFIG_DYNAMIC_CRC_TABLE=y
CONFIG_RSA=y
CONFIG_LZO=y
After configuring with the custom am335x_cct_defconfig, we cross-compile using proper toolchain:
export PATH=$PATH:/path/to/toolchain/bin make ARCH=arm CROSS_COMPILE='arm-linux-' mrproper make ARCH=arm CROSS_COMPILE='arm-linux-' am335x_cct_defconfig make ARCH=arm CROSS_COMPILE='arm-linux-'
Compilation works fine. Process ends generating both u-boot.img and spl/u-boot-spl.bin files as expected.
We have setup a DHCP server and a TFTP to load this u-boot images via ethernet without bricking the board. This setup works. We can use original (but old) u-boot images to boot the board. In this case, we see this on the serial console:
U-Boot SPL 2015.10 (Jun 14 2016 - 16:09:45) Using default environment <ethaddr> not set. Validating first E-fuse MAC cpsw cpsw Waiting for PHY auto negotiation to complete... done link up on port 0, speed 100, full duplex BOOTP broadcast 1 BOOTP broadcast 2 BOOTP broadcast 3 DHCP client bound to address 192.168.1.51 (1008 ms) Using cpsw device TFTP from server 192.168.1.44; our IP address is 192.168.1.51 Filename 'platform/raption/firmware/u-boot.img'. Load address: 0x807fffc0 Loading: ##################### 1.3 MiB/s done Bytes transferred = 304896 (4a700 hex) U-Boot 2015.10 (Jun 14 2016 - 16:09:45 +0200) Watchdog enabled I2C: ready DRAM: 256 MiB Reset Source: Power-on reset has occurred. MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 Net: cpsw Hit any key to stop autoboot: 0 gpio: pin 65 (gpio 65) value is 1 gpio: pin 65 (gpio 65) value is 0 reading am335x-cct.dtb 36771 bytes read in 8 ms (4.4 MiB/s) reading uImage 4880640 bytes read in 275 ms (16.9 MiB/s) ## Booting kernel from Legacy Image at 80200000 ... Image Name: Linux-4.19.94 Created: 2023-06-19 13:05:13 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 4880576 Bytes = 4.7 MiB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... OK ## Flattened Device Tree blob at 80f80000 Booting using the fdt blob at 0x80f80000 Loading Kernel Image ... OK Loading Device Tree to 8ef36000, end 8ef41fa2 ... OK Starting kernel ...
However, when we use the new custom images, nothing is displayed on the serial console.
We have compared images using "file" linux tool. That tool is reporting some differences:
$ file * GOOD_u-boot.img: u-boot legacy uImage, U-Boot 2015.10 for am335x board, Firmware/ARM, Firmware Image (Not compressed), 304832 bytes, Tue Jun 14 14:09:52 2016, Load Address: 0x80800000, Entry Point: 0x00000000, Header CRC: 0x2DE1A092, Data CRC: 0xC5E1D00B GOOD_u-boot-spl.bin: data u-boot.img: Device Tree Blob version 17, size=2784, boot CPU=0, string block size=150, DT structure block size=2576 u-boot-spl.bin: data
Could you please provide some support to try to get this images booting on the board as expected?
Many thanks in advance.