I’m trying to setup to build a kernel with the code restored. Guided by your posts here:
I used git and updpkgsums to obtain linux513 and the kernel source but I’m troubled that I can’t find the
“CONFIG_PCI_MSI_ARCH_FALLBACKS=y” line in any of the previous config files.
My plan is to restore that line in the linux513 config file and also restore the code in the 3 files documented here:
brings it into my Linux513 kernel source from gitlab.
But I’m still running 5.12 so where can I find the 5.13 config file? Again, my plan is to take the Manjaro 5.13 source and edit it to restore the use of the msi_controller. If it then boots from NVMe, that would be conclusive and I’ll file the bug report.
I have Manjaro XFCE on an SD card. Maybe I can get the 5.13 config file from it, but looks like I’ll have to boot the SD card to generate the file in /proc/
make menuconfig doesn’t allow me to add the "CONFIG_PCI_MSI_ARCH_FALLBACKS=y” back into the 5.13 .config file so I added it back in manually. Now on to the source edits…
When I tried to edit linux-5.3/drivers/pci/msi.c to put the code back into 5.13, I see that it still contains the old code with the MSI support ( beginning with /* Arch hooks */`on line #65), but when I browse the code at msi.c « pci « drivers - kernel/git/stable/linux.git - Linux kernel stable tree, I see that the MSI code has been removed, as expected.
The code differences are not as I expect so pointless to build the kernel at this point.
When I
cd linux53
updpkgsums
(quote is from your “Download kernel source” post)
Does updpkgsums generate a tar.gz source archive for 5.12 instead of 5.13, because I’m still running the 5.12 kernel? I guess I could try all this from my 5.13 Manjaro XFCE SD card and see what happens.
This kernel building process is very different from my frequent experiences building kernels with Gentoo, Ubuntu, Red Hat, etc. many years ago, where I’d just install the linux-source package (or whatever it was named) and I’d know exactly what version of linux source I was getting!
However, there is no /boot/vmlinuz file to copy and vmlinux-5.13.0-MANJARO-ARM already exists and it has a timestamp that indicates it was built when I performed step 7 (“sudo make install”).
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 ?