User Tag List

Results 1 to 6 of 6
  1. #1
    Senior Member xeon.zolt's Avatar
    Join Date
    May 2014
    Location
    faridabad,haryana
    Posts
    249
    Post Thanks / Like
    Mentioned
    5 Post(s)
    Tagged
    2 Thread(s)

    kernel development for ffos [completed] only bugs and test now

    Rebuild boot.img
    This isn't usually needed for the kernel itself, but to pick up the changes to init.rc.

    Changes to init.rc

    The init.rc you use is not the one provided by B2G; instead, you need to pull it from the device.
    The main things you'll need to modify are
    Import init.b2g.rc
    Add the following lines to import init.b2g.rc


    Code:
    on early-init
        start ueventd
        import /init.b2g.rc
    Fix permissions

    Correct the permissions on the files /system/b2g/b2g, /system/b2g/updater, /system/b2g/plugin-container; this should be done after the lines that mount the filesystem read/write


    Code:
    chmod 0755 /system/b2g/b2g
    chmod 0755 /system/b2g/updater
    chmod 0755 /system/b2g/plugin-container
    You might want to start by modifying the init.rc from the new device instead of using the init.rc provided by the build system; if so, you need to remember to set TARGET_PROVIDES_INIT_RC in BoardConfig.mk.

    Prebuilt kernel vs. building the kernel from source
    You can use a prebuilt kernel, or you may build the kernel from source. To build the kernel from source, add AndroidKernel.mk and the kernel config to the device configuration tree.

    The Hidden Content on the old build system is an example that builds the kernel from source.

    Extracting and modifying an existing boot image
    It is possible to recover the boot image of a phone by dumping the contents of the /dev/mtd/mtd1 or /dev/mtd/mtd2 devices, the resulting image file can then be easily recovered:


    Code:
    adb shell 'cat /dev/mtd/mtd1 > /sdcard/boot.img'
    adb pull /sdcard/boot.img
    Once the boot image file has been obtained it can be unpacked via a helper tool such as Hidden Content . The tool will extract both the kernel image (zImage) and the ramdisk (initramfs.cpio.gz) as well as printing out a command to rebuild the image with the same parameters of the original one, for example:


    Code:
    $ unmkbootimg boot.img 
    Kernel size 3872576
    Kernel address 0x208000
    Ramdisk size 265102
    Ramdisk address 0x1500000
    Secondary size 0
    Secondary address 0x1100000
    Kernel tags address 0x200100
    Flash page size 2048
    Board name is ""
    Command line "androidboot.hardware=aphone"
    Extracting kernel to file zImage ...
    Extracting root filesystem to file initramfs.cpio.gz ...
    All done.
    ---------------
    To recompile this image, use:
      mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x200000 --cmdline 'androidboot.hardware=aphone' -o new_boot.img
    ---------------

    To modify the ramdisk file create an output directory and extract it there:

    Code:
    mkdir initramfs_dir
    cd initramfs_dir
    gunzip -c ../initramfs.cpio.gz | cpio -i
    Make all the required changes (such as modifying init.rc) and repack the ramdisk using mkbootfs, be sure to use the version that has been built with the B2G host tools:
    Code:
    /path/to/your/B2G/out/host/linux-x86/bin/mkbootfs . | gzip > ../newinitramfs.cpio.gz
    Finally go back to the top-level directory and re-pack the boot image using the mkbootimg, also make sure you're using the version built with the other B2G host tools:
    Code:
    /path/to/your/B2G/out/host/linux-x86/bin/mkbootimg  --kernel zImage --ramdisk newinitramfs.cpio.gz --base 0x200000  --cmdline 'androidboot.hardware=aphone' -o newboot.img
    If you now copy the new boot image under out/target/product/$DEVICE/boot.img (where $DEVICE is your device name) it will be automatically flashed when invoking flash.sh. Alternatively you can flash it by hand with the following commands:


    Code:
    adb reboot bootloader
    fastboot flash boot newboot.img
    fastboot reboot

  2. # ADS
    Ads
    Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many
     

  3. #2
    Senior Member xeon.zolt's Avatar
    Join Date
    May 2014
    Location
    faridabad,haryana
    Posts
    249
    Post Thanks / Like
    Mentioned
    5 Post(s)
    Tagged
    2 Thread(s)
    wawan upload completed kernel here

  4. #3
    Super Administrator W2n's Avatar
    Join Date
    May 2014
    Location
    Arek Surabaya
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hidden Content Originally Posted by xeon.zolt Hidden Content
    wawan upload completed kernel here
    Hmm... Maybe not now..
    Anyone can do this guide to Mod Ramdisk, and this is a init.b2g.rc script

    Code:
    service fakeperm /system/bin/fakeperm
        class main
        user root
    
    
    service fakesched /system/bin/fakesched
        class main
        user root
    
    
    service fakeappops /system/bin/fakeappops
        class main
        user root
    
    
    service b2g /system/bin/b2g.sh
        class main
        onrestart restart media
    
    
    service rilproxy /system/bin/rilproxy
        class main
        socket rilproxy stream 660 root system
        user root
        group radio
    
    
    on boot
        exec /system/bin/rm -r /data/local/tmp
        exec /system/bin/mkdir -p /data/local/tmp
        # set RLIMIT_NOFILE to increase soft limit from 1024(default) to 2048.
        # Hard limit keeps default value(4096).
        setrlimit 7 2048 4096

  5. #4
    Senior Member xeon.zolt's Avatar
    Join Date
    May 2014
    Location
    faridabad,haryana
    Posts
    249
    Post Thanks / Like
    Mentioned
    5 Post(s)
    Tagged
    2 Thread(s)
    i thougt to save time only and if you say anyone then be the one

  6. #5
    being Member
    Join Date
    Jul 2014
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you guys share the sources

  7. #6
    being Member
    Join Date
    Jul 2014
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    firefox for y duos will be awesome cause its working faster for low end devices like this


Similar Threads

  1. Replies: 140
    Last Post: 09-13-2016, 08:49 PM
  2. zombie kernel 2 [development] [28/5/2014]
    By xeon.zolt in forum Darker Side
    Replies: 7
    Last Post: 08-03-2014, 10:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •