+ Reply to Thread
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 21 to 40 of 60

[HowTo] build / boot a linux kernel on M8

This is a discussion on [HowTo] build / boot a linux kernel on M8 within the Meizu M8 Android forums, part of the M8 Firmware category; if you took the m8 kernel from bill, you just have to switch the initramfs off and do a nfs ...

  1. #21
    Senior Member
    Join Date
    Sep 2009
    Posts
    380
    Thanks
    3
    Thanked 138 Times in 53 Posts
    if you took the m8 kernel from bill, you just have to switch the initramfs off and do a nfs root. Thats what i do.
    Serial poert sould be ttySAC2. Maybe banxian changed something on the makefile dunno, for me it workx

  2. #22
    Member
    Join Date
    Nov 2006
    Posts
    101
    Thanks
    0
    Thanked 8 Times in 7 Posts
    It wasn't the tree after all. Using the config file inside the tree (not the one downloaded from the 1st post) I was able to build a working kernel. Did have to turn off initramfs as well. However, it looks like initramfs is needed for booting the system completely. So I'd appreciate if somebody can provide me with an initramfs.cpio file.

    nfs would be nice as I don't have to go through building kernel, bundle up tinyloader, zImage, xip into a dual-boot image, etc. But I need a special cable for that, no?

  3. #23
    Senior Member
    Join Date
    Sep 2009
    Posts
    380
    Thanks
    3
    Thanked 138 Times in 53 Posts
    I use the kernel from bill. Disable dinitramfs to compile (this should enable NFSboot autoaticly i think) when you then u se ununtu, you can use Ethernet over USB and connect the m8 to ububtu host via usb cable this is eneugh to do an nfsroot.

    You dont need a dualboot at all if you want to test/tinker around. I flash a kernel (ca 1,8megs) xip and work over telnet with the phone. When im done i just flash the orgiginal FW back. thats what i do nearly every day

    Bills kernel is no android so just aplain linux as long as you dont put and android ramfs into the package. (but tghis package can kill your update xip so you would need to reflash this via serial port)
    So if you dont want android and you just want to do kernel/driver research (like i do) i would not recomend to use android or dualboot or sth

  4. #24
    Member
    Join Date
    Nov 2006
    Posts
    101
    Thanks
    0
    Thanked 8 Times in 7 Posts
    OK. I'll try the nfs option.

    But I'd just like to get a dual-boot system working with my own kernel as well to get a warm fuzzy feeling if you like. So here is my understanding how it works, correct me if I'm wrong:

    the initramfs.cpio file contains a minimal root fs which the kernel mount automatically. At the end of the init from within the initramfs, there is a switch_root which leads to the new android rootfs - mdroid.img. Right? The puzzle here is that to access mdroid.img, the moviNand will have to be mounted. But I'm not seeing that with the dual-boot R3 image.

  5. #25
    Senior Member
    Join Date
    Sep 2009
    Posts
    380
    Thanks
    3
    Thanked 138 Times in 53 Posts
    i think the bill kernel does not mount the movinand. (the one i use does it not)
    There must be an "how to make a dualboot package" somewhere here. I used it just once to show off by my friends
    But since i dont want to build it everytime a new fw arrives, or everytime i try a new kernel (abour 5-10 times a day ) i never did it and so i dunno how to manage this sry

  6. #26
    Valued Member
    Join Date
    Aug 2008
    Location
    Belgium
    Posts
    2,434
    Thanks
    127
    Thanked 189 Times in 130 Posts
    Quote Originally Posted by r3wDy View Post
    There must be an "how to make a dualboot package" somewhere here.
    i think you mean this one?
    [HowTo] - create your own dualboot package (with needed tools).
    The only thing that needs to be changed is the zimage, you need to use the one you build. Just read the howto in the download link to understand it better ;-)

    i think the bill kernel does not mount the movinand. (the one i use does it not)
    Itīs been a while, buyt i think that tinyloader loads the image from movinand to the ram.

    mount the movinand
    if i remember well, bill mentioned once instructions to mount it, the code should be in the wiki. but nobody confirmed it yet.

    edit looked it up this is the code:

    Code:
    Mount SD card by default
    *compile mountd
    *start mountd server
    *modify the file  "system/core/mountd/Android.mk"
    
    # disabled - we are using vold now instead
    # include $(BUILD_EXECUTABLE)
    
    to:
    # disabled - we are using vold now instead
    include $(BUILD_EXECUTABLE)
    
    *add install file mountd.conf to root file system:
    *in file: system/core/rootdir/init.rc free these rows:
    
    service mountd /system/bin/mountd
    socket mountd stream 0660 root mount
    
    *modify file: system/core/rootdir/Android.mk , add "etc/mountd.conf \",like this:
    copy_from := \
    etc/dbus.conf \
    etc/init.goldfish.sh \
    etc/mountd.conf \
    etc/hosts

  7. #27
    Member
    Join Date
    Nov 2006
    Posts
    101
    Thanks
    0
    Thanked 8 Times in 7 Posts
    Quote Originally Posted by evow04 View Post
    i think you mean this one?

    The only thing that needs to be changed is the zimage, you need to use the one you build. Just read the howto in the download link to understand it better ;-)
    Yes that's the procedure. But the problem is: nobody (besides banxian &
    bill and perhaps r3wDy) has managed to build their own zImage, which is what I'm trying to do. The missing piece for me now is the initramfs.cpio file.

    Quote Originally Posted by evow04 View Post
    Itīs been a while, buyt i think that tinyloader loads the image from movinand to the ram.
    Yes it does... although not exactly. mdroid.img resides on movinand and got mounted as / after initramfs has done it's job. So the kernel is able to access the movinand, otherwise it would make no sense.


    if i remember well, bill mentioned once instructions to mount it, the code should be in the wiki. but nobody confirmed it yet.
    That's actually a strange one to me:
    1. somewhere along the android development, vold replaced mountd. So bill's suggesting us to go back.
    2. The code snip he pasted looked like Android rootfs build script, which, is only available inside Google at the moment.

    Either way, vold should be able to handle it but doesn't at the moment. Actually I wasn't seeing the mmc device under /dev......

  8. #28
    Valued Member
    Join Date
    Aug 2008
    Location
    Belgium
    Posts
    2,434
    Thanks
    127
    Thanked 189 Times in 130 Posts
    Quote Originally Posted by lang2 View Post
    Yes that's the procedure. But the problem is: nobody (besides banxian &
    bill and perhaps r3wDy) has managed to build their own zImage, which is what I'm trying to do. The missing piece for me now is the initramfs.cpio file.
    unfortunaly i want be able to help you there.
    You might wonna try to send banxian a pm?

  9. #29
    Member
    Join Date
    Nov 2006
    Posts
    101
    Thanks
    0
    Thanked 8 Times in 7 Posts
    Quote Originally Posted by evow04 View Post
    unfortunaly i want be able to help you there.
    You might wonna try to send banxian a pm?
    Already did but got no reply . I did find a ramfs from within android sdk itself. But I think it relies on two mtd devices to mount system.img and user.img, which is different from M8. But it might lead to something......

    Also I found more info about bill's approach to mount the moviNand. Those build script are actually accessible here: android.git.kernel.org Git. So might be worth trying.

    I'm just a bit slow these days.

  10. #30
    Senior Member
    Join Date
    Sep 2009
    Posts
    380
    Thanks
    3
    Thanked 138 Times in 53 Posts
    The main problem is here that he knowledge about this is @ banxian and bill. I can help you get a kernel runing on the phone to tinker anroung with drrivers but i cant build such a andoird. Last time is treid is it killed my updateloader .
    Android is not nice to you disk because is it cant find a suitable FS in the flash, it tries to create one. And this killes my loader. So the phone could easly fixed with a serial cable then, but such a thing you sould have

    I could upload my kernel somewhere if you want a straigt running kernel.

  11. #31
    Valued Member
    Join Date
    Aug 2008
    Location
    Belgium
    Posts
    2,434
    Thanks
    127
    Thanked 189 Times in 130 Posts
    lang2, you might wonna re-read the android topic starting from here, i am sure it will help you further cause it contains lots of clouīs like this..

    An other option is looking at pudn what bill exactly uploaded.

    r3wdy, wasnīt there a patch to avoid the corrupt bootloader?

    lang2, you have an m8 or M8SE?

  12. #32
    Member
    Join Date
    Nov 2006
    Posts
    101
    Thanks
    0
    Thanked 8 Times in 7 Posts
    Quote Originally Posted by r3wDy View Post
    So the phone could easly fixed with a serial cable then, but such a thing you sould have
    Looking more and more like so. I might have to do it... or ask somebody.

    I could upload my kernel somewhere if you want a straigt running kernel.
    Don't you need specific mount option for nfs? If you can provide me your latest .config file, it should be OK. Assuming that your tree is not far off banxian's tree.

  13. #33
    Member
    Join Date
    Nov 2006
    Posts
    101
    Thanks
    0
    Thanked 8 Times in 7 Posts
    Quote Originally Posted by evow04 View Post
    lang2, you might wonna re-read the android topic starting from here, i am sure it will help you further cause it contains lots of clouīs like this..
    Totally agree. Just need to keep reading it.


    lang2, you have an m8 or M8SE?
    M8SE 8G.

  14. #34
    Valued Member
    Join Date
    Aug 2008
    Location
    Belgium
    Posts
    2,434
    Thanks
    127
    Thanked 189 Times in 130 Posts
    Goodluck reading,
    i know it will take some time, since we should document everything a bit better in the wiki to avoid timeloss.:-)

    mm the SE, i have one aswell, didnīt try much since i got it to detect the serial out since i suspect there isnīt one like on fe. This due the rumour there is a tv out on se. Loonix started investigating in the past but he never found it, why is unclear, should ask him once again :-)

    Maybe if my other work/private projects are done that i will order the usb plugs and try to investigate again, but this could take some time (thinking in months now)..

  15. #35
    Member
    Join Date
    Nov 2006
    Posts
    101
    Thanks
    0
    Thanked 8 Times in 7 Posts
    So the cable doesn't work for SE?

  16. #36
    Valued Member
    Join Date
    Aug 2008
    Location
    Belgium
    Posts
    2,434
    Thanks
    127
    Thanked 189 Times in 130 Posts
    difficult question.
    let me say why;
    *I never tested it, except on m8fe, but my old usb plug is damaged so i canīt test it on se for the moment untill i order new ones (not willing to kill my last cable like i did in the past).
    *Loonix was trying to do the test, but as far as i understand he killed his plugs and canīt say for sure if his contacts are good.
    *Banxian said in the android porting topic that he bought a SE after launch to do some debuging, but when i asked the question if he used serial he never answered on to it.

    So for the moment i canīt say it doesnīt work untill some one really tries it.

  17. #37
    Senior Member
    Join Date
    Sep 2009
    Posts
    380
    Thanks
    3
    Thanked 138 Times in 53 Posts
    Okay short fact:
    If you use Bills sources, i can send you my config. This config creats a running kernel with nfs root. This nfs root comes over ethernet through usb. In my Ubuntu linux this worked without any configuring. The nfs root i use can be zipped and uploaded too. So you would end up with exactly the same system i use for by baseband and hardware tests. but is not a running android. And it will be useless without serial cable as is disabled the consoleon m8 screen and bootmsgs are posteet through esrial.
    Buti can fix this.
    I wil upload this packacke soon for you.

  18. #38
    Member
    Join Date
    Nov 2006
    Posts
    101
    Thanks
    0
    Thanked 8 Times in 7 Posts
    Finally got an initramfs that'll load the mdroid.img on Disk. Certainly took longer than I though. My theory was indeed correct:
    - small busybox based initramfs
    - /init as a shell script for mounting stuff and eventually switch_root to the real thing.

    However, currently my system goes into loading Android but got stuck when displaying the android log. Another days job I guess. I've asked banxian for his initramfs and hopefully he doesn't mind providing it.

    I'll post howto when everything settles down.

    @r3wDy
    please still go ahead and upload those files. Loading android full stack is fun but nfsboot is definitely more flexible when playing with the kernel often... if I can get it working that is.

    lang2

  19. #39
    Valued Member
    Join Date
    Aug 2008
    Location
    Belgium
    Posts
    2,434
    Thanks
    127
    Thanked 189 Times in 130 Posts
    mm.. then it sounds that the howto on pudn from bill is the only correct way to go. If i remember well that is exactly what bill described, unfortunally in chinglish
    3. linux-2.6.27-m8.tar.gz,56325KB,downloads 0 ,MEIZU M8 Linux kernel s3c6410 1,if you want to boot from onenand flash,just "make zImage" is OK. 2,if you want to boot from nfs,remove select: "make menuconfig"--->General setup --->[] Initial RAM filesystem and RAM disk (initramfs/initrd) support, then "make zImage" is OK. finished drivers: LCD touch screen key button sound card camera
    10. android_modify_ramdisk.img.rar,1KB,downloads 0 ,浅析如何在android上生成我们自己的ramdisk.img启动系统文件
    5. MEIZU_M8_Android_port_guide.zip,75KB,downloads 0 ,meizu M8 Android s3c6410 portting guide

  20. #40
    Member
    Join Date
    Nov 2006
    Posts
    101
    Thanks
    0
    Thanked 8 Times in 7 Posts
    Got a dual-boot image (images maybe) that I can mount the moviNand to /sdcard as well. A lot of work arounds for this. Basically, banxian's image wouldn't really work for this because this is what it does:
    - mount moviNand to somewhere. e.g. /Disk just to be confusing
    - mount /Disk/mdroid.img to /newroot
    - chroot /newroot init

    By the time chroot finishes, /dev/mmcblk01p5 is gone! That's why mount shows it but no file is there.

    Anyways, what I had to do was hack the ramfs.img from Android sdk and mount moviNand to /sdcard before going into Android (well it's a lot more than that but that's basically the idea). So after Android is fully loaded, I can see from the 'adb logcat' command that it recognized /sdcard and successfully scans it. However, bringing up the gallery shows nothing. I *could* play mp3 files on the disk and it works perfectly except for one thing: there is no sound coming out - did anybody here anything with Android?

    At this stage, I'm beginning to think that it's impossible to dual-boot Android and WinCE and share the same VFAT disk. Probably a Linux partition is the only way to get Android working.

    If anybody is interested in trying/playing, I can upload howto, images (dualboot with the latest firmware). Otherwise, I'm going to park this and do something else. New kernel? Might be too much for me

    Edit: over at r3wdy's wiki, it does say we have "running sound support (more or less)". hmmmm
    Last edited by lang2; 02-10-2010 at 01:04 AM.

  21. Member who thanked lang2 for the post:



 

Similar Threads

  1. M6 SP won't boot after dissemble.
    By MeiVincible in forum Technical
    Replies: 8
    Last Post: 07-26-2009, 09:28 PM
  2. Internet Explorer (Build 2000)
    By sten in forum M8 Applications
    Replies: 5
    Last Post: 06-21-2009, 08:04 AM
  3. Meizu wont boot
    By Lazlo2k5 in forum General Meizu M6
    Replies: 8
    Last Post: 12-09-2008, 07:44 AM
  4. how i build skin?
    By A2x in forum Modifications and Skins
    Replies: 1
    Last Post: 07-31-2007, 11:00 PM
  5. Boot images
    By Kiruat in forum General Meizu M6
    Replies: 8
    Last Post: 12-30-2006, 03:01 PM