[yocto] Help to add uboot/standalone binary program for yocto projects

Szabolcs Báder sb at baader.hu
Sat Jul 6 10:07:08 PDT 2019


Hello

I follow my last email, I solved the reboot things. Works fine.. but I
found a cool/interesting thing, what I would like to integrate. >>

I read about standalone binaries (from C, or with Rust generated too?)
could use at uboot.
http://www.denx.de/wiki/view/DULG/UBootCmdGroupExec#Section_5.9.4.1
Hello World example: http://www.denx.de/wiki/view/DULG/UBootStandalone

I understand but really not, how possible use with Yocto. I just create a
similar hello_world.c program like at example and solved? Drop to the same
folder? .. (I use rpi3.) Somebody did similar thing in the past? Or good
example?

On Stackoverflow:
https://stackoverflow.com/questions/49814470/u-boot-how-to-run-a-standalone-binary-program
"You can use the Yocto toolchain but you cannot link against the C library
(which is done by default) so you have to put some extra options to GCC to
let it know that, also, you cannot use the go instruction from U-Boot to
jump to an ELF binary that you just loaded in memory, the ELF binary has to
be converted to a 'raw' binary (list of ARM instructions in your case) with
the tool objdump. An ELF binary it's a specific format that encapsulate
your code/your data and some extra information, and the first part of the
ELF is the description of the binary, so right now, when you do a go at the
first address, you are trying to tell the CPU to execute something which is
not an ARM instruction. You basically want to execute what we call the
'.text' section of the ELF binary."

Many thanks,
Szabolcs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20190706/89d98dc3/attachment.html>


More information about the yocto mailing list