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 并负责启动其它程序.功能包括:支持并行化任务: ...
随机推荐
- NativeWindow_01_CreateWindow(Ex)_VC6
1. #include <windows.h> LRESULT CALLBACK ProcWindow(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA ...
- @media only screen and (max-width:640px)中的问题,响应式布局
<head> <meta charset="UTF-8"> <meta name="viewport" content=" ...
- CoordinatorLayout实现的效果(标题栏效果)
一.效果 CoordinatorLayouy是一个能够协调子布局的容器布局. 使用引入: compile 'com.android.support:design:24.1.1' 常见的使用方法如下:1 ...
- Rxbus的使用
Rxbus是一种模式,在RxJava中 一.添加依赖 compile 'io.reactivex:rxandroid:1.2.0' compile 'io.reactivex:rxjava:1.1.5 ...
- pip切换国内源(解决pipenv lock特别慢)
切换方法参考https://blog.csdn.net/chenghuikai/article/details/55258957 实测,确实解决了pipenv这个问题,否则只能--skip-lock. ...
- js常见知识点1.ajax相关
一. javascript中的typeof返回哪些数据类型? 建议回复: typeof 运算符把类型信息当作字符串返回.typeof 返回值有六种可能: number, string, boolean ...
- DirectX之顶点法线的计算
首先要明白,顶点法线存在的原因:确定灯光照射到物体表面的角度.所以一提到顶点法线,肯定要进行与灯光相关的运算了. 下面是顶点法线的计算方式 假如 A.B.C三个顶点构成一个三角形,它们对应的顶点法线分 ...
- python float转为decimal
73.2413793103 ======= 73.2414 <type 'float'> ======= <class 'decimal.Decimal'> 当断言这两个值相等 ...
- ffmpeg 无损改变纵横比aspect
最后发觉, potplayer 里 Ctrl+Enter 或者 Enter 可以扩展到整个屏幕/保持比例,根本不需要额外去转换 如果整个视频都要改的话,把 -ss -t 参数去掉 ffmpeg -ss ...
- spring cloud: 关闭ribbon负载均衡
spring cloud: 关闭ribbon负载均衡 1.eureka服务 2.2个user服务:7900/7901 3,movie服务 movie服务去请求 user的用户信息,而此时只想请求790 ...