Results 1 to 8 of 8

Thread: Development kernel for kernel developers

  1. [translate]    #1
    Moderator
    Join Date
    Jun 2010
    Location
    Warsaw, Poland
    Posts
    3,706

    Default Development kernel for kernel developers

    --- This shouldn't be specially dangerous, but as usual: ---
    WARNING: THIS METHOD CAN BE DANGEROUS. DON’T DO ANYTHING IF YOU DO NOT KNOW WHAT YOU DO.
    I AM NOT RESPONSIBLE IF YOU TRANSFORM YOUR SPICA INTO A BRICK

    I've made a specially prepared kernel to allow testing new kernels without flashing, using kexec.

    Features:

    • kexec inside the initramfs
    • no recovery utility, just kernel output on the screen (ADB still available)
    • always boots to recovery
    • screen is kept enabled on kernel shutdown (kexec shuts the old kernel down first)

    Bugs: (will be probably tracked down and fixed in some near future)
    • CPU frequency has to be changed to 400 MHz or less before running kexec.(ie. echo 400000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq)

    Usage:

    1. Flash the development kernel
    2. Upload new kernel to your phone (preferably with adb push and to /tmp)
    3. Limit CPU frequency (echo 400000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq)
    4. Load the kernel with kexec -l kernel_image
    5. Boot the kernel with kexec -e

    Notes:

    • Kernel can be flashed to the phone by issuing the following command in adb shell:
      Code:
      bml_flash boot kernel_image
      where kernel_image is the path to the kernel located somewhere on the phone (in /tmp preferably)
    • If you want to make your own kernel supporting kexec, gunzip the attached kexec.gz file, put it in /sbin of your initramfs source tree, enable "kexec system call" support in your kernel configuration and rebuild it.
    • utils.tar.gz contains physical memory manipulation utilities to allow dumping and modification of RAM contents, for example android ram console data.
    Attached Files Attached Files
    Last edited by tom3q; 08-09-2011 at 09:18 PM.
    Follow me on twitter.
    My projects: CyanogenMod 7.x Nightly for Spica | Kernel 3.0 | OpenFIMG | Others
    In case of problems with CM7 for Spica: Troubleshooting thread
    Samsung is a registered trademark of Samsung Group, Samsung Electronics and it's listed subsidiaries.
    Views expressed herein are my own and do not necessarily represent the views of my employer.

  2. [translate]    #2
    Administrator
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,730

    Default

    Quote Originally Posted by tom3q View Post
    allow testing new kernels without flashing, using kexec.
    THANK YOU!!!
    Twitter | Devices: Samsung Spica i5700 - SamdroidMod 2.0.1 Froyo | Nexus One - Android 2.2 Froyo | Nexus S CyanogenMod 7.1
    If you like my stuff, buy me a beer!

  3. [translate]    #3
    Senior Member
    Join Date
    Aug 2010
    Location
    Poland
    Posts
    2,839

    Default

    For which Android is it?
    Code:
    setprop persist.world.domination 1

  4. [translate]    #4
    Moderator
    Join Date
    Jun 2010
    Location
    Warsaw, Poland
    Posts
    3,706

    Default

    Any. It's not supposed to boot Android, only a special recovery terminal to load another kernel.
    Follow me on twitter.
    My projects: CyanogenMod 7.x Nightly for Spica | Kernel 3.0 | OpenFIMG | Others
    In case of problems with CM7 for Spica: Troubleshooting thread
    Samsung is a registered trademark of Samsung Group, Samsung Electronics and it's listed subsidiaries.
    Views expressed herein are my own and do not necessarily represent the views of my employer.

  5. [translate]    #5
    Senior Member
    Join Date
    May 2010
    Location
    Hungary
    Posts
    726

    Default

    How can I dump dmesg into screen?
    I've disabled log and progress bar, enabled framebuffer console, 4x6 mini font...
    I've got android text (and reset, which I need to debug)

  6. [translate]    #6
    Moderator
    Join Date
    Jun 2010
    Location
    Warsaw, Poland
    Posts
    3,706

    Default

    It depends on kernel version, but generally you have to bypass the command line passed by the bootloader, which says that the console should go to ttyS2, which is a serial port.

    In 2.6.29 you have to open arch/arm/kernel/setup.c and comment a call to strlcpy in parse_tag_cmdline, in newer kernels there is an option in config for that. Then independently of kernel version you have to edit the built-in command line (in config) to include console=tty1 instead of ttyS2* .
    Follow me on twitter.
    My projects: CyanogenMod 7.x Nightly for Spica | Kernel 3.0 | OpenFIMG | Others
    In case of problems with CM7 for Spica: Troubleshooting thread
    Samsung is a registered trademark of Samsung Group, Samsung Electronics and it's listed subsidiaries.
    Views expressed herein are my own and do not necessarily represent the views of my employer.

  7. [translate]    #7
    Senior Member
    Join Date
    May 2010
    Location
    Hungary
    Posts
    726

    Default

    Thanks, it's working... Now, I need to read it fast I saw somewhere a settings some timeout before reset

  8. [translate]    #8
    Moderator
    Join Date
    Jun 2010
    Location
    Warsaw, Poland
    Posts
    3,706

    Default

    If the reset is caused by a kernel panic then you can set the panic timeout value by appending "panic=XX" to the kernel command line, where XX is the timeout value in seconds.
    Follow me on twitter.
    My projects: CyanogenMod 7.x Nightly for Spica | Kernel 3.0 | OpenFIMG | Others
    In case of problems with CM7 for Spica: Troubleshooting thread
    Samsung is a registered trademark of Samsung Group, Samsung Electronics and it's listed subsidiaries.
    Views expressed herein are my own and do not necessarily represent the views of my employer.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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