Looking at my Manjaro XFCE system on my SD card as well as my backup of Manjaro KDE Fusion 5.12 that I copied to eMMC, it appears that I might need to rename “vmlinux-5.13.0-MANJRO-ARM” to “Image”, because U-Boot does not support selecting multiple kernels like grub so the kernel is simply named “Image.”
Or maybe I can keep the old Image and initramfs.linux.img files and just edit extlinux.conf to point to the new files. That seems safer, because if it doesn’t boot, I can restore extlinux.conf and get the system to boot (I think).
mkinitcpio would not let me generate an initramfs with a new filename so I’m using the original name (initramfs-linux.img ) and, even though mkinitcpio seems to to permit a new kernel name, I’m using the original name “Image” too. (I saved the old files as .bak files.)
After generating the initramfs and rebooting, it’s not booting my new 5.13 kernel:
uname -ar
Linux pinebook 5.12.11-1-MANJARO-ARM #1 SMP Wed Jun 16 10:48:53 UTC 2021 aarch64 GNU/Linux
[calinb@pinebook ~]$
Maybe it’s because my mmcblk2 and nvme0n1 partitions have the same UUID (but different labels, which I changed):
I used gparted to reset the UUIDs on both mmcblk2 partitions, re-ran mkinitcpio (which generated a new initramfs-linux.img) but, upon reboot, uname -r still reports 5.12 is running.
Maybe I should use makepkg -s, as you describe here:
Where does makepkg expect to find config (and is it “config” or “.config”)? Should config exist in the same folder as PKGBUILD? Where does it expect to find the .preset file (“linux.preset”)?
What steps must be completed after makepkg -s to install the kernel?
Makepkg it self does not use the config file. But it is listed in the source of the PKGBUILD. So the file is called what it’s called in the PKGBUILD (which in our case is config).
Yes. All the files mentioned in the source=() array should be in the same folder as the PKGBUILD, unless the source is a URL.
In the same folder as the PKGBUILD, just like config.
To install a package that was built with makepkg you run:
sudo pacman -U <path to package file>
According to the output: ==> ERROR: A failure occurred in prepare(). there was an error in the prepare step. So likely a patch failed to apply. But we can’t know for sure, without the entire output (you only pasted a couple of lines, which so not contain the actual error).
Yes–many questions but your answers helped me greatly! I’ll debug the prepare error later. It was from my Manjaro XFCE system on SD card. I went back to my Manjaro Fusion system on NVMe SSD and makepkg worked!
However, I don’t see any new Image or vmlinux or other new file in /boot. There is a ~/linux/linux-5.13/vmlinux file with a new timestamp. Do I need to copy it to /boot/Image ?
Okay–it did create a /boot/Image file. It has an earlier timestamp than I expected but installing the package did create it.
The system would not boot, however, and I put the PCI_MSI code back in there (I’ll double check.)
For now, I don’t think I need assistance. I’ll reboot to my SD card and try to debug the prepare error on that system. I need to confirm that I can build and install a kernel on that SD card system and also include the PCI_MSI code and successfully boot. Then I will return to the MVNe system.
Thanks for all your help, Strit. I’ll keep plugging away at it, because I’d like to confirm the PCI_MSI problem and file a bug report to linux dot org.
I did cp -a ~/home/linux to my SD card XFCE system. Then
pacman - U sudo pacman -U linux-5.13.4-2-aarch64.pkg.tar.zst
and rebooted and confirmed my new kernel was running from my SD card:
$ uname -r
5.13.4-2-MANJARO-ARM
I doubled-checked and my PCI_MSI edits are in place and also the line "CONFIG_PCI_MSI_ARCH_FALLBACKS=y"
is in ~/linux/config
so my MSI-regresson kernel’s failure to boot on my NVMe SSD seems to not be related to PCI_MSI changes in 5.12 >> 5.13.
I can archive the three .c source files and the config file and send them to you, if you’re interested in having a look at them but here are the code insertions:
Thanks for all your help, Strit. At least I can build a kernel package and install it now.
I successfully installed my test kernel package to my Manjaro XFCE SD card system and it boots from the SD card. However, it still does not boot from my NVMe SSD Manjaro Fusion system. (I have installed it twice and restored the NVMe Manjaro system from backup twice after it failed to boot.) It fails to boot from NVMe in the same manner as the updated package from the Manjaro repository (black screen and no boot) so there is something else wrong in 5.13 that causes the NVMe boot to fail.