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 linux image to MMC without SD Card on BBB

Hello,

I have Beaglebone Black revision C, and a constraint that I can not use an SD card for flashing the new image (this is for the custom AM335x board which will be similar to BBB)

Right now I am trying to flash the image to EMMC, which brings me to question #1

1) I have built u-boot from ti-sdk-am335x-evm-08.00.00.00 and can boot into it successfully through UART.

Inside of U-Boot interface, I am able to TFTP files through USB RNDIS into memory and (what seems like) write them to the mmc by following a short guide I found in u-boot readme file. 

However when I try to run the kernel, I get the error message "mmcblk0boot1/0: unknown partition table", and after that the execution hangs.

This message implies that it could not find a valid partition on eMMC, which is correct. However is there a way to create a partition table from u-boot? Or do I need to take another approach?

2) Another question, is there a way to write u-boot to memory so I do not have to load it through Uart every time? To clarify, I would like to power on the board and go into u-boot. Currently I receive the "CCCC" messages on power on, so I need to load the two files (spl and boot) before entering u-boot.

3) When I insert the SD card, I am greeted by a very old u-boot message that hangs with "no daughter card present" - uboot version 2011.09. I am almost certain I did not build that one. Does anybody know where this message comes from, and how to update *that* uboot ?

Thank you.

  • Update:

    I found this: github.com/.../BBBlfs

    It seems to work well. I will study the source code and see how it works. It seems to do everything I want.

    Replies still welcome.
  • Hi Denis,

    I will forward this to the SW team.

  • Hi Denis,

    You can refer to am335x TRM, specially chapter 26.1.7.5 - "Booting Procedure", to clarify uncertainties.
    www.ti.com/.../spruh73k.pdf

    This thread can be helpful:
    www.element14.com/.../write-an-uimage-from-a-sd-card-to-the-emmc-memory

    Regarding your questions:
    1) Use gpt command to restore partition table from u-boot prompt.

    2) Boot from sdcard (or from UART) and place u-boot.img and MLO in mmcblk1 (that is eMMC).

    3) Use u-boot prebuilts from am335x-SDK , or download latest sources and build u-boot binaries for your board from official u-boot site:
    ftp://ftp.denx.de/pub/u-boot/

    BR,
    Georgi
  • Hello, thank you for the reply. I have read the resources you've provided.

    For #2 you mentioned that I need to boot from UART or sdcard and copy files to the partition.
    However right now our linux kernel is not running (but thankfully we can use RNDIS so loading files is fast)

    I would like to verify eMMC is functioning, the README file describes a process of tftping MLO and u-boot.img files and writing them to eMMC using mmc commands (Falcon mode). (MLO to 100 100, 200 100, u-boot.img to 300 400 in memory) If I understand correctly, this should allow me to boot straight into u-boot once the board is powered on? However when I reset the board, I am greeted with 'CCCCC'.

    Am I missing some step, or am I misunderstanding the instructions?


    Thanks.

  • Hi Denis,

    As I understand, you want to place MLO and u-boot.img to clean emmc.
    You are booting over UART, and then using TFTP to transfer MLO and u-boot.img files to memory
    and then place them to emmc.

    These are the steps, that work for me.

    I am using uboot v. 2015.04, compiled for am-335x_beagleboard instead
    of u-boot from sdk8 prebuilts.

    1. Boot in U-Boot over UART.
    2. Pratitioning of emmc.
    2.1 Using "uuid -v4" command on my host machine, generate two uuids: <uuid1> and <uuid2>.
    2.2 from U-Boot prompt run:

    setenv uuid_gpt_disk <uuid1>
    setenv uuid_gpt_rootfs <uuid2>
    gpt write mmc 1 $partitions
    (In my case "mmc 1" is emmc)

    3. Reboot the system and boot in U-Boot over UART.
    4. Set environment variables serverip, clientip and rootpath for tftp transfer.
    5. Follow steps form u-boot README:

    tftp 81000000 MLO
    mmc write 81000000 100 100
    mmc write 81000000 200 100
    tftp 81000000 u-boot.img
    mmc write 81000000 300 400
    reset

    After restart must boot into U-Boot

    Also you can refer to the following link:

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

    Best regards,

    Georgi

  • Thanks. It ended up wrong boot sequence was set on hardware. Once the hw engineer changed the sequence, we booted into a few days old u-boot build.
    Your guide should work. I'll double check by writing new bootloader.

    Edit: Confirmed to be working.

    Thanks again.