U-Boot

How to boot bare board binary from U-Boot?

安稳与你 提交于 2019-11-28 10:39:08
问题 How can we boot independent bare board binary(not standalone binary which runs using U-Boot environment and not linux kernel) from U-Boot. My requirement is to reinitialize the board and drivers using my binary... I can replace the U-Boot in the boot medium(here NOR Flash) with my binary but my requirement is to not removing the U-boot from NOR flash and I should load my binary from LAN network using "tftp" command. Thanks and Regards, Veerendranath 回答1: How to boot bare board binary from U

u-boot-1.1.4代码阅读(转)

自作多情 提交于 2019-11-28 03:09:19
写在前面:通过uboot的阅读我学到了很多东西,高手写的代码就是不一样。 代码阅读顺序: 1.第一阶段(Stage 1) 第一阶段的启动代码在 cpu\<cpu type>\start.s中,完成的工作主要有: CPU自身初始化:包括 MMU,Cache,时钟系统,SDRAM 控制器等的初始化 重定位:把自己从非易失性存储器搬移到 RAM中 分配堆栈空间,设置堆栈指针 清零 BSS 数据段 跳转到第二阶段入口函数 start_armboot() /Uboot114/u-boot-1.1.4/cpu/arm926ejs/start.S 2.第二阶段(Stage 2) 第二阶段是 u-boot 的主体,入口点是 lib_arm\board.c 中的 start_armboot()函数,完成的主要工作包括: 为 U-boot 内部私有数据分配存储空间,并清零 依次调用函数指针数组 init_sequence 中定义的函数进行一系列的初始化 如果系统支持 NOR Flash,调用 flash_init ()和 display_flash_config ()初始化并显示检测到的器件信息(AT91SAM9260EK不需要) 如果系统支持LCD或VFD,调用lcd_setmem()或vfd_setmem()计算帧缓冲(Framebuffer)大小,然后在 BSS 数据段之后为

How to run custom kernel on beaglebone?

我的梦境 提交于 2019-11-28 02:17:43
I am starting kernel or operating system programming for beaglebone with TI - AM3359 SoC. I have written an assembly program to write some characters to the serial interface (just to start off with) and i want to run this as kernel on beaglebone, just like linux kernel. what is the linking address for my program? and How to boot it from u-boot by default? I don't want to get into u boot programming and want to use the available u-boot which came with angstrom distribution along with the BBone. Any help is appreciated. Thanks I have written an assembly program to write some characters to the

learning armbian steps(11) ----- armbian 源码分析(六)

為{幸葍}努か 提交于 2019-11-27 23:53:59
接下来我们来分析一下uboot的编写过程: 从 lib/compilation.sh 89开始阅读: 89 compile_uboot() 90 { 91 # not optimal, but extra cleaning before overlayfs_wrapper should keep sources directory clean 92 if [[ $CLEAN_LEVEL == *make* ]]; then 93 display_alert "Cleaning" "$BOOTSOURCEDIR" "info" 94 (cd $SRC/cache/sources/$BOOTSOURCEDIR; make clean > /dev/null 2>&1) 95 fi 96 97 if [[ $USE_OVERLAYFS == yes ]]; then 98 local ubootdir=$(overlayfs_wrapper "wrap" "$SRC/cache/sources/$BOOTSOURCEDIR" "u-boot_${LINUXFAMILY}_${BRANCH}") 99 else 100 local ubootdir="$SRC/cache/sources/$BOOTSOURCEDIR" 101 fi 102 cd "$ubootdir" 103 104 #

Building kernel uImage using LOADADDR

痞子三分冷 提交于 2019-11-27 22:27:40
While building the kernel I am giving LOADADDR as "0x80008000": make uImage LOADADDR=0x80008000 Can you please help to understand what is the use of this? Can I change the LOADADDR, is there any restriction on the length of the LOADADDR? (I'm assuming that you're using ARM based on the mention of U-Boot and the value of LOADADDR.) Can you please help to understand what is the use of this? LOADADDR specifies the address where the kernel image will be located by the linker. (This is true for a few architectures (e.g. Blackfin), but not for ARM. LOADADDR specifies the address where the kernel

Pass large amount of binary data from u-boot to linux kernel

青春壹個敷衍的年華 提交于 2019-11-27 13:21:22
Have some issues with passing large amount of data (3 MB) from uboot to linux kernel 2.6.35.3 on imx50 ARM board. This data is required in kernel device driver probe function and then it should be released. First uboot load data from flash to RAM, then pass physical address for linux kernel using bootargs. In kernel I try to reserve certain amount of memory using reserve_resource() in arch/arm/kernel/setup.c file: --- a/arch/arm/kernel/setup.c Tue Jul 17 11:22:39 2012 +0300 +++ b/arch/arm/kernel/setup.c Fri Jul 20 14:17:16 2012 +0300 struct resource my_mem_res = { .name = "My_Region", .start =

《uboot教程 Exynos4412》-第3章-汇编之源码分析

一笑奈何 提交于 2019-11-27 11:23:31
在第一章中,介绍了Exynos4412的iROM、启动方式、源码组成等;在第二章中,介绍 uboot 编译等。通过前面对编译的详细分析,了解到 uboot 源码中有以下几个文件是非常重 要的: “cpu/ ARM _cortexa9/start.S” “board/samsung/smdkc210/lowlevel_init_SCP.S 或者 lowlevel_init_POP.S” “include/configs/itop_4412_android.h 或者 itop_4412_ubuntu.h” 其中“cpu/arm_cortexa9/start.S”是 uboot 代码入口文件,分析 uboot 一般是从 “start.S”文件开始,“lowlevel_init_SCP.S”文件是 内存 初始化、时钟初始化和串口初始化 等的文件,start.S 文件在运行过程中会跳到这个文件中。 “itop_4412_android.h 或者 itop_4412_ubuntu.h”文件是重要的配置头文件,里面的 宏配置,会影响以上文件如何编译和运行,包括在下一章节中 uboot 源码的 C 语言部分,很 多代码编译和运行都会受到这个头文件的影响。 本章主要内容是,从“start.S”文件开始分析所有汇编代码,截止于 uboot 开始执行 C 代码。其中涉及到很多不常用概念

itop4412开发板Android4.4旧源码编译

荒凉一梦 提交于 2019-11-27 11:23:19
注意:本小节,介绍的旧源码指的是“20170803”之前的源码。 在网盘目录中“iTOP4412 开发板资料汇总(不含光盘内容)\iTOP-4412 开发板系统源 码及镜像(其他)\android_4.4.4 源码以及对应 Kernel 源码”中下载 Android4.4.4 的 文件 系统,并通过 github 下载 uboot(Android4.4 的 uboot 源码和 Android4.0.3 完全一样) 和 kernel 的源码(参考附录六)。 5.4.2.1 uboot 的编译 Android4.4.4 对应 uboot 的源码,编译器,参数配置,编译脚本以及编译参数和 Android4.0.3 的 uboot 全部一模一样。 5.4.2.2 Linux 内核的编译 源码目录 网盘下载 Android4.4.4 对应的源码。在网盘“iTOP-4412 开发板系统源码及镜像(其 他)”→“android_4.4.4 源码及镜像”目录下。 编译器 Android4.4.4 对应内核的编译器和 Android4.0.3 的内核编译器一模一样。 参数配置 内核的编译是组合式配置文件,基本的配置文件名是“config_for_android_YY”,YY 表 示用下表所示的参数替代。 如上表所示,如果需要 Android4.4.4 支持 WiFi,则需要配置对应的参数。

iTOP4412精英版Ubuntu16.04系统编译uboot

只谈情不闲聊 提交于 2019-11-27 11:23:05
iTOP4412精英版Ubuntu16.04系统编译uboot uboot 的编译 ① 源码目录: Uboot 源码在光盘“06_源码_uboot 和 kernel”目录下,如下图所示。 ② 编译器: 如下图所示,编译器是使用的光盘目录下,“02_编译器以及烧写工具”→“arm 交叉编 译器”下的“arm-2009q3.tar.bz2”。如果使用的是搭建好的环境,确保编译器环境变量, 如下图所示。 使用命令“cd”(一定要使用 root 账户),接着使用“vim .bashrc”命令,打开环境 变量配置文件。修改环境变量配置文件最底行(取消注释),如下图所示。 接着还需要更新一下环境变量,如下图所示,使用命令“source .bashrc”。 最后做一下环境变量测试,Ubuntu 控制台中输入“arm”,然后按键盘上的“Tab” 键,会出现如下图所示内容。 ③ 参数配置 参考“5.3.1.3 参数配置”小节 ④ 编译生成 uboot 镜像举例 这里以 SCP 1G 核心板为例编译 uboot 镜像。 将光盘“06_源码_uboot 和 kernel”目录“CodeSign4SecureBoot_POP”、 “CodeSign4SecureBoot_SCP”以及“iTop4412_uboot_xxx.tar.gz”拷贝到 Ubuntu 系统 下,然后将“iTop4412_uboot

Enabling Interrupts in U-boot for ARM cortex A-9

别来无恙 提交于 2019-11-27 06:22:16
问题 I am trying to configure a GPIO interrupt in the uboot, This it to test the Interrupt response time without any OS intervention (Bare-metal). I was able to configure the pin-muxing and also successful in setting up the interrupt with the GPIO pin. My question is regarding the registering of the interrupt service routine. I see that the Interrupt vector table for my platform is at address 0xFFFF0000 ( I read the System Control Register to find out this). The interrupt Id for the GPIO was 56