U-Boot

U-Boot移植(6)总结U-Boot工程的总体结构

百般思念 提交于 2019-12-18 16:09:12
1、源代码组织 对于ARM而言,主要的目录如下: board 平台依赖  存放电路板相关的目录文件,每一套板子对 应一个目录。如 smdk2410(arm920t)   cpu 平台依赖  存放CPU相关的目录文件,每一款CPU对应一个目录,例如: arm920t 、 xscale、 i386 等目录 lib_arm 平台依赖  存放对ARM体系结构通用的文件,主要用于实现ARM平台通用的函数, 如 软件浮点。 common 通用 通用的多功能函数实现,如 环境,命令,控制台相关 的函数实现。 include 通用 头文件和开发板配置文件,所有开发板的配置文件都在 configs 目录下 lib_generic 通用 通用库函数的实现 net 通用 存放 网络协议 的程序 drivers 通用 通用的设备驱动程序,主要有以太网接口的驱动,nand驱动。 ....... 2.makefile简要分析 所有这些目录的编译连接都是由顶层目录的makefile来确定的。 在执行make之前,先要执行make $(board)_config 对工程进行配置,以确定特定于目标板的各个子目录和头文件。 $(board)_config:是makefile 中的一个伪目标,它传入指定的CPU,ARCH,BOARD,SOC参数去执行mkconfig脚本。

How to add customised ATAG variable in U-Boot and Linux kernel?

ぃ、小莉子 提交于 2019-12-18 10:56:17
问题 I want to add customized atag variable in U-Boot and Linux kernel. How can i achieve this? Is there any procedure to add an ATAG variable in U-Boot and Linux ? 回答1: Follow this procedure , To achieve this goal, there're 2 parts need to be modified. One is the U-Boot, and the other one is the Linux kernel. 1. U-Boot changes required : A. Make sure the CONFIG_CMDLINE_TAG/CONFIG_SETUP_MEMORY_TAGS/CONFIG_INITRD_TAG are defined in you project definition header file ( u-boot/include/configs/am335x

U-Boot编译过程完全分析

妖精的绣舞 提交于 2019-12-18 10:50:22
本文转载于:http://www.cnblogs.com/heaad/archive/2010/07/17/1779806.html 2.1 U-Boot Makefile分析 2.1.1 U-Boot编译命令 对于mini2440开发板,编译U-Boot需要执行如下的命令: $ make mini2440_config $ make all 使用上面的命令编译U-Boot,编译生成的所有文件都保存在源代码目录中。为了保持源代码目录的干净,可以使用如下命令将编译生成的文件输出到一个外部目录,而不是在源代码目录中,下面的2种方法都将编译生成的文件输出到 /tmp/build目录: $ export BUILD_DIR=/tmp/build $ make mini2440_config $ make all 或 $ make O=/tmp/build mini2440_config (注意是字母O,而不是数字0) $ make all 为了简化分析过程,方便读者理解,这里主要针对第一种编译方式(目标输出到源代码所在目录)进行分析。 2.1.2 U-Boot配置、编译、连接过程 U-Boot开头有一些跟主机软硬件环境相关的代码,在每次执行make命令时这些代码都被执行一次。 1. U-Boot 配置过程 ( 1 )定义主机系统架构 HOSTARCH := $(shell uname -m

4418开发板Android源码整体&单独编译

試著忘記壹切 提交于 2019-12-18 10:27:46
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 内核缺省文件配置之后,Android 目录,运行一键编译脚本“build_android.sh”,如下图所示。 注意:本篇文章基于iTOP-4418开发板,编译 Android 必须保证给 Ubuntu 系统提供 4G 以上内存。 这里“提供 4G 以上内存”的意思,不仅仅是指在 VMware Workstations 虚拟机中设置分配 4G 内存。 例如,用户在编译的时候,PC 机的内存一共是 6G,在虚拟机中设置分配 4G 内存,但是在 Windows 系统下,开着 QQ,杀毒软件,音乐播放器,浏览器等等,这样在 Windows 下占用的内存就快 2G 了,那么虚拟机会自动调整到只占用 3G,甚至不到 3G 的内存,这样就有可能没法编译通过。后面 的单独编译 Android 也是需要 4G 以上内存。 正确的分配内存方法是,首先给虚拟机分配 4G 以上内存,然后在 Windows 下关掉尽量 多的不必要的应用,关掉尽量多应用的后台程序。 当然,如果用户的 PC 是 8G 或者 16G 内存,随意就成。 编译中,如下图所示。 编译完成之后,在 result 目录下,如下图所示。 生成了 uboot 文件“u-boot-iTOP-4418.bin”; 生成了 kernel 文件“ boot.img”; 生成了

buildroot构建项目(二)--- u-boot 2017.11 建立 2440 开发板

倾然丶 夕夏残阳落幕 提交于 2019-12-18 04:54:58
一、准备工作   在建立之前,先需要将下载的u-boot 拷贝一份出来解压,在此工程下进行更改和创建。同时根据前面搜索到的 mini2440开发板所在的版本,下载一份u-boot 拷贝出 mini2440 的工程文件。   选择2013.10版本的 u-boot。下载,并解压。 1.1 board 目录修改   u-boot-2013.10/board/samsung/smdk2410 复制进 u-boot-2017.11/board/samsung/ 目录   文件名修改:         Makefile 修改为:      创建 Kconfig 文件并修改:    1.2 头文件修改   u-boot-2013.10/include/configs/smdk2410.h 拷贝进 u-boot-2017.11//include/configs/mini2440.h      在头文件中添加对 S3C2440芯片的支持:      在2013.10版本中,执行命令:grep -R -l "smdk2410.h"   查找是否还有包含 smdk2410.h 文件 1.3 修改arch/arm下文件   1.3.1 修改Kconfig文件   当前新版的u-boot与linux源码一样,都执行make menuconfig 进行配置

buildroot构建项目(一)---buildroot介绍

喜你入骨 提交于 2019-12-18 04:53:05
1.1 什么是buildroot   Buildroot是Linux平台上一个构建嵌入式Linux系统的框架。整个Buildroot是由Makefile脚本和Kconfig配置文件构成的。你可以和编译Linux内核一样,通过buildroot配置,menuconfig修改,编译出一个完整的可以直接烧写到机器上运行的Linux系统软件(包含boot、kernel、rootfs以及rootfs中的各种库和应用程序)。   下载:git clone git://git.buildroot.net/buildroot   解压:tar -xzvf buildroot-2017.02.9.tar.gz 1.2 buildroot 的目录结构 buildroot/package/:下面放着应用软件的配置文件,每个应用软件的配置文件有Config.in和soft_name.mk,其中soft_name.mk(这种其实就Makefile脚本的自动构建脚本)文件可以去下载应用软件的包。 buildroot/output/:是编译出来的输出文件夹,里面的build/目录存放着解压后的各种软件包编译完后的现场。 host:是由各类源码编译后在你主机上运行的工具(build for host)的安装目录,如arm-linux-gcc就是安装在这里. 编译出来的主机工具在host/usr下

Building kernel uImage using LOADADDR

孤街浪徒 提交于 2019-12-17 16:24:44
问题 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? 回答1: (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

How do I find ARM Linux entry point when it fails to uncompress?

强颜欢笑 提交于 2019-12-17 06:51:26
问题 I am trying to boot Linux via U-boot on a custom board with i.MX6 (CPU core is ARM Cortex A9) We seem to have ported Das U-Boot(2009.08) successfully. But booting Linux fails at the last U-Boot message: "Starting kernel ..." Here is my relevant environment: bootargs=console=ttymxc1,115200 vmalloc=400M root=/dev/mmcblk0p1 rootwait consoleblank=0 earlyprintk video=mxcfb0:dev=lcd,LCD-ORTUS,if=RGB24 video=mxcfb1:dev=hdmi,1280x720M@60,if=RGB24 calibration tsdev=tsc2004 fbmem=10M,28M bootcmd

u-boot之make <board_name>_config执行过程分析

此生再无相见时 提交于 2019-12-17 02:00:01
  从网上下载uboot源码之后需要对源码作相应修改来支持自己的开发板,更改完源码之后需要配置。uboot(make<board_name>_config)。这里以百问网的开发板jz2440为例子,配置命令为make 100ask24x0_config。这条命令的执行过程按以下几步分析: 1、u-boot-1.1.6/Makefile简单分析 2、u-boot-1.1.6/mkconfig详细分析 3、总结make 100ask24x0_config这条命令执行后会发生什么 1、u-boot-1.1.6/Makefile简单分析。Makefile的最简单的规则如下(摘超自博客 https://blog.csdn.net/haoel/article/details/2886 ) target ... : prerequisites ... command ... ... target 也就是一个目标文件,可以是Object File ,也可以是执行文件。还可以是一个标签 (Label),对于标签这种特性,在后续的“伪目标”章节中会有叙述。 prerequisites 就是,要生成那个target 所需要的文件或是目标。 command 也就是make 需要执行的命令。(任意的Shell 命令) u-boot-1.1.6/Makefile文件下增加了支持jz2440开发板的规则

Unknown command 'nand' - try 'help' on beaglebone black

守給你的承諾、 提交于 2019-12-13 05:13:50
问题 I'm trying build a linux system on beaglebone black and following to mastering embedded linux programming book, however when I boot my u-boot on beaglebone black, I have received a error: unknown command 'nand' - try 'help' . Does anybody have any idea of what did I do wrong or did I miss something? 回答1: If you are in Chapter 3: All About Bootloaders → U-Boot → Using U-Boot : This is NOT an example meant to be executed on a BeagleBoneBlack. It is a generic example of a U-Boot command that