I’ve been trying to compile a new kernel for Fedora RISC-V for a while, every time without success. In my most recent try
- I have an up-to-date Fedora RISC-V,
Fedora release 31 (Rawhide),
gcc (GCC) 9.0.1 20190320 (Red Hat 9.0.1-0.11)on the device, that I’m using to compile the kernel
- I have checked out https://github.com/rwmjones/fedora-riscv-kernel.git , branch
- Then I’ve updated the
riscv-linuxto https://github.com/avpatel/linux.git , branch
v5.0_unleashed(https://github.com/avpatel/linux/tree/v5.0_unleashed). This is Linux 5.0 with HiFive specific patches.
- I’ve also, just in case, updated
riscv-pkto current master https://github.com/riscv/riscv-pk.git (but I have the same problems with the referenced commit)
Then I do
make and it produces a
bbl.u540 that I install to the correctly labeled GPT partition of a SD card.
I get this, then nothing at all, no error messages through the serial out
SiFive FSBL: 2018-03-20 HiFive-U serial #: 0000xxxx bbl loader vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvvv rrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvvvv rrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv rrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv rrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv rrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv rrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvv rrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvv rr vvvvvvvvvvvvvvvvvvvvvv rr vvvvvvvvvvvvvvvvvvvvvvvv rr rrrr vvvvvvvvvvvvvvvvvvvvvvvvvv rrrr rrrrrr vvvvvvvvvvvvvvvvvvvvvv rrrrrr rrrrrrrr vvvvvvvvvvvvvvvvvv rrrrrrrr rrrrrrrrrr vvvvvvvvvvvvvv rrrrrrrrrr rrrrrrrrrrrr vvvvvvvvvv rrrrrrrrrrrr rrrrrrrrrrrrrr vvvvvv rrrrrrrrrrrrrr rrrrrrrrrrrrrrrr vv rrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrr INSTRUCTION SETS WANT TO BE FREE
I have no idea how to even start debugging this
- Is the configuration in https://github.com/rwmjones/fedora-riscv-kernel/blob/master/config right for the new kernel? (I did a quick search and it seems the config variable names are still the same). At least everything with SIFIVE and RISCV is enabled:
# grep SIFIVE .config CONFIG_SERIAL_SIFIVE=y CONFIG_SERIAL_SIFIVE_CONSOLE=y CONFIG_SPI_SIFIVE=y CONFIG_GPIO_SIFIVE=y CONFIG_PWM_SIFIVE=y CONFIG_SIFIVE_PLIC=y # grep RISCV .config CONFIG_RISCV=y CONFIG_RISCV_ISA_C=y CONFIG_RISCV_ISA_A=y CONFIG_SERIAL_EARLYCON_RISCV_SBI=y CONFIG_HVC_RISCV_SBI=y CONFIG_RISCV_TIMER=y
- Is the serial device name in the command line
console=ttySI0still correct? (could this explain no output?)
edit: okay, this could be it, we might need
drivers/tty/serial/sifive.c:#define SIFIVE_TTY_PREFIX "ttySIF"
No, unfortunately that didn’t help.