Skip to content

Barebox as alternative to uBoot #19

Open

Description

@schulz-alexander

Maybe usefull for bringing up hardware and bootup linux or whatever:

https://www.barebox.org/

Activity

  1. xn--nding-jua commented on Aug 2, 2025

    @xn--nding-jua
    Member

    This is looking promising, especially because U-Boot has dropped the support for the i.MX25. Barebox seems to have devicetree-support for the i.MX25, but the dtsi-file is very short. So this needs more investigation but could be the bootloader for the final system.

  2. schulz-alexander commented on Aug 3, 2025

    @schulz-alexander
    MemberAuthor

    Repo/Branch: https://github.com/OpenMixerProject/barebox/tree/openx32

    • load barebox using u-boot, to check the basics
    • if this works, then replace u-boot with barebox
    • if this works, get the rest working (mmc read, ...)
    • get MMU working -> barebox should be faster with MMU
    • boot linux
    • get USB working -> to enable others to boot the full stack using imx-usb-loader and a prepared USB drive without the need to modify their console
    • (optional) implement a driver to get up/down/left/right key working (for menutree)
  3. schulz-alexander commented on Aug 3, 2025

    @schulz-alexander
    MemberAuthor

    current state:

    • barebox builds as u-boot bootable image in kernel format (using bootz command)
    • u-boot loads barebox ("Starting Kernel ..."), but nothing happens after this ;-)
    • need to sort out the serial3 port
    Image
  4. schulz-alexander commented on Aug 5, 2025

    @schulz-alexander
    MemberAuthor
    Image

    🚀

  5. schulz-alexander commented on Aug 6, 2025

    @schulz-alexander
    MemberAuthor

    Upload via imx-usb-loader works and the lamp turns on via DCD-Table (https://github.com/xn--nding-jua/OpenX32/wiki/Booting)

    Next step is to get barebox booting without chainloading via u-boot

  6. schulz-alexander commented on Aug 7, 2025

    @schulz-alexander
    MemberAuthor

    successfully bootet barebox standalone on the X32 🚀

  7. xn--nding-jua commented on Aug 7, 2025

    @xn--nding-jua
    Member

    Congratulations! How many changes did you make on the barebox-repository. Is it necessary to keep the individual fork or can we take the regular barebox-repository with minimum changes like on U-Boot?

  8. schulz-alexander commented on Aug 7, 2025

    @schulz-alexander
    MemberAuthor

    It's just the serial downloader which works, currently I debug the load from sd card.

    I would keep the fork and try to push it upstream some time.

  9. schulz-alexander commented on Aug 7, 2025

    @schulz-alexander
    MemberAuthor

    bootet barebox, mounted sd card, tried to boot the linux kernel

    Image
  10. schulz-alexander commented on Aug 8, 2025

    @schulz-alexander
    MemberAuthor

    Current state:

    • sd card can be mount
    • usb is somewhat working
    • framebuffer driver is loaded
    Error: Cannot request SDRAM region for stack
    imx-esdhc 53fb4000.mmc@53fb4000.of: registered as mmc0
    mmc0: detected SD card version 2.0
    mmc0: registered mmc0
    gpiolib: _gpio_request: gpio-120 (mculed) status -16
    gpiolib: _gpio_request: gpio-26 (lamp) status -16
    gpiolib: _gpio_request: gpio-124 (reset_surface) status -16
    imx-di-rtc 53ffc000.dryice@53ffc000.of: Unlocked unit detected
    imxfb imxfb: i.MX Framebuffer driver
    fb0: framebuffer console 100x30 activated
    fbconsole: registered as fbconsole0-1
    fb1: framebuffer console 100x30 activated
    fbconsole: registered as fbconsole1-1
    malloc space: 0x8de00000 -> 0x8fdfffff (size 32 MiB)
    environment load /dev/env0: No such file or directory
    Maybe you have to create the partition.
    
    Hit any to stop autoboot:    1
    boot: No such file or directory
    barebox:/ 
    
  11. xn--nding-jua commented on Aug 8, 2025

    @xn--nding-jua
    Member

    Cool. Would be great to have a bootmenu to select between OpenX32 and the original Firmware. Should be possible to create a fifth Partition on a larger SD Card. Or we could place our barebox at 0x400 of the SD Card and move the DCP Loader to a later position.

    Your progress looks promising 👍

  12. schulz-alexander commented on Aug 10, 2025

    @schulz-alexander
    MemberAuthor

    First boot from sd card worked!

    The trick was to use just allowed ranges in the DCD-Table, as mentioned in the reference manual ;-)
    Setting the GPIO-PINs was not allowed.

  13. schulz-alexander commented on Aug 10, 2025

    @schulz-alexander
    MemberAuthor

    Image

  14. schulz-alexander commented on Aug 12, 2025

    @schulz-alexander
    MemberAuthor
    • normal colors and no more screen artifacts in barebox
    • splash logos can be shown
    Image
  15. schulz-alexander commented on Aug 14, 2025

    @schulz-alexander
    MemberAuthor
    • mmu works, barebox is way faster :-)
    • barebox loads the kernel and device tree, but nothing happens
    Hit m for menu or any to stop autoboot:    1
    barebox@Behringer X32 - OpenX32:/ boot mmc
    Booting entry 'mmc'
    
    Loading ARM Linux zImage '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/sd/zImage'
    request region(0x82158000:0x82803327): success flags=0x200
    Loading devicetree from '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/sd/imx25-pdk.dtb'
    request region(0x82904000:0x82909c85): success flags=0x200
    commandline: console=ttymxc4,115200 console=tty0 video=imxfb:800x480  
    exitcall-> nv_exit+0x0/0x38
    exitcall-> devices_shutdown+0x0/0xa8
        remove-> fat0
        remove-> 53ff4400.usb@53ff4400.of
        remove-> 53ff4000.usb@53ff4000.of
        remove-> devfs0
        remove-> ramfs0
    exitcall-> umsmod_exit+0x0/0x10
    exitcall-> arch_shutdown+0x0/0x20
    
    

    I think the memory initialisation is not right. The DTS file defines 0x80000000 to 0x84000000 as RAM (==64MB), but barebox add two more regions, one from 0x90000000 :-/

    I think it's time for a break ⏸️ to rethink and get new brain power...

  16. schulz-alexander commented on Aug 15, 2025

    @schulz-alexander
    MemberAuthor

    got it! Linux is booting from barebox 🚀

    Image



    the trick was to disable the second (not used) sdram controller via DCD table:

    # Disable ESDCTL1
    wm 32 0xB8001008 0x0
    
  17. added this to the OpenX32 v0.2 milestone on Dec 2, 2025
  18. schulz-alexander commented on Dec 2, 2025

    @schulz-alexander
    MemberAuthor

    Next step is to include Barebox into the DCP-Loader image

  19. removed this from the OpenX32 v0.3 milestone on Mar 1, 2026
  20. schulz-alexander commented on May 3, 2026

    @schulz-alexander
    MemberAuthor

    Next step is to include Barebox into the DCP-Loader image

    That's harder than expected 😑 I can not get barebox to load from the DCP-Loader

  21. removed their assignment
    on May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions