So which version of system image are you using? starfive-jh7110-202306-nvme-minimal-desktop.img? From your image in pasteboard, your system are using Gnome, iirc system version 202302 and before gnome isn’t the default desktop env.
@chbinnc Thanks for the reply.
I am using starfive-jh7110-202306-nvme-minimal-desktop.img.
As per the photo (Screenshot) I posted, at this stage there is no rescue possible.
Either I attach the NVME device to another system and try to repair things or I do a re-image.
I normally do a re-image as I find it is quicker.
As far as I am aware of, there is no trace of any 202302 on my system as I erase the device and re-image as outlined above.
Again, here is a print of /boot/extlinux/extlinux.conf in it’s original (virginal) state - fresh after a new install (re-image).
Aubrey
/extlinux/extlinux.conf
IMPORTANT WARNING
The configuration of this file is generated automatically.
Do not edit this file manually, use: u-boot-update
default l0
menu title U-Boot menu
prompt 0
timeout 50
label l0
menu label Debian GNU/Linux bookworm/sid 5.15.0-starfive
linux /vmlinuz-5.15.0-starfive
initrd /initrd.img-5.15.0-starfive
I do a fresh build and have the same issue in your pasteboard link,
by comparing config-5.15.0 and config-5.15.0-starfive in the boot partition, I found that the kernel of starfive-jh7110-202306-nvme-minimal-desktop.img is build with options GCC_PLUGINS=y and CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=y.
After install gcc-12-plugin-dev and rebuild the kernel with those options enabled, I can successfully boot into the system.
Here is the recipe:
sudo apt install git
git clone https://github.com/starfive-tech/linux
cd linux/
git checkout -b JH7110_VisionFive2_devel origin/JH7110_VisionFive2_devel
git pull
sudo apt install make libncurses-dev bison flex libelf-dev libssl-dev bc
sudo apt install gcc-12-plugin-dev
make starfive_visionfive2_defconfig ARCH=riscv
make ARCH=riscv menuconfig
│ Symbol: GCC_PLUGINS [=y] │
│ Type : bool │
│ Defined at scripts/gcc-plugins/Kconfig:8 │
│ Prompt: GCC plugins │
│ Depends on: HAVE_GCC_PLUGINS [=y] && CC_IS_GCC [=y] && y │
│ Location: │
│ (1) -> General architecture-dependent options
| Symbol: GCC_PLUGIN_STRUCTLEAK_BYREF_ALL [=y] │
│ Type : bool │
│ Defined at security/Kconfig.hardening:83 │
│ Prompt: zero-init everything passed by reference (very strong) │
│ Depends on: <choice> && GCC_PLUGINS [=y] && (!KASAN [=n] || !KASAN_STACK [=n]) │
│ Location: │
│ -> Security options │
│ -> Kernel hardening options │
│ -> Memory initialization │
│ (2) -> Initialize kernel stack variables at function entry (<choice> [=y]) │
│ Selects: GCC_PLUGIN_STRUCTLEAK [=y]
time make ARCH=riscv -j4
sudo make ARCH=riscv INSTALL_PATH=/boot/ zinstall
sudo make INSTALL_DTBS_PATH="/boot/dtbs/new" dtbs_install
sudo make INSTALL_MOD_PATH="/" INSTALL_MOD_STRIP=1 modules_install
sudo update-initramfs -c -k 5.15.0
u-boot-update failed to work correctly for me either, so I still need to manually edit it:
## /boot/extlinux/extlinux.conf
##
## IMPORTANT WARNING
##
## The configuration of this file is generated automatically.
## Do not edit this file manually, use: u-boot-update
default l1
menu title U-Boot menu
prompt 0
timeout 50
label l0
menu label Debian GNU/Linux bookworm/sid 5.15.0-starfive
linux /vmlinuz-5.15.0-starfive
initrd /initrd.img-5.15.0-starfive
fdtdir /dtbs
append root=/dev/mmcblk1p4 rw console=tty0 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0
label l0r
menu label Debian GNU/Linux bookworm/sid 5.15.0-starfive (rescue target)
linux /vmlinuz-5.15.0-starfive
initrd /initrd.img-5.15.0-starfive
fdtdir /dtbs
append root=/dev/mmcblk1p4 rw console=tty0 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0 single
label l1
menu label Debian GNU/Linux bookworm/sid 5.15.0
linux /vmlinuz-5.15.0
initrd /initrd.img-5.15.0
fdtdir /dtbs/new
append root=/dev/mmcblk1p4 rw console=tty0 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0
label l1r
menu label Debian GNU/Linux bookworm/sid 5.15.0 (rescue target)
linux /vmlinuz-5.15.0
initrd /initrd.img-5.15.0
fdtdir /dtbs/new
append root=/dev/mmcblk1p4 rw console=tty0 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0 single
In your case you need to replace mmcblk1p4 to nvme0n1p4.
@chbinnc The kernel compile works.
Thank you for your time and the assistance rendered.
A last question, why do I/we need all of this kernel hardening GCC Plugins (more overhead…) etc?
For a partial build (just remove the gcc-plugins options in the kernel and make again) or a complete build (pull the kernel sourcecode again and make)?
Partial build.
Something strange now…
Yesterday, I had 8GB RAM, after this kernel build, I now have only 4GB.
Firmware (U-Boot and SPL) is up to date.
Any ideas?