在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(三)的更多相关文章

  1. am335x system upgrade uboot sd boot(一)

    由于上层应用的需求,需要运行arm docker,在kernel3.2上面还不支持,且编译器的glibc版本比较低的问题,故需要做系统升级 新的内核4.14.40驱动开发和以往有很大的不同,关键在于d ...

  2. am335x system upgrade uboot ethernet(二)

    系统可以通过SD卡引道之后,为了之后了调试方便 通过查看网卡的硬件设计 正常来说需要注意的有如下几点: 1) 网口 的接线方式: RMII 2) 网口的PHY地址两张网口,这里我们只需先初始化一张网卡 ...

  3. am335x system upgrade kernel tf(五)

    1      Scope of Document This document describes TF hardware design 2      Requiremen 2.1     Functi ...

  4. am335x system upgrade rootfs using yocto make rootfs(十二)

    1      Scope of Document This document describes how to make am335x arago rootfs using ycoto project ...

  5. am335x system upgrade set/get current cpufreq(二十一)

    1      Scope of Document This document describes am335x cpufreq technology insider. 2      Requireme ...

  6. am335x system upgrade kernel ethernet(四)

    1      Scope of Document This document describes ethernet hardware design and porting KZS8081 to ubo ...

  7. am335x system upgrade kernel can(八)

    1      Scope of Document This document describes can bus hardware design and can bus driver developm ...

  8. am335x system upgrade kernel uart(七)

    1      Scope of Document This document describes UART hardware design, uart driver porting 2      Re ...

  9. am335x system upgrade rootfs custom service using systemd script(十七)

    1      Scope of Document systemd 是一个 Linux 系统基础组件的集合,提供了一个系统和服务管理器,运行为 PID 1 并负责启动其它程序.功能包括:支持并行化任务: ...

随机推荐

  1. LaTeX 交叉引用系统简介

    目录 摘要 1. 简介 2. 指定标签或标记符 3. 标签的位置 4. 引用的生成和更新 5. 引用相关的警告信息 6. 扩展引用功能的宏包 6.1 varioref宏包 6.2 cleveref宏包 ...

  2. Python pip 常用命令

    使用了这么就pip命令,但是一直是简单使用,很多命令都是用了查,查了用,今天把常用的命令汇总一下,方便使用. 命令: pip 由上图可以看到 pip 支持一下命令 Commands: install ...

  3. lua --- 局部变量

    1.block(代码块) --- 一个控制结构.一个函数体.一个chunk   chunck --- 变量被声明的那个文件或者文本串 2.局部变量只在声明的那个block中有效 3.可以使用 do . ...

  4. 第 8 章 容器网络 - 052 - overlay 如何实现跨主机通信?

    overlay 如何实现跨主机通信? 在 host2 中运行容器 bbox2: docker run -itd --name bbox2 --network ov_net1 busybox bbox2 ...

  5. Pytorch Visdom可视化工具

    2018-12-04 14:05:49 Visdom是Facebook专门为PyTorch开发的一款可视化工具,其开源于2017年3月.Visdom十分轻量级,但却支持非常丰富的功能,能胜任大多数的科 ...

  6. (转)C#连接OleDBConnection数据库的操作

    对于不同的.net数据提供者,ADO.NET采用不同的Connection对象连接数据库.这些Connection对我们屏蔽了具体的实现细节,并提供了一种统一的实现方法. Connection类有四种 ...

  7. missing seperator error when [make all]

    https://stackoverflow.com/questions/16931770/makefile4-missing-separator-stop makefile has a very st ...

  8. 雷林鹏分享:jQuery EasyUI 窗口 - 自定义窗口工具栏

    jQuery EasyUI 窗口 - 自定义窗口工具栏 默认情况下,窗口(window)有四个工具:collapsible.minimizable.maximizable 和 closable.比如我 ...

  9. LeetCode--415--字符串相加

    问题描述: 给定两个字符串形式的非负整数 num1 和num2 ,计算它们的和. 注意: num1 和num2 的长度都小于 5100. num1 和num2 都只包含数字 0-9. num1 和nu ...

  10. smarty插件

    smarty插件    1.目录:放在Smarty类库下的plugins目录下面(默认存放的都是smarty自带的插件)        smarty3.0提供了自定义插件目录的方式:        $ ...