系统版本:Ubuntu18.04-64
编译器版本:gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)
uboot版本:2018.07 -linux4sam_6.0
板子型号:at91sama5d3x-xplained
MCU型号:sama5d36
内核移植主要是裁剪一些不需要的功能,使用对应的交叉工具链把内核重新编译,设备树文件按照硬件去配置。
一、配置文件路径
arch/arm/configs/sama5_defconfig
//配置文件路径
arch/arm/configs/sama5_defconfig
//声明环境变量,指定交叉编译器
$ export CROSS_COMPILE=arm-linux-gnueabi-
//先按照默认配置编译内核文件,看是否会报错,编译出来的文件先进行烧录,是否能正确引导文件系统;
$ make ARCH=arm sama5_defconfig
$ make ARCH=arm
//图形化配置窗口调出
$ make ARCH=arm menuconfig
//单独编译设备树文件,生成dtb文件
$ make ARCH=arm dt
二、把编译的zImage和dtb文件烧录板子,根据打印信息,分析出硬件驱动的情况。
1、内核接收uboot传递过来的分区信息,要和设备树中的分区一致,后面再细讲;
Kernel command line: console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,768k(uboot)ro,256K(env_redundant),256k(env),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=6 root=ubi0:rootfs
2、GPIO控制器驱动OK
AT91: PM: standby: standby, suspend: ulp0
gpio-at91 fffff200.gpio: at address (ptrval)
gpio-at91 fffff400.gpio: at address (ptrval)
gpio-at91 fffff600.gpio: at address (ptrval)
gpio-at91 fffff800.gpio: at address (ptrval)
gpio-at91 fffffa00.gpio: at address (ptrval)
pinctrl-at91 ahb:apb:pinctrl@fffff200: initialized AT91 pinctrl driver
3、DMA通道生效
at_hdmac ffffe600.dma-controller: Atmel AHB DMA Controller ( cpy set slave ), 8 channels
at_hdmac ffffe800.dma-controller: Atmel AHB DMA Controller ( cpy set slave ), 8 channels
4、USB控制器驱动注册成功
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
5、i2C总线驱动模型注册成功
at91_i2c f0014000.i2c: using dma0chan0 (tx) and dma0chan1 (rx) for DMA transfers
at91_i2c f0014000.i2c: AT91 i2c bus driver (hw version: 0x402).
at91_i2c f0018000.i2c: using dma0chan2 (tx) and dma0chan3 (rx) for DMA transfers
at91_i2c f0018000.i2c: AT91 i2c bus driver (hw version: 0x402).
6、蓝牙驱动注册成功
Bluetooth: Core ver 2.22
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized
7、串口、SPI、CAN驱动注册
ssc f0008000.ssc: Atmel SSC device at 0x(ptrval) (irq 20)
atmel_usart_serial.0.auto: ttyS2 at MMIO 0xf0020000 (irq = 24, base_baud = 4125000) is a ATMEL_SERIAL
atmel_usart_serial.1.auto: ttyS0 at MMIO 0xffffee00 (irq = 34, base_baud = 8250000) is a ATMEL_SERIAL
console [ttyS0] enabled
atmel_spi f0004000.spi: DMA TX channel not available, SPI unable to use DMA
atmel_spi f0004000.spi: Atmel SPI Controller using PIO only
m25p80 spi0.0: unrecognized JEDEC id bytes: 00, 00, 00
atmel_spi f0004000.spi: Atmel SPI Controller version 0x213 at 0xf0004000 (irq 19)
libphy: Fixed MDIO Bus: probed
CAN device driver interface
at91_can f000c000.can: device registered (reg_base=(ptrval), irq=42)
8、GMAC控制器上面的网络芯片没有驱动成功,因为id读取为全0xFF;
libphy: MACB_mii_bus: probed
Generic PHY f0028000.ethernet-ffffffff:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=f0028000.ethernet-ffffffff:01, irq=POLL)
macb f0028000.ethernet eth0: Cadence GEM rev 0x00020119 at 0xf0028000 irq 43 (ee
上一篇:[linux kernel]内核图形化裁剪配置
下一篇:[linux 底层]u-boot EMMC驱动
推荐阅读最新更新时间:2024-11-20 00:16
设计资源 培训 开发板 精华推荐
- 使用 LTC1863IGN 12 位、8 通道、200Ksps ADC 用于差分输入的典型应用电路
- 【航顺训练营】基于航顺HK32F030MF4P6的学习板
- 使用 16 位 SRAM 的应用电路:IS61WV51216BLL 连接到 STM32F10xxx
- 具有关断功能的 LT1117CM 5V 稳压器的典型应用
- ZRD0027PLM0ZRD、Z8F2480 MCU 功率监视器和 eZ80F91 网络服务器参考设计
- STEVAL-BCN002V1B,BlueTile - 支持蓝牙 LE 的传感器节点开发套件
- L7812C远程关断稳压器的典型应用
- Recoil 电机控制器 G431 DRV8350RS
- MTRCKTSPNZVM128: 采用S12 MagniV® MC9S12ZVML128 MCU的3相无传感器PMSM开发套件
- 使用 Infineon Technologies AG 的 OM9369CM 的参考设计