am335x system upgrade uboot nand boot(三)
在uboot 下初始化nand,一般需要做如下工作:
第一: 配置默认从NAND boot
Index: include/configs/am335x_evm.h
===================================================================
--- include/configs/am335x_evm.h (revision 8)
+++ include/configs/am335x_evm.h (revision 9)
@@ -17,9 +17,11 @@
#define __CONFIG_AM335X_EVM_H
#include <configs/ti_am335x_common.h>
-#define CONFIG_SD_BOOT
+/*#define CONFIG_SD_BOOT*/
+#define CONFIG_NAND_BOOT
#define CONFIG_PHY_MICREL
#define CONFIG_PHY_MICREL_KSZ8XXX
#ifndef CONFIG_SPL_BUILD
# define CONFIG_TIMESTAMP
第二,nand 相应的引脚做初始化
===================================================================
--- board/ti/am335x/mux.c (revision 8)
+++ board/ti/am335x/mux.c (revision 9)
@@ -422,4 +422,5 @@
configure_module_pin_mux(gpio0_7_pin_mux);
configure_module_pin_mux(rmii1_pin_mux);
configure_module_pin_mux(mmc0_pin_mux_sk_evm);
+ configure_module_pin_mux(nand_pin_mux);
}
第三:指定uboot变量何存至uboot-env分区
Index: Kconfig
===================================================================
--- Kconfig (revision 13)
+++ Kconfig (revision 14)
@@ -22,7 +22,7 @@
default ENV_IS_IN_SPI_FLASH if INTEL_QUARK
default ENV_IS_IN_SPI_FLASH if INTEL_QUEENSBAY
default ENV_IS_IN_FAT if ARCH_BCM283X
- default ENV_IS_IN_FAT if MMC_OMAP_HS && TI_COMMON_CMD_OPTIONS
+ default ENV_IS_IN_NAND if TI_COMMON_CMD_OPTIONS
default ENV_IS_NOWHERE
help
At present the environment can be stored in only one place. Use this
第四:指nand env的大小
Index: am335x_evm.h
===================================================================
--- am335x_evm.h (revision 15)
+++ am335x_evm.h (revision 16)
@@ -301,6 +301,7 @@
#define CONFIG_ENV_OFFSET_REDUND (768 << 10) /* 768 KiB */
#elif defined(CONFIG_ENV_IS_IN_NAND)
#define CONFIG_ENV_OFFSET 0x001c0000
+#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
/*#define CONFIG_ENV_OFFSET_REDUND 0x001e0000*/
#define CONFIG_SYS_ENV_SECT_SIZE CONFIG_SYS_NAND_BLOCK_SIZE
#endif
第五: 需要修改默认的bootcmd从nand启动
Index: am335x_evm_defconfig
===================================================================
--- am335x_evm_defconfig (revision 15)
+++ am335x_evm_defconfig (revision 16)
@@ -6,7 +6,7 @@
CONFIG_DISTRO_DEFAULTS=y
CONFIG_SPL_SYS_MALLOC_F_LEN=0x1000
CONFIG_SPL_LOAD_FIT=y
-CONFIG_BOOTCOMMAND="if test ${boot_fit} -eq 1; then run update_to_fit; fi; run findfdt; run init_console; run envboot; run distro_bootcmd"
+CONFIG_BOOTCOMMAND="run nandboot"
CONFIG_LOGLEVEL=3
CONFIG_SYS_CONSOLE_INFO_QUIET=y
CONFIG_VERSION_VARIABLE=y
经过上述修改之后,便可以默认从NAND引导,uboot环境变量保存至uboot-env分区
boot log:
U-Boot SPL 2018.01-svn16 (Nov 22 2018 - 15:56:43)
Trying to boot from NAND
U-Boot 2018.01-svn16 (Nov 22 2018 - 15:56:43 +0800)
CPU : AM335X-GP rev 2.1
Model: TI AM335x EVM
DRAM: 256 MiB
NAND: 256 MiB
MMC: OMAP SD/MMC: 0
Net: cpsw
Hit any key to stop autoboot: 0
am335x system upgrade uboot nand boot(三)的更多相关文章
- am335x system upgrade uboot sd boot(一)
由于上层应用的需求,需要运行arm docker,在kernel3.2上面还不支持,且编译器的glibc版本比较低的问题,故需要做系统升级 新的内核4.14.40驱动开发和以往有很大的不同,关键在于d ...
- am335x system upgrade uboot ethernet(二)
系统可以通过SD卡引道之后,为了之后了调试方便 通过查看网卡的硬件设计 正常来说需要注意的有如下几点: 1) 网口 的接线方式: RMII 2) 网口的PHY地址两张网口,这里我们只需先初始化一张网卡 ...
- am335x system upgrade kernel tf(五)
1 Scope of Document This document describes TF hardware design 2 Requiremen 2.1 Functi ...
- am335x system upgrade rootfs using yocto make rootfs(十二)
1 Scope of Document This document describes how to make am335x arago rootfs using ycoto project ...
- am335x system upgrade set/get current cpufreq(二十一)
1 Scope of Document This document describes am335x cpufreq technology insider. 2 Requireme ...
- am335x system upgrade kernel ethernet(四)
1 Scope of Document This document describes ethernet hardware design and porting KZS8081 to ubo ...
- am335x system upgrade kernel can(八)
1 Scope of Document This document describes can bus hardware design and can bus driver developm ...
- am335x system upgrade kernel uart(七)
1 Scope of Document This document describes UART hardware design, uart driver porting 2 Re ...
- am335x system upgrade rootfs custom service using systemd script(十七)
1 Scope of Document systemd 是一个 Linux 系统基础组件的集合,提供了一个系统和服务管理器,运行为 PID 1 并负责启动其它程序.功能包括:支持并行化任务: ...
随机推荐
- eclipse导入项目文件以及 import项目文件后有个红色感叹号
eclipse导入项目文件 步骤:File —>Import—>General—>Existing Projects into Workspace 然后进去选择项目文件的具体路径即可 ...
- Wiener’s attack python
题目如下: 在不分解n的前提下,求d. 给定: e = 140586954170153340715880103465867497905399132874997078029388987191993846 ...
- Android JNI 数组操作
JNI 中有两种数组操作,基础数据类型数组和对象数组,JNI 对待基础数据类型数组和对象数组是不一样的. 基本数据类型数组 对于基本数据类型数组,JNI 都有和 Java 相对应的结构,在使用起来和基 ...
- Java离线人脸识别SDK 支持arcface 2.0 最新版
虹软人脸识别SDK之Java版,支持SDK 1.1+,以及当前最新版本2.0,滴滴,抓紧上车! JDK SDK Win release license status 前言 由于业务需求,最近跟人脸识别 ...
- 第 3 章 镜像 - 021 - Docker 镜像小结
镜像小结 镜像的常用操作子命令: images 显示镜像列表 history 显示镜像构建历史 commit 从容器创建新镜像 build 从 Dockerfile 构建镜像 ...
- Java将byte[]和int的互相转换
/** * 将整数转换为byte数组并指定长度 * @param a 整数 * @param length 指定长度 * @return */ public static byte[] intToBy ...
- python基础和进阶思维导图(转)
- OnSen UI结合AngularJs打造”美团"APP"附近”页面 --Hybrid App
1.页面效果图: 演示链接地址:http://www.nxl123.cn/bokeyuan/meiTuanDemo_near/ 2.核心代码 near.html: <ons-page id=&q ...
- 使用Tomcat数据源的方式访问数据库(MySql) --Struts2框架应用与开发
1.为方便测试首先创建数据库和表,然后插入测试数据 2.打开Tomcat服务器安装目录的conf/下的context.xml,配置context.xml文件. 在<Context>标签 ...
- 如何使用mysql profiling功能分析单条查询语句
Mysql从5.1版本开始引入show profile来剖析单条语句功能 一. 查看是否支持这个功能 yes表示支持 mysql> show variables like 'have_profi ...