linux on onda vx747(updated)

Feb 24th, 2009 | Posted by yajin | Filed under JZ, kernel

Before reading this article, please please visit the following website and help this little girl. She is the daughter of panjet, the core member of this project. Without him, this project can not even happen.

http://yifanfund.com (English)

在阅读这篇文章前, 我恳请您花一点时间来帮助panjet的女儿怡帆. Panjet是这个项目的核心成员.如果没有他的参与,这个项目不可能成功地port linux到vx747上面. 赠人玫瑰,手留余香.  您的爱心一定能让小怡帆度过目前的困难.

http://help-yifan.org (中文)

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.

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

  1. Han
    May 11th, 2009 at 09:48
    Reply | Quote | #1

    英文怎么了?为的是让外国人都看得懂啊。

  2. Frank
    May 13th, 2009 at 16:29
    Reply | Quote | #2

    Sounds cool, but:
    Could somebody, in non-technical language, tell me what I could do with a movie player running Linux, other than what the player could already do before?
    Could I, for example, use it to store calendar, notes and/or view non-music/movie files in the memory? In that case, it would step close to a PDA replacement - and that would be really cool!

  3. TT
    May 15th, 2009 at 16:14
    Reply | Quote | #3

    Hi,guys,minutes ago, i have run the linux system sucessfully on my mp4!!! really happy i am. And so for your hard work.
    ur,but i found i can hardly focus the key on the small button,expecially the close button upon. So, can you adjust the width or langth of display screen,to left enough space?

  4. CUI
    May 23rd, 2009 at 15:11
    Reply | Quote | #4

    I am a Chinese. Can Vx777 4G move linux. msn:LALA576092469@HOTMAIL.COM THANKS.

  5. SycoKU
    May 30th, 2009 at 04:04
    Reply | Quote | #5

    @CUI
    I have Linux running on my VX777. See this forum http://www.mp4nation.net/forum/viewtopic.php?f=6&t=10828

  6. dude0316
    May 30th, 2009 at 10:31
    Reply | Quote | #6

    Has any one figured out how to cut the screen off during music playback?
    Also is there a way to cut off external speaker other than disconnecting the wires?

  7. clueX
    Jun 13th, 2009 at 22:38
    Reply | Quote | #7

    Hi yazin, I have followed your instructions above, but I got this error in linux framebuffer section which has a tux above it :

    List of all partitions:
    b300 7761920 mmcblk0 driver : mmcblk
    b301 409626 mmcblk0p1
    b302 40162 mmcblk0p2
    b303 7309575 mmcblk0p3
    No filesystem could mount root, tried ext2
    Kernel panic - not syncing : VFS : Unable to mount root fs on unknown-block (179,2)

    And also I couldn't find ext folder in ext2 partition so I created a new folder ext/init.d/rcS and ext/pointercal <-- was this right??

    Thank you.

  8. clueX
    Jun 14th, 2009 at 14:05
    Reply | Quote | #8

    Anyone who has read my comment, if you know the solution, please tell me.

    Thank you in advance.

  9. yslc120
    Jun 15th, 2009 at 05:48
    Reply | Quote | #9

    Thank you for your job.I am chinese,also i am a mp4 fan.
    I will try my best to help your job,at the same time ,we will get better.

    Because i have no much knoweledge in this field, i will call my friends knew from imp3.net to help you ,if they can .

    I have reprint your article on imp3.net,and translate it into chinese

  10. clueX
    Jun 15th, 2009 at 13:03

    @yslc120
    Thank you yslc120. I am also Chinese. 谢谢
    I think the problem is SDHC card. I used 8giga SDHC card and it didn't work.

    But when I changed to 1giga micro sd card, it worked. Thank you for effort to reprint my problem on imp3.net.
    Have you installed rockbox on onda vx747. Rockbox also shows the same problem if you use SDHC card.

  11. ocean
    Jun 24th, 2009 at 08:29

    hi, i've tried to boot it on VX747+ (8 GB) everything goes fine but it locks when appear those strings Freeing unused kernel memory 132k freed Algorithmics/MIPS FPU Emulator 1.5 then it locks.

    any idea?
    thanks

  12. ocean
    Jun 24th, 2009 at 09:30

    got it to work without copying rcS and pointercal... don't know why though, eventually i'll retry another time.

    regards

  13. stwilson
    Jul 18th, 2009 at 12:11

    the linux can run on vx747+??

  14. stwilson
    Jul 18th, 2009 at 12:46

    Hi yazin,the linux can run on vx747+??
    I have followed your instructions above, but I got this error in linux framebuffer section which has a tux above it :

    List of all partitions:

    b300 3870720 mmcblk0 driver : mmcblk
    b301 265041 mmcblk0p1
    b302 48195 mmcblk0p2
    b303 3550365 mmcblk0p3
    No filesystem could mount root, tried ext2
    Kernel panic - not syncing : VFS : Unable to mount root fs on unknown-block (179,2)

  15. yajin
    Jul 20th, 2009 at 10:14

    It seems

    stwilson :
    Hi yazin,the linux can run on vx747+??
    I have followed your instructions above, but I got this error in linux framebuffer section which has a tux above it :
    List of all partitions:
    b300 3870720 mmcblk0 driver : mmcblk
    b301 265041 mmcblk0p1
    b302 48195 mmcblk0p2
    b303 3550365 mmcblk0p3
    No filesystem could mount root, tried ext2
    Kernel panic - not syncing : VFS : Unable to mount root fs on unknown-block (179,2)

    It seems that there is something wrong with your filesytesms on your sd card. You do not have a valid ext2 filesystem on your sd card.
    PS: Do not use SDHC card. Someones tells me that sdhc card is not working......

  16. stwilson
    Jul 20th, 2009 at 11:09

    I'm using 1G micro sd card, sd card of the document should be no problem. Vx747 + a lot of users told me the same question, I have heard people say that with the vx747 hardware address vx747 + different result, I would like to know is not the case。
    (Can you give your e-mail to me。My email address is heshengzhou123@163.com

  17. stwilson
    Jul 21st, 2009 at 16:49

    Hi yazin
    I found:
    TF card if I am FAT16 first and then sub-district area EXT2 if the situation arises:I got this error in linux framebuffer section which has a tux above it :
    List of all partitions:
    b300 3870720 mmcblk0 driver : mmcblk
    b301 265041 mmcblk0p1
    b302 48195 mmcblk0p2
    b303 3550365 mmcblk0p3
    No filesystem could mount root, tried ext2
    Kernel panic - not syncing : VFS : Unable to mount root fs on unknown-block (179,2)

    If I tf card first and then sub-sub-district EXT2 District FAT16 if the situation arises:I got this error in linux framebuffer section which has a tux above it :
    in:serial
    out:1cd
    err:1cd
    hit any key to stop autoboot:0
    mmc card found
    mmc card is ready
    i'm sorry wo only surport fat16 and fat32
    i'm sorry wo only surport fat16 and fat32
    reading uimage

    **unable to read "uimage" from mmc 0:1**
    ##booting image at 80600000 ...
    bad magic munber
    ondavx747 #

    Why is this happening?Gone wrong with my partition it?

  18. justafriend
    Jul 21st, 2009 at 21:11

    stwilson :
    Hi yazin
    I found:
    TF card if I am FAT16 first and then sub-district area EXT2 if the situation arises:I got this error in linux framebuffer section which has a tux above it :
    List of all partitions:
    b300 3870720 mmcblk0 driver : mmcblk
    b301 265041 mmcblk0p1
    b302 48195 mmcblk0p2
    b303 3550365 mmcblk0p3
    No filesystem could mount root, tried ext2
    Kernel panic - not syncing : VFS : Unable to mount root fs on unknown-block (179,2)
    If I tf card first and then sub-sub-district EXT2 District FAT16 if the situation arises:I got this error in linux framebuffer section which has a tux above it :
    in:serial
    out:1cd
    err:1cd
    hit any key to stop autoboot:0
    mmc card found
    mmc card is ready
    i'm sorry wo only surport fat16 and fat32
    i'm sorry wo only surport fat16 and fat32
    reading uimage
    **unable to read "uimage" from mmc 0:1**
    ##booting image at 80600000 ...
    bad magic munber
    ondavx747 #
    Why is this happening?Gone wrong with my partition it?

    Have tried this. You will need 2 gig SD card http://www.mp4nation.net/forum/viewtopic.php?f=6&t=10828

  19. stwilson
    Jul 21st, 2009 at 21:20

    Hi yazin,thank you very much,Vx747+ I finally will be able to run LINUX, and I would like to know those things have not improved yet ready. And now what procedures will be able to run?

  20. Okon3
    Oct 25th, 2009 at 17:31

    Hi, i'm trying to get this to work on my VX747 8G but after mounting the EXT2 Filesystem it hangs saying:

    EXT2-fs warning: mounting unchecked fs, running e2fsck is reccomended
    VFS: Mounted root (ext2 filesystem).
    Freeing unused kernel memory: 136k freed
    request_module: runaway loop modprobe binfmt-0000
    request_module: runaway loop modprobe binfmt-0000
    request_module: runaway loop modprobe binfmt-0000
    request_module: runaway loop modprobe binfmt-0000
    request_module: runaway loop modprobe binfmt-0000

    can you help me?

    thanks in advance

  21. sanjay
    Dec 3rd, 2009 at 22:28

    I tried to follow the steps given by you to boot linux on my DPF(ID800T) which is based on jz4740.

    At the boot linux step:
    I run
    usbtool 1 jz_xloader.bin 0x80000000
    and
    usbtool 1 u-boot-boot-linux.bin 0x80100000

    I get the following, But I don't see any boot logo, nothing turns up on LCD either.(I am using SD card of size 1GB, windows xp).

    Please suggest me, what am I doing wrong. Thanks in advance.

    D:\ingenic\jz_hacking\jz_tools_20090224.tar\jz_tools_20090224\jz_tools_20090224\usb_tools>usbtool 1 jz_xloader.bin 0x80000000
    USBtool v0.4 - (C) 2008 Maurus Cuelenaere
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    [INFO] File size: 1512 bytes
    [INFO] Searching for device...
    [INFO] Found device, uploading application.
    [INFO] GET_CPU_INFO: JZ4740V1
    [INFO] SET_DATA_ADDRESS to 0x80000000... Done!
    [INFO] Sending data... Done!
    [INFO] Verifying data... Done!
    [INFO] Booting device [STAGE1]... Done!

    D:\ingenic\jz_hacking\jz_tools_20090224.tar\jz_tools_20090224\jz_tools_20090224\usb_tools>usbtool 1 u-boot-boot-linux.bin 0x80100000
    USBtool v0.4 - (C) 2008 Maurus Cuelenaere
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    [INFO] File size: 199592 bytes
    [INFO] Searching for device...
    [INFO] Found device, uploading application.
    [INFO] GET_CPU_INFO: JZ4740V1
    [INFO] SET_DATA_ADDRESS to 0x80100000... Done!
    [INFO] Sending data... Done!
    [INFO] Verifying data... Done!
    [INFO] Booting device [STAGE1]... Done!

  22. Mat_L
    Dec 6th, 2009 at 00:08

    Hi Yajin, I very much appreciate the work you did with the vx747 player. I was wondering if you intend to take Linux even on a 8gb version, I saw your post where you said that it was planned, but then nothing ..:-(

  23. yajin
    Dec 7th, 2009 at 17:36

    @Mat_L
    Hi Mat_L, thanks for your message.
    Unfortunately, I have not spent time on this project anymore. If you are interested in running linux on jz-based devices, I advice you visit the qi-hardware[1] website and join their mail-list. They are doing very cool open source hardware/software projects!

    [1] http://www.qi-hardware.com

  24. Pavel
    Dec 22nd, 2009 at 09:56

    I have the same error like ZKer:

    vfs:mount root (ext2 filesystem).
    freeing unused kernel memory:132k free
    kernel panic - notsyncing: no init found. try passing init=option to kernel.
    Does anybody knows what that mean and how to fix this problem?

  25. Pavel
    Dec 23rd, 2009 at 09:06

    what means "kernel panic - notsyncing: no init found." ? kernel can't mount root file system or some files lost or something else? Please explain me.
    does numbers
    "0x80000000" and "0x80100000" depends of flash geometry? what size of fat partition I must do?
    my device is jagga zoom TC-300 4GB, but it's the same as 747 (I want to believe that it's the same..). I don't know about memoy size. How I can find is it 16 or 32mb? may be it isn't compatible with this linux?
    "Rename pointercal-vx747-20090302 to pointercal and copy it to the directory 'ext/pointercal'" I think that it's a typo and copy to etc/pointercal to replace existed file? or I really must create directory ext?

  26. Pavel
    Dec 23rd, 2009 at 10:45

    now I did all operations under linux but it still not working.
    now I have such log:
    "Warning: unable to open an initial console.
    Alogorithmics/MIPS FPU Emulator v1.5
    _"
    and nothing else.

  27. Pavel
    Dec 23rd, 2009 at 11:00

    also when I eject sd-card after boot stoped at that stage, device recognize it and write smth like that:
    "mmc0: card d283 removed
    mmcblk0: error -145 sending read/write command ....
    ....
    ........."
    that looks like device is not halted and waited for something. But why it doesn't load after "Alogorithmics/MIPS FPU Emulator v1.5"?

  28. yajin
    Dec 23rd, 2009 at 11:36

    So I think maybe the mmc driver is not compatible with your device?

  29. Pavel
    Dec 23rd, 2009 at 13:28

    my fackin god! It works!!! Thanks a lot yajin!

  30. kev
    Dec 29th, 2009 at 05:22

    For all people having trouble extracting root26.tar.bz2 on Ubuntu! Download the file, open terminal as sudo! Then extract the package using: tar -jxvf root26.tar.bz2 works a treat, took a while to figure this out!

  31. greg_House
    Mar 5th, 2010 at 07:44

    Hi .. First of all .. Amazing Work thanks for your effort.!
    there is any chance to watch PDF or chm files on this onda vx747 using this linux.??? Men thank for the answer that you can provide me.! thanks..

  32. starcube
    Apr 4th, 2010 at 02:14

    I keep getting this error when loading:

    "Entry Point: 80290150
    Verifying Checksum ... Bad
    Data CRC
    ONDAVX747 #"

    It's when it's loading "Image Name: Linux-2.6.24.3g3a9c24c8-dirty" Any help would be much appreciated - Thanks in advance :)

  33. qing
    Jul 22nd, 2010 at 15:22

    你好。这么如何用qemu 运行呢?

    还有samsung i8320的手机的内核如何用 qemu运行了。

Comment pages