This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

U-boot is usable with proprietary operating system

Hello everybody!!
I have a question...Can i use U-boot for a proprietary operating system??

I should port an OS from x86 to ARM architecture and i would use U-boot as bootloader.

Can someone help me?

Thanks in advance

Parents
  • dlbp90,

    Depending on the format of the OS kernel image you want to load (ELF, raw binary, whatever) you may want to look into the "bootelf" or "go" commands - "bootelf" will parse, relocate, clear BSS for an ELF file loaded into memory, and jump to the entrypoint. "go" will branch to the address you specify, without doing anything else, so if you need to prepare the environment (like clearing the BSS, or relocating, or whatever), that's up to you.

    "bootelf" is good if your image loads into a fixed memory map where the application/kernel has no 'internal knowledge' of the file format be that ELF, split into sections, needing cleared or copied or something else.

    "go" is good if you're pretty sure your application/kernel has that knowledge.

    It's useful to note that all of the U-Boot "bootXXX" commands technically "go" as the last step, the "boot" part is preparing the image to "go" based on a particular image format (bootm for FIT or Legacy U-Boot Linux, bootz for Linux zImage, bootelf for plain ELF, etc. etc.) or boot protocol.

    In this sense, yes, you can run whatever you like from U-Boot, relatively simply. You just have to make sure your U-Boot contains the appropriate file format and boot protocol support as above.

    Ta,

    Matt

Reply
  • dlbp90,

    Depending on the format of the OS kernel image you want to load (ELF, raw binary, whatever) you may want to look into the "bootelf" or "go" commands - "bootelf" will parse, relocate, clear BSS for an ELF file loaded into memory, and jump to the entrypoint. "go" will branch to the address you specify, without doing anything else, so if you need to prepare the environment (like clearing the BSS, or relocating, or whatever), that's up to you.

    "bootelf" is good if your image loads into a fixed memory map where the application/kernel has no 'internal knowledge' of the file format be that ELF, split into sections, needing cleared or copied or something else.

    "go" is good if you're pretty sure your application/kernel has that knowledge.

    It's useful to note that all of the U-Boot "bootXXX" commands technically "go" as the last step, the "boot" part is preparing the image to "go" based on a particular image format (bootm for FIT or Legacy U-Boot Linux, bootz for Linux zImage, bootelf for plain ELF, etc. etc.) or boot protocol.

    In this sense, yes, you can run whatever you like from U-Boot, relatively simply. You just have to make sure your U-Boot contains the appropriate file format and boot protocol support as above.

    Ta,

    Matt

Children