Kindle Kernel Development

From MobileRead
Jump to: navigation, search

Contents

[edit] Kernel Sources

[edit] Extracting Kernel Images

get linux kernel(s) from mmc

getkernels /dev/mmcblk0

get linux kernel(s) from file

getkernels mmcblk0.img


[edit] Extracting initramfs

git clone "https://github.com/choff/galaxys2_kernel_repack.git" kindle_kernel_repack
cd kindle_kernel_repack
sudo ./unpack.sh /path/to/Image ./initramfs

[1]

[edit] How to run Kernels

[edit] Directly Booting into a Kernel on USB Drive

kexec is included in Kindle. Get it here or use the one from Debian ARM.

From the manual: Passing the exact contents of /proc/cmdline into command-line-options is the safest way to ensure that correct values are passed to the rebooting kernel.

Booting into diag system with new kernel:

kexec \
 -l diags_kernel.img \
 --type=uImage \
 --append="consoleblank=0 rootwait ro ip=off root=/dev/mmcblk0p2 quiet user_debug=31 eink=fslepdc video=mxcepdcfb:E60,bpp=8 console=ttymxc0,115200"
kexec -e

To boot into main system replace the kernel image and replace root=/dev/mmcblk0p2 by root=/dev/mmcblk0p1.

[edit] Flashing a Kernel onto the Kindle

Bring the Kindle into bootloader mode by:

  • Pressing the power button until power LED goes off.
  • Keep on pressing power button and start pressing the "magic" key.
  • Release power button while still pressing "magic" key.
  • Release "magic" key.

Now the Kindle is in bootloader mode and waits for the bootloader code to execute at USB. Fastbootloader code is sent by imx_usb.

imx_usb fastboot.bin

imx_usb prints some information. If there is now information, the code transfer failed.

After the successful transfer of fastboot.bin the Kindle is in fastbootloader mode. The fastboot tool can be used now to flash the kernel.

fastboot download <kernel.img>

To flash the main kernel execute:

fastboot flash kernel  

or to flash the diags kernel execute:

fastboot flash diags_kernel

After flashing trigger a reboot:

fastboot reboot

[edit] Information Sources

[edit] Forum Links

[edit] See also

Personal tools
Namespaces

Variants
Actions
Navigation
MobileRead Networks
Toolbox