软件版本:uboot-2013-04
硬件版本:i.MX6DL-Sabreasd
源码获取:
Freescale的内核和uboot都是使用git管理的 【http://git.freescale.com/git/cgit.cgi】,在这里都可以浏览到,也可以选择任意版本的源码下载
这里选择imx系列的
uboot移植:
由于这里的uboot源码都是由Freescale官方一直维护的,这里使用的也是Freescale的芯片imx6dl,所以uboot的移植还是挺简单的,而且Freescale也给出了详细的指导文档"i.MX 6 BSP Porting Guide",其实imx6dl系列和imx6q系列差不多,不做移植仅仅修改一些地方就可以让板子启动了,这里为了更加清晰源码结构所以参照imx6q系列做移植,具体移植步骤如下:
1》创建板子目录
cp board/freescale/mx6qsabresd board/freescale/mx6dlsabresd
mv board/freescale/mx6dlsabresd/mx6qsabresd.c board/freescale/mx6dlsabresd/mx6qsabresd.c
将
COBJS := mx6qsabresd.o
修改成
COBJS := mx6dlsabresd.o
4》创建板子配置文件
cp include/configs/mx6qsabresd.h include/configs/mx6dlsabresd.h
-mx6dlsabresd arm armv7 mx6qsabresd freescale mx6 mx6qsabresd:IMX_CONFIG=board/freescale/mx6qsabresd/mx6dl_4x_mt41j128.cfg,MX6DL,DEFAULT_FDT_FILE="imx6dl-sabresd.dtb",DDR_MB=1024,SYS_USE_SPINOR
+mx6dlsabresd arm armv7 mx6dlsabresd freescale mx6 mx6dlsabresd:IMX_CONFIG=board/freescale/mx6dlsabresd/mx6dl_4x_mt41j128.cfg,MX6DL,DEFAULT_FDT_FILE="imx6dl-sabresd.dtb",DDR_MB=1024,SYS_USE_SPINOR
--- a/board/freescale/mx6dlsabresd/mx6dlsabresd.c
+++ b/board/freescale/mx6dlsabresd/mx6dlsabresd.c
@@ -178,11 +178,11 @@ iomux_v3_cfg_t const usdhc3_pads[] = {
MX6_PAD_SD3_DAT1__USDHC3_DAT1 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
MX6_PAD_SD3_DAT2__USDHC3_DAT2 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
MX6_PAD_SD3_DAT3__USDHC3_DAT3 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
- MX6_PAD_SD3_DAT4__USDHC3_DAT4 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
- MX6_PAD_SD3_DAT5__USDHC3_DAT5 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
- MX6_PAD_SD3_DAT6__USDHC3_DAT6 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
- MX6_PAD_SD3_DAT7__USDHC3_DAT7 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
- MX6_PAD_NANDF_D0__GPIO_2_0 | MUX_PAD_CTRL(NO_PAD_CTRL), /* CD */
+// MX6_PAD_SD3_DAT4__USDHC3_DAT4 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+// MX6_PAD_SD3_DAT5__USDHC3_DAT5 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+// MX6_PAD_SD3_DAT6__USDHC3_DAT6 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+// MX6_PAD_SD3_DAT7__USDHC3_DAT7 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+ MX6_PAD_GPIO_6__GPIO_1_6 | MUX_PAD_CTRL(NO_PAD_CTRL), /* CD */
};
iomux_v3_cfg_t const usdhc4_pads[] = {
@@ -435,7 +435,7 @@ int mmc_get_env_devno(void)
#define USDHC2_CD_GPIO IMX_GPIO_NR(2, 2)
-#define USDHC3_CD_GPIO IMX_GPIO_NR(2, 0)
+#define USDHC3_CD_GPIO IMX_GPIO_NR(1, 6)
#!/bin/bash
export ARCH=arm
export CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-
#make distclean;
make mx6dlsabresd_config
make
sudo dd if=u-boot.imx of=/dev/sdx bs=512 seek=2
注: x根据具体的节点而定
启动logo:
U-Boot 2013.04-04989-g6bb0820-dirty (Jul 20 2016 - 16:22:43)
CPU: Freescale i.MX6DL rev1.1 at 792 MHz
CPU: Temperature 51 C, calibration data: 0x5aa50e69
Reset cause: POR
Board: MX6Q/SDL-SabreSD
I2C: ready
DRAM: 1 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
No panel detected: default to Hannstar-XGA
Display: Hannstar-XGA (1024x768)
In: serial
Out: serial
Err: serial
mmc1 is current device
Net: Phy not found
PHY reset timed out
FEC [PRIME]
Warning: failed to set MAC address
Normal Boot
Hit any key to stop autoboot: 0
mmc1 is current device
MMC read: dev # 1, block # 2048, count 12288 ... 12288 blocks read: OK
MMC read: dev # 1, block # 20480, count 2048 ... 2048 blocks read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!
U-Boot >