View Single Post
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#66
I was able to dualboot mine, too.
Actually I booted the stock kernel but with a different rootfs, you do not need to do any changes to the kernel configuration since you can override the command line when mkbootimg'ing.

The stock kernel image, cmdline and initramfs are stored in /boot/boot.img (this is in mkbootimg format). There are several (Android) programs around to "unmkbootimg" this and get the raw kernel images et all. Also, the format is simple enough to decode manually. The stock kernel cmdline, stored in this file, is:
Code:
init=/sbin/preinit root=/dev/mmcblk0p28 rootfstype=btrfs rootflags=recovery noinitrd androidboot.hardware=qcom user_debug=31 ehci-hcd.park=3 maxcpus=2
(Presumably should match what you get on a live SbJ's /proc/cmdline)

Some comments to the wiki page https://wiki.merproject.org/wiki/ind.../Backup_Device that may be interesting if creating your own bootimgs:
  • You do not really need to edit CONFIG_CMDLINE or set CONFIG_CMDLINE_FORCE. Passing a valid cmdline (via --cmdline 'init=/linuxrc ...') to mkbootimg is enough and this is the way the builtin kernel does this. However, this is mostly personal preference.
  • You can use standard Linux tools to build the initramfs such as "cpio -H newc". It can be gzipped.
  • You do need to set the same offsets the stock boot.img uses to mkbootimg, i.e. ensure you pass the following to mkbootimg (along with kernel and ramdisk options):
    Code:
     --base 0x00000000 --pagesize 2048 --kernel_offset 0x80208000 --ramdisk_offset 0x82200000 --second_offset 0x81100000 --tags_offset 0x80200100 --board ''
    " Otherwise you'll get instant reboot.

EDIT: I've now changed the above wiki page (section "Build your own image"). Waiting for feedback if you're trying to build your own images!

Last edited by javispedro; 2013-12-22 at 00:54.
 

The Following 17 Users Say Thank You to javispedro For This Useful Post: