<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 

开发环境:win7 64位 + VMware12 + Ubuntu14.04 64位

工具链:linaro提供的gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-gnueabi

要移植的u-boot版本:u-boot-2016-11

Git仓库地址:https://github.com/X-Project-FriendlyARMTiny4412/u-boot

Tiny4412开发板硬件版本为

    底板:  Tiny4412/Super4412SDK 1506

       核心板:Tiny4412 - 1412

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 

在上一节中我们已经完成了把u-boot.bin从SD卡上拷贝到DDR内存,并跳转到DDR内存中去执行u-boot的工作。这节仅先记录下如何把SDCard用起来,并且把Kernelboot起来的一些具体的操作,详细分析后面再写。

1、Tiny4412 SDCard用起来

代码修改如下:

diff --git a/arch/arm/dts/exynos4412-tiny4412.dts b/arch/arm/dts/exynos4412-tiny4412.dts

index a467250..3010f50 100644

--- a/arch/arm/dts/exynos4412-tiny4412.dts

+++ b/arch/arm/dts/exynos4412-tiny4412.dts

@@ -1,29 +1,135 @@

/*

- * FriendlyARM Tiny4412 board device tree source

- *

+ * FriendlyARM's Exynos4412 based TINY4412 board device tree source

*             2016

*  Author  AP0904225 <ap0904225@qq.com>

*

- * SPDX-License-Identifier:    GPL-2.0+

- */

+ * Device tree source file for FriendlyARM's TINY4412 board which is based on

+ * Samsung's Exynos4412 SoC.

+ *

+ * This program is free software; you can redistribute it and/or modify

+ * it under the terms of the GNU General Public License version 2 as

+ * published by the Free Software Foundation.

+ *

+ * SPDX-License-Identifier:    GPL-2.0+

+ *

+*/

/dts-v1/;

#include "exynos4412.dtsi"

/ {

-   model = "Tiny4412 based on Exynos4412";

-   compatible = "samsung,tiny4412", "samsung,exynos4412";

-

-   chosen {

-       stdout-path = "serial0";

-   };

+   model = "FriendlyARM TINY4412 board based on Exynos4412";

+   compatible = "friendlyarm,tiny4412", "samsung,exynos4412", "samsung,exynos4";

aliases {

serial0 = "/serial@13800000";

console = "/serial@13800000";

+       mmc2 = "/sdhci@12530000";

+       mmc4 = "/dwmmc@12550000";

};

-   serial0:serial@13810000 {

+   memory {

+       reg = <0x40000000 0x40000000>;

+   };

+

+   serial0:serial@13800000 {

status = "okay";

};

+

+   serial1:serial@13810000 {

+       status = "disabled";

+   };

+

+   serial2:serial@13820000 {

+       status = "disabled";

+   };

+

+   serial3:serial@13830000 {

+       status = "disabled";

+   };

+

+   serial4:serial@13840000 {

+       status = "disabled";

+   };

+

+   i2c@13860000 {

+       status = "disabled";

+   };

+

+   i2c@13870000 {

+       status = "disabled";

+   };

+

+   i2c@13880000 {

+       status = "disabled";

+   };

+

+   i2c@13890000 {

+       status = "disabled";

+   };

+

+   i2c@138a0000 {

+       status = "disabled";

+   };

+

+   i2c@138b0000 {

+       status = "disabled";

+   };

+

+   i2c@138c0000 {

+       status = "disabled";

+   };

+

+   i2c@138d0000 {

+       status = "disabled";

+   };

+

+   sdhci@12510000 {

+       compatible = "samsung,exynos4412-sdhci";

+       status = "disabled";

+   };

+

+   sdhci@12520000 {

+       compatible = "samsung,exynos4412-sdhci";

+       status = "disabled";

+   };

+

+   sdhci@12530000 {

+       compatible = "samsung,exynos4412-sdhci";

+       samsung,bus-width = <4>;

+       samsung,timing = <1 2 3>;

+       cd-gpios = <&gpk2 2 0>;

+   };

+

+   sdhci@12540000 {

+       compatible = "samsung,exynos4412-sdhci";

+       status = "disabled";

+   };

+

+   dwmmc@12550000 {

+       samsung,bus-width = <8>;

+       samsung,timing = <2 1 0>;

+       samsung,removable = <0>;

+       fifoth_val = <0x203f0040>;

+       bus_hz = <400000000>;

+       div = <0x3>;

+       index = <4>;

+   };

+

+   ehci@12580000 {

+       compatible = "samsung,exynos-ehci";

+       reg = <0x12580000 0x100>;

+       #address-cells = <1>;

+       #size-cells = <1>;

+       phy {

+           compatible = "samsung,exynos-usb-phy";

+           reg = <0x125B0000 0x100>;

+       };

+   };

+

+   emmc-reset {

+       compatible = "samsung,emmc-reset";

+       reset-gpio = <&gpk1 2 0>;

+   };

+

};

diff --git a/configs/tiny4412_defconfig b/configs/tiny4412_defconfig

index 19d0dda..62ed0d2 100644

--- a/configs/tiny4412_defconfig

+++ b/configs/tiny4412_defconfig

@@ -1,6 +1,3 @@

-#

-# U-Boot 2016.11 Configuration for FriendlyARM tiny4412

-#

CONFIG_ARM=y

CONFIG_ARCH_EXYNOS=y

CONFIG_ARCH_EXYNOS4=y

@@ -11,34 +8,43 @@ CONFIG_SYS_CONSOLE_IS_IN_ENV=y

CONFIG_SYS_CONSOLE_INFO_QUIET=y

CONFIG_SPL=y

CONFIG_HUSH_PARSER=y

-CONFIG_SYS_PROMPT="TINY4412 # "

+CONFIG_SYS_PROMPT="Tiny4412 # "

CONFIG_CMD_BOOTZ=y

+# CONFIG_CMD_IMLS is not set

+# CONFIG_CMD_XIMG is not set

+CONFIG_DM_MMC=y

CONFIG_CMD_MMC=y

+CONFIG_CMD_DFU=y

+CONFIG_CMD_USB_MASS_STORAGE=y

+# CONFIG_CMD_FPGA is not set

+# CONFIG_CMD_NET is not set

+CONFIG_CMD_DHCP=y

+# CONFIG_CMD_NFS is not set

CONFIG_CMD_MII=y

CONFIG_CMD_CACHE=y

+# CONFIG_CMD_MISC is not set

CONFIG_CMD_EXT2=y

CONFIG_CMD_EXT4=y

CONFIG_CMD_EXT4_WRITE=y

CONFIG_CMD_FAT=y

CONFIG_CMD_FS_GENERIC=y

CONFIG_OF_CONTROL=y

+CONFIG_DFU_MMC=y

+CONFIG_USB=y

+CONFIG_DM_USB=y

+CONFIG_USB_GADGET=y

+CONFIG_USB_GADGET_DWC2_OTG=y

+CONFIG_USB_GADGET_DOWNLOAD=y

+CONFIG_G_DNL_MANUFACTURER="Samsung"

+CONFIG_G_DNL_VENDOR_NUM=0x04e8

+CONFIG_G_DNL_PRODUCT_NUM=0x6601

#

#DEBUG UART

#

-CONFIG_DEBUG_UART=y

-CONFIG_SPL_SERIAL_SUPPORT=y

-CONFIG_SPL_GPIO_SUPPORT=y

-CONFIG_DEBUG_UART_S5P=y

-CONFIG_DEBUG_UART_BASE=0x13800000

-CONFIG_DEBUG_UART_CLOCK=100000000

-

-#

-#NOTE:do not delete this:

-#

-# CONFIG_CMD_IMLS is not set

-# CONFIG_CMD_XIMG is not set

-# CONFIG_CMD_MISC is not set

-# CONFIG_CMD_FPGA is not set

-# CONFIG_CMD_NET is not set

-# CONFIG_CMD_NFS is not set

+#CONFIG_DEBUG_UART=y

+#CONFIG_SPL_SERIAL_SUPPORT=y

+#CONFIG_SPL_GPIO_SUPPORT=y

+#CONFIG_DEBUG_UART_S5P=y

+#CONFIG_DEBUG_UART_BASE=0x13800000

+#CONFIG_DEBUG_UART_CLOCK=100000000

diff --git a/include/configs/tiny4412.h b/include/configs/tiny4412.h

index 3a02f9e..4197e16 100644

--- a/include/configs/tiny4412.h

+++ b/include/configs/tiny4412.h

@@ -1,5 +1,5 @@

/*

- *         2016

+ *         2017

*     Author AP0904225 <ap0904225@qq.com>

*

* Configuration settings for the FriendlyARM TINY4412 (EXYNOS4412) board.

@@ -15,10 +15,6 @@

#include <configs/exynos4-common.h>

-/* TIZEN THOR downloader support */

-#undef CONFIG_CMD_THOR_DOWNLOAD

-#undef CONFIG_USB_FUNCTION_THOR

-

/* High Level Configuration Options */

#define TINY4412           1   /* working with TINY4412*/

@@ -36,15 +32,15 @@

#define CONFIG_SYS_LOAD_ADDR       (CONFIG_SYS_SDRAM_BASE + 0x3E00000)

#define CONFIG_SYS_TEXT_BASE       0x43E00000

+#define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_TEXT_BASE - 0x1000000)

#define CONFIG_MACH_TYPE       MACH_TYPE_TINY4412

/* select serial console configuration */

-#define CONFIG_SERIAL2

#define CONFIG_BAUDRATE            115200

/* Console configuration */

-#define CONFIG_DEFAULT_CONSOLE     "console=ttySAC1,115200n8\0"

+#define CONFIG_DEFAULT_CONSOLE     "console=ttySAC0,115200n8\0"

#define CONFIG_SYS_MEM_TOP_HIDE    (1 << 20)   /* ram console */

@@ -93,10 +89,10 @@

"fi;" \

"load mmc ${mmcdev} ${loadaddr} uImage; bootm ${loadaddr} "

-#define CONFIG_CLK_1000_400_200

+/* //#define CONFIG_CLK_1000_400_200 */

/* MIU (Memory Interleaving Unit) */

-#define CONFIG_MIU_2BIT_21_7_INTERLEAVED

+/* //#define CONFIG_MIU_2BIT_21_7_INTERLEAVED */

#define CONFIG_ENV_IS_IN_MMC

#define CONFIG_SYS_MMC_ENV_DEV     0

@@ -109,13 +105,10 @@

#define CONFIG_SPL_LDSCRIPT    "board/samsung/common/exynos-uboot-spl.lds"

#define CONFIG_SPL_MAX_FOOTPRINT   (14 * 1024)

-#define CONFIG_SYS_INIT_SP_ADDR        0x02040000

-

-/* U-Boot copy size from SD/MMC to DRAM.*/

+/* U-Boot copy size from boot Media to DRAM.*/

#define COPY_BL2_SIZE      0x80000

#define BL2_START_OFFSET   ((CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)/512)

#define BL2_SIZE_BLOC_COUNT    (COPY_BL2_SIZE/512)  /* u-boot size is 512K */

-

/*

*    SD/MMC(1 Block = 512B) layout:

*    +------------+-------------------------------------------------------------------------------------------------+

@@ -130,5 +123,4 @@

*/

-

#endif /* __CONFIG_H */

2、Kernel boot起来

2.1 先把u-boot烧进SD卡,并把uImage、ramdisk.img和exynos4412-tiny4412.dtb拷贝进SD卡,这三个文件的下载地址为:http://files.cnblogs.com/files/AP0904225/tiny4412-test-image.tar.gz

tiny4412开发板从SD卡启动后,使其进入u-boot命令行状态,如下图所示:

2.2 输入mmcinfo命令查看下SD/MMC设备信息:

2.3 设置bootcmd参数

设置bootcmd变量为 "load mmc 0 0x40007000 uImage; load mmc 0 0x48000000 ramdisk.img; load mmc 0 0x42000000 exynos4412-tiny4412.dtb; bootm 0x40007000 0x48000000 0x42000000";并保存。

load mmc 0 0x40007000 uImage 是把SD卡上的uImage文件读到内存地址为0x40007000处;

load mmc 0 0x48000000 ramdisk.img 是把SD卡上的ramdisk.img文件读到内存地址为0x48000000处;

load mmc 0 0x42000000 exynos4412-tiny4412.dtb是把SD卡上的exynos4412-tiny4412.dtb读到内存地址为0x42000000处;

bootm 0x40007000 0x48000000 0x42000000是告诉u-boot从0x40007000处启动内核,并告诉内核ramdisk.img和设备树文件(*.dtb)的地址为0x48000000、0x42000000

2.4查看下u-boot的环境变量:

然输入boot命令后就把kernel boot起来了

X-009 FriendlyARM tiny4412 uboot移植之SD Card用起来Kernel boot起来的更多相关文章

  1. X-004 FriendlyARM tiny4412 uboot移植之点亮指路灯

    <<<<<<<<<<<<<<<<<<<<<<<<< ...

  2. X-003 FriendlyARM tiny4412 uboot移植之添加相应目录文件

    X-003 FriendlyARM tiny4412 uboot移植之添加相应目录文件 <<<<<<<<<<<<<< ...

  3. X-007 FriendlyARM tiny4412 u-boot移植之内存初始化

    <<<<<<<<<<<<<<<<<<<<<<<<< ...

  4. X-008 FriendlyARM tiny4412 uboot移植之copy u-boot到DDR内存

    <<<<<<<<<<<<<<<<<<<<<<<<< ...

  5. X-001 FriendlyARM Tiny4412 uboot移植前奏

    版权声明:本文为博主原创文章,转载请注明出处 开发环境:win7 64位 + VMware12 + Ubuntu14.04 64位 工具链:linaro提供的gcc-linaro-6.1.1-2016 ...

  6. X-010 FriendlyARM tiny4412 uboot移植之移植网卡驱动TFTP用起来

    <<<<<<<<<<<<<<<<<<<<<<<<< ...

  7. X-006 FriendlyARM tiny4412 u-boot移植之Debug串口用起来

    <<<<<<<<<<<<<<<<<<<<<<<<< ...

  8. tiny4412 --Uboot移植(6) SD卡驱动,启动内核

    开发环境:win10 64位 + VMware12 + Ubuntu14.04 32位 工具链:linaro提供的gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-g ...

  9. X-005 FriendlyARM tiny4412 uboot移植之时钟初始化

    <<<<<<<<<<<<<<<<<<<<<<<<< ...

随机推荐

  1. linux wc命令的作用。

    Linux系统中的wc(Word Count)命令的功能为统计指定文件中的字节数.字数.行数,并将统计结果显示输出. 1.命令格式: wc [选项]文件... 2.命令功能: 统计指定文件中的字节数. ...

  2. Linux内核中的Cache段

    Linux内核中的Cache段 原文地址:http://blogold.chinaunix.net/u2/85263/showart_1743693.html 最近移植LEON3的内核时,了解了一些简 ...

  3. netif_start_queue/netif_wake_queue/netif_stop_queue

    在网卡驱动中,内核为发送数据包的流量控制提供了几个主要的函数,用来在驱动程序和内核之间传递流控信息. 主要有4个: 1]netif_start_queue  启动接口传输队列 2]netif_wake ...

  4. python爬虫多线程编程

    #使用了线程库 import threading from queue import Queue from bs4 import BeautifulSoup import json import re ...

  5. [写出来才有价值系列:node.js]node.js 01-介绍及安装

    对于Node.js在百度百科上是这样解释的: Node.js是一个Javascript运行环境(runtime).实际上它是对Google V8引擎进行了封装.V8引 擎执行Javascript的速度 ...

  6. ftp,nfs和samba的区别

    先从名字上进行理解: 1. FTP(文件传输协议) 2. NFS(网络文件系统) 3. samba 即smb(服务信息块)协议 1 其中FTP 是TCP/IP协议栈所提供的一种子协议,该子协议具体可以 ...

  7. H5移动端视频问题(苹果全屏播放问题等)

    iphone上,手动.自动.窗口化等问题 iphone窗口化 解决方案: 通过canvas + video标签结合处理 原理: 获取video的原图帧,通过canavs绘制到页面. 我们一般在苹果上在 ...

  8. 创建 dblink

    目的:oracle中跨数据库查询       两台数据库服务器db_A(本地)和db_B(远程192.168.1.100),db_A下用户user_a 需要访问到db_B下user_b的数据解决:查询 ...

  9. day4正则表达式

    语法: 正则表达式是处理字符串的函数,我们在Excel函数中也有很多这样的公式,因为学过一些Excel,所以看一下有什么不同的方法. import re       #导入re模块,处理正则表达式的模 ...

  10. scrapy 学习笔记1

    最近一段时间开始研究爬虫,后续陆续更新学习笔记 爬虫,说白了就是获取一个网页的html页面,然后从里面获取你想要的东西,复杂一点的还有: 反爬技术(人家网页不让你爬,爬虫对服务器负载很大) 爬虫框架( ...