本文以友善之臂产品tiny4412为例,进行内核的烧写,以SD卡启动方式为主。

  1. 拷贝源码并解压得到linux-3.5

tar -xvf linux-3.5-20141114.tar

cd linux-3.5

linux内核烧写

linux内核烧写

  1. 安装ncurses-dev库

apt install ncurses-dev(若无法获得锁,重启虚拟机即可)

linux内核烧写

  1. 打开配置菜单

make menuconfig

注意:若打不开配置菜单,可能需要缩小字体,因为菜单界面需要至少有19行和80列。

linux内核烧写

linux内核烧写

  1. 对System Type中进行以下配置

linux内核烧写

linux内核烧写

  1. 修改Makefile中的编译器

vim Makefile

搜索CROSS_COMPILE

将CROSS_COMPILE修改为交叉编译器,注意最后不要加空格

linux内核烧写

linux内核烧写

  1. 修改kernel/timeconst.pl第373行

将373行修改为如下形式,若不修改,则会导致编译出错

linux内核烧写

linux内核烧写

  1. 配置

cp tiny4412_linux_defconfig .config

linux内核烧写

  1. 编译

make –j8

linux内核烧写

  1. 编译完成出现以下界面

linux内核烧写

  1. 烧写

(1)cd到zImage所在文件夹

linux内核烧写

(2)注意zImage和Image的大小

linux内核烧写

(3)插入SD卡

linux内核烧写

(4)烧写

烧写时间大约为40多秒

dd iflag=dsync oflag=dsync if=./zImage of=/dev/sdb  seek=1057

linux内核烧写

linux内核烧写

相关文章:

  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-11
  • 2021-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-07
  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案