树梅派4b+ubuntu-20.04.2-server ARM64 更换Linux 内核

HW : 树梅派4b 4G

OS : ubuntu-20.04.2-server ARM64

下载 树梅派 的linux kernel 

https://github.com/raspberrypi/linux

$git clone --depth=1 -b VERSION https://github.com/raspberrypi/linux.git

其中VERSION替换为对应的版本号.

加上--depth=1参数使得只会下载最新的一次commit. 查不到code 提交的历史。

也可下载直接unzip

make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bcm2711_defconfig

make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-

在 linux-rpi-5.10.y/arch/arm64/boot/ 生成Image.gz

目前baidu上能收到的替换方法好像都是树梅派系统的方法。

唉,只能呢个生弄了

sd 会有两个分区system-boot  writable. 注意如果把这个sd 挂载在windows上,就只能看到system-boot.

我pc 用的ubuntu 18

其中writable 的boot 下 vmlinuz , 感觉应该替换这个。但证明不行。

writable/boot$ ls -lh
total 90M
-rw------- 1 root root 4.0M Jan 20 18:27 System.map-5.4.0-1028-raspi
-rw------- 1 root root 4.0M May 13 00:44 System.map-5.4.0-1036-raspi
-rw-r--r-- 1 root root 214K Jan 20 18:27 config-5.4.0-1028-raspi
-rw-r--r-- 1 root root 215K May 13 00:44 config-5.4.0-1036-raspi
lrwxrwxrwx 1 root root   43 Jun 20 20:21 dtb -> dtbs/5.4.0-1036-raspi/./bcm2711-rpi-4-b.dtb
lrwxrwxrwx 1 root root   43 Jun 19 14:48 dtb-5.4.0-1028-raspi -> dtbs/5.4.0-1028-raspi/./bcm2711-rpi-4-b.dtb
lrwxrwxrwx 1 root root   43 Jun 20 20:21 dtb-5.4.0-1036-raspi -> dtbs/5.4.0-1036-raspi/./bcm2711-rpi-4-b.dtb
drwxr-xr-x 4 root root 4.0K Jun 20 20:21 dtbs
drwxr-xr-x 2 root root 4.0K Feb  1 19:19 firmware
lrwxrwxrwx 1 root root   27 Jun 20 20:20 initrd.img -> initrd.img-5.4.0-1036-raspi
-rw-r--r-- 1 root root  29M Jun 19 14:48 initrd.img-5.4.0-1028-raspi
-rw-r--r-- 1 root root  29M Jun 20 20:21 initrd.img-5.4.0-1036-raspi
lrwxrwxrwx 1 root root   27 Feb  1 19:16 initrd.img.old -> initrd.img-5.4.0-1028-raspi
lrwxrwxrwx 1 root root   14 Jun 22 19:14 vmlinuz -> vmlinuz-5.10.y
-rw-r--r-- 1 root root 7.7M Jun 22 19:13 vmlinuz-5.10.y
-rw------- 1 root root 8.0M Jan 20 18:27 vmlinuz-5.4.0-1028-raspi
-rw-r--r-- 1 root root 7.7M Jun 22 19:19 vmlinuz-5.4.0-1036-raspi
lrwxrwxrwx 1 root root   24 Feb  1 19:16 vmlinuz.old -> vmlinuz-5.4.0-1028-raspi

最后发现 system-boot 也有一个 vmlinuz。

linux-rpi-5.10.y/arch/arm64/boot/Image.gz

cp 到

system-boot/vmlinz.

在插回卡,重启动,发现kernel 版本已经更换,成功。

但我没改动dts所以那部分不用更新。

 

 

 

 

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值