Monday, July 20, 2009

System installation pack and toolchain released

Big news. Grab both from the google code download section here.

The installation pack includes the kernel images and a root filesystem in ROMFS format. You just need to place both in the root directory of the first (and most likely only) FAT partition of your miniSD card. No need for ext2/ext3 any longer, which should make Windoze users quite happy.

Another big improvement is console and file transfer. As soon as linux boots your PC will detect a new network card and it will be assigned a network address (by a DHCP server in your A320). Telnet to 10.1.0.2 to get console access, FTP to 10.1.0.2 to transfer files.

Enabling networking in the kernel adds enlarges it noticeably, but this is compensated by the removal of ext2/ext3, which is not longer needed and is quite heavy too.

Dingux will try to run the file "local/sbin/main" in your miniSD on startup, and if it exits it will respawn it. Get your menu application of choice, rename it as "main" and place it in "local/sbin" to get it running on startup.

To system menu application developers, I'd advice to use the exec call to launch other applications. The launched application will replace yours in memory (so the menu won't be sitting silently in the background waiting for the application to end and using precious RAM), and when it exits your menu will be launched again.

I've tried to include as many libraries as possible in the root filesystem. If you need some library not included, link it statically as a temporary solution and email me: I'll try to include it in the next release.

You should notice an important boot speed improvement. The initialization sequence has been optimized in many ways, but the post noticeable is the active monitoring of the miniSD detection. Now the system waits just as long as needed until the miniSD block devices are created, while before there was a fixed delay of one second (the rootdelay kernel parameter was used and the minimum value you can set is one second).

UPDATE: note that existing applications do not work on this new root filesystem. They will have to be recompiled using the new toolchain. I bet developers will catch up quickly.

52 comments:

  1. I'm using WXP, and when i connect Dingux to my pc, Windows asks me for a driver for the new "ethernet card" and i can't seem to find any appropiate for it to make it work or be recognized. Any advice?

    ReplyDelete
  2. Try this one and please report success/failure:

    http://dl.openhandhelds.org/cgi-bin/gp2x.cgi?0,0,0,0,15,1290

    ReplyDelete
  3. Hi, I've just installed the new Dingux version to my Dingoo (with ILI9331 LCD) using XP
    Everything went perfect, but when i reset + select it just hangs at the dingux screen
    (i tried re-copying rootfs and correct zImage to my MiniSD root with no success)
    Any ideas?

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Dingoo LCD 31 here with 8GB MicroSD in MiniSD adapter, formatted in Vista x64 as single FAT32 partition and it works here (get a loop saying it can't run local/sbin/main). Using latest dual boot.

    Network does not install because driver is not for my OS.

    ReplyDelete
  6. I'm not interested in having a fat partition based system.
    Can I still use an ext2 partition?

    ReplyDelete
  7. Thanks, works great, network came up automatically under linux. But I seem to be getting very slow transfer rates over FTP (3~4KB/s), just wondering if you experienced anything like that or if it's a problem on the PC end.

    ReplyDelete
  8. ok i re-copied the files again, Dingux boots now but the screen flashes and i get following error message:

    Kernel panic - not syncing: attempted to kill init!

    ReplyDelete
  9. Does this mean dmenu is also needs to recompile?

    ReplyDelete
  10. @DjDavemortis

    Looks like u-boot is not able to load the zImage (otherwise you would at least see the penguin). Make sure you have put zImage/rootfs in the FIRST partition of your miniSD and that it is FAT32 formatted. Not sure if this is important, but the parition type I'm using is 0x0B.

    @zeartul

    Mmmm... yes, but you'll have to recompile the kernel yourself:

    - do "make a320_defconfig".
    - edit the configuration file .config.
    - find the kernel command line (search for CMDLINE), remove the "boot=" and "loop0=" options and change the "root=" option to "root=/dev/mmcblk0p2".
    - do "make zImage" and copy your zImage from arch/mips/boot/compressed.

    @richardofaus

    I did very little testing on transfer speed. Mine was more than acceptable, but still far from the theoretical USB 2.0 bandwidth.

    There's probably much room for improvement here. The ethernet gadget device is a temporary solution until I get a composite storage/serial or storage/ethernet device working.

    ReplyDelete
  11. Thanks for your efforts on this booboo, the network feature is especially useful! And even as a linux user having the whole filesystem as FAT32 is useful as it means I can still use my microSD in other devices (i.e. my sansa media player, running rockbox of course).

    @Marjin1
    The version of dmenu I'm using didn't need a recompile. Just be careful with the directories... as far as I can tell everything needs to be under local/ or it won't be mounted. And you reference these directories in dingux as /usr/local.

    For example, in my boot up script (local/sbin/main) I have the following:
    #!/bin/sh
    export SDL_NOMOUSE=1
    /usr/local/root/volset 40
    cd /usr/local/dmenu
    ./dmenu

    But dmenu is located at local/dmenu when mounted by a PC.

    Several other programs seemed to work fine for me, probably because they are statically compiled (blockrage, snes9x, scummvm, sms).

    ReplyDelete
  12. Got an error code 10 in device manager:
    http://support.microsoft.com/kb/943104
    device won't start, http://support.microsoft.com/kb/943104
    Could be correct seen it isn't starting due to lack of boot menu's. But is that really what it is saying?

    ReplyDelete
  13. Updated some binaries:

    http://lambda.kmeaw.com/~kmeaw/muedit.mips

    http://lambda.kmeaw.com/~kmeaw/prboom.mips

    http://lambda.kmeaw.com/~kmeaw/prboom.cfg

    ReplyDelete
  14. Hi booboo
    Thanks for the news filesystem.
    Have you succed to include System controls (volume and backlight) in teh kernel or have we still to use Volset or other apps ?

    ReplyDelete
  15. pfff I'm lost, how do you make the main file??
    Can someone post the filesystem with a dmenu and 1 game?

    ReplyDelete
  16. Hi !
    Sorry it seems it cannot works under Windows, could you check this note please, it is due to the linux kernel version :

    http://docs.openmoko.org/trac/ticket/1279

    Thanks, and very great job by the way :)

    ReplyDelete
  17. MAME4ALL is working with this new setup. Just played 1942 and it was perfect.

    ReplyDelete
  18. @mofive

    Thanks!!!. I'll apply the patch, recompile the kernel and make a new release ASAP (won't be back to my workstation until late in the evening).

    ReplyDelete
  19. Anyone having problems that result in the kernel panic:
    You have to create a fat32 filesystem, not fat16.
    mkfs.vfat -F 32 -n A320_VFAT /your/card does the trick
    mkfs.vfat /your/card doesn't

    ReplyDelete
  20. @booboo

    I'm assuming there is some way to get this running in a MIPS VM? Do you have any idea what the grub config should be like to launch off the rootfs?

    ReplyDelete
  21. I get the same problem as DJDavemortis. I have copied both the roofs and zimage to the root of a card with Vista. Tried two different cards, they both freeze at the dingux screen. Mines a 9325 LCD. Any ideas anyone?

    ReplyDelete
  22. @rob:

    I fixed it by reformatting my memorycard in XP in FAT32
    Works great now thanks booboo

    ReplyDelete
  23. Hi everyone !

    @Booboo : cool for the patch !

    The first partition of the miniSD is in FAT32, ok. What about the second with the linux files ? should it have to be in EXT2 or EXT3 ? couldn't it be in FAT32 itself ?

    Sincerely.

    ReplyDelete
  24. @mofive
    You don't need a second partition now. But if you want to maintain a second partition, then only FAT32 is supported, ext2/ext3 support has been stripped from the kernel.

    ReplyDelete
  25. Still no joy. Reformatted the mini sd in xp as fat32, reloaded the rootfs and zimage then rebooted the dingoo whilst holding "Select". Still nothing happens apart from the dingux logo and the web address being displayed on the screen. Do I need any other files on the sd card? Or am I doing anything else wrong?
    Please help!

    ReplyDelete
  26. I am stupid-it's official! I didn't read the instructions properly so didn't rename the zImage to just zImage!
    Now what do I do next to get a "main" application?
    Thanks.

    ReplyDelete
  27. ya my screen just hangs at the dingux logo aswell, i have in my sd:

    rootsf
    zImage

    what am i missing?

    ReplyDelete
  28. @booboo

    This driver (http://dl.openhandhelds.org/cgi-bin/gp2x.cgi?0,0,0,0,15,1290) does not work. Error is:
    This device can not start (code 10)
    I am using Win XP.

    ReplyDelete
  29. It seems to be picky about the type of card. It lauches ok on a 2 GB mini SD but doesn't work on my 8 GB SDHC (actually a micro SDHC in a mini adapter).
    Hope this helps.

    ReplyDelete
  30. It works on my 4 GB micro SDHC with adaptor.

    ReplyDelete
  31. works great!

    Is there a script or tutorial to build toochain? I use linux on powerpc

    Many thanks!

    ReplyDelete
  32. @Uguru

    I'll ASAP place my buildroot branch in SVN and make a patch available in the download section.

    ReplyDelete
  33. I get the same as jarek.kala but on windows vista with the driver

    ReplyDelete
  34. booboo, did you get to check the latest git out of buildroot? I was told the sdl_gfx patch went in so it should be selectable now. I still have to do one for sdl_sound but it hasnt been officially accepted yet as a change, though for feature additions I dont think it matters much as long as there is a patch posted they put it in within a week.

    ReplyDelete
  35. @mortys

    No, no special volume/brightness handling included yet. I know someone is already working on that but he needs some framebuffer support that I had not the time to implement yet.

    ReplyDelete
  36. Hi booboo, awesome work! I can telnet no prob, but when I ftp to 10.1.0.2 with anonymous or root login I'm able to login but there's no files or directories. Any ideas? I'm on linux, and it detects the eth connection properly.

    ReplyDelete
  37. I am having difficulty installing the dual boot onto my dingoo.

    i have follwed the readme to the letter and dualboot just will not find find my dingoo even though it is in usb boot mode.
    Device manager shows the jz4740 boot device with a yellow exclamation mark.
    Using windows vista
    Can anybody shed any light on why this may be happening?

    thanks

    ReplyDelete
  38. This comment has been removed by the author.

    ReplyDelete
  39. @booboo

    Have an issue with the toolchain...
    Configuring --host=mipsel-linux-uclibc causes ./configure to fail with: "C compiler cannot create executables"...

    Any ideas???

    ReplyDelete
  40. The problem I had earlier seems to be related to gFtp -- when I connect with Filezilla the files and directories are visible. Getting a 500K/s transfer speed.

    ReplyDelete
  41. Hola,
    Estoy intentando compilar el núcleo de linux para la A320 con el LCD ILI9331, pero no estoy seguro de si estoy modificando correctamente el archivo 'a320_defconfig'.He encontrado las líneas:

    CONFIG_JZ_SLCD_A320_ILI9325=y
    # CONFIG_JZ_SLCD_A320_ILI9331 is not set

    y lo he modificado con esto:

    #CONFIG_JZ_SLCD_A320_ILI9325=y
    CONFIG_JZ_SLCD_A320_ILI9331=y

    Lo he compilado con esta modificación pero la pantalla me muestra unas líneas verticales, no se ve bien.
    ¿Es esto suficiente para compilar correctamente el núcleo para ILI9331?

    Espero una respuesta, gracias.

    ReplyDelete
  42. It works fine and libs are a bit faster than previous versions, thanks :)

    Zx

    ReplyDelete
  43. Can I access onboard flash with dingux?

    ReplyDelete
  44. Stupid question. Due I need the native firmware for the Dingoo a320 or can I setup dual boot with version 1.03TD-3? I had some issues trying to get this working. Please advise.

    ReplyDelete
  45. I get all the way to this with firmware 1.03TD-3:

    4. You should now see your Dingoo launching the flasher script, and a screen like this should appear on it:

    This screen never shows up.

    ReplyDelete
  46. Guys trying this again. I get all the way to step 6 but I do not boot into linux. I have tried doing this every which way. I have had 3 different firmwares on while doing this but still no luck. Is there some sort of issue with newer versions of the Dingoo? This is getting frustrating. Also I have tried every little trick that people have suggested on various forums but still no luck. Not sure Dingux will be happening for this device:

    ---=== INSTRUCTIONS FOR WINDOWS ===---

    1- Unplug your A320.

    2- Put it in USB boot mode: reset it while holding B button pressed.
    The LCD will remain dark.

    3- Plug your A320. If a "new hardware found" dialog shows up, select
    "No, not at this time", and when you're asked for a driver location
    use the directory there you unpacked the dual boot files. Go to
    step 5.

    4- If the "new hardware found" dialog doesn't show up, that means you
    have the ChinaChip drivers installed. You have to uninstall them.
    Open the hardware manager dialog, find the device, right click on
    it and select "uninstall". Unplug your A320 and go to step 3.

    5- Open a command shell (Start --> Run --> "cmd"), change to the
    directory where you unpacked the dual boot files and execute the
    following commands (replace ILI9325 by ILI9331 if you have the
    later LCD type):

    usbtool-win 1 hwinit.bin 0x80000000
    usbtool-win 1 zImage_dual_boot_installer_ILI9325 0x80600000


    >> Does not launch install:

    6- You should now see your A320 booting linux and launching the
    flasher script. Follow the instructions on the A320 screen.

    ReplyDelete
  47. About the only way I haven't tried is via Linux, I may login to Ubuntu later tonight and try it if I do not have any luck today. This is pissing me off.

    ReplyDelete
  48. Finally I got it! Yes! Woot! Seriously talk about doing the process over and over again. For anybody else having issues I was able to setup the dual boot with custom firmware as well.

    ReplyDelete
  49. Got to :
    Swtching root
    cannot run /usr/local/sbin/main: No such file or directory

    What am I missing?

    ReplyDelete
  50. Just found out: needed to read the README.
    Sorry.

    ReplyDelete