http://vm-kernel.org/blog/2009/02/24/linux-on-onda-vx747/

linux on onda vx747(updated)

February 24th, 2009

Hi guys, a good news for you who are interested in running linux on jz4740 based devices. First I would link to say it is not a very easy work although ingenic has released the linux source code. Secondly I would like to say thanks to many people who helped me a lot, vxworks,panjet,esoul of linuxforum and Maurus Cuelenaere, the great rockbox guy.

Hey do not be so boring to say these useless words. Tell me how do you do that. Ok. Please be patient.

Currently linux can run on onda vx747 without writting any things to your nand flash. What you need is just a micro sd card  bigger than 128M bytes where you put linux kernel and root filesystem. Of course, if you want to replace the original firmware and write u-boot into nand flash, I can tell you how to do it. Even after writing u-boot into your nand flash you can still reinstall the original firmware. So please do not worry about your devices.  It won't be damaged.

1. Download the following files from jz_hacking.

(1)jz_tools_20090224.tar.bz2: It contains a tool called usbtool which uploads your program into jz4740's internal sram directly.

md5:1520851babe97da15651f9bef2c1ac5f

(2)jz_hacking_20090224.tar.bz2: It contains u-boot image, jz_xloader and linux image.

md5:ac755b694f6e38224560a9051f1392e7

(3)root26.tar.bz2: root file system of linux 2.6 kernel with qtopia

md5:738f6dfc648d36229a799d1d608655d1

Some guy says that this bz2 file is corrupted. I have tried downloading it using firefox in window and the file downloaded is corrupted!. But when I use other download tool it is ok. So if you can not unpack this package, you can try downloading it using other download tool. Wget in linux works well.

2. Make usbtool

Decompress the jz_tools_20090224.tar.bz2 and build the usbtool. It can be compiled in linux or minigw on windows. Please first read the README file in 'jz_tools_20090224/usb_tools'.

In linux, libusb-dev needs to be installed first. In windows, install MingW32 and LibUSB-Win32 and edit "Makefile" to make sure "WIN_DRIVERS_LIBUSB_DIR" is set correctly.

Type 'make linux' in linux platform and 'make win' on windows to build usbtool. After that copy jz_xloader.bin and u-boot-boot-linux.bin and u-boot-program-nand.bin from jz_hacking_20090224 into this directory.

3. Prepare your micro sd card

First you need to format sd card into two three partitions, one is fat and the other is ext2 and the third partition is swap. You do not know how to do it? Do not worry. This wiki page on beagle board tells you how to do it.  Please  to format your first partition to FAT16 format, not FAT32 referred on the wiki page. That mean you have to use 'mkfs.vfat -F 16' to format the first partition. Use mkswap command in linux to format the third partition into swap space. In xp, you can use partition magic to do this job.

Download the following files:

After you finish formatting your micro sd card, rename uImage-vx747-20090303 to uImage and copy it to your fat partition. Copy u-boot-nand.bin from jz_hacking_20090224 to your fat pattition. Do NOT copy uImage in jz_hacking_20090224 to your fat partition. It is the old linux kernel image. Now we have uImage-vx747-20090303 and we do not need it anymore. Copy all the files in root26 into the ext2 partition. Rename rcS-vx747-20090303 to rcS and copy it to directory 'ext/init.d/rcS' of the ext2 partition of your SD card. Rename pointercal-vx747-20090302 to pointercal and copy it to the directory 'ext/pointercal'.

4. Boot linux

Ok, it is time to boot linux. Insert the sd card into onda vx747. Press the reset button and hold the M button at the same time to enter usb boot mode. Run the usbtool using the following commands.

./usbtool 1 jz_xloader.bin 0x80000000

./usbtool 1 u-boot-boot-linux.bin 0x80100000

If that does not work in your system(some guy says it does that work on ubuntu), you can try the following commands:

sudo ./usbtool 12

Then you can see the u-boot logo. It will load uImage from micro sd card into SDRAM automatically and then boot from SDRAM. After that, linux logo will appear on LCD with framebuffer console output. At last, qtopia is running and you can play with it.

5. Programing u-boot into nand flash(optional)

If you decide to replace the original firmware and write u-boot into nand flash, you can use u-boot-program-nand.bin to do that.

./usbtool 1 jz_xloader.bin 0x80000000

./usbtool 1 u-boot-program-nand.bin 0x80100000

Also 'sudo ./usbtool 13' can work.

It will write u-boot into nand flash and reboot onda vx747 automatically.

If you want to restore the original firmware, this information may help you.

I only test the linux kernel and u-boot on my 4G bytes onda vx747 with 16M SDRAM. Some guy says that there is another model of vx747 with 32M SDRAM, I have not tried on that device. If you have any suggestion, please wirte to me(yajin AT vm-kernel.org). Spams are not welcome. :).

Current Issue:

  • Touch screen is not accurate (solved)
  • Sound is not working (solved)
  • time and date setting (solved)
  • nand driver of u-boot is not working on 8G vx747 (not yet. I do not have the 8G version of vx747)

Please be patient. I will solve these problems.

Also any donation of jz4740/4750 based device is appreciated.

JZ, kernel JZ, jz4740, linux, onda, qtopia, vx747

  1. yajin
    March 11th, 2009 at 18:56 | #1

    Maurus Cuelenaere :Oh and I just see you mention the need for a third swap partition, I only used a FAT16 and a EXT3 partition and that worked too; I'm not sure whether a swap partition is needed (perhaps to run programs which need a lot of RAM?)

    Yes two partitions are ok. But if you use free to see the memory useage, you will find only less 800K RAM is free. So I add the third partition for swap space.

  2. March 12th, 2009 at 17:39 | #2

    - I have a vx767 4Gb (the same vx747 + TV out), do u think if i can install this app?
    - I don't understand step2 " copy jz_xloader.bin and u-boot-boot-linux.bin and u-boot-program-nand.bin from jz_hacking_20090224 into this directory ", which directory ?
    - And don't understand Step4 Boot linux " Run the usbtool using the following commands. " do i Run this commands on windows (linux) with keyboard or run on vx747 Automaticly when hit M & Reset?

  3. Alven
    March 12th, 2009 at 21:41 | #3

    Hi,do you have used some software in the 747? I really want to know if some software can be used in the 747?
    thank you very much!!!!!!

  4. Maurus Cuelenaere
    March 13th, 2009 at 06:43 | #4

    Ken :
    - I have a vx767 4Gb (the same vx747 + TV out), do u think if i can install this app?

    No (unless Yajin did something I didn't know), you can't.

    Because the LCD on the VX767 is different from the one on the VX747 (it needs different initialisation routines), the LCD wouldn't work.
    Also, the VX767 doesn't have a touchscreen and AFAIK the software (qtopia) isn't adapted to use buttons currently.

  5. March 13th, 2009 at 11:30 | #5

    Maurus Cuelenaere :

    Ken :
    - I have a vx767 4Gb (the same vx747 + TV out), do u think if i can install this app?

    No (unless Yajin did something I didn't know), you can't.
    Because the LCD on the VX767 is different from the one on the VX747 (it needs different initialisation routines), the LCD wouldn't work.
    Also, the VX767 doesn't have a touchscreen and AFAIK the software (qtopia) isn't adapted to use buttons currently.

    Maurus is right. You can not use it directly on vx767. Currently I have no plans to port linux into vx767. So if you want to try, just try it on vx747. Thanks.

  6. March 13th, 2009 at 11:31 | #6

    Alven :
    Hi,do you have used some software in the 747? I really want to know if some software can be used in the 747?
    thank you very much!!!!!!

    Sorry I have not tried any software other than the default ones.


Reply via email to