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.

AM5728: Things to do after u-boot

Part Number: AM5728

Hi,

I got an overview of u-boot and understood about u-boot handling. Now for further study I started experimenting how to make u-boot to run an application.

So i created a boot partition copied MLO, u-boot and a .out cross-compiled exe. I copied the exe in memory location 0x82000000

with load 0:0 0x82000000 hello_world  (first 0 being the sd card and second 0 is the root partition)

Then started the application as go 82000000 but the terminal didn't responded for like 5-10 minutes and I was forced to reset the board. How to debug things in these kind off situations?

The program is a simple hello world program. Initially i tried to go through the Makefile of u-boot/examples/standalone to understand the process of compilation but its bit tough for me so i just cross-compiled using arm toolchain.

Now I am stuck at why I am not able to see the output over the console. Also if I need to u-boot to run it automatically then I need to create a script for this or I have to put it in u-env.txt ?

  • Hi Matt,

    I will look into this and get back to you in couple of days.

    Thanks,
    Keerthy

  • Hi keerthy,

    Thanks for replying, but before that I wanted to know that the is there something wrong with the steps and sequence I carried out? Also when I was looking at the memory contents at 0x82000000 I  got some random junk values, I was expecting some string "Hello world" near to the starting address, If that is the case then its something wrong with load operation.

  • Matt,

    Try md 0x82000000 0x100

    Try dumping 256 bytes and check the contents. You will see Hello wold.

    - Keerthy

    urrent device
    =>
    => fatload mmc 0 0x80300000 hello_world.bin
    570 bytes read in 4 ms (138.7 KiB/s)
    => md 0x80300000 0x100
    80300000: 41f0e92d 46084605 f000460e 2109f8c3 -..A.F.F.F.....!
    80300010: f0004817 f000f851 4601f83b f0004815 .H..Q...;..F.H..
    80300020: 4815f84b f848f000 48144629 f844f000 K..H..H.)F.H..D.
    80300030: 4f132400 8054f8df dd0e42ac f0004811 .$.O..T..B...H..
    80300040: f000f83b 2800f82d f000d0fb 480ef825 ;...-..(....%..H
    80300050: f832f000 e8bd2000 f85681f0 46212024 ..2.. ....V.$ !F
    80300060: bf082a00 4640463a f826f000 e7e33401 .*..:F@F..&..4..
    80300070: 803001b7 803001d7 803001f5 80300202 ..0...0...0...0.
    80300080: 803001b0 8030021e 80300237 8030020d ..0...0.7.0...0.
    80300090: c070f8d9 f000f8dc c070f8d9 f004f8dc ..p.......p.....
    803000a0: c070f8d9 f008f8dc c070f8d9 f00cf8dc ..p.......p.....
    803000b0: c070f8d9 f010f8dc c070f8d9 f014f8dc ..p.......p.....
    803000c0: c070f8d9 f018f8dc c070f8d9 f01cf8dc ..p.......p.....
    803000d0: c070f8d9 f020f8dc c070f8d9 f024f8dc ..p... ...p...$.
    803000e0: c070f8d9 f028f8dc c070f8d9 f02cf8dc ..p...(...p...,.
    803000f0: c070f8d9 f030f8dc c070f8d9 f034f8dc ..p...0...p...4.
    80300100: c070f8d9 f038f8dc c070f8d9 f03cf8dc ..p...8...p...<.
    80300110: c070f8d9 f040f8dc c070f8d9 f044f8dc ..p...@...p...D.
    80300120: c070f8d9 f048f8dc c070f8d9 f04cf8dc ..p...H...p...L.
    80300130: c070f8d9 f050f8dc c070f8d9 f054f8dc ..p...P...p...T.
    80300140: c070f8d9 f058f8dc c070f8d9 f05cf8dc ..p...X...p...\.
    80300150: c070f8d9 f060f8dc c070f8d9 f064f8dc ..p...`...p...d.
    80300160: c070f8d9 f068f8dc c070f8d9 f06cf8dc ..p...h...p...l.
    80300170: c070f8d9 f070f8dc c070f8d9 f074f8dc ..p...p...p...t.
    80300180: c070f8d9 f078f8dc c070f8d9 f07cf8dc ..p...x...p...|.
    80300190: 00004770 4b042100 42934a04 4770d300 pG...!.K.J.B..pG
    803001a0: 1b01f803 bf00e7f9 8031023a 8031023c ........:.1.<.1.
    803001b0: 4c554e3c 45003e4c 706d6178 6520656c <NULL>.Example e
    803001c0: 63657078 41207374 76204942 69737265 xpects ABI versi
    803001d0: 25206e6f 41000a64 61757463 2d55206c on %d..Actual U-
    803001e0: 746f6f42 49424120 72657620 6e6f6973 Boot ABI version
    803001f0: 0a642520 6c654800 57206f6c 646c726f %d..Hello World
    80300200: 7261000a 3d206367 0a642520 67726100 ..argc = %d..arg
    80300210: 64255b76 203d205d 22732522 6948000a v[%d] = "%s"..Hi
    80300220: 6e612074 656b2079 6f742079 69786520 t any key to exi
    80300230: 2e2e2074 0a00202e 04aa000a dfbbffef t ... ..........
    80300240: 8380f2df f9b37d7f 640e13bf adab77ff .....}.....d.w..
    80300250: c8202a0d b8a7e377 a14ea830 2d621fff .* .w...0.N...b-
    80300260: 1a904009 d75971b8 20091992 fbf9ef2a .@...qY.... *...
    80300270: 0088caea feffb77f 0440ded5 fb3f57db ..........@..W?.
    80300280: 132986a0 cfb7a320 a00ba000 bfb6964d ..). .......M...
    80300290: 00100000 7d634464 00080008 63347f45 ....dDc}....E.4c
    803002a0: 20049100 4e99270f 00010101 7bf80612 ... .'.N.......{
    803002b0: 01e00904 c4f631cf 00620002 4fbfd4fc .....1....b....O
    803002c0: 00c244d0 b8afbdde 00005950 5c9adfbb .D......PY.....\
    803002d0: 00081080 ff2fcb81 00401202 ca0e7c04 ....../...@..|..
    803002e0: 0a000000 87170b1b 00002000 02feb509 ......... ......
    803002f0: 11126080 17eefab7 c8410184 d7f3bf63 .`........A.c...
    80300300: ac3388ee bfbff8df 5619dbce effcfedf ..3........V....
    80300310: 10006a0c 707ffbff 0010114a c28affdf .j.....pJ.......
    80300320: 441b6c00 9e6a377d 482ec6e2 fc7cdf9d .l.D}7j....H..|.
    80300330: c3c8e07e ed7efaff 83a56ffd 5d7fffef ~.....~..o.....]
    80300340: 0692de9e 7ffffbeb 00d8048f fefdf7ff ................
    80300350: 40816093 4ba9ddf7 2c8333cc e1eefe67 .`.@...K.3.,g...
    80300360: 20086a09 feabbf7f 04c23442 bdc7efd3 .j. ....B4......
    80300370: 3881e2ec 777fffed f806fc42 9c4bffff ...8...wB.....K.
    80300380: 40000102 0bee435f 8e4c06c6 fb627767 ...@_C....L.gwb.
    80300390: 04000201 fbe98b4a 84140400 f581ce7e ....J.......~...
    803003a0: 0c008006 00fd5b3d 00f00009 d9e0801a ....=[..........
    803003b0: 00010210 b36d8ed7 20201906 d83ebc0e ......m... ..>.
    803003c0: 82e04240 74a4dffd 9a100234 77cd663a @B.....t4...:f.w
    803003d0: 80004010 28c93c40 09000000 68530ed4 .@..@<.(......Sh
    803003e0: 22000001 4e0beb25 00002820 fdd533a8 ..."%..N (...3..
    803003f0: 050c94e0 7fd957f3 91080230 3fffc731 .....W..0...1..?
    =>

  • Hi keerthy,

    Thanks for the reply, at the moment I don't have board with me, will try your commands once i have the board. I see you are doing fatload mmc 0 0x80300000 hello_world.bin is there any specific reason that you used 0x80300000 address? Why I chose 0x80200000 because the bdinfo show start address as 0x80200000.

    After looking into u-boot manual I thought load command should work fine anyway I will look into u-boot commands again to understand the specific purpose of the command.