ayufan-rock64 / linux-build

Rock64 Linux build scripts, tools and instructions
MIT License
562 stars 98 forks source link

Cannot downgrade kernel from mainline to 4.4 on bionic-minimal-rock64-0.6.31-209-arm64 #159

Open seangineer opened 6 years ago

seangineer commented 6 years ago

When I attempt to return to the 4.4 kernel after running the mainline kernel using dpkg -i, I run into a problem regarding old or unknown versions. I do not recall this issue being present while attempting to downgrade the kernel on build 0.5.15.

root@rock64:~# uname -r
4.16.0-rockchip-ayufan-209-g027e722bb
root@rock64:~# dpkg -i linux-image-4.4.120-rockchip-ayufan-209_0.6.31_arm64.deb
(Reading database ... 50689 files and directories currently installed.)
Preparing to unpack linux-image-4.4.120-rockchip-ayufan-209_0.6.31_arm64.deb ...
Unpacking linux-image-4.4.120-rockchip-ayufan-209 (0.6.31) over (0.6.31) ...
Setting up linux-image-4.4.120-rockchip-ayufan-209 (0.6.31) ...
update-initramfs: Generating /boot/initrd.img-4.4.120-rockchip-ayufan-209
Warning: root device  does not exist
Using DTB: rockchip/rk3328-rock64.dtb
Installing /usr/lib/linux-image-4.4.120-rockchip-ayufan-209/rockchip/rk3328-rock64.dtb into /boot/dtbs/4.4.120-rockchip-ayufan-209/rockchip/rk3328-rock64.dtb
Taking backup of rk3328-rock64.dtb.
Installing new rk3328-rock64.dtb.
Ignoring old or unknown version 4.4.120-rockchip-ayufan-209 (latest is 4.16.0-rockchip-ayufan-209-g027e722bb)
Use --force if you want version 4.4.120-rockchip-ayufan-209.
Installing /usr/lib/linux-image-4.16.0-rockchip-ayufan-209-g027e722bb/rockchip/rk3328-rock64.dtb into /boot/dtbs/4.16.0-rockchip-ayufan-209-g027e722bb/rockchip/rk3328-rock64.dtb
Taking backup of rk3328-rock64.dtb.
Installing new rk3328-rock64.dtb.
flash-kernel: deferring update (trigger activated)
Using DTB: rockchip/rk3328-rock64.dtb
Installing /usr/lib/linux-image-4.4.120-rockchip-ayufan-209/rockchip/rk3328-rock64.dtb into /boot/dtbs/4.4.120-rockchip-ayufan-209/rockchip/rk3328-rock64.dtb
Taking backup of rk3328-rock64.dtb.
Installing new rk3328-rock64.dtb.
Ignoring old or unknown version 4.4.120-rockchip-ayufan-209 (latest is 4.16.0-rockchip-ayufan-209-g027e722bb)
Processing triggers for flash-kernel (3.92) ...
Using DTB: rockchip/rk3328-rock64.dtb
Installing /usr/lib/linux-image-4.16.0-rockchip-ayufan-209-g027e722bb/rockchip/rk3328-rock64.dtb into /boot/dtbs/4.16.0-rockchip-ayufan-209-g027e722bb/rockchip/rk3328-rock64.dtb
Taking backup of rk3328-rock64.dtb.
Installing new rk3328-rock64.dtb.
flash-kernel: installing version 4.16.0-rockchip-ayufan-209-g027e722bb
Taking backup of Image.
Installing new Image.
Taking backup of initrd.img.
Installing new initrd.img.
Taking backup of dtb.
Installing new dtb.

I see that there is an option to use a --force option, but I am unsure as to how to pass this option to flash-kernel when using dpkg.

Any hints on how to downgrade would be appreciated since I seem to be lose access the server daily due to #158 and #157.

ayufan commented 6 years ago

The easiest is to remove mainline.

apt-get remove linux-{image,headers}-4.16.0-rockchip-ayufan-209-g027e722bb
seangineer commented 6 years ago

Thanks ayufan, that worked perfectly!

Feel free to close if this is the expected behavior.