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/AM5728: Device trees to include on custom board.

Part Number: AM5728

Tool/software: Linux

Hello, I've been working on booting Linux on our custom board, and I have a couple questions regarding device trees for the Linux kernel.  For reference, I am using PSDK 4 and the 4.9.28 kernel included with it.  I have been modifying the existing dts files for our firmware rather than making my own at present.

In the Linux Kernel Users Guide in the PSDK wiki: it states that the device tree to compile would be the am57xx-evm-reva3.dts file for the AM572x EVM.  That makes sense, and decompiling the dtb that is produced by that process yields a full device tree for the EVM.  But when I copy just the am57xx-evm-reva3.dtb file over to /boot on the device memory card, my device hangs at:

Updating property '/ocp/ethernet@48484000/slave@48480300/mac-address' =  d4 36 39 fc 4b 3f
Updating property '/ocp/ethernet@48484000/slave@48480300/local-mac-address' =  d4 36 39 fc 4b 3f
## Transferring control to Linux (at address 82000000)...

Starting kernel ...

After searching E2E, I believe it's simply a device tree misconfiguration.


With that in mind I made my edits and placed my own version of the device tree in the /boot directory, as the only .dtb file in the directory, along with the zImage.  When I tried booting, I was greeted by this: 

iterate >zImage<
** File not found /boot/am57xx-beagle-x15.dtb **
Command failed, result=1
Command failed, result=1

This brings up a question that I have thus far been unable to answer: if the compiled device tree blob am57xx-evm-reva3.dtb contains a full device tree for the device, then why does the zImage request other dtb's?

Secondly, what do those other device trees on disk do?  Are they simply fragments for peripherals such as the LCD screen and the various compatible cameras for the EVM?  

Thirdly, does this mean that the device tree compilation process in the wiki is incorrect for not stating that multiple device tree blobs must be created?

Full boot logs are attached.g3_linux1.logg3_linux_only_one_dtb.log

EDIT: I've found that the only device tree binary required by zImage appears to be the am57xx-beagle-x15.dtb file.  If only that one is included in /boot, U-Boot will move to Starting Kernel...  However it still hangs.

EDIT Sept 19 2017: After ensuring that the U-Boot and Linux UART configurations for the custom board are identical, minus the u-boot specific u-boot,dm-pre-reloc tag, which does nothing in Linux (not that it matters, as it is not present in the EVM's device tree configuration).  As well, the EVM and custom board UART configurations are identical.  The circuit for UART3 on the custom board is the same as the one for the EVM, and the .config file is also the same. 

What else could be causing this kernel hang???  According to all of the sources I have found, the cause for not receiving any messages after 'Starting Kernel' is due to a misconfigured UART line, but to the best of my knowledge, it is identical.


  • Hi,

    It seems that your custom board is defined as am57xx-beagle-x15.
    Here is what I do on my am572x GPEVM, I will adapt the steps for your board beagle-x15
    Could you please try the following:
    1. Create a new bootable sd card.
    2. Then navigate to the rootfs partition, folder /boot:
    rename devicetree-zImage-am57xx-beagle-x15.dtb to devicetree-zImage-am57xx-beagle-x15.dtb.old
    copy your am57xx-beagle-x15.dtb as devicetree-zImage-am57xx-beagle-x15.dtb in /boot
    No you should have the modified dtb file.

    Same goes for kernel image:
    rename zImage-4.9.28-<watever your kernel version is> to zImage-<watever your kernel version is>.old
    copy your modifed zImage as zImage-4.9.28-<watever your kernel version is>.
    This should update your kernel image.

    Try this and post the result.

    Best Regards,
    Yordan
  • EDIT: Disregard the below, this has been solved.  For posterity (and for other people reading this) this is caused by my custom board not having EEPROM with the board name on it.  In board/ti/am57xx/board.c, in setup_board_eeprom_env(), the board_name is by default set to 'beagle_x15', and I missed the ti_i2c_eeprom_am_get() call (like an idiot) and didn't notice that without that call, it will skip over all the board detect logic that I hard-coded to result in the board_name being changed to 'am57xx_evm_reva3'  If you don't have EEPROM on your board, and want to change the board_name value in printenv, change the name variable at the top of this function to whatever you want your board to pretend to be.

    Another question: my build always seems to look for the file 'am57xx-beagle-x15.dtb' when choosing a FDT.

    EXT4 features COMPAT: 0000003c INCOMPAT: 00000246 RO_COMPAT: 0000007b
    EXT2 rev 1, inode_size 256, descriptor size 32
    ext4fs read 0 group descriptor (blkno 1 blkoff 0)
     <8, 0, 32>
     <8456, 256, 128>
    Iterate dir boot
     <73992, 0, 8>
     <73992, 8, 1>
    iterate >.<
     <73992, 12, 8>
     <73992, 20, 2>
    iterate >..<
     <73992, 24, 8>
     <73992, 32, 3>
    iterate >etc<
     <73992, 36, 8>
     <73992, 44, 5>
    iterate >media<
     <73992, 52, 8>
     <73992, 60, 7>
    iterate >include<
     <73992, 68, 8>
     <73992, 76, 4>
    iterate >boot<
    Iterate dir am57xx-beagle-x15.dtb
    ext4fs read 96 group descriptor (blkno 1 blkoff 3072)
     <14, 0, 32>
     <25166166, 256, 128>
     <25231624, 0, 8>
     <25231624, 8, 1>
    iterate >.<
     <25231624, 12, 8>
     <25231624, 20, 2>
    iterate >..<
     <25231624, 24, 8>
     <25231624, 32, 38>
    iterate >devicetree-zImage-am57xx-evm-reva3.dtb<
     <25231625, 380, 8>
     <25231625, 388, 25>
    iterate >zImage-4.9.28-geed43d1050<
     <25231626, 124, 8>
     <25231626, 132, 6>
    iterate >uImage<
     <25231626, 140, 8>
     <25231626, 148, 25>
    iterate >uImage-4.9.28-geed43d1050<
     <25231627, 208, 8>
     <25231627, 216, 26>
    iterate >vmlinux-4.9.28-geed43d1050<
     <25231628, 292, 8>
     <25231628, 300, 6>
    iterate >zImage<
    ** File not found /boot/am57xx-beagle-x15.dtb **
    Command failed, result=1
    Command failed, result=1
    test(4): 'try' '=' 'try': returns 0
    ## Current stack ends at 0x8df119f8 *  kernel: default image load address = 0x82000000
    ## No init Ramdisk
       ramdisk start = 0x00000000, ramdisk end = 0x00000000
    ## No Flattened Device Tree
    Continuing to boot without FDT
    Initial value for argc=3
    Final value for argc=3
    ## FIT configuration was not specified
    using: ATAGS
    ## Transferring control to Linux (at address 82000000)...
    
    Starting kernel ...
    

    Is there any reason for this?  I'm using the same defconfig as the EVM...

    When I do include all of the .dtb's from the compressed filesystem in the PSDK folder, but with the devicetree-zImage-am57xx-beagle-15.dtb and devicetree-zImage-am57xx-evm-reva3.dtb with my own copies, I receive the following:

    EXT4 features COMPAT: 0000003c INCOMPAT: 00000246 RO_COMPAT: 0000007b
    EXT2 rev 1, inode_size 256, descriptor size 32
    ext4fs read 0 group descriptor (blkno 1 blkoff 0)
     <8, 0, 32>
     <8456, 256, 128>
    Iterate dir boot
     <73992, 0, 8>
     <73992, 8, 1>
    iterate >.<
     <73992, 12, 8>
     <73992, 20, 2>
    iterate >..<
     <73992, 24, 8>
     <73992, 32, 3>
    iterate >etc<
     <73992, 36, 8>
     <73992, 44, 5>
    iterate >media<
     <73992, 52, 8>
     <73992, 60, 7>
    iterate >include<
     <73992, 68, 8>
     <73992, 76, 4>
    iterate >boot<
    Iterate dir am57xx-beagle-x15.dtb
    ext4fs read 240 group descriptor (blkno 2 blkoff 3584)
     <23, 0, 32>
     <62914816, 0, 128>
     <62980352, 0, 8>
     <62980352, 8, 1>
    iterate >.<
     <62980352, 12, 8>
     <62980352, 20, 2>
    iterate >..<
     <62980352, 24, 8>
     <62980352, 32, 45>
    iterate >devicetree-zImage-am571x-idk-pru-excl-uio.dtb<
     <62980352, 80, 8>
     <62980352, 88, 48>
    iterate >devicetree-zImage-am571x-idk-lcd-osd101t2045.dtb<
     <62980352, 136, 8>
     <62980352, 144, 30>
    iterate >am572x-idk-lcd-osd101t2045.dtb<
     <62980352, 176, 8>
     <62980352, 184, 38>
    iterate >devicetree-uImage-am57xx-evm-reva3.dtb<
     <62980352, 224, 8>
     <62980352, 232, 24>
    iterate >am572x-idk-jailhouse.dtb<
     <62980352, 256, 8>
     <62980352, 264, 32>
    iterate >devicetree-uImage-am572x-idk.dtb<
     <62980352, 296, 8>
     <62980352, 304, 44>
    iterate >devicetree-zImage-am57xx-evm-cam-ov10635.dtb<
     <62980352, 348, 8>
     <62980352, 356, 50>
    iterate >devicetree-uImage-am57xx-evm-reva3-cam-ov10635.dtb<
     <62980352, 408, 8>
     <62980352, 416, 30>
    iterate >am572x-idk-lcd-osd101t2587.dtb<
     <62980352, 448, 8>
     <62980352, 456, 45>
    iterate >devicetree-uImage-am572x-idk-pru-excl-uio.dtb<
     <62980352, 504, 8>
     <62980353, 0, 32>
    iterate >am57xx-evm-reva3-cam-ov10635.dtb<
     <62980353, 32, 8>
     <62980353, 40, 30>
    iterate >am571x-idk-lcd-osd101t2045.dtb<
     <62980353, 72, 8>
     <62980353, 80, 48>
    iterate >devicetree-uImage-am571x-idk-lcd-osd101t2045.dtb<
     <62980353, 128, 8>
     <62980353, 136, 44>
    iterate >devicetree-zImage-am57xx-evm-cam-mt9t111.dtb<
     <62980353, 180, 8>
     <62980353, 188, 50>
    iterate >devicetree-zImage-am57xx-evm-reva3-cam-ov10635.dtb<
     <62980353, 240, 8>
     <62980353, 248, 39>
    iterate >devicetree-zImage-am57xx-beagle-x15.dtb<
     <62980353, 288, 8>
     <62980353, 296, 30>
    iterate >am571x-idk-lcd-osd101t2587.dtb<
     <62980353, 328, 8>
     <62980353, 336, 44>
    iterate >devicetree-uImage-am57xx-evm-cam-ov10635.dtb<
     <62980353, 380, 8>
     <62980353, 388, 25>
    iterate >zImage-4.9.28-geed43d1050<
     <62980353, 416, 8>
     <62980353, 424, 42>
    iterate >devicetree-zImage-am572x-idk-jailhouse.dtb<
     <62980353, 468, 8>
     <62980353, 476, 39>
    iterate >devicetree-uImage-am57xx-beagle-x15.dtb<
     <62980354, 4, 8>
     <62980354, 12, 24>
    iterate >am572x-evm-jailhouse.dtb<
     <62980354, 36, 8>
     <62980354, 44, 21>
    iterate >am57xx-beagle-x15.dtb<
    ext4fs read 240 group descriptor (blkno 2 blkoff 3584)
     <23, 0, 32>
     <62914827, 256, 128>
    Got symlink >devicetree-uImage-am57xx-beagle-x15.dtb<
    Iterate dir devicetree-uImage-am57xx-beagle-x15.dtb
    ext4fs read 240 group descriptor (blkno 2 blkoff 3584)
     <23, 0, 32>
     <62914816, 0, 128>
     <62980352, 0, 8>
     <62980352, 8, 1>
    iterate >.<
     <62980352, 12, 8>
     <62980352, 20, 2>
    iterate >..<
     <62980352, 24, 8>
     <62980352, 32, 45>
    iterate >devicetree-zImage-am571x-idk-pru-excl-uio.dtb<
     <62980352, 80, 8>
     <62980352, 88, 48>
    iterate >devicetree-zImage-am571x-idk-lcd-osd101t2045.dtb<
     <62980352, 136, 8>
     <62980352, 144, 30>
    iterate >am572x-idk-lcd-osd101t2045.dtb<
     <62980352, 176, 8>
     <62980352, 184, 38>
    iterate >devicetree-uImage-am57xx-evm-reva3.dtb<
     <62980352, 224, 8>
     <62980352, 232, 24>
    iterate >am572x-idk-jailhouse.dtb<
     <62980352, 256, 8>
     <62980352, 264, 32>
    iterate >devicetree-uImage-am572x-idk.dtb<
     <62980352, 296, 8>
     <62980352, 304, 44>
    iterate >devicetree-zImage-am57xx-evm-cam-ov10635.dtb<
     <62980352, 348, 8>
     <62980352, 356, 50>
    iterate >devicetree-uImage-am57xx-evm-reva3-cam-ov10635.dtb<
     <62980352, 408, 8>
     <62980352, 416, 30>
    iterate >am572x-idk-lcd-osd101t2587.dtb<
     <62980352, 448, 8>
     <62980352, 456, 45>
    iterate >devicetree-uImage-am572x-idk-pru-excl-uio.dtb<
     <62980352, 504, 8>
     <62980353, 0, 32>
    iterate >am57xx-evm-reva3-cam-ov10635.dtb<
     <62980353, 32, 8>
     <62980353, 40, 30>
    iterate >am571x-idk-lcd-osd101t2045.dtb<
     <62980353, 72, 8>
     <62980353, 80, 48>
    iterate >devicetree-uImage-am571x-idk-lcd-osd101t2045.dtb<
     <62980353, 128, 8>
     <62980353, 136, 44>
    iterate >devicetree-zImage-am57xx-evm-cam-mt9t111.dtb<
     <62980353, 180, 8>
     <62980353, 188, 50>
    iterate >devicetree-zImage-am57xx-evm-reva3-cam-ov10635.dtb<
     <62980353, 240, 8>
     <62980353, 248, 39>
    iterate >devicetree-zImage-am57xx-beagle-x15.dtb<
     <62980353, 288, 8>
     <62980353, 296, 30>
    iterate >am571x-idk-lcd-osd101t2587.dtb<
     <62980353, 328, 8>
     <62980353, 336, 44>
    iterate >devicetree-uImage-am57xx-evm-cam-ov10635.dtb<
     <62980353, 380, 8>
     <62980353, 388, 25>
    iterate >zImage-4.9.28-geed43d1050<
     <62980353, 416, 8>
     <62980353, 424, 42>
    iterate >devicetree-zImage-am572x-idk-jailhouse.dtb<
     <62980353, 468, 8>
     <62980353, 476, 39>
    iterate >devicetree-uImage-am57xx-beagle-x15.dtb<
    ext4fs read 240 group descriptor (blkno 2 blkoff 3584)
     <23, 0, 32>
     <62914826, 256, 128>
     <63186640, 0, 98557>
    98557 bytes read in 466 ms (206.1 KiB/s)
    Initial value for argc=3
    Final value for argc=3
    Initial value for argc=3
    Final value for argc=3
    ## Current stack ends at 0x8df11968 *  kernel: cmdline image address = 0x82000000
    ## Skipping init Ramdisk
    ## No init Ramdisk
       ramdisk start = 0x00000000, ramdisk end = 0x00000000
    *  fdt: cmdline image address = 0x88000000
    ## Checking for 'FDT'/'FDT Image' at 88000000
    Wrong FIT format: no description
    *  fdt: raw FDT blob
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       of_flat_tree at 0x88000000 size 0x000180fd
    Initial value for argc=3
    Final value for argc=3
    ## FIT configuration was not specified
    using: FDT
    ## initrd_high = 0x90000000, copy_to_ram = 1
       ramdisk load start = 0x00000000, ramdisk load end = 0x00000000
    ## device tree at 88000000 ... 880180fc (len=110845 [0x1B0FD])
       Loading Device Tree to 8def5000, end 8df100fc ... OK
    Initial value for argc=3
    Final value for argc=3
    Updating property '/ocp/ethernet@48484000/slave@48480200/mac-address' =  d4 36 39 fc 4b 3e
    Updating property '/ocp/ethernet@48484000/slave@48480200/local-mac-address' =  d4 36 39 fc 4b 3e
    Updating property '/ocp/ethernet@48484000/slave@48480300/mac-address' =  d4 36 39 fc 4b 3f
    Updating property '/ocp/ethernet@48484000/slave@48480300/local-mac-address' =  d4 36 39 fc 4b 3f
    ## Transferring control to Linux (at address 82000000)...
    
    Starting kernel ...
    
    




  • Hi Yordan, but after a few more tries, involving setting the custom board to use the EVM rev A3 device tree, as well as setting the same U-Boot printenv as the EVM (with exception of fdtcontroller address and MAC addresses.  board_name, board_serial and board_revision are am57xx-evm-reva3, 46164P551378 and A.3A, respectively), and correcting the name of the device tree I send over (see below for my buildscript), I have not seen any improvements.

    The reason I copy the device tree over with both uImage and zImage names is due to the shortcut in the /boot directory symlinking to the uImage name.  I found the original uImage and zImage-named dtb files to be identical, so I decided I'd follow suit with my changes.  Please advise if you can think of anything.  I have attached a u-boot printenv and a full boot-log with my current changes.

    Thank you for your help,
    Tom

    #!/bin/sh
    
    export PATH=/home/tom/psdk4/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH
    
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am57xx-evm-reva3.dtb
    
    echo "writing to sd card"
    cp arch/arm/boot/zImage /media/tom/rootfs/boot/zImage-4.9.28-geed43d1050
    cp arch/arm/boot/dts/am57xx-evm-reva3.dtb /media/tom/rootfs/boot/devicetree-zImage-am57xx-evm-reva3.dtb
    cp arch/arm/boot/dts/am57xx-evm-reva3.dtb /media/tom/rootfs/boot/devicetree-uImage-am57xx-evm-reva3.dtb
    make ARCH=arm INSTALL_MOD_PATH=/media/tom/rootfs modules_install
    
    echo "decompiling device tree"
    dtc -I dtb -O dts -o devicetree-evm.dts arch/arm/boot/dts/am57xx-evm-reva3.dtb

    g3_uboot_printenv_short.log
      0: 8df2c3e8 ==> bootdir    => /boot
      1: 8df2c44c ==> bootm_size => 0x10000000
      2: 8df2c550 ==> boot_fit   => 0
      3: 8df2c5f0 ==> loadbootscript => load mmc ${mmcdev} ${loadaddr} boot.scr
      4: 8df2c6a4 ==> dofastboot => 0
      5: 8df2c744 ==> netloadimage => tftp ${loadaddr} ${bootfile}
      6: 8df2c80c ==> arch       => arm
      7: 8df2c910 ==> mmcdev     => 1
      8: 8df2ca3c ==> fdtcontroladdr => 8df12018
      9: 8df2cac8 ==> board_name => am57xx_evm_reva3
     10: 8df2cadc ==> pxefile_addr_r => 0x80100000
     11: 8df2cbcc ==> eth1addr   => d4:36:39:fc:4b:3f
     12: 8df2cc44 ==> importbootenv => echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}
     13: 8df2cc6c ==> scriptaddr => 0x80000000
     14: 8df2cc80 ==> envboot    => mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootscript; then run bootscript;else if run loadbootenv; then echo Loaded env from ${bootenvfile};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;fi;fi;
     15: 8df2cd0c ==> dfu_alt_info_ram => kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ramdisk ram 0x81000000 0x4000000
     16: 8df2cd84 ==> ethaddr    => d4:36:39:fc:4b:3e
     17: 8df2cdd4 ==> fdt_addr_r => 0x88000000
     18: 8df2ce4c ==> dfu_bufsiz => 0x10000
     19: 8df2ce88 ==> finduuid   => part uuid mmc ${bootpart} uuid
     20: 8df2ceb0 ==> devtype    => mmc
     21: 8df2cf28 ==> partitions_android => uuid_disk=${uuid_gpt_disk};name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};name=bootloader,size=768K,uuid=${uuid_gpt_bootloader};name=environment,size=128K,uuid=${uuid_gpt_environment};name=misc,size=128K,uuid=${uuid_gpt_misc};name=reserved,size=256K,uuid=${uuid_gpt_reserved};name=efs,size=16M,uuid=${uuid_gpt_efs};name=crypto,size=16K,uuid=${uuid_gpt_crypto};name=recovery,size=10M,uuid=${uuid_gpt_recovery};name=boot,size=10M,uuid=${uuid_gpt_boot};name=system,size=768M,uuid=${uuid_gpt_system};name=cache,size=256M,uuid=${uuid_gpt_cache};name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};name=userdata,size=-,uuid=${uuid_gpt_userdata}
     22: 8df2cf50 ==> bootscript => echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
     23: 8df2cf78 ==> boot_fdt   => try
     24: 8df2cff0 ==> baudrate   => 115200
     25: 8df2d108 ==> usbtty     => cdc_acm
     26: 8df2d2c0 ==> dfu_alt_info_mmc => boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x300 0x400;spl-os-args.raw raw 0x80 0x80;spl-os-image.raw raw 0x900 0x2000;spl-os-args fat 0 1;spl-os-image fat 0 1;u-boot.img fat 0 1;uEnv.txt fat 0 1
     27: 8df2d338 ==> ethact     => cpsw
     28: 8df2d414 ==> bootcmd    => if test ${dofastboot} -eq 1; then echo Boot fastboot requested, resetting dofastboot ...;setenv dofastboot 0; saveenv;echo Booting into fastboot ...; fastboot 1; fi;if test ${boot_fit} -eq 1; then run update_to_fit;fi;run findfdt; run envboot; run mmcboot;setenv mmcdev 1; setenv bootpart 1:2; setenv mmcroot /dev/mmcblk0p2 rw; run mmcboot;
     29: 8df2d478 ==> kernel_addr_r => 0x82000000
     30: 8df2d61c ==> mmcrootfstype => ext4 rootwait
     31: 8df2d658 ==> filesize   => 0
     32: 8df2d6f8 ==> fit_loadaddr => 0x87000000
     33: 8df2d734 ==> bootfile   => zImage
     34: 8df2d75c ==> netloadfdt => tftp ${fdtaddr} ${fdtfile}
     35: 8df2d7c0 ==> board      => am57xx
     36: 8df2d810 ==> stderr     => serial@48020000
     37: 8df2d824 ==> bootenvfile => uEnv.txt
     38: 8df2d84c ==> vram       => 16M
     39: 8df2d914 ==> fdtfile    => am57xx-evm-reva3.dtb
     40: 8df2da40 ==> netargs    => setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
     41: 8df2daf4 ==> loadaddr   => 0x82000000
     42: 8df2dc5c ==> rdaddr     => 0x88080000
     43: 8df2dc70 ==> bootdelay  => 2
     44: 8df2dc84 ==> dfu_alt_info_emmc => rawemmc raw 0 3751936;boot part 1 1;rootfs part 1 2;MLO fat 1 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x300 0x1000;spl-os-args.raw raw 0x80 0x80;spl-os-image.raw raw 0x900 0x2000;spl-os-args fat 1 1;spl-os-image fat 1 1;u-boot.img fat 1 1;uEnv.txt fat 1 1
     45: 8df2dd4c ==> rootpath   => /export/rootfs
     46: 8df2dd9c ==> loadimage  => load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
     47: 8df2ddd8 ==> fileaddr   => 82000000
     48: 8df2de14 ==> fdtaddr    => 0x88000000
     49: 8df2de50 ==> mmcroot    => /dev/mmcblk0p2 rw
     50: 8df2dea0 ==> scsidevs   => 0
     51: 8df2dec8 ==> nfsopts    => nolock
     52: 8df2dff4 ==> stdin      => serial@48020000
     53: 8df2e008 ==> cpu        => armv7
     54: 8df2e01c ==> partitions => uuid_disk=${uuid_gpt_disk};name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}
     55: 8df2e080 ==> stdout     => serial@48020000
     56: 8df2e094 ==> vendor     => ti
     57: 8df2e134 ==> loadfdt    => load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
     58: 8df2e170 ==> board_serial => 46164P551378
     59: 8df2e198 ==> ramdisk_addr_r => 0x88080000
     60: 8df2e314 ==> update_to_fit => setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}
     61: 8df2e378 ==> board_rev  => A.3A
     62: 8df2e5a8 ==> loadfit    => run args_mmc; bootm ${loadaddr}#${fdtfile};
     63: 8df2e620 ==> console    => ttyO2,115200n8
     64: 8df2e634 ==> devnum     => 1
     65: 8df2e65c ==> soc        => omap5
     66: 8df2e6e8 ==> mmcboot    => mmc dev ${mmcdev}; setenv devnum ${mmcdev}; setenv devtype mmc; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadimage; then if test ${boot_fit} -eq 1; then run loadfit; else run mmcloados;fi;fi;fi;
     67: 8df2e760 ==> static_ip  => ${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
     68: 8df2e7c4 ==> fit_bootfile => fitImage
     69: 8df2e800 ==> bootpart   => 1:2
     70: 8df2e904 ==> findfdt    => if test $board_name = omap5_uevm; then setenv fdtfile omap5-uevm.dtb; fi; if test $board_name = dra7xx; then setenv fdtfile dra7-evm.dtb; fi;if test $board_name = dra72x-revc; then setenv fdtfile dra72-evm-revc.dtb; fi;if test $board_name = dra72x; then setenv fdtfile dra72-evm.dtb; fi;if test $board_name = dra71x; then setenv fdtfile dra71-evm.dtb; fi;if test $board_name = beagle_x15; then setenv fdtfile am57xx-beagle-x15.dtb; fi;if test $board_name = beagle_x15_revb1; then setenv fdtfile am57xx-beagle-x15-revb1.dtb; fi;if test $board_name = am572x_idk && test $idk_lcd = no; then setenv fdtfile am572x-idk.dtb; fi;if test $board_name = am572x_idk && test $idk_lcd = osd101t2045; then setenv fdtfile am572x-idk-lcd-osd101t2045.dtb; fi;if test $board_name = am572x_idk && test $idk_lcd = osd101t2587; then setenv fdtfile am572x-idk-lcd-osd101t2587.dtb; fi;if test $board_name = am57xx_evm; then setenv fdtfile am57xx-evm.dtb; fi;if test $board_name = am57xx_evm_reva3; then setenv fdtfile am57xx-evm-reva 71: 8df2e92c ==> ver        => U-Boot 2017.01-00341-g9e73999-dirty (Sep 20 2017 - 19:33:00 -0400)
     72: 8df2e954 ==> loadbootenv => fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
     73: 8df2eae4 ==> mmcloados  => run args_mmc; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
     74: 8df2eb5c ==> netboot    => echo Booting from network ...; setenv autoload no; dhcp; run netloadimage; run netloadfdt; run netargs; bootz ${loadaddr} - ${fdtaddr}
     75: 8df2ebfc ==> args_mmc   => run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
    arch=arm
    args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
    baudrate=115200
    board=am57xx
    board_name=am57xx_evm_reva3
    board_rev=A.3A
    board_serial=46164P551378
    boot_fdt=try
    boot_fit=0
    bootcmd=if test ${dofastboot} -eq 1; then echo Boot fastboot requested, resetting dofastboot ...;setenv dofastboot 0; saveenv;echo Booting into fastboot ...; fastboot 1; fi;if test ${boot_fit} -eq 1; then run update_to_fit;fi;run findfdt; run envboot; run mmcboot;setenv mmcdev 1; setenv bootpart 1:2; setenv mmcroot /dev/mmcblk0p2 rw; run mmcboot;
    bootdelay=2
    bootdir=/boot
    bootenvfile=uEnv.txt
    bootfile=zImage
    bootm_size=0x10000000
    bootpart=1:2
    bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
    console=ttyO2,115200n8
    cpu=armv7
    devnum=1
    devtype=mmc
    dfu_alt_info_emmc=rawemmc raw 0 3751936;boot part 1 1;rootfs part 1 2;MLO fat 1 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x300 0x1000;spl-os-args.raw raw 0x80 0x80;spl-os-image.raw raw 0x900 0x2000;spl-os-args fat 1 1;spl-os-image fat 1 1;u-boot.img fat 1 1;uEnv.txt fat 1 1
    dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x300 0x400;spl-os-args.raw raw 0x80 0x80;spl-os-image.raw raw 0x900 0x2000;spl-os-args fat 0 1;spl-os-image fat 0 1;u-boot.img fat 0 1;uEnv.txt fat 0 1
    dfu_alt_info_ram=kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ramdisk ram 0x81000000 0x4000000
    dfu_bufsiz=0x10000
    dofastboot=0
    envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootscript; then run bootscript;else if run loadbootenv; then echo Loaded env from ${bootenvfile};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;fi;fi;
    eth1addr=d4:36:39:fc:4b:3f
    ethact=cpsw
    ethaddr=d4:36:39:fc:4b:3e
    fdt_addr_r=0x88000000
    fdtaddr=0x88000000
    fdtcontroladdr=8df12018
    fdtfile=am57xx-evm-reva3.dtb
    fileaddr=82000000
    filesize=0
    findfdt=if test $board_name = omap5_uevm; then setenv fdtfile omap5-uevm.dtb; fi; if test $board_name = dra7xx; then setenv fdtfile dra7-evm.dtb; fi;if test $board_name = dra72x-revc; then setenv fdtfile dra72-evm-revc.dtb; fi;if test $board_name = dra72x; then setenv fdtfile dra72-evm.dtb; fi;if test $board_name = dra71x; then setenv fdtfile dra71-evm.dtb; fi;if test $board_name = beagle_x15; then setenv fdtfile am57xx-beagle-x15.dtb; fi;if test $board_name = beagle_x15_revb1; then setenv fdtfile am57xx-beagle-x15-revb1.dtb; fi;if test $board_name = am572x_idk && test $idk_lcd = no; then setenv fdtfile am572x-idk.dtb; fi;if test $board_name = am572x_idk && test $idk_lcd = osd101t2045; then setenv fdtfile am572x-idk-lcd-osd101t2045.dtb; fi;if test $board_name = am572x_idk && test $idk_lcd = osd101t2587; then setenv fdtfile am572x-idk-lcd-osd101t2587.dtb; fi;if test $board_name = am57xx_evm; then setenv fdtfile am57xx-evm.dtb; fi;if test $board_name = am57xx_evm_reva3; then setenv fdtfile am57xx-evm-reva3.dtb; fi;if test $board_name = am571x_idk && test $idk_lcd = no; then setenv fdtfile am571x-idk.dtb; fi;if test $board_name = am571x_idk && test $idk_lcd = osd101t2045; then setenv fdtfile am571x-idk-lcd-osd101t2045.dtb; fi;if test $board_name = am571x_idk && test $idk_lcd = osd101t2587; then setenv fdtfile am571x-idk-lcd-osd101t2587.dtb; fi;if test $fdtfile = undefined; then echo WARNING: Could not determine device tree to use; fi;
    finduuid=part uuid mmc ${bootpart} uuid
    fit_bootfile=fitImage
    fit_loadaddr=0x87000000
    importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}
    kernel_addr_r=0x82000000
    loadaddr=0x82000000
    loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
    loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr
    loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
    loadfit=run args_mmc; bootm ${loadaddr}#${fdtfile};
    loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
    mmcboot=mmc dev ${mmcdev}; setenv devnum ${mmcdev}; setenv devtype mmc; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadimage; then if test ${boot_fit} -eq 1; then run loadfit; else run mmcloados;fi;fi;fi;
    mmcdev=1
    mmcloados=run args_mmc; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
    mmcroot=/dev/mmcblk0p2 rw
    mmcrootfstype=ext4 rootwait
    netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
    netboot=echo Booting from network ...; setenv autoload no; dhcp; run netloadimage; run netloadfdt; run netargs; bootz ${loadaddr} - ${fdtaddr}
    netloadfdt=tftp ${fdtaddr} ${fdtfile}
    netloadimage=tftp ${loadaddr} ${bootfile}
    nfsopts=nolock
    partitions=uuid_disk=${uuid_gpt_disk};name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}
    partitions_android=uuid_disk=${uuid_gpt_disk};name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};name=bootloader,size=768K,uuid=${uuid_gpt_bootloader};name=environment,size=128K,uuid=${uuid_gpt_environment};name=misc,size=128K,uuid=${uuid_gpt_misc};name=reserved,size=256K,uuid=${uuid_gpt_reserved};name=efs,size=16M,uuid=${uuid_gpt_efs};name=crypto,size=16K,uuid=${uuid_gpt_crypto};name=recovery,size=10M,uuid=${uuid_gpt_recovery};name=boot,size=10M,uuid=${uuid_gpt_boot};name=system,size=768M,uuid=${uuid_gpt_system};name=cache,size=256M,uuid=${uuid_gpt_cache};name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};name=userdata,size=-,uuid=${uuid_gpt_userdata}
    pxefile_addr_r=0x80100000
    ramdisk_addr_r=0x88080000
    rdaddr=0x88080000
    rootpath=/export/rootfs
    scriptaddr=0x80000000
    scsidevs=0
    soc=omap5
    static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
    stderr=serial@48020000
    stdin=serial@48020000
    stdout=serial@48020000
    update_to_fit=setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}
    usbtty=cdc_acm
    vendor=ti
    ver=U-Boot 2017.01-00341-g9e73999-dirty (Sep 20 2017 - 19:33:00 -0400)
    vram=16M
    
    Environment size: 6275/65532 bytes
    =>

    7536.putty.log

  • Hi,

    The reason I copy the device tree over with both uImage and zImage names is due to the shortcut in the /boot directory symlinking to the uImage name.


    Which SDK are you using? All AM572x TI Linux SDK release work with zImage....

    As for setting the dtb file, you can fix it in u-boot. In include/configs/ti_omap5_common.h change:
    "fdtfile=undefined\0" \

    to
    "fdtfile=<your custom dtb>\0" \

    Then remove the "findfdt="\
    "if test $board_name = omap5_uevm; then " \
    "setenv fdtfile omap5-uevm.dtb; fi;
    ..............
    portion from the same header file.

    Best Regards,
    Yordan
  • I'm using PSDK4.  But I think I may have misworded that response.  My board is still using the zImage image file, but the device tree shortcuts will link to the dtb files that are prefixed with 'uImage'.  So the shortcut file 'am57xx-evm-reva3.dtb' links to the file 'devicetree-uImage-am57xx-evm-reva3.dtb.'  I made sure that devicetree-uImage-am57xx-evm-reva3.dtb and devicetree-zImage-am57xx-evm-reva3.dtb are the same, because they are identical in the original PSDK4 filesystem.  

    Once I configured the custom board to report as a am57xx-evm-reva3 with board_rev A.3A and the same serial number as the AM572x GPEVM (46164P551378), U-Boot selected the am57xx-evm-reva3.dtb shortcut file, which in turn goes to my device tree for the board.  I did these configurations by modifying board/ti/am57xx/board.c and board/ti/common/board_detect.c in U-Boot to not read the EEPROM (which we don't have) and simply hardcodes the values into setenv().

  • Actually, quick question: since I don't have any EEPROM on my board, should I disable anything regarding the EEPROM in Linux? I noticed some I2C EEPROM slave configs in arch/arm/configs/tisdk_am57xx-evm_defconfig. If I do disable that slave EEPROM, are there any configuration settings I do need to set (ie board name, serial number, revision) to make the Linux kernel believe that it was built for the same board as the bootloader?
  • Hello Yordan, I hope you had a good weekend.  I've been working on this some more, and I'm still fairly convinced that my issues are due to my board identification.  I'm not using EEPROM, and I have a solution in place, where when board.c queries board_detect.c:board_ti_is, board_ti_get_rev, and set_info_env, I've hardcoded the values of board_name, board_rev and board_serial to the same values as the AM5728 EVM rev A3.  My patch for that is below:

    board_detect.diff
    diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c
    index 854141e..93935ea 100644
    --- a/board/ti/common/board_detect.c
    +++ b/board/ti/common/board_detect.c
    @@ -234,11 +234,16 @@ int __maybe_unused ti_i2c_eeprom_dra7_get(int bus_addr, int dev_addr)
     
     bool __maybe_unused board_ti_is(char *name_tag)
     {
    +	debug("board_detect.c: board_ti_is: name_tag argument = %s\n", name_tag);
     	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
     
    +#if 0
     	if (ep->header == TI_DEAD_EEPROM_MAGIC)
     		return false;
     	return !strncmp(ep->name, name_tag, TI_EEPROM_HDR_NAME_LEN);
    +#else
    +	return !strncmp("AM572PM_", name_tag, TI_EEPROM_HDR_NAME_LEN);
    +#endif
     }
     
     bool __maybe_unused board_ti_rev_is(char *rev_tag, int cmp_len)
    @@ -257,8 +262,12 @@ char * __maybe_unused board_ti_get_rev(void)
     {
     	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
     
    +#if 0
     	/* if ep->header == TI_DEAD_EEPROM_MAGIC, this is empty already */
     	return ep->version;
    +#else
    +	return "A.3A";
    +#endif
     }
     
     char * __maybe_unused board_ti_get_config(void)
    @@ -320,23 +329,21 @@ void __maybe_unused set_board_info_env(char *name)
     {
     	char *unknown = "unknown";
     	struct ti_common_eeprom *ep = TI_EEPROM_DATA;
    +	debug("%s, ep->name, %s, ep->version, %s, ep->serial, %s\n", __func__, ep->name, ep->version, ep->serial);
     
    -	if (name)
    +	if (name){
     		setenv("board_name", name);
    +	}
     	else if (ep->name)
     		setenv("board_name", ep->name);
     	else
     		setenv("board_name", unknown);
     
    -	if (ep->version)
    -		setenv("board_rev", ep->version);
    -	else
    -		setenv("board_rev", unknown);
    +	debug("%s, board_rev = A.3A\n", __func__);
    +	setenv("board_rev", "A.3A");
     
    -	if (ep->serial)
    -		setenv("board_serial", ep->serial);
    -	else
    -		setenv("board_serial", unknown);
    +	debug("%s, board_serial = 46164P551378\n", __func__);
    +	setenv("board_serial", "46164P551378");
     }
     
     static u64 mac_to_u64(u8 mac[6])
    

    I have also tried the following:  

    with no success in booting Linux.  U-Boot does detect the correct device tree, yet the kernel never starts.  I'm pretty much out of ideas as to why it's not booting, and I'm not receiving any early printk debug messages to determine what's going on.  UART debug is the same as the EVM, same circuit and everything.

    Do you think that my not having EEPROM is confusing the Linux kernel in some way?  Is there a board detect phase in the kernel that is stalling somewhere?  I haven't seen any in the source code but I'm curious as to if U-Boot sends any of the board-detect information to the kernel as starting parameters.

  • Sorry for the delayed response.
    should I disable anything regarding the EEPROM in Linux?

    I personally haven't tested this, but yes, go ahead and try it.

    Do you think that my not having EEPROM is confusing the Linux kernel in some way?

    No, it shouldn't.

    Is there a board detect phase in the kernel that is stalling somewhere?

    No, the kernel does not have board detect phase, this should be handled in u-boot.

    Just a suggestion, can you try adding your configurations to am57xx-evm.dts and use this file as your device tree.

    Best Regards,
    Yordan
  • Yordan Kovachev said:

    Just a suggestion, can you try adding your configurations to am57xx-evm.dts and use this file as your device tree.

    I've been doing this, as am57xx-evm-reva3.dts  We have a device tree fragment (attached) that has only the barebone changes our board needs to boot, and disabling anything nonessential.  We've been compiling this as the root of the device tree, using 

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- customboard.dtb

    Then copying it to the rootfs partition with:

    cp arch/arm/boot/dts/customboard.dtb /media/tom/rootfs/boot/zImage-am57xx-evm-reva3.dtb

    My methodology for creating and moving Linux follows the steps given in the wiki, and is below:

    #!/bin/sh
    rm -rf /media/tom/rootfs/*
    tar xf ~/psdk4/filesystem/tisdk-rootfs-image-am57xx-evm.tar.xz -C /media/tom/rootfs/
    
    export PATH=/home/tom/psdk4/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH
    
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- tisdk_am57xx-evm_defconfig
    
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- customboard.dtb
    make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage
    make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules
    
    echo "writing to sd card"
    cp arch/arm/boot/zImage /media/tom/rootfs/boot/zImage-4.9.28-geed43d1050
    cp arch/arm/boot/dts/customboard.dtb /media/tom/rootfs/boot/devicetree-zImage-am57xx-evm-reva3.dtb
    make ARCH=arm INSTALL_MOD_PATH=/media/tom/rootfs modules_install
    
    echo "decompiling device tree"
    dtc -I dtb -O dts -o decompiled_devicetree_customboard.dts arch/arm/boot/dts/customboard.dtb

    8883.customboard.txt
    /*
     * customboard Controller - customboard Device Tree
     * 5728 - 256MB RAM, based on AM5728 Beagle-X15
     */
    
    #include "am57xx-evm-reva3-base.dts"
    #include "am57xx-evm-cmem.dtsi"
    
    #include <dt-bindings/input/input.h>	/* see if this is necessary */
    
    /*	Removed for now (should be unnecessary) - am57xx-beagle-x15-common.dtsi - ln 77-78
     *		regulator-boot-on;
     *		regulator-always-on;
     */
    
    / {
    	model = "customboard Controller - Rev 00";
    	compatible = "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7";
    
    	gpio_keys {
    		compatible = "gpio-keys";
    		#address-cells = <1>;
    		#size-cells = <0>;
    		autorepeat;
    
    		button1 {
    			label = "g3:btn1";
    			linux,code = <KEY_1>;
    			gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
    			gpio-key,wakeup;
    		};
    
    		/delete-node/ USER1;
    		/delete-node/ USER2;
    		/delete-node/ USER3;
    		/delete-node/ USER4;
    		/delete-node/ USER5;
    	};
    
    	aliases {
    		/delete-property/ display0;
    	};
    
    	leds{
    		led0 {
    			gpios = <&gpio6 11 GPIO_ACTIVE_HIGH>;
    		};
    
    		/delete-node/ led1;
    		/delete-node/ led2;
    		/delete-node/ led3;
    	};
    
    	/delete-node/ tpd12s015;
    	/delete-node/ hdmi0;
    };
    
    &tps659038{
    	/delete-node/ extcon_usb2;
    	/delete-node/ tps659038_pwr_button;
    };
    
    
    &gpio_fan {
    	gpios = <&gpio7 22 GPIO_ACTIVE_HIGH>;
    };
    
    &tmp102 {
    	status = "disabled";
    };
    
    &tlv320aic3104 {
    	status = "disabled";
    };
    
    /delete-node/ &eeprom;
    
    &i2c3 {
    	status = "disabled";
    };
    
    &cpsw_emac0 {
    	status = "disabled";
    	phy-mode = "mii";
    };
    
    &cpsw_emac1 {
    	status = "disabled";
    	phy-mode = "mii";
    };
    
    &mmc1 {
    	/* Should be active low, but the wrong part is installed so it stays high... */
    	cd_gpios = <&gpio6 27 GPIO_ACTIVE_HIGH>;
    	/*non-removable;*/
    	cd-inverted;
    };
    
    &mmc2 {
    	status = "disabled";
    };
    
    &mmc3 {
    	status = "disabled";
    
    	pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50";
    	pinctrl-0 = <&mmc3_pins_default>;
    	pinctrl-1 = <&mmc3_pins_hs>;
    	pinctrl-2 = <&mmc3_pins_sdr12>;
    	pinctrl-3 = <&mmc3_pins_sdr25>;
    	pinctrl-4 = <&mmc3_pins_sdr50>;
    	vmmc-supply = <&vdd_3v3>;
    	vmmc_aux-supply = <&ldo1_reg>;
    
    	/* Should be active low, but the wrong part is installed so it stays high... */
    	cd_gpios = <&gpio7 12 GPIO_ACTIVE_HIGH>;
    };
    
    &sata {
    	status = "disabled";
    };
    
    &usb2_phy1 {
    	status = "disabled";
    };
    
    &usb2_phy2 {
    	status = "disabled";
    };
    
    &usb1 {
    	status = "disabled";
    };
    
    &omap_dwc3_2 {
    	status = "disabled";
    };
    
    &usb2 {
    	status = "disabled";
    };
    
    &bb2d {
        status = "disabled";
    };
    
    &dss {
    	status = "disabled";
    };
    
    &hdmi {
    	status = "disabled";
    };
    
    &pcie1_rc {
    	status = "disabled";
    };
    
    &pcie1_ep {
    	status = "disabled";
    };
    
    &mcasp3 {
    	status = "disabled";
    };
    
    &mailbox3 {
    	status = "disabled";
    };
    
    &mailbox4 {
    	status = "disabled";
    };
    
    &mailbox5 {
    	status = "disabled";
    };
    
    &mailbox6 {
    	status = "disabled";
    };
    
    &mmu0_dsp1 {
    	status = "disabled";
    };
    
    &mmu1_dsp1 {
    	status = "disabled";
    };
    
    &mmu0_dsp2 {
    	status = "disabled";
    };
    
    &mmu1_dsp2 {
    	status = "disabled";
    };
    
    &mmu_ipu1 {
    	status = "disabled";
    };
    
    &mmu_ipu2 {
    	status = "disabled";
    };
    
    &ipu1 {
    	status = "disabled";
    };
    
    &ipu2 {
    	status = "disabled";
    };
    
    &dsp1 {
    	status = "disabled";
    };
    
    &dsp2 {
    	status = "disabled";
    };
    
    &pruss_soc_bus1 {
    	status = "disabled";
    };
    
    &pruss_soc_bus2 {
    	status = "disabled";
    };

    And a log when using this configuration

    putty.txt

  • I've gone back through U-Boot and re-checked my board-detection changes (due to the lack of EEPROM) and I wound up starting from a fresh slate and implementing this change:

    No success so far with getting the kernel to start.  At this point I'm basically spitballing, so here are a couple things from the U-Boot logs that I'd like your opinion on:

    Iterate >boot<
    Iterate dir am57xx-evm-reva3.dtb
    ext4fs read 256 group descriptor (blkno 3 blkoff 0)

    This is when U-Boot selects a device tree from /boot.  This is my own custom device tree.  It is the only .dtb in the /boot directory (contrary to that script from before).  I've noticed that it is read as 256 group descriptor, while the EVM reads its .dtb selection as a 96 group descriptor.  I have been unable to determine what this means, but it's consistent across boots/machines.  Both have the same COMPAT/INCOMPAT when the EXT4 filesystem comes online.



    EXT4 features COMPAT: 0000003c INCOMPAT: 00000246 RO_COMPAT: 0000007b
    EXT2 rev 1, inode_size 256, descriptor size 32
    ext4fs read 0 group descriptor (blkno 1 blkoff 0)

    ## Current stack ends at 0x8df11ae8 * kernel: cmdline image address = 0x82000000
    ## Skipping init Ramdisk
    ## No init Ramdisk
    ramdisk start = 0x00000000, ramdisk end = 0x00000000
    * fdt: cmdline image address = 0x88000000
    ## Checking for 'FDT'/'FDT Image' at 88000000
    Wrong FIT format: no description
    * fdt: raw FDT blob
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    of_flat_tree at 0x88000000 size 0x00018f52
    Initial value for argc=3
    Final value for argc=3
    ## FIT configuration was not specified
    using: FDT
    ## initrd_high = 0x90000000, copy_to_ram = 1
    ramdisk load start = 0x00000000, ramdisk load end = 0x00000000
    ## device tree at 88000000 ... 88018f51 (len=114514 [0x1BF52])
    Loading Device Tree to 8def4000, end 8df0ff51 ... OK
    Initial value for argc=3
    Final value for argc=3
    Updating property '/ocp/ethernet@48484000/slave@48480200/mac-address' = d4 36 39 fc 4b 3e
    Updating property '/ocp/ethernet@48484000/slave@48480200/local-mac-address' = d4 36 39 fc 4b 3e
    Updating property '/ocp/ethernet@48484000/slave@48480300/mac-address' = d4 36 39 fc 4b 3f
    Updating property '/ocp/ethernet@48484000/slave@48480300/local-mac-address' = d4 36 39 fc 4b 3f
    ## Transferring control to Linux (at address 82000000)...

    Starting kernel ...

    This is the final output before the system hangs.  It appears to be the same output as the EVM, with the exception of filesizes and RAM offsets.  The FIT/FDT messaging is the exact same as the EVM, I can really only think that's because my configurations follow the EVM so closely.  U-Boot states that my board is for all intents and purposes, an EVM.  Because of that I'm not too concerned about it.  

    For init ramdisk, we changed nothing between the EVM and Customboard, after reading the documentation it appeared that the EVM was set up according to the spec we wanted.  Our initrd_high (0x90000000) is the upper limit of our DDR3 RAM (256MB, starting at offset 0x80000000, mapped only to EMIF2).  That's really the only major difference between our unit and the EVM.  The reason I mention this is because I'm completely at a loss as to why it's not transferring over to the kernel.  

    Any help at all is greatly, greatly appreciated.

  • Hi,

    Check common/common_fit.c:
    int fit_select_fdt(const void *fdt, int images, int *fdt_offsetp)
    {
    const char *name, *fdt_name;
    int conf, node, fdt_node;
    int len;

    *fdt_offsetp = 0;
    conf = fdt_path_offset(fdt, FIT_CONFS_PATH);
    if (conf < 0) {
    debug("%s: Cannot find /configurations node: %d\n", __func__,
    conf);
    return -EINVAL;
    }
    for (node = fdt_first_subnode(fdt, conf);
    node >= 0;
    node = fdt_next_subnode(fdt, node)) {
    name = fdt_getprop(fdt, node, "description", &len);
    if (!name) {
    #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
    printf("%s: Missing FDT description in DTB\n",
    __func__);
    #endif
    return -EINVAL;
    }
    if (board_fit_config_name_match(name))
    continue;

    debug("Selecting config '%s'", name);
    fdt_name = fdt_getprop(fdt, node, FIT_FDT_PROP, &len);
    if (!fdt_name) {
    debug("%s: Cannot find fdt name property: %d\n",
    __func__, len);
    return -EINVAL;
    }

    debug(", fdt '%s'\n", fdt_name);
    fdt_node = fdt_subnode_offset(fdt, images, fdt_name);
    if (fdt_node < 0) {
    debug("%s: Cannot find fdt node '%s': %d\n",
    __func__, fdt_name, fdt_node);
    return -EINVAL;
    }

    *fdt_offsetp = fdt_getprop_u32(fdt, fdt_node, "data-offset");
    len = fdt_getprop_u32(fdt, fdt_node, "data-size");
    debug("FIT: Selected '%s'\n", name);

    return len;
    }

    #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
    printf("No matching DT out of these options:\n");
    for (node = fdt_first_subnode(fdt, conf);
    node >= 0;
    node = fdt_next_subnode(fdt, node)) {
    name = fdt_getprop(fdt, node, "description", &len);
    printf(" %s\n", name);
    }
    #endif

    return -ENOENT;
    }

    To fall into this condition board_fit_config_name_match should always return false.
    You can find the board_fit_config_name_match in board/ti/am57xx/board.c:
    #ifdef CONFIG_SPL_LOAD_FIT
    int board_fit_config_name_match(const char *name)
    {
    if (board_is_x15()) {
    if (board_is_x15_revb1()) {
    if (!strcmp(name, "am57xx-beagle-x15-revb1"))
    return 0;
    } else if (!strcmp(name, "am57xx-beagle-x15")) {
    return 0;
    }
    } else if (board_is_am572x_evm()) {
    if (board_is_am572x_evm_reva3()) {
    if (!strcmp(name, "am57xx-evm-reva3"))
    return 0;
    } else if (!strcmp(name, "am57xx-beagle-x15")) {
    return 0;
    }
    } else if (board_is_am572x_idk() && !strcmp(name, "am572x-idk")) {
    return 0;
    } else if (board_is_am571x_idk() && !strcmp(name, "am571x-idk")) {
    return 0;
    }

    return -1;
    }
    #endif

    Can you verify that you've modified board/ti/am57xx/board.c to point to your custom device tree?

    Best Regards,
    Yordan
  • Hi Yordan, I've verified that my board.c and board_detect.c now provide the correct board configurations by hardcoding the 'correct' EEPROM results. I noticed that I had a silly mistake where I changed the 'ti_i2c_eeprom_dra_get' in board/ti/common/board_detect.c rather than 'ti_i2c_eeprom_am_get' in my last post. I've also verified that Linux selects the correct 'am57xx-evm-reva3.dtb' in /rootfs/boot/. Thank you very much for helping!