Rkutils

From Linux Rockchip
Jump to: navigation, search

Contents

rkutils

https://github.com/naobsd/rkutils

rkcrc is used to create a kernel image that can be flashed directly into a rom kernel partition.

 rkutils/rkcrc -k rk3x_kernel_3.0.36/arch/arm/boot/zImage kernel.img

rkcrc -p is for creating parameters.img.


TBD ENOMAN

Packing/Repacking boot.img files

TBD - somewhere should explain all the different contents of img files

Unpack

  1. rkunpack boot.img so I have a boot.img-raw
  2. Create an empty folder and cd into it: mkdir boot; cd boot
  3. extract contained cpio: cat ../boot.img-raw | gunzip | cpio -i
  4. ... hack away, modify the contents in place ...

(re)Pack

  1. Still in the boot folder: find . | cpio -o -H newc | gzip > ../boot-new.img
  2. Don't forget to sign the resulting image before flashing it: rkcrc -k boot-new.img boot.img