This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3358: Custom board boot issue

Part Number: AM3358

Tool/software: Linux

Hello everyone,

We are trying to integrate a OSD module into our product. As a base of our hardware we have used BeagleBoneWireless Board and PocketBeagle that are both based on Octavo OSD SIP.

For SPL,U-boot, Linux and rootfs we are using everything provided in the latest Processor SDK for am335x.

The first problem we had to solve was the empty EEPROM on our OSD module (unable to resolve board id). For that reason we hardcoded in u-boot /board/ti/board.h file that the board is board_is_bone_lt to force beagle bone black board configuration.

After this patch in u-boot, the OSD SPL and u-boot started but Linux is not loading. We are using pre-build images for Linux and rootfs from Processor SDK. SD CARD is created using create_sd_card script.

SD Card is connected to mmc0 interface. Below is shown booting printlog.

Is there anything special that we should configure in u-boot "bootcmd" or other scripts that will let bare OSD module (bare am3358 withouth cpsw, usb hub and with empty EEPROM) to properly load Linux/DTB into RAM and start booting ? We noticed that in U-boot there is no native support for pocket beagle or wireless beagle bone buth in Linux kernel there are special configurations for kernel build.

U-Boot 2018.01-00569-g7b4e473-dirty (Jun 24 2019 - 13:11:27 +0200)

CPU : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM: 512 MiB
NAND: 0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
** Bad device mmc 0 **
Using default environment

<ethaddr> not set. Validating first E-fuse MAC
Net: Could not get PHY for cpsw: addr 0
cpsw, usb_ether
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc1(part 0) is current device
** No partition table - mmc 1 **
switch to partitions #0, OK
mmc1(part 0) is current device
SD/MMC found on device 1
** No partition table - mmc 1 **
## Error: "bootcmd_nand0" not defined
starting USB...
USB0: Port not available.
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 98:5d:ad:2a:ff:28
HOST MAC de:ad:be:ef:00:00
RNDIS ready
missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/01-98-5d-ad-2a-ff-28
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 98:5d:ad:2a:ff:28
HOST MAC de:ad:be:ef:00:00

  • Hello Aleksandar,

    Can you stop the booting in U-Boot console and enter these commands?

    setenv board_name A335BNLT
    run findfdt;
    run init_console;
    setenv mmcdev 0;
    setenv bootpart 0:2 ;
    mmc dev ${mmcdev};
    setenv devnum ${mmcdev};
    setenv devtype mmc;
    mmc rescan;
    run loadimage;
    run args_mmc;
    run loadfdt;
    bootz ${loadaddr} - ${fdtaddr};

    Best regards,
    Kemal

  • Thanks Kemal,

    We tryed several boot options and finally discovered that SDCard detectche cking was is the problem.

    We disable that in uboot and now it works.

    This is very ambigious to be mandatory in the SDK for am335x bevause room bootloader doesnt check SDCard presence and it is also not relevant for emmc chips.

    We will share here what should be modified in order to boot bare am335x with no eeprom and sdcard detection.

  • Okay. Thank you very much.

  • Hello everyone. Here is the epilogoue for successful boot a custom made am335x board or with bare OSD (octavo SIP module) :

    • Skip EEPROM device id resolving (when EEPROM is empty or not present):

      In file uboot/board/ti/am335x/board.h force always resolving a board is beaglebone black:

      static inline int board_is_bone_lt(void)
      {
          return 1;
          //return board_ti_is("A335BNLT");
      }

    • Disable SD Card detection (SD card holder without SD Card detection capability). Without this patch, Linux will not start to load from mmc/SDCard:
      In am335x_evm_defconfig file add the following set: CONFIG_MMC_BROKEN_CD=y
      This will compile mmc.c driver with always assuming SD Card is presented.

    • Saving a uboot env variable in uboot.env prduces an error : FAT: Misaligned buffer address (000000007deb9b60)
      This is caused due to a bug in uboot. 
      Perform the patch to /include/environment.h from this link  : https://patchwork.ozlabs.org/patch/915163/ 
    • Configure u-boot according to Kemal's post or just force fdtfile to take value for am335x-boneblack-wireless.dtb or desired device tree you want to load because uboot's board_name is resolved only if EEPROM is loaded with proper data.

    The interesting thing is that bug with "Misaligned buffer address" on saveenv happens also with BeagleBoneWireles board and prebuilt Sitara images !

     

  • Hello Aleksandar,

    Thank you for sharing the solution. Cold you also mark the solution as "This resolved my Issue".

    Thanks,
    Kemal