am335x system upgrade uboot sd boot(一)
由于上层应用的需求,需要运行arm docker,在kernel3.2上面还不支持,且编译器的glibc版本比较低的问题,故需要做系统升级
新的内核4.14.40驱动开发和以往有很大的不同,关键在于dts,本质来说就是把以往通过注册设备资源来加载驱动,查找总线的挂载的驱动,通过比较驱动名称,来加载驱动。
现在变成了通过dst来表述设备资源,对比驱动当中的id,来加载驱动。
第一阶段的目标:
由TI官网上面下载TI SDK 5.0,搭建成功之后,第一件事情就是希望系统能引导起来,能挂载文件系统,能通过网口上网,然后再来调通外围的设备驱动。
如何让系统默认从SD引导,通过在增加如下配置选项:
Index: board-support/u-boot-2018.01/include/configs/am335x_evm.h
===================================================================
--- board-support/u-boot-2018.01/include/configs/am335x_evm.h (revision 4)
+++ board-support/u-boot-2018.01/include/configs/am335x_evm.h (revision 5)
@@ -17,6 +17,7 @@
#define __CONFIG_AM335X_EVM_H
#include <configs/ti_am335x_common.h>
+#define CONFIG_SD_BOOT
#ifndef CONFIG_SPL_BUILD
# define CONFIG_TIMESTAMP
接上来需要对相应的IO做初始化
Index: mux.c
===================================================================
--- mux.c (revision 5)
+++ mux.c (revision 6)
@@ -340,6 +340,7 @@
void enable_board_pin_mux(void)
{
+#if 0
/* Do board-specific muxes. */
if (board_is_bone()) {
/* Beaglebone pinmux */
@@ -400,4 +401,9 @@
/* Unknown board. We might still be able to boot. */
puts("Bad EEPROM or unknown board, cannot configure pinmux.");
}
+#endif
+ configure_module_pin_mux(i2c1_pin_mux);
+ configure_module_pin_mux(gpio0_7_pin_mux);
+ configure_module_pin_mux(rgmii1_pin_mux);
+ configure_module_pin_mux(mmc0_pin_mux_sk_evm);
}
由于自家的版子与 官方的板子有区别,去掉Uboot当中的判断
Index: board.c
===================================================================
--- board.c (revision 5)
+++ board.c (revision 6)
@@ -82,9 +82,9 @@
#ifndef CONFIG_DM_SERIAL
struct serial_device *default_serial_console(void)
{
- if (board_is_icev2())
- return &eserial4_device;
- else
+ //if (board_is_icev2())
+ // return &eserial4_device;
+ //else
return &eserial1_device;
}
#endif
@@ -262,14 +262,14 @@
{
int ind = get_sys_clk_index();
- if (board_is_evm_sk())
+ //if (board_is_evm_sk())
return &dpll_ddr3_303MHz[ind];
- else if (board_is_bone_lt() || board_is_icev2())
- return &dpll_ddr3_400MHz[ind];
- else if (board_is_evm_15_or_later())
- return &dpll_ddr3_303MHz[ind];
- else
- return &dpll_ddr2_266MHz[ind];
+ //else if (board_is_bone_lt() || board_is_icev2())
+ // return &dpll_ddr3_400MHz[ind];
+ //else if (board_is_evm_15_or_later())
+ // return &dpll_ddr3_303MHz[ind];
+ //else
+ // return &dpll_ddr2_266MHz[ind];
}
static u8 bone_not_connected_to_ac_power(void)
@@ -291,13 +291,13 @@
{
int ind = get_sys_clk_index();
int freq = am335x_get_efuse_mpu_max_freq(cdev);
-
+#if 0
if (bone_not_connected_to_ac_power())
freq = MPUPLL_M_600;
if (board_is_bone_lt())
freq = MPUPLL_M_1000;
-
+#endif
switch (freq) {
case MPUPLL_M_1000:
return &dpll_mpu_opp[ind][5];
@@ -324,8 +324,8 @@
* Only perform PMIC configurations if board rev > A1
* on Beaglebone White
*/
- if (board_is_bone() && !strncmp(board_ti_get_rev(), "00A1", 4))
- return;
+ //if (board_is_bone() && !strncmp(board_ti_get_rev(), "00A1", 4))
+ // return;
if (i2c_probe(TPS65217_CHIP_PM))
return;
@@ -334,15 +334,15 @@
* On Beaglebone White we need to ensure we have AC power
* before increasing the frequency.
*/
- if (bone_not_connected_to_ac_power())
- freq = MPUPLL_M_600;
+ //if (bone_not_connected_to_ac_power())
+ // freq = MPUPLL_M_600;
/*
* Override what we have detected since we know if we have
* a Beaglebone Black it supports 1GHz.
*/
- if (board_is_bone_lt())
- freq = MPUPLL_M_1000;
+ //if (board_is_bone_lt())
+ // freq = MPUPLL_M_1000;
switch (freq) {
case MPUPLL_M_1000:
@@ -389,19 +389,19 @@
* Set LDO3, LDO4 output voltage to 3.3V for Beaglebone.
* Set LDO3 to 1.8V and LDO4 to 3.3V for Beaglebone Black.
*/
- if (board_is_bone()) {
+ /*if (board_is_bone()) {
if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
TPS65217_DEFLS1,
TPS65217_LDO_VOLTAGE_OUT_3_3,
TPS65217_LDO_MASK))
puts("tps65217_reg_write failure\n");
- } else {
- if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
+ } else {*/
+ if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
TPS65217_DEFLS1,
TPS65217_LDO_VOLTAGE_OUT_1_8,
TPS65217_LDO_MASK))
puts("tps65217_reg_write failure\n");
- }
+
if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
TPS65217_DEFLS2,
@@ -463,9 +463,9 @@
gpi2c_init();
freq = am335x_get_efuse_mpu_max_freq(cdev);
- if (board_is_beaglebonex())
- scale_vcores_bone(freq);
- else
+ //if (board_is_beaglebonex())
+ // scale_vcores_bone(freq);
+ //else
scale_vcores_generic(freq);
}
@@ -533,15 +533,18 @@
gpio_request(GPIO_DDR_VTT_EN, "ddr_vtt_en");
gpio_direction_output(GPIO_DDR_VTT_EN, 1);
}
-
+#if 0
if (board_is_icev2()) {
gpio_request(ICE_GPIO_DDR_VTT_EN, "ddr_vtt_en");
gpio_direction_output(ICE_GPIO_DDR_VTT_EN, 1);
}
-
- if (board_is_evm_sk())
+#endif
+
+ //if (board_is_evm_sk())
config_ddr(303, &ioregs_evmsk, &ddr3_data,
&ddr3_cmd_ctrl_data, &ddr3_emif_reg_data, 0);
+
+#if 0
else if (board_is_bone_lt())
config_ddr(400, &ioregs_bonelt,
&ddr3_beagleblack_data,
@@ -560,6 +563,7 @@
else
config_ddr(266, &ioregs, &ddr2_data,
&ddr2_cmd_ctrl_data, &ddr2_emif_reg_data, 0);
+#endif
}
#endif
@@ -723,7 +727,7 @@
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
char *name = NULL;
-
+#if 0
if (board_is_bone_lt()) {
/* BeagleBoard.org BeagleBone Black Wireless: */
if (!strncmp(board_ti_get_rev(), "BWA", 3)) {
@@ -742,6 +746,8 @@
if (board_is_bbg1())
name = "BBG1";
set_board_info_env(name);
+#endif
+ set_board_info_env("A335X_SK");
/*
* Default FIT boot on HS devices. Non FIT images are not allowed
初次调试,增加MLO的串口打印以方便调试:
Index: board-support/u-boot-2018.01/common/spl/spl.c
===================================================================
--- board-support/u-boot-2018.01/common/spl/spl.c (revision 6)
+++ board-support/u-boot-2018.01/common/spl/spl.c (revision 7)
@@ -20,6 +20,8 @@
#include <dm/root.h>
#include <linux/compiler.h>
#include <fdt_support.h>
+#define DEBUG
DECLARE_GLOBAL_DATA_PTR;
通过SDK提供的编译uboot命令: make u-boot
将生成的MLO及u-boot.img 放入SD之后,系统正常启动
am335x system upgrade uboot sd boot(一)的更多相关文章
- am335x system upgrade uboot nand boot(三)
在uboot 下初始化nand,一般需要做如下工作: 第一: 配置默认从NAND boot Index: include/configs/am335x_evm.h=================== ...
- 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 并负责启动其它程序.功能包括:支持并行化任务: ...
随机推荐
- 一篇好文之Android数据库 GreenDao的完全解析
数据库GreenDao.jpg 之前在开发过程中,数据库基本上会使用Litepal或者SQlite自己写,最近换新环境,公司原先使用的数据库就是GreenDao,在各种情况的作用下,准备了解下Gree ...
- Java面试题基础知识(收集)
1.集合类:list和Set比较,各自的子类比较(Arraylist,Vector,inkedLIst,HashSet,TreeSet) List:存入元素有序,元素可以重复,允许null值得存在,主 ...
- HDU 3949 XOR
3949 思路: 线性基,线性基的每个元素尽可能小 将k转换成二进制与排好序的线性基相对应 如果线性基的个数小于n,说明n个元素线性相关,所以可以构成0,k要减1 代码: #pragma GCC op ...
- angular2 学习笔记 (Typescript - Attribute & reflection & decorator)
更新 : 2018-11-27 { date: Date } 之前好像搞错了,这个是可以用 design:type 拿到的 { date: Date | null } 任何类型一但配上了 | 就 de ...
- Java定时器的三种实现方式
一.普通thread /** * 普通thread * 这是最常见的,创建一个thread,然后让它在while循环里一直运行着, * 通过sleep方法来达到定时任务的效果.这样可以快速简单的实现, ...
- idea javamaven项目 连接sqlserver 数据库方法
这里用的是c3p0连接数据库 1.pom文件写法: <!-- 数据库连接池 --> <dependency> <groupId>com.mchange</gr ...
- Getting Started with Processing 第五章的总结
Getting Started with Processing 第五章:响应 一次与永久 setup()函数 Processing 中,setup()函数只运行一次,用于设置一些初始的值,比如画布的大 ...
- Stanford: Creating a Hadoop-2.x project in Eclipse
Creating a Hadoop-2.x project in Eclipse http://snap.stanford.edu/class/cs246-data-2014/hw0.pdf Hado ...
- nodejs安装、环境配置和测试
nodejs下载 https://nodejs.org/en/ nodejs安装 双击下载的nodejs,可自定义安装路径,安装模块部分直接next即可安装. 检查是否安装 win+R输入cmd,打开 ...
- 三种css样式表及其优先级
1.行内样式 body内: <p style="text-indent: 2em;color: red"> 我是行内样式 </p> 2.内部样式表 body ...