一、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。
三、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上)]
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上)]