When attempting to build the kernel for htc-dlx (based on the m7 kernel from Lineage), pmbootstrap fails with numerous failures to find either arm-eabi-gcc or arm-eabi-ld. Full build log and copy of APKBUILD file are available in this gist.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
The problem is, that the cross-compiler is hardcoded in your kernel's Makefile. It has a different name in postmarketOS, so this fails.
The following patch fixes it (save it as Makefile-no-hardcoded-CROSS_COMPILE.patch or something like that inside the aports/linux-... folder and add it to your source= line inside the APKBUILD.)
This fixes errors like the following (because our cross-compiler has a different name): /bin/sh: arm-eabi-ld: not found /bin/sh: arm-eabi-gcc: not found--- a/Makefile+++ b/Makefile@@ -194,8 +194,6 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ export KBUILD_BUILDHOST := $(SUBARCH) ARCH ?= $(SUBARCH) CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)-ARCH := arm-CROSS_COMPILE := arm-eabi- # Architecture as present in compile.h UTS_MACHINE := $(ARCH)
I have seen, that you have forked the kernel in your own repository and applied patches there. I strongly recommend not to do this, and use the original kernel source (the one you have forked) as base, and apply patch files on top of that, for the following reasons:
less fragmentation, we really have enough kernel forks in the Android world (the long time goal is to unify them with pmOS, not to have further forks)
it is much easier to see, what has been changed with single patch files
when you made a new patch, you/other people using your kernel don't need to download the whole source code archive again
the patch files can be re-used for other kernels (e.g. patches from the mako kernel were used for the hammerhead kernel)
Upstreaming your changes to the kernel you have forked is of course the best solution here - but in the meantime, I suggest keeping the patches inside the aports folder.
With that being said, thanks for making the bug report and working on this port
I have merged your commit into the device-htc-dlx branch and fixed the linux-htc-dlx aport, the kernel compiles now :)
Could you try to get your device to boot it?
Current update:
Kernel now builds successfully. Using pmbootstrap.py flasher boot hangs the device immediately. Fastboot still sees the device from my laptop but nothing I can do gets it to respond.
If I try pmbootstrap.py flasher flash_kernel or flash_system I get FAILED (remote: not allowed) after writing 'SHLVL=1'.
Googling implies that this error is related to not having an unlocked bootloader, but my HBOOT screen shows *** UNLOCKED *** across the top and S-OFF.
You basically use fastboot to ask for a code from your bootloader, then send that to that HTC site (you must register for that), then wait until they send you an e-mail with the unlock code (which takes 15 minutes or so). After that, you can use that code to unlock your device with fastboot. They have detailed instructions with images at least. I have done this process once.
...last but not least, if we can't get it to work by unlocking fastboot, I think we should make a new flashing method based on exploiting the outdated Android kernels (#101 (closed)) :>
Too bad we didn't get anywhere yet. By now we know a lot more about boot.img files. Please answer if you're willing to try out some more ideas, closing otherwise.
No! I'm still here! Sorry, was just on vacation over the summer and had to turn away from this for a bit. If there's a new method that might work, I still have the dlx just lying around. Happy to give it a shot.
No need to be sorry, this is a free time project
Cool that you want to try it again. What we did not try yet with the htc-dlx, but lead to success at least in one case.
use abootimg (packaged for Ubuntu/Debian, not yet for pmOS, but we can do that if you need it: #135 (closed)) to modify the known working boot.img file (from LineageOS/TWRP/whatever)
replace the initramfs and kernel with the postmarketOS kernel and initramfs
quick remainder on how to generate them: pmbootstrap install, then pmbootstrap export.