由于上层应用的需求,需要运行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(一)的更多相关文章

  1. am335x system upgrade uboot nand boot(三)

    在uboot 下初始化nand,一般需要做如下工作: 第一: 配置默认从NAND boot Index: include/configs/am335x_evm.h=================== ...

  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. 数据库 Mysql 使用,优化,索引

    数据库事务的隔离级别,由低到高 : READ UNCOMMITTED(读未提交数据):允许事务读取未被其他事务提交的变更数据,会出现脏读.不可重复读和幻读问题. READ COMMITTED(读已提交 ...

  2. 认识flask框架-2

    1.json:基于键值对的字符串,轻量级的数据交互格式,用来传输数据 2.json模块 dumps:把字典转化成json字符串. loads:把json字符串转成字典. dump.load操作的是文件 ...

  3. 【转载】LINUX下安装wget命令(SFTP实现法)

    如何安装wget命令. 方法一:通过yum 命令行为:yum install wget 完成.此操作很简单,但是我安装的linux是centos的最小版本,运行上述命令时会出现无法连接到源网站(大概是 ...

  4. 混合测序(Pooling)

    什么是高通量测序技术中的多重测序? 多重测序是指将带有特殊分子标签(barcode或者index)的不同来源的DNA标本,放入一个反应体系进行测序的方法.与一次检测一种来源的DNA相比,多重检测通过分 ...

  5. Web版记账本开发记录(二)

    第二天又开始了,继续开始编辑之路. 今天在弄用户登录,也不知道为什么, 挺简单的一个程序耗时还挺多,在编程的过程中我发现昨天的思路有一些问题, 今天又重新理了一下思路. 还将昨天的表格给完善了一些,自 ...

  6. 『TensorFlow』SSD源码学习_其八:网络训练

    Fork版本项目地址:SSD 作者使用了分布式训练的写法,这使得训练部分代码异常臃肿,我给出了部分注释.我对于多机分布式并不很熟,而且不是重点,所以不过多介绍,简单的给出一点训练中作者的优化手段,包含 ...

  7. rsync+inotify

    一.rsync 1.1rsync是啥 相当于cp.scp.rm等工具,但优于这些工具,主要用在数据备份 1.2.rsync安装 yum -y install rsync --update 客户端删除文 ...

  8. vue中v-for和动态src问题及解决办法

  9. python-django rest framework框架之解析器

    1.解析器 : 对请求的数据进行解析 - 请求体进行解析. 解析器在你不拿请求体数据时 不会调用. class UsersView(APIView): def get(self,request,*ar ...

  10. poj-2369-置换

    Permutations We remind that the permutation of some final set is a one-to-one mapping of the set ont ...