标签:copyright 解压缩 purpose link edits without for general spec
1.解压缩
tar xjf u-boot-1.1.6.tar.bz2
2.打补丁
patch -p1 < ../u-boot-1.1.6_jz2440.patch
3.配置
make 100ask24x0_config,下面为Makefile
MKCONFIG := $(SRCTREE)/mkconfig
#上面这段翻译为:mkconfig 100ask24x0 arm arm920t 100ask24x0 NULL s3c24x0
make 100ask24x0_config这个命令执行的就是 mkconfig 100ask24x0 arm arm920t 100ask24x0 NULL s3c24x0这个脚本,下面我们看下mkconfig文件
mkconfig新建的文件打印内容如下:
4.编译
make
继续提取Makefile一些主要成分:
# load ARCH, BOARD, and CPU configuration include $(OBJTREE)/include/config.mk ifeq ($(ARCH),arm) CROSS_COMPILE = arm-linux- # U-Boot objects....order is important (i.e. start must be first) OBJS = cpu/$(CPU)/start.o LIBS = lib_generic/libgeneric.a LIBS += board/$(BOARDDIR)/lib$(BOARD).a LIBS += cpu/$(CPU)/lib$(CPU).a ALL = $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) all: $(ALL)
# LDFLAGS在根目录config.mk中: LDFLAGS += -Bstatic -T $(LDSCRIPT) -Ttext $(TEXT_BASE) $(PLATFORM_LDFLAGS)
# TEXT_BASE在board/100ask24x0/config.mk中: TEXT_BASE = 0x33F80000再看一下u-boot.lds
/* * (C) Copyright 2002 * Gary Jennejohn, DENX Software Engineering, <gj@denx.de> * * See file CREDITS for list of people who contributed to this * project. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") /*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/ OUTPUT_ARCH(arm) ENTRY(_start) SECTIONS { . = 0x00000000; //0x33F80000这个地址是0x30000000+64M-512Kb所在位置,当uboot大于512就要修改这个地址 . = ALIGN(4); .text : { cpu/arm920t/start.o (.text) board/100ask24x0/boot_init.o (.text) *(.text) } . = ALIGN(4); .rodata : { *(.rodata) } . = ALIGN(4); .data : { *(.data) } . = ALIGN(4); .got : { *(.got) } . = .; __u_boot_cmd_start = .; .u_boot_cmd : { *(.u_boot_cmd) } __u_boot_cmd_end = .; . = ALIGN(4); __bss_start = .; .bss : { *(.bss) } _end = .; }
标签:copyright 解压缩 purpose link edits without for general spec
原文地址:https://www.cnblogs.com/lzd626/p/11530560.html