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.

Writing to a blank EEPROM on a new custom board

Hi 

We have built our own board based on the BeagleBone Black reference design.

I am using the board.c file in the am335x folder under SDK directory to generate a uboot image.

However, the code has function read_eeprom(&header) that reads the EEPROM, but at this point oour eeprom is empty.

My first question is how can we burn the eeprom with our board name/id/serial /version numbers?

Secondly, if we by pass this function we get error at enable_board_pin_mux . 

How to resolve this?

Regards

Wafa

  • Hi Wafa,

    You will need an external I2C programmer, like Aardwark for this. Hope you have got access points for EEPROM programming on your board.

    If you choose to bypass the EEPROM check, be aware that check happens several times in the u-boot code, you'll need to bypass them all.

  • Thanks for the response. Unfortuanately, i do not have access points to program the eeprom. But i have cleaned the code of the read_eeprom.

    The point where i am stuck now is that i cannot get the u-boot-spl.bin that i generated to download on my board via Minicom . 

    I can successfully do so using Tera Term on my Windows machine.

    I read that it might be because the xmodem timeouts..how can we change the timeout value of the xmodem in Minicom?

    I tried using Tera Term in Linux but it simply doesn't connect. Gives the error "Cannot find COM1". for all COM ports.

    Regards

    Wafa

  • Wafa Iqbal1 said:
    I read that it might be because the xmodem timeouts..how can we change the timeout value of the xmodem in Minicom?

    You could search the net for this. This is a processor specific forum and we do not support general questions.

  • I resolved that issue by using Cutecom instead of Minicom.

    But nowi have to partition the eMMC before i write anything to it . So following the instructions found here

    http://processors.wiki.ti.com/index.php/Linux_Core_U-Boot_User's_Guide#Partitioning_eMMC_from_U-Boot

    $ uuidgen
    ...first uuid...
    $ uuidgen
    ...second uuid...
    
    U-Boot # printenv partitions
    uuid_disk=${uuid_gpt_disk};name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}
    U-Boot # setenv uuid_gpt_disk ...first uuid...
    U-Boot # setenv uuid_gpt_rootfs ...second uuid...
    U-Boot # gpt write mmc 1 ${partitions}

    i get an error immediately saying:

    data abort.

    MAYBE you should read doc/README.arm-unaligned-accessess
    pc : [] lr : []
    etc..
    etc..
    etc..

    Flags: NzCv IRQs off FIQs on MODE SVC_32
    Resetting CPU...

    reseting...
    ccccccccccc


    I cannot find understand this error. What is causing it ? is there any other way to go about partitioning and flashing the MLO, uboot and kernel to eMMC?


  • Hi,

    Which SDK version are you using?

    Can you verify that your eMMC is visible from U-Boot? Can you run "mmc dev 1" + "mmc rescan" commands? What's the output?

    You can also try to partition the eMMC from Linux (boot from SD card), following these steps:

    4. The eMMC is /dev/mmcblk1. Format it this way:
    4.01. fdisk /dev/mmcblk1
    4.02. o - this clears the existing partitions
    4.03. p - this lists all partition tables on the card (there should be none)
    4.04. n - create a new partition
    4.05. p - primary partition
    4.06. 1 - partition number
    4.07. 2048 - default value for the first sector
    4.08. +16M - last sector / partition size
    4.09. t - change the partition type (select partition 1)
    4.10. e - change tha partition type to "W95 FAT16 (LBA)"
    4.11. a - set the bootable flag for the selected partition (1)
    4.12. n - create a new partition
    4.13. p - primary partition
    4.14. 2 - partition number
    4.15. hit Enter to choose the default (next available) value for the first sector
    4.16. hit Enter to choose the default (last) value for the last sector
    4.17. p - this lists all partition tables on the card (there should be two)
    4.18. w - write all the above changes to disk
    4.19. umount /dev/mmcblk1p1; mkfs.vfat -F 16 /dev/mmcblk1p1 - format the first partition
    4.20. umount /dev/mmcblk1p2; mkfs.ext4 /dev/mmcblk1p2 - format the second partition

    Best regards,
    Miroslav

  • Hi Miroslav

    Thanks for your reply. I have seen your recommendations on other posts to but they wont work in my case as i do not have a SD card slot on my board. I a running the Uboot over UART currently.

    I am using SDK version 07. 

    Yes the eMMC is visible.

    U-Boot# mmc dev 1 

    mmc1 (part 0) is current device

    U-Boot# mmc rescan

    U-Boot#

    no output...

    I was directed to the wiki that explains eMMC partitioning by TI support but i havnet heard back for a week from TI about my problem of not being able to partition it.

    Waiting anxiously for a break through.

    -Wafa

  • Anyone else have a solution for 

    gpt write mmc 1 $(partitions)

    resulting in a reset

    Writing GPT: data abort

    This is on a BBB derived custom board. Trying to program on-board eMMC via uboot. 

    I've set the UUIDs for envs uuid_gpt_disk and uuid_gpt_rootfs

    => gpt write mmc 1 uuid_disk=e16ab547-0d89-4daa-9b43-1322436efbc1;name=rootfs,start=2MiB,size=-,uuid=bdabc2da-6930-45fd-b4c6-5d487ef77666
    Writing GPT: data abort
    pc : [<9ff8b84a>] lr : [<9ff6cbbb>]
    reloc pc : [<8082b84a>] lr : [<8080cbbb>]
    sp : 9ef3fd38 ip : 00000003 fp : 00000005
    r10: 9ef40a28 r9 : 9ef3fed8 r8 : 9ef43158
    r7 : 9ff6cafd r6 : 00000001 r5 : 9ef43000 r4 : 00000000
    r3 : 00000001 r2 : 00000000 r1 : 9ff9b985 r0 : 00000000
    Flags: nzcv IRQs off FIQs on Mode SVC_32
    Resetting CPU ...

    If we write and image to MMC 1 it boots and runs just fine. This is about trying to get uboot to flash the MMC to program the board.
    We can vary the gpt parameters, and it still crashed the board.

    I've been following the below method:

    http://processors.wiki.ti.com/index.php/Linux_Core_U-Boot_User's_Guide#Using_SD.2C_eMMC_or_USB_storage

  • Incase someone gets here from google. See here for why gpt might be crashing. e2e.ti.com/.../2220615