Pmbootstrap: [hammerhead] Make `pmbootstrap flasher flash_kernel` work

Created on 2 Jun 2017  路  19Comments  路  Source: postmarketOS/pmbootstrap

Hi @dzervas and @MartijnBraam,

amazing progress with hammerhead! Wifi is working? Wow! :D

So there is pmboostrap flasher boot, which should do the same as the command specified in the wiki: fastboot boot /mnt/rootfs_lg-hammerhead/boot/vmlinuz-lg-hammerhead /mnt/rootfs_lg-hammerhead/boot/initramfs-lg-hammerhead

Does that work?

(Also, can you upload photos and maybe share them on /r/postmarketOS?)

help wanted

All 19 comments

The fastboot boot command isn't what currently makes it boot, I shall update the wiki.

The workaround at the bottom of the wiki with generating a seperate boot.img and flashing that to the boot partition or starting it with fastboot boot boot.img does work. The automatic image creation from fastboot seems to have issues.

Can't really make photos yet, the only thing on the screen is the google logo.

Good to know! To fix that, we could add a script, that builds the bootimg in a temporary folder with mkbootimg, and then flashes that bootimg.

If someone wants to try it:

  • create a new package called fastboot-mkbootimg or something, add such a shell script and make it depend on android-tools and mkbootimg
  • change the config, so the script gets called instead of fastboot directly (look at the heimdall part - there are also scripts getting called, instead of heimdall directly)

(Instead of making an extra package, it could also be done all in the config - it allows multiple commands. But that might get quite long.)

Is the only problem here the kernel commandline, that does not get passed to fastboot yet (so this would be fixed in #50)?
Or is fastboot really creating broken bootimg files, and we must use mkbootimg instead, and pass the generated image to fastboot?

I still use mkbootimg manually to flash my images.

I know, but is it really necessary, or is the actual reason missing kernel commandlines in pmbootstrap flasher?

It's necesairy because fastboot cannot live-create a bootable image for me for some reason, If I don't specify the cmdline in mkbootimg then I still get a flashable image, If I let fastboot create the boot.img then it will complain about the partition table.

flasher boot works for me on my hammerhead

Hmm yes flasher boot works and flasher flash_system works. flasher flash_kernel doesn't

That would make sense, I did not try "flasher flash_kernel" with the lg-mako (which is the only fastboot device I have tested).
So flashing does work when you manually use mkbootimg, and then fastboot?

Yes, with the command in the device page on the wiki

Could somebody please test, if it works with the current master branch (implemented in 615880e1615a1b01ec3973b82a87f2b86d31056c)?

It works with the change in #132

Great!

Closing as it looks fixed now.

I've just tried the hammerhead build on the current mainline again and this stopped working, the workaround on the wiki still works

Could you post the error symptoms?

@MartijnBraam which workaround you used? you created a boot.img and booted directly without flashing? that workaround to create the boot.img in the host shouldn't be necessary anymore, please try with pmbootstrap flasher boot, which does the same thing, if it works

No the flasher boot and flasher_flash kernel both don't work. The workaround is creating the boot.img outside pmbootstrap and using fastboot outside the chroot to flash it.

@MartijnBraam so that means the mkbootimg we are using is not working for the hammerhead?
can you try with the osm0sis version? #441
Which program you used to create the working boot.img?

Hmm I found the error, the code works fine but the deviceinfo offsets were wrong. Should've checked first.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhuowei picture zhuowei  路  4Comments

schvabodka-man picture schvabodka-man  路  6Comments

ollieparanoid picture ollieparanoid  路  3Comments

erhoof picture erhoof  路  4Comments

ghost picture ghost  路  4Comments