This pr provides support for enabling the kdump service on riscv. After starting the kdump service, the kdump kernel can be successfully loaded, and after triggering a kernel crash, the kdump kernel can be started normally and the vmcore can be captured.

Due to some issues with initrd in kexec-tools, avoid it first to provide basic riscv architecture kdump support. Tested in openeuler riscv qemu, and can also pass Mugen testing.

Please note that the 6.6 kernel used for testing needs to be patched with an upstream bugfix patch, which has merged to 6.6.30 [1][2].

Link: https://lore.kernel.org/stable/20240416085647.14376-1-xingmingzheng@iscas.ac.cn [1]
Link: https://lore.kernel.org/stable/20240430032403.19562-1-xingmingzheng@iscas.ac.cn [2]

Test:

$ systemctl status kdump
● kdump.service - Crash recovery kernel arming
     Loaded: loaded (/usr/lib/systemd/system/kdump.service; enabled; preset: enabled)
     Active: active (exited) since Thu 2024-04-18 15:51:31 CST; 22min ago
    Process: 449 ExecStart=/usr/bin/kdumpctl start (code=exited, status=0/SUCCESS)
   Main PID: 449 (code=exited, status=0/SUCCESS)

Apr 18 15:50:53 openeuler-riscv64 kdumpctl[584]: grep: warning: stray \ before -
Apr 18 15:50:53 openeuler-riscv64 kdumpctl[584]: grep: warning: stray \ before -
Apr 18 15:50:53 openeuler-riscv64 kdumpctl[586]: grep: warning: stray \ before -
Apr 18 15:50:54 openeuler-riscv64 kdumpctl[626]: grep: warning: stray \ before -
Apr 18 15:50:54 openeuler-riscv64 kdumpctl[626]: grep: warning: stray \ before -
Apr 18 15:50:54 openeuler-riscv64 kdumpctl[630]: grep: warning: stray \ before -
Apr 18 15:51:30 openeuler-riscv64 kdumpctl[782]: Warning: No dtb provided, using /sys/firmware/fdt
Apr 18 15:51:31 openeuler-riscv64 kdumpctl[454]: kexec: loaded kdump kernel
Apr 18 15:51:31 openeuler-riscv64 kdumpctl[454]: Starting kdump: [OK]
Apr 18 15:51:31 openeuler-riscv64 systemd[1]: Finished Crash recovery kernel arming.

All modifications in PR have arch isolation, only affects the riscv architecture.