linux on onda vx747(updated)
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. Build 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:
uImage-vx747-20090303 :this is the linux kernel with sound support rcS-vx747-20090303 :This is the init script for vx747. pointercal-vx747-20090302 :This is the touch screen calibration data for vx747.
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. .
6. 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.
For anyone interested, the source code of u-boot and linux-kernel is available here.http://code.google.com/p/jz-hacking/wiki/Index?tm=6#source_code
2009/02/24(YYYY/MM/DD) Category:Linux Tag: Linux, JZ4740, Onda vx747