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 并负责启动其它程序.功能包括:支持并行化任务: ...
随机推荐
- Dragger2好网文整合
Dagger2从入门到放弃再到恍然大悟 详解Dagger2 http://blog.csdn.net/u012124438/article/details/52505986
- 《剑指offer》第五十七题(为s的连续正数序列)
// 面试题57(二):为s的连续正数序列 // 题目:输入一个正数s,打印出所有和为s的连续正数序列(至少含有两个数). // 例如输入15,由于1+2+3+4+5=4+5+6=7+8=15,所以结 ...
- C++的虚函数
1 多态产生的背景 希望同一个方法在派生类和基类中的行为是不同的,换句话来说,方法的行为取决于调用该方法的对象. 2 解决多态的两种方法 1)在派生类中重新定义基类的方法 2)使用虚方法 3 虚 ...
- 牛客网NOIP赛前集训营-提高组(第七场)C 洞穴
洞穴 思路: 矩阵乘法 由于只需要知道 A ^ l 的 第a行第b个元素 所以我们每次在做矩阵乘法时只需要算第a行就可以了 还要像矩阵快速幂一样预处理A ^ (1<<d) 代码: #pra ...
- 拒绝采样 Rejection Sampling
2018-12-09 16:40:30 一.使用Rand7()来生成Rand10() 问题描述: 问题求解: 这个问题字节跳动算法岗面试有问到类似的,有rand6,求rand8,我想了好久,最后给了一 ...
- 雷林鹏分享:XML 元素
XML 元素 XML 文档包含 XML 元素. 什么是 XML 元素? XML 元素指的是从(且包括)开始标签直到(且包括)结束标签的部分. 一个元素可以包含: 其他元素 文本 属性 或混合以上所有. ...
- 常用音频协议介绍&&有关音频编码的知识与技术参数
(转载)常用音频协议介绍 会议电视常用音频协议介绍及对比白皮书 一.数字化音频原理:声音其实是一种能量波,因此也有频率和振幅的特征,频率对应于时间轴线,振幅对应于电平轴线.通常人耳可以听到的频率在20 ...
- LeetCode--374--猜数字大小
问题描述: 我们正在玩一个猜数字游戏. 游戏规则如下: 我从 1 到 n 选择一个数字. 你需要猜我选择了哪个数字. 每次你猜错了,我会告诉你这个数字是大了还是小了. 你调用一个预先定义好的接口 gu ...
- hdu-4080 Stammering Aliens 字符串hash 模板题
http://acm.hdu.edu.cn/showproblem.php?pid=4080 求出现次数大于等于n的最长串. #include<iostream> #include< ...
- CentOS7 安装Nginx 1.14:
nginx-1.14.2.tar.gz:下载:wget http://nginx.org/download/nginx-1.14.2.tar.gz 安装nginx: yum install ...