Thanks for the information but that is a developer’s script.
I am running Debian. Too many things to change from Arch to Debian.
I will wait.
The error in the compile should be relatively easy to pin down.
@ chbinnc.
Appreciate the reply.
The kernel now compiles clean when I enable debug fs in menuconfig. Thanks.
What happens AFTER your last step ourlined above (make ARCH=riscv -j4)
Make install, make modules_install??, i.e, what happens with Image.gz and the DTB's newly created?
This is NOT explained in the documentation.
Regards
Aubrey
For me I directly generate necessary files with the commands below:
sudo make ARCH=riscv INSTALL_PATH=/boot/ zinstall
sudo make INSTALL_DTBS_PATH="/boot/dtbs" dtbs_install
sudo make INSTALL_MOD_PATH="/" INSTALL_MOD_STRIP=1 modules_install
@chbinnc
Thanks for the information.
I followed your instructions, then ran u-boot-update to update extlinux.conf.
I then amended extlinux.conf to point to the newly compiled kernel (l1).
The board is now dead (red led, but no I/O activity (green)).
I have, but one of the pins is bent, so I cannot use it.
It looks like I will have to re-image the board again.
Is there a chance I forgot a step in the install sequence?
I have been building kernels for years, this case is proving difficult…
Aubrey
PS In the abovementioned steps you describe -
" ```
make ARCH=riscv INSTALL_PATH=/boot/ zinstall
make INSTALL_DTBS_PATH=“/boot/dtbs” dtbs_install
make INSTALL_MOD_PATH=“/” INSTALL_MOD_STRIP=1 modules_install
You make no mention of extlinux.conf. In the meantime, this topic has surfaced in the documentation...
I find the mixture of cross-compile and native compile instructions in the documentation misleading and non-intuitive.
It would be preferable if the native (on the box) and cross-compile instructions were treated in separate paragraphs.
Aubrey
Old kernel is still in the /boot partition and was renamed to *.old, you can try to edit extlinux.conf again and point to it. If it doesn’t work, please paste your extlinux.conf here.
You can just connect your system sdcard/emmc/nvme with a USB adapter to your PC and edit the extlinux.conf file. Anyway, if you are going to re-image the board, you need another device and a working OS.
I could have taken the NVME device out and attached it to another machine and done my magic from there. Did not have the time. I re-imaged the NVME SSD, quicker.
Now I am back to where I was before all of these shenanigans started.
Can you confirm that these steps are still valid and in the right sequence -
make ARCH=riscv INSTALL_PATH=/boot/ zinstall
make INSTALL_DTBS_PATH="/boot/dtbs" dtbs_install
make INSTALL_MOD_PATH="/" INSTALL_MOD_STRIP=1 modules_install
Aubrey
PS There is no “old” or backup copy of vmlinuz being created when running the first command - see below
root@risc-v:/Transit/linux/linux# make ARCH=riscv INSTALL_PATH=/boot/ zinstall
sh ./arch/riscv/boot/install.sh 5.15.0
arch/riscv/boot/Image.gz System.map “/boot/”
root@risc-v:/Transit/linux/linux# ll /boot
total 32744
-rwx------ 1 root root 4003528 Aug 6 11:56 System.map-5.15.0
-rwx------ 1 root root 4415441 Jun 11 09:48 System.map-5.15.0-starfive
-rwx------ 1 root root 194818 Aug 6 11:56 config-5.15.0
-rwx------ 1 root root 199013 Jun 11 09:48 config-5.15.0-starfive
drwx------ 4 root root 2048 Jun 11 11:40 dtbs
drwx------ 2 root root 2048 Jun 11 11:40 extlinux
-rwx------ 1 root root 9272081 Jun 11 11:32 initrd.img-5.15.0-starfive
-rwx------ 1 root root 406 Jun 11 11:31 uEnv.txt
-rwx------ 1 root root 6858544 Aug 6 11:56 vmlinuz-5.15.0
-rwx------ 1 root root 8574915 Jun 11 09:48 vmlinuz-5.15.0-starfive
root@risc-v:/Transit/linux/linux#
Your new kernel is vmlinuz-5.15.0, the old one is vmlinuz-5.15.0-starfive, the name is different, so no backup files are generated. You need to edit extlinux.conf and change vmlinuz-5.15.0-starfive to vmlinuz-5.15.0.
I can confirm, except sometimes for avoiding overwriting dtbs files, I may change
make INSTALL_DTBS_PATH="/boot/dtbs" dtbs_install
to
make INSTALL_DTBS_PATH="/boot/dtbs/new" dtbs_install
And change dtbs path in the extlinux.conf respectively.
As mentioned already, I ran the three commands in the sequence you outlined.
I edited extlinux.conf and changed the boot menu option from “l0” to “l1” whci pointed to
menu label Debian GNU/Linux bookworm/sid 5.15.0
linux /vmlinuz-5.15.0
initrd /initrd.img-5.15.0-starfive
fdtdir /dtbs
append root=/dev/nvme0n1p4 rw console=tty0 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0
As you can see from the above I did not change the initrd line. I then powered off, restarted, result system dead.
make ARCH=riscv INSTALL_PATH=/boot/ zinstall
make INSTALL_DTBS_PATH="/boot/dtbs" dtbs_install
make INSTALL_MOD_PATH="/" INSTALL_MOD_STRIP=1 modules_install
The contents of /boot are as follows -
-rwx------ 1 root root 4003528 Aug 6 12:48 System.map-5.15.0
-rwx------ 1 root root 4415441 Jun 11 09:48 System.map-5.15.0-starfive
-rwx------ 1 root root 4003528 Aug 6 11:56 System.map-5.15.0.old
-rwx------ 1 root root 194818 Aug 6 12:48 config-5.15.0
-rwx------ 1 root root 199013 Jun 11 09:48 config-5.15.0-starfive
-rwx------ 1 root root 194818 Aug 6 11:56 config-5.15.0.old
drwx------ 4 root root 2048 Jun 11 11:40 dtbs
drwx------ 2 root root 2048 Jun 11 11:40 extlinux
-rwx------ 1 root root 9272081 Jun 11 11:32 initrd.img-5.15.0-starfive
-rwx------ 1 root root 406 Jun 11 11:31 uEnv.txt
-rwx------ 1 root root 6858544 Aug 6 12:48 vmlinuz-5.15.0
-rwx------ 1 root root 8574915 Jun 11 09:48 vmlinuz-5.15.0-starfive
-rwx------ 1 root root 6858544 Aug 6 11:56 vmlinuz-5.15.0.old
After running u-boot-update, this is what /boot/extlinux/extlinux.conf looks like -
default l0
menu title U-Boot menu
prompt 0
timeout 50
label l0
menu label Debian GNU/Linux bookworm/sid 5.15.0.old
linux /vmlinuz-5.15.0.old
Having added the failing line “fdtdir /dtbs” to the new kernel that I compiled section in /boot/extlinux/extlinux.conf, I am greeted with this on a reboot -