# Replacing existing kernel with new kernel

**URL:** <https://forums.sifive.com/t/replacing-existing-kernel-with-new-kernel/3882>\
**Category:** RISC-V\
**Created:** [July 20, 2020, 9:17am UTC](https://forums.sifive.com/t/replacing-existing-kernel-with-new-kernel/3882 "2020-07-20T09:17:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![talnikarpankaj](https://avatars.discourse-cdn.com/v4/letter/t/d2c977/32.png) [@talnikarpankaj](https://forums.sifive.com/u/talnikarpankaj)\
**Post date:** [July 20, 2020, 9:17am UTC](https://forums.sifive.com/t/replacing-existing-kernel-with-new-kernel/3882/1 "2020-07-20T09:17:26Z")

</div>

Hi ,

I am trying to replace my existing kernel image which is 5.5.6 to 5.5.7 on qemuriscv64 i would like to mention i have built my qemu image with openembedded-core.

i have tried to build the kernel 5.5.7 natively,i was able to build the kernel successfully and in my /boot folder i am able to see vmlinux-5.5.7 but now i want to install this image…i have tried to do it by make install i didnt got any error with it but when i rebooted my system i am getting

i have followed the following steps to build kernel

$root@qemuriscv64-exaleapsemi-r2:/usr/src/kernel# make menuconfig arch=riscv64

$root@qemuriscv64-exaleapsemi-r2:/usr/src/kernel# make -j4

$root@qemuriscv64-exaleapsemi-r2:/usr/src/kernel# make modules\_install

$root@qemuriscv64:/usr/src/kernel# make install

sh ./arch/riscv/boot/install.sh 5.5.7 \

arch/riscv/boot/Image System.map “/boot”

Installing normal kernel

$reboot

13024.451157] printk: systemd-shutdow: 37 output lines suppressed due to ratelimiting

[13024.527282] systemd-shutdown[1]: Syncing filesystems and block devices.

[13024.668538] systemd-shutdown[1]: Sending SIGTERM to remaining processes…

[13024.719496] systemd-journald[87]: Received SIGTERM from PID 1 (systemd-shutdow).

[13024.769405] systemd-shutdown[1]: Sending SIGKILL to remaining processes…

[13024.834318] systemd-shutdown[1]: Unmounting file systems.

[13024.868285] [13413]: Remounting ‘/’ read-only in with options ‘(null)’.

[13025.228499] EXT4-fs (vda): re-mounted. Opts: (null)

[13025.358123] systemd-shutdown[1]: All filesystems unmounted.

[13025.358576] systemd-shutdown[1]: Deactivating swaps.

[13025.361264] systemd-shutdown[1]: All swaps deactivated.

[13025.361727] systemd-shutdown[1]: Detaching loop devices.

[13025.420602] systemd-shutdown[1]: All loop devices detached.

[13025.421071] systemd-shutdown[1]: Detaching DM devices.

[13025.595237] reboot: Restarting system

[13046.599875] rcu: INFO: rcu\_sched detected stalls on CPUs/tasks:

[13046.600329] (detected by 0, t=5252 jiffies, g=2837145, q=17)

[13046.600763] rcu: All QSes seen, last rcu\_sched kthread activity 5252 (4298153942-4298148690), jiffies\_till\_next\_fqs=1, root -\>qsmask 0x0

[13046.601503] systemd-shutdow R running task 0 1 0 0x00000008

[13046.602053] Call Trace:

[13046.602562] [] walk\_stackframe+0x0/0xa4

[13046.602890] [] show\_stack+0x2a/0x34

[13046.603156] [] sched\_show\_task+0x158/0x174

[13046.603442] [] rcu\_sched\_clock\_irq+0x6b2/0x6ec

[13046.603740] [] update\_process\_times+0x1e/0x44

[13046.604009] [] tick\_sched\_handle.isra.16+0x30/0x3e

[13046.604331] [] tick\_sched\_timer+0x4e/0x94

[13046.604620] [] \_\_hrtimer\_run\_queues+0x10c/0x2de

[13046.604928] [] hrtimer\_interrupt+0xcc/0x1d6

[13046.605236] [] riscv\_timer\_interrupt+0x32/0x3a

[13046.605580] [] do\_IRQ+0xae/0xba

[13046.605837] [] ret\_from\_exception+0x0/0xc

[13046.606127] [] machine\_restart+0xc/0xe

[13046.606508] rcu: rcu\_sched kthread starved for 5252 jiffies! g2837145 f0x2 RCU\_GP\_WAIT\_FQS(5) -\>state=0x0 -\>cpu=0

[13046.606990] rcu: RCU grace-period kthread stack dump:

[13046.607257] rcu\_sched R running task 0 10 2 0x00000000

[13046.607610] Call Trace:

[13046.607774] [] \_\_schedule+0x1a8/0x482

[13046.608044] [] schedule+0x60/0xda

[13046.608304] [] schedule\_timeout+0x15c/0x2b2

[13046.608602] [] rcu\_gp\_kthread+0x4cc/0x7ec

[13046.608889] [] kthread+0xf0/0x102

[13046.609162] [] ret\_from\_exception+0x0/0xc

… so on getting continuously…

Can someone help me out how i can replace my kernel to 5.5.7 since i am not able to find grub or grub2 on my riscv platform?? i have googled for the solution but most of them seems to be x86 specific where they are trying to change the grub??Where i should modify for riscv to get my kernel up???

Thanks
