Thursday, June 25, 2009

Dual boot installer released

Get it from the google code project download section here.

The README file explains it all. You can flash dual boot in your A320 both from Windows and Linux. Note that the installer will give you the ability to select from original firmware on internal flash or linux on miniSD. The later means the dual boot code will look for a zImage kernel file in the first partition of the miniSD and launch it. That's all.

IMPORTANT: I'm almost 100% sure the ILI9331 variant works fine, but could not test it since the newer A320 (paid by your generous donations) hasn't arrived yet. Postal service sucks big time here. If you have any troubles, please let me know.

Some notes for rootfs developers:
  • The flashed U-Boot environment can't be changed. It just loads a zImage from miniSD and that's all.
  • If you want to pass special command line parameters to the kernel, you must embed them in the zImage (see CONFIG_CMDLINE). That means you need to recompile the kernel.
  • If you want an initramfs, you'll also have to embed it into the kernel (see CONFIG_INITRAMFS_SOURCE).
I guess that U-Boot environment could be read from miniSD, but I don't see the point at the moment and didn't bother to implement. Will do if the need arises.

This is how the installer works: the instructions let you boot a zImage. It's just the kernel with three particularities:
  • The console font size is set to 8x16 (instead of the tiny one).
  • The NAND flash support is enabled and forced to 2K page size (required to properly write the SPL area which is the first eraseblock).
  • There is an embedded initramfs which contains libc, busybox, mtd-tools, dialog, and a script that executes on startup, shows a disclaimer and does the job.
Using Linux to do the actual flashing has the advantage of having a single installer. The instructions for Windows and Linux differ because they use different tools to boot the kernel with embedded initramfs, but once the kernel is running the flashing (or any other task that I might perform) is independent of the PC operating system.

UPDATE 1: yes, the logo is shown even if you are booting into the original firmware. I though it was nice to show it as sort of saying "this A320 is modded to boot linux". However, it can be easily changed if enough people prefer it not shown.

UPDATE 2: please please please read the keyboard related section of this document. It explains the current key map and special key combinations in linux, in particular how to reboot the machine. I've noticed that the immediate reboot key combination (POWER+START+SELECT) is a bit inconvenient if you are rebootint into the original firmware, because you must be quick releasing SELECT or you boot again into linux. This wasn't a problem when boot selection was being done by U-Boot because it takes a little time to load, but now selection is done right in the SPL, in fact the SELECT key state reading is the first thing done. I'll be glad to hear your comments and suggestions on this issue.

UPDATE 3: some clarification: the dual-boot installer lets you boot linux withou having to use a PC. But you had to have linux installed already in your miniSD as described in the QuickStart guide in the wiki section of the google code project page. I guess it's been a bit confusing that I've released a kernel image at the same time than the dual boot installer. You still need to install the root filesystem in a second ext2/ext3 partition.

UPDATE 4: yes, formatting and installing the root filesystem from windows is not yet solved, but it is not difficult and someone (maybe me) will do it soon. All we need is to place the rootfs file in the FAT partition and embed a initramfs into the zImage that will first mount the FAT partition and then the rootfs file as a loopback device.


  1. Awesome ...downloading now

  2. Thanks, downloading now. This is a very awesome thing.

  3. Is it normal to see the Dingux screen every time i boot the dingoo although im not pressing select and that it ends up booting Dingoo's original firmware?

  4. is there a way to fix problems with it being a read only filesystem?

  5. The installation worked fine on mine (ILI9331), and it boots up properly into the existing firmware.

    But when I hold SELECT it stays on the Dingux logo screen for, well, as long as I've left it. Seems to be stuck.

    Have an 8GB micro SD in a mini SD adapter (which works fine with the regular firmware, I can access files etc). It has a 64MB VFAT partition (#1) with the latest 9331 zImage, and the rest of the card is an EXT3 partition with the rootfs extracted.

  6. I was going to say that you had to put the zImage kernel on the vfat partition but it looks like you did it the hex code type b vfat partition that you would have made in fdisk?

  7. Yeah it's type 0b, W95 FAT32.

  8. If I launch the regular firmware and look at the miniSD in the browser I can see the zImage file there.

  9. Awesome awesome work, just got it up and running, worked perfectly. I thought I initially had a problem booting but it seems the zImage just wasn't being written to the FAT partition correctly, sorted that out and it works great! Anyone having problems are you renaming the zImage to just "zImage", I'm using a kernel I built so it's already called that but that might be a problem if you get the one off google-code.

  10. Wow... okay. That's what I thought I'd done (renamed to zImage), but I just copied it on again and renamed it and this time it actually boots. Maybe I had a stray space character left in the filename? *shrug*

    So, problem solved I guess.

  11. So far, I've gotten the dualboot working, and I can get the zImage to boot. But then the screen starts blinking, and I get an error:

    "Kernel Panic - not syncing: No init found. Try passing init= option to kernel."

    I grabbed the basic rootfs from the google code site, the card is set up as 64M fat32, the rest as Ext3, it's set as readable, and so forth.

    What do I do from here?

  12. @quoadomatic

    The rootfs I provided is just a proof-of-concept and not much can be done. There's people working in getting an optimized and useful rootfs.

    Anyway, to make it rw execute "mount -o remount,rw /".


    Yes. In principle I worked hard to get the LCD working right from the SPL because otherwise the LCD remained dark for some time until the kernel framebuffer driver kicked in, which was a bit confusing.

    Actually it is not required that the splash screen/logo appears if you are booting the original firmware, but I though it would be nice to show it too as sort of saying "this A320 is flashed to boot linux too".


    Follow carefully the instructions in the QuickStart guide you can get at the wiki section of the google code project page.

  13. Booboo: I've done that. Got a rootFS extracted and all - used that exact command as listed. Ah well, I guess I'll wait for a more "complete/userfriendly" layout - I'll be ready ASAP, since I've got the dual-boot code.

    One thing that would be nice, is make the kernel look at a fat32 partition. I realize a lot of the permissions, etc that linux wants won't work, but it'd make setup a lot simpler.

  14. Perfect,
    Works very well on ILI9325.
    Flashing very simple and very fast.

    Booboo congratulations for all your efforts. You have promised and you did it.

    Very nice job, thanx a lot !!!

  15. Works fine here with ILI9331. Good work!

    Is there a way to modify the boot loader to boot into Linux by default?

    The site is giving 404 errors now, maybe it's possible to make it redirect to this site?

    @Marta: The Linux usbtool uses libusb, which is available on Mac as well. So it might be easy to port.

  16. Maybe you could add a confirm prompt of some kind before rebooting?

    Say if you press Power + Start + Select then it would ask you to press Power (or A or whatever) to restart?

  17. im using windows and when i type boot 0 it just sits there i get download stage one program and execute and nothing happens.

    do i need to put anything on my dingoo before i do this


  18. read/write ext2 partitions on windows with

  19. is that in responce to my question?

  20. To all the people who are having problems with the installation, there is a known issue when trying to launch a linux image on the dingoo. When you put your dingoo off, then press B and reset, sometimes it seems the hardware isn't initialized correctly to launch the image.

    To solve this, you have to boot on the original firmware, then press B and reset while it's running, then do the installation steps as usual. The original firmware seems to do something more on the hardware than the boot instructions, this little trick will initialize what is needed in order to run the linux image.

    By the way, Great job for this release booboo. Menus are clear, warning is included, everything is here; nice work.

  21. Works fine here (Display: ILI9331). Thanks!

  22. I already had boot working via usbtool, but after a flash of the dualboot installer, booting to linux just hangs at the dingux splashscreen - any suggestions?

  23. nevermind... I was missing zImage from the fat partition. :)

  24. same here,
    "Kernel Panic - not syncing: No init found. Try passing init= option to kernel."

    Can anyone shed a light on where the problem may be?
    Rootfs? (I did follow the guide...)

  25. @ myself... it's a rootfs issue, reformatted the ext3 and unpacked again, now complaining about can't log to /dev/tty5

  26. mine still freezes at stage 2

  27. @ wendy, I have the same issue on my windows box, usb-boot.exe stay's hanging at stage 1 or stage 2 (depends), used my Ubuntu box to do the flashing and it worked nicely.
    (noob - like me)tip: When unpacking the file on my ubuntu the perms where defaulted to RW for my user only, so to let the sudo commands work you need to do something like
    $ chmod a+rwx *
    in the directory where you unpacked the zip file.

  28. i dont have unbuntu on my system

  29. @Wendy

    Did you install the USB boot driver (Usb_Boot_Driver.inf)? It's in the zip-file.

  30. @Wendy

    After you reset while pressing B, Windows will ask you for a driver. Point Windows to the .inf file that you extracted from the zip-file. If Windows doesn't ask you for a driver, you could also try right-clicking the .inf file and selecting 'Install' from the menu.

  31. i suppose there isn't an "uninstall" procedure...
    Is it possible to restore orginal NAND & Stuff?

  32. ok got so far now buy all i get is a white screen on the dingoo

  33. ok got it installed now but all i get is the dingux splash screen

  34. @Wendy

    You must install not only the zImage but also a rootfs, for which you have to create a second partition, format it as ext2/ext3, unpack the rootfs package, etc. You can follow the steps in the QuickStart guide (googlel code).

    Note that you'll just get a console login prompt and nothing else. Someone has to develop a menu system and such. I don't think it will take very long. I'd like to do it but I think it's more productive if I focus on the kernel.

  35. can i do this under windows enviroment

  36. thanks for all your hard work, booboo! now i just need to get off my ass and order an 8gb microsd with an adapter.

  37. I think i have some issue here, but with the original firmware, i followed the instructions, i followed the ones that appeared on the dingoo, and dual boot was installed. But, whenever i load the original firmware, this one goes slower than before, i cant tell if the games too, but the menu is just not at the same speed as before, theres a delay every time i browse the main menu, going from interesting games to the last icon (system setup) takes longer and gets stucked for really short time in the icons in between (randomly).

    Really, help me out.

  38. same issue here.
    a couple of hours ago I was asking for a "uninstall" in order to return to original NAND... i hope LINGUX installation is reversable...

  39. I don't have the menu "hang" but things are indeed "moving" slower in the menu (Dingoo custom FW 1.03TD-2).
    AVI files who worked before don't play smoothly anymore.
    However - very weird - in the mega drive emulator i have no "tearing" on the screen any more when playing Sonic (1) - but still at acceptable speed (aldo i have here also the impression it's a tad slower)...
    I don't get it.... Does the dualboot screen init changes some stuff in the screen driver or so that this happen???

  40. Oh yeah, you are right, the Genesis emulator has less graphical glitches, how come?

  41. Hi there

    I'm still struggling with partitioning the sd card in windows - Anyone here do it ?
    Wendy did you come right? Seems we have the same issue

  42. AFAIK there are no free tools to partition and create ext2/3 partitions under windows. You can however try the and boot this, If it recognizes your SDcard reader then you can partition your SD card with this . Remove all partitions from the card, create first an FAT32 (dous not need to be big 50mb is more then enough) and then create a ext3 partition as second one....
    With you can then access ext2/3 partitions on windows.
    If you install Ubuntu then you need to add the "gparted" tool to your installation (not by default installed) screen shots for Ubuntu are found in th guide linked on

  43. warning, if you're not very sure about that partitioning stuff, remove/disconnect your harddisk(s) and leave only your dvd drive connected, and boot the "livecd" then from your dvd drive. If you choose the wrong disk in gparted then you lose all your data

  44. I try genesis emulator with few games and it has less graphical glitches but run slowly. Now some games run perfectly and other more slowly. I think the dual-boot do this. very strange...

  45. Polossatik

    Thanks for you advise. I used gparted and i think it worked i got three partitions 1 primary 64mb fat32, one extended and within one logical 1.8gb ext3

    however it does not show up in windows using fs-driver ... it seems to be stopped. Does one "format" ext3 partitions, assign drive letter or what ?

    Advise appreciated!


  46. I think you can't see the EXT3 partition from SD. i tried this (fs-driver) and i can see Hard Drive EXT3 only.

  47. yep, sorry, also just tested and it does not shows ext3 on SD... so you need to use a Linux or so.
    On the other side, the current state is not very interesting or usable for "end users", mainly "for fun" or poeple who know Linix very well and can make stuff for this. so maybe someone makes that FAT32 magic so that ext3 partitions are not needed anymore.

  48. okay i know absolutely nothing about linux

    gonna use the "ubuntu live cd"

    can someone give me pointers to the commands i should use to copy the contents of "rootfs-20090518.tar.bz2" from the root of my d: to the ext3 partition on the sd card?

    i know this is a big ask ... thank you

  49. i tell you how i've done, i went to applications-accesories-terminal and type:
    sudo nautilus
    write the password
    and nautilus(explorer) opens
    then locate the ext3 partition of your card and just drag the content in there
    good luck, i have not had it

  50. Thanks Max .. (rolls up sleeves and starts burning the cd)

  51. Well, someone could help me? I've done two partition on my miniSD, the first (fat32) is 3,5Gb and it have only zIMAGE file, the second (ext3) is 300MB and under linux ubuntu I've extracted the file rootfs.tar.bz2 in the partition (i've lotsa folder now (tipical linux folders, bin, etc) but my dingoo still hang in a blank screen after the go 0x80600000 0 command... why? have I to copy the rootfs file in ext3 WITHOUT extract it?

  52. This might be a stupid question, but since the graphical errors are fixed for the Genesis, is the Y/B problem fixed for whatever reason?

  53. I finally get it working!!
    for those with the freeze problem when booting dingux, after you've done de two partitions and put into the second (ext3) the contents of the rootfs file (all the folders typical linux extructure) MAKE SURE to:
    1-get from here: the file zImage-20090625-ILI9325/or/ILI9331
    2-once donwloaded rename it to zimage
    3-the copy zimage to the first partition (fat32), i've used ubuntu to do that, and make sure theres nothing else into that partition, only that file, also check that th size of the file once copied is 1016, because i've already copied it but it had been misscopied cause the size was 0kb

    Good luck!

    now i'd like to know what can i do from the command line of the dingux because i can't write anything, in which directory of the ext3 partition must i copied, for example, scummvm?

    Thanks again!! this is great!

  54. I've done like Max but I have no luck.

    When I digit boot 0 my dingoo will hang always in a blank screen... it's normal?

  55. I compiled "usbtool" for Mac OS X:

    I successfully booted Linux from my MacBook using this. However, I already had an SD card prepared with an ext3 file system using my Linux desktop; it might be a bit of a challenge to create the ext3 root fs using only a Mac.

  56. When linux boots up for the first time, all the txt is backwards. I can navigate and 'click' yes through the setup menus but it's all reversed. When my dingoo reboots and I hold select, it freezes at the dingux splash screen, but again its all backwards. What did I do wrong?

  57. Right ... Max and others helping me (thank)

    I booted linux last night (ubuntu cd) and managed to get the two partitions created. Furthermore, i managed (in ubuntu) to copy the zlimage to the fat32 partition. okay so far ..

    Then I move onto the ext3 partition I have read access to it, but cannot copy anything on to it. looking at permission only "root" has read and write, so I changed the password of root account, loggedout (ubuntu user seems to always log in automatically) and tried to log in as root. I told me root could not login through the login screen (????).I then opened up a terminal and tried to login as root. said somthing about sh, so i typied sh. Then it complained about utmf or something (sorry cannot remember).

    At the end of the day just want to copy files to the ext3, and need to login as root (can someone give me a pointer on how to do this please - Please remember I am booting ubuntu from the cd image, not on my hdd


  58. Thanks mth. Truth is, I already dusted off my Ubuntu netbook and Windows notebook to do it. :P

  59. @Booboo

    Thanks for all your hard work!

    Anyway, I have a small question about programming for Dingux: Is interprocess communication possible? I try to do ::socket(PF_LOCAL, SOCK_STREAM, 0), but this action fails.

  60. Can boot fully into linux now, but all txt is reversed/mirrored still.

  61. Have you got the x760+ yet booboo?

  62. @master: Yes the kernel released has no networking support.
    I have compiled one, that you can get here:

    It is for the ILI9325 dingoos only.

    I was able to start xwindow, xeyes, mplayer and so on...

    I don't know where to post the news, there are so many forums about dingux...

  63. Silly question, but is it possible to acces the dingoo when booted in Linux besides using the serial interface?

  64. @Eric.

    Thanks! I'll try that image.

    Currently, I'm having a bit of a problem: my Dingoo freezes at the Dingux logo screen when I try to boot into Linux (still with original Booboo firmware). It worked before.

  65. >my Dingoo freezes
    It seems to be okay if I first right-click on the FAT drive in Windows and select 'Eject'. After the sound that the eja..uhm..ejecting is finished, rebooting into Linux works :)

  66. @Eric

    With your zImage, I'm able to run Qt Embedded examples now. Input does not seem to work yet but I didn't spent much time configuring the Qt build (except for using mipsel toolchain).

  67. @master: please contact me cyberic99, on gmail, I have some apps ready (xmms, madplay, xserver etc...)...

    We have to agree on a common and compatible package structure.


  68. Is there any way to install this without a MiniSD card? or is there no handy way to fiddle with the partition tables of the Dingoo? I'm primarily interested as there doesn't seem to be a native C64 emulator.

  69. Hi
    i try here.

    I have a problem with my start button on my dingo A320 ILI9331.

    Anyone can help me for build a new dualboot installer with another command to confirm the flash of the nand for install dualboot

    Thans a lot in advance...