i.mx6q|i.mx6q Linux-4.1.15移植笔记

使用主板:迅为i.mx6q开发板,2G DDR
参考文献:
fsl-yocto-L4.1.15_2.0.0-ga
IMXBSPPG Rev. 1, 01/2017
1.Freescale git下载L4.1.15_2.0.0-ga kernel源码
2.以imx6q-sabresd为模版,太懒了,我就不改名字了
3.编译环境设置,编译uImage
export ARCH=arm
export CROSS_COMPILE=/opt/imx6/iTOP-iMX6_android4.4.2/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
make imx_v7_defconfig
make menuconfig:取消下面的设置
Boot options --->
【i.mx6q|i.mx6q Linux-4.1.15移植笔记】[*] Support for the traditional ATAGS boot data passing
make uImage LOADADDR=0x12000000
make imx6q-sabresd.dts
4.按照i.MX Linux user's guide,SD卡分区
5.烧写u-boot,uImage,dts
dd if=u-boot.imx of=/dev/sdd bs=512 seek=2 conv=fsync
dd if=uImage of=/dev/sdd bs=512 seek=2048 conv=fsync
dd if=imx6q-sabresd.dtb of=/dev/sdd bs=512 seek=20480 conv=fsync
6,插入SD卡,启动开发板
7.设置环境变量,根据内核大小设置
setenv bootargs 'noinitrd console=ttymxc0,115200 root=/dev/mmcblk1p2 rw init=/linuxrc'
setenv bootcmd 'mmc dev 0; mmc read 0x11ffffc0 0x800 0x4000; mmc read 0x18000000 0x5000 0x800; bootm 0x11ffffc0 - 0x18000000
saveenv
8.reboot
gpio_get_value(USDHC2_CD_GPIO) = 1
switch to partitions #0, OK
mmc0 is current device
MMC read: dev # 0, block # 2048, count 16384 ... 16384 blocks read: OK
MMC read: dev # 0, block # 20480, count 2048 ... 2048 blocks read: OK
## Booting kernel from Legacy Image at 11ffffc0 ...
Image Name:Linux-4.1.15
Image Type:ARM Linux Kernel Image (uncompressed)
Data Size:6745696 Bytes = 6.4 MiB
Load Address: 12000000
Entry Point:12000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 18000000
Booting using the fdt blob at 0x18000000
XIP Kernel Image ... OK
Using Device Tree in place at 18000000, end 1800e344
Starting kernel ...
未完。。。


    推荐阅读