05-29-2023, 09:39 PM
(This post was last modified: 06-17-2023, 02:50 AM by Valenoern.
Edit Reason: clarify what is a "new kernel"
)
I have been trying to get a DVD drive to work with the RockPRO64, but for some reason the kernel is not properly operating the drive and the open/close button does not work.
I researched the problem, and it seems like this is a general problem with the Linux kernel or its modules on multiple architectures — some versions of the "linux" package in Manjaro/Arch properly provided CD drive support and some did not. So, now I simply have to compile kernels from source until I get the right one. [2]
The only problem is, after a week or so of trying to compile kernels and comb through source code for rockpro U-Boot packages I still have no idea how to compile a kernel for U-Boot that actually boots. I have tried "mkimage" and putting a regular compiled kernel stripped of debug information into mkimage, but the kernel always fails to boot and restarts the CPU. I read and re-read the documentation for the U-Boot packages and saw that I'm apparently supposed to have a kernel tree with "make uImage" or "make pImage", but none of the kernel.org trees had this so I'm not sure where to get this source tree. [1]
I am also confused where the blobless package "uboot-rockpro64-foss" finds the kernel if it does not install one to /boot, or in any case where my kernel is on disk after I boot into a Manjaro partition.
How do I compile a kernel from source into an "Image" file loaded by extlinux.conf?
Is that even the same kernel that loads when I boot my eMMC and run "uname -a" to describe the kernel? How do I compile and use a new one?
[1] edit 6/07: so, apparently new kernel trees have "make Image". I tried this with kernel version 6.4.0-rc4 and it did not boot past what seems to be the Secondary Program Loader (SPL).
[2] edit 6/17: well now I feel really stupid. The problem with the DVD drive was that I kept trying to plug it into a USB 2.0 port and it really needed a USB 3.0 port. I just never figured this out because I always had something else in the single one the ROCKPro has.
That said, it would still probably be helpful to people to know how to compile a kernel, so I will still test it if anybody figures out how. I have already been messing with creating distro images for a while now.
I researched the problem, and it seems like this is a general problem with the Linux kernel or its modules on multiple architectures — some versions of the "linux" package in Manjaro/Arch properly provided CD drive support and some did not. So, now I simply have to compile kernels from source until I get the right one. [2]
The only problem is, after a week or so of trying to compile kernels and comb through source code for rockpro U-Boot packages I still have no idea how to compile a kernel for U-Boot that actually boots. I have tried "mkimage" and putting a regular compiled kernel stripped of debug information into mkimage, but the kernel always fails to boot and restarts the CPU. I read and re-read the documentation for the U-Boot packages and saw that I'm apparently supposed to have a kernel tree with "make uImage" or "make pImage", but none of the kernel.org trees had this so I'm not sure where to get this source tree. [1]
I am also confused where the blobless package "uboot-rockpro64-foss" finds the kernel if it does not install one to /boot, or in any case where my kernel is on disk after I boot into a Manjaro partition.
How do I compile a kernel from source into an "Image" file loaded by extlinux.conf?
Is that even the same kernel that loads when I boot my eMMC and run "uname -a" to describe the kernel? How do I compile and use a new one?
[1] edit 6/07: so, apparently new kernel trees have "make Image". I tried this with kernel version 6.4.0-rc4 and it did not boot past what seems to be the Secondary Program Loader (SPL).
[2] edit 6/17: well now I feel really stupid. The problem with the DVD drive was that I kept trying to plug it into a USB 2.0 port and it really needed a USB 3.0 port. I just never figured this out because I always had something else in the single one the ROCKPro has.
That said, it would still probably be helpful to people to know how to compile a kernel, so I will still test it if anybody figures out how. I have already been messing with creating distro images for a while now.