UBIBoot on the RetroMini

Hello there,

For those who don’t know, I had written a bootloader called UBIBoot, quite a long time ago, for the Dingoo A320. As its name suggests, it supported booting from a UBI volume on the NAND. That is to say, it was able to boot a Linux kernel on the only Dingoo A320 with the internal NAND formatted as UBI: my own. I trashed the native OS and was running OpenDingux directly on the internal NAND.

The job of UBIBoot was to initialize the main PLL, the clocks, set the pins of the SoC in the right mode, initialize the SDRAM, initialize the NAND, initialize the SD card controller, and then finally, boot Linux from the first FAT partition of the SD card if there’s one inserted, or from the “kernel” UBI drive of the internal NAND.

All of that in about 5 kilobytes.

Before the GCW Zero came out, I got a prototype (with 256 MiB RAM), and ported UBIBoot to it. It then became the default and official bootloader for the GCW Zero when it was retailed months later.

There’s a fun story about it: the GCW Zero prototype didn’t have marks on the main board to show where the UART pads were, so I ported UBIBoot without having any output log: instead, I was blinking the LCD. My test passed? LCD turned on. It failed? The LCD remained off. Repeat for everything you need to test in your code. Next time it will be faster for me to learn Morse code and make the LCD blink Morse code to me 🙂

Anyway, I disgress. I ported UBIBoot to the RetroMini, and the code is in the master branch now, which means it’s officially supported. The code is available here.

Note that right now, it only supports booting from an external micro-SD card. I did not try to flash it on the NAND; I want to dump the NAND before starting to overwrite it with random stuff.

To compile:
CONFIG=rs90 make

For the stage1 variant, where UBIBoot will only initialize the hardware then return to the USB loader:
CONFIG=rs90 STAGE1_ONLY=y make

Note that right now, it’s only useful for people with a UART cable soldered and who want to boot their own Linux kernel (or other operating system).

Next step: boot Linux!

  1. #1Alan, 13 Jul 2018

    So interesting to watch this develop. Thanks for documenting your progress here.

    Reply

  2. #2chris, 14 Jul 2018

    Yes it is really interesting, and you can explain quite clearly. I will watch your progress ! Thank you very much for sharing !

    Reply

  3. #3Alan, 14 Jul 2018

    I just got mine yesterday. Very cool little device, surprisingly good with Genesis and SNES.

    Reply

  4. #4Dulus_No, 20 Jul 2018

    Reply

    1. #4.1pcercuei, 20 Jul 2018 (Reply to Dulus_No)

      I dumped it as well 😉

      Reply

  5. #5retromini, 10 Aug 2018

    I’d love to know if you managed to get Linux running on your RetroMini!

    Reply

    1. #5.1pcercuei, 10 Aug 2018 (Reply to retromini)

      Let’s say I code faster than I write blog posts 😉

      Reply

    2. #5.2retromini, 11 Aug 2018 (Reply to retromini)

      Assuming you managed to get to the point of having something like OpenDingux fully running, could you please share the your opinion of performance of this little machine?
      Would you say that it’s now perfectly usable for retro playing? (read: near full speed for platformers and the like)

      Reply

    3. #5.3pcercuei, 11 Aug 2018 (Reply to retromini)

      I’m not quite there yet. As for performance, it’s good enough for running GBA and GameBoy. I’m not really interested into anything else TBH.

      Reply

    4. #5.4retromini, 11 Aug 2018 (Reply to retromini)

      I really hope you manage to get it in a state where you feel comfortable to release it to the public and write a new blog post about it!

      Kudos for your hacking abilities! =)

      Reply

    5. #5.5VanZan, 13 Aug 2018 (Reply to retromini)

      Great to hear. I may purchase another as I’m sure the price will increase once your hack is released

      Reply

  6. #6VanZan, 17 Aug 2018

    The most important question though is…did you get rid of the fish?

    Reply

  7. #7blackz1982, 19 Aug 2018

    Hello pcercuei.
    Maybe you will make at least the short instruction how to pass to ubiboot on dingoo a320?

    Reply