[总结]给pcDuino v2编译Linux kernel

时间:2023-03-09 00:24:40
[总结]给pcDuino v2编译Linux kernel

1、版本问题

推荐选择pcdunio提供的官方的kernel。

当然可以选用www.github.com/linux-sunxi 中的kernel,不过有很多驱动都用不了包括arduino。

我尝试了以下的几个版本,3.29,3.79,3.90,下面是我这些时间的总结,会慢慢更新。

2、具体问题

(1)gen_initramfs_list.sh的问题

Cannot open '../../linux-sunxi/rootfs/rootfs.cpio.xz'

make[1]: *** [usr/initramfs_data.cpio.xz] Error 1

make: *** [usr] Error 2

按照如下建立个文件夹结构,在roofs下面建立一个硬链接,链接到 linux-sunxi-sunxi-v3.4.29-r1/rootfs/sun4i_rootfs.cpio.gz。

├── linux-sunxi-sunxi-v3.4.29-r1

└── rootfs

└── rootfs.cpio.xz

(2)pcduino编译内核启动不了

pcduino启动之后没有反应,用uart对pcduino进行debug,发现一直卡死在kernel starting。

在编译kernel打开CONFIG_DEBUG_LL选项,用uart进行debug可以看到如下的信息:

<1>Unable to handle kernel paging request at virtual address 34797474

.......
<0>Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

参考资料后,

将arm-gnueabihf-gcc的链接从arm-gnueabihf-gcc-4.8改成arm-gnueabihf-gcc-4.7即可。

参考文献:

[1]http://pcduino.com/forum/index.php?topic=3877.0