Because networking did not work on my huawei-kiwi, I enabled CONFIG_USB_ETH as described on the wiki, Then, the kernel did not compile anymore. I also noticed that this disabled CONFIG_USB_G_ANDROID because the selection menu in menuconfig only allowed selecting one option.
Now, I am clueless as to where compilation failed. I would appreciate it if you could have a look at my log.txt or tell me how I can get my device to communicate with my workstation (via ssh or telnet or whatever; currently, it does not appear in lsusb after executing pmbootstrap flasher boot). Thanks!
If you need more files like my APKBUILD, you can find them in the huawei-kiwi branch.
it does not appear in
lsusbafter executingpmbootstrap flasher boot
...and (from your device page):
- After trying to boot, the device is stuck at the Honor branding/fastboot screen
- When using fastboot mode, fastboot isn't able to connect to the device after it booted, so something must be happening. It may be that graphics are not working.
It sounds like it doesn't even boot. I suspect, that the issue comes from missing dtb files. Could you try the following?
pmbootstrap export to get a symlink).vmlinuz inside both boot.img filesThe required programs dtbtool and unpackbootimg are packaged for postmarketOS and can be built and installed the following way:
pmbootstrap build unpackbootimg dtbtool
pmbootstrap chroot
# apk add unpackbootimg dtbtool
Because the device tree files were the same, @ollieparanoid told me to use abootimg to "put the postmarketOS initramfs inside the known working boot.img". I did that, but the resulting boot.img did could not boot because it was missing dtb files. @ollieparanoid asked about details on how I injected later, but he doesn't seem to have noticed my response, so here it is:
I did abootimg -u boot-working.img -r initramfs-huawei-kiwi and fastboot boot boot-working.img.
Sorry for not getting back to that. What do you mean with "I did that, but the resulting boot.img did could not boot because it was missing dtb files."?
The idea was, that if we use the known working boot.imgfile, we would have the dtb files already put in place, and even the same kernel, so it should boot just like it boots when you don't replace the initramfs.
So, after replacing, were the dtb files gone?
It appears so! I attempted booting the boot.img from the Lineage zip without modifying it and my ROM booted without problems. Any thoughts? How can I manually attach them? Was my command wrong?
It appears so!
Well, you could actually verify it with unpackbootimg and extract-dtb (highly recommended if you didn't do it yet!).
It's bad that we apparently can't get the postmarketOS initramfs running on your device. However, we could check if the kernel is the issue by replacing just the kernel (which should have the same appended dtbs as the known working kernel!) in the known working boot.img file, and checking if that can boot LineageOS correctly.
If that works, it means that the kernel is fine and the problem is in the initramfs.
Another idea would be to extract the kernel configuration from the working one and compare it with the config in pmos. If you search on internet there are various way to retrieve the config from an existing kernel
@ollieparanoid: I compared the dtb from the modified Lineage boot.img to the original Lineage boot.img and noticed there are even extra files (if you want to have a closer look, here is the diff output).
Where can I find the compiled kernel so I can try injecting it into the known working image?
@drebrez: I extracted kernel config from both the postmarketOS boot.img and the Lineage boot.img. Injecting it into the postmarketOS boot.img seems to have worked, but it still does not boot. I found interesting I could not inject the pmOS config into the known working image because lpm_levels.sleep_disabled is a bad config entry. I don't know anything about these config files so I would appreciate if you or anyone else could have a look at it: cfg_pmos.txt cfg_working.txt
Where can I find the compiled kernel so I can try injecting it into the known working image?
pmbootstrap export will create convenience symlinks to find the kernel, initramfs, boot.img and everything else we create.
It looks like, a new line before lpm_levels.sleep_disabled=1 is causing the config file error.
BTW, I'm not sure if that is what @drebrez meant with kernel configuration. Usually the kernel configuration is what you change with menuconfig. But it's very interesting, the changes in that file could be very well the issue. If replacing it solves it for you, I think you can set all of that information in the deviceinfo (flasher offsets and kernel commandline).
@fyfyone: do you need more help with this? Meanwhile pmbootstrap
bootimg_analyze was implemented and should be able to generate you a working deviceinfo.
Not for now, no. I'm actually working on other things now, and should I return to the project (I want to!), I will look for help with the issues I will face then. Thanks, everyone!