How to pack boot.img for HOV?
Hello there, I have just compiled my first kernel. It is plain vanilla HTC kernel compiled with 4.6 toolchain. Only had to disable some warnings on the Makefile to get it compiled.
But now I am having trouble in booting this kernel. Trying to boot zImage directly fails, apparently because I am required to pack it with a ramdisk into a .img file.
For that I am using my stock kernel, which is in the file boot-stock.img. My first exercise is to try to unpack and repack the stock rom itself:
$ ./android_bootimg_tools/unpackbootimg -i kernels/boot-stock.img -o ./my_image/
It also gives me a bunch of files in order to remeber this info:
$ ls my_image/
boot-stock.img-base boot-stock.img-cmdline boot-stock.img-pagesize boot-stock.img-ramdisk.gz boot-stock.img-zImage
Im am pretty sure "base", "page_size" and "cmdline" info will be required in order to repack:
error: no output filename specified
[ --second <2ndbootloader-filename> ]
[ --cmdline <kernel-commandline> ]
[ --board <boardname> ]
[ --base <address> ]
[ --pagesize <pagesize> ]
[ --ramdiskaddr <address> ]
However, I can't seem to be able to figure out the command I should use to repack. My first try would be to use
$ ./android_bootimg_tools/mkbootimg --kernel primou-ics-crc-3.0.16-133e482/primou-ics-crc-3.0.16-133e482/arch/arm/boot/zImage --ramdisk my_image/boot-stock.img-ramdisk.gz --base $(cat my_image/boot-stock.img-base) --cmdline $(cat my_image/boot-stock.img-cmdline) --pagesize $(cat my_image/boot-stock.img-pagesize) -o test.img
error: unsupported page size -880147008
Well, this is unsurprising, I can't figure out a meaning for a negative pag size, whatever it is supposed to mean.
$ ./android_bootimg_tools/mkbootimg --kernel primou-ics-crc-3.0.16-133e482/primou-ics-crc-3.0.16-133e482/arch/arm/boot/zImage --ramdisk my_image/boot-stock.img-ramdisk.gz --base $(cat my_image/boot-stock.img-base) --cmdline $(cat my_image/boot-stock.img-cmdline) -o test.img
This now succeeds, but the image stucks at "HTC quietly brilliant screen", with the small red text.
What am I doing wrong here? I presume it is the page size, which is the correct setting for HOV?