Crosstool 、 Makefile、u-boot的Makefile

一、Makefile之Configure

(1)configure

--host=x86-linux

--target=arm-linux

--prefix=path

(2)make 

(3)mkae install

二、工具链的途径

(1)买开发板时自带的一个工具链
(2)用crosstool来制作。 Script to build gcc/glibc cross toolchains 这个工具是要联网的。只能提供4.22前的工具链,是OABI的,我们现在用的是EABI,所以现在不用了一般:特俗需求可以去这里下载“ 下载地址:http://kegel.com/crosstool/crosstool-0.43.tar.gz”
取而代之的是:crosstool-ng 它是支持4.2以后的,EABI。

(3)www.codesourcecery.com

三、u-boot的Makefile

make distclean
make fs2410_config
make


我们需要更改的有u-boot-1.1.6/board/smdk2410/
u-boot-1.1.6/cpu/arm920t/
u-boot-1.1.6/lib_arm/
u-boot-1.1.6/include/


要查看的文件有:Makefile、README、DOC/


(1)make smdk2410_config 一个代码私有化的过程
:vsp MKCONFIG
    asm -> asm-arm (include/) asm是一个符号链接
    arch -> arch-s3c24x0 (include/asm/)
----------------------------vi Makefile-----------------------------
fs2410_config   :   unconfig
    @$(MKCONFIG) $(@:_config=) arm arm920t fs2410 samsung s3c24x0


MKCONFIG    := $(SRCTREE)/mkconfig


-------------------cd include/ vi config.mk-------------------------
ARCH   = arm
CPU    = arm920t
BOARD  = fs2410
VENDOR = samsung
SOC    = s3c24x0


-------------------cd include/ vi config.h-------------------------
 /* Automatically generated - do not edit */
#define CONFIG_BOARDDIR board/samsung/fs2410
#include <config_defaults.h>
#include <configs/fs2410.h>
#include <asm/config.h>


-------------------cd include/configs/ vi fs2410.h-------------------------
[这里面是一些宏定义分为:开关项(条件编译来加载驱动)、配置项(链接到那个bank上)]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值