||
在config 目录下,对于嵌入式平台,是arch.m68k,如下:
.EXPORT_ALL_VARIABLES:
###################################################################
#
# Vendor specific settings
#
CONSOLE_BAUD_RATE = 19200
###################################################################
#
# The makefiles need to know how to do things in different contexts
# To save some pain we put it all here
#
# First settings we always want for all build
#
# ARCH = kernel, TARGET_ARCH = uClibc
MACHINE = m68k
ARCH = m68knommu
CROSS_COMPILE = m68k-elf-
CROSS = $(CROSS_COMPILE)
# We've used -m5307 here because the bulk of the 5272 instruction timings
# happen to be closer to the 5307 than the 5200 series. Luckily, the
# actual instructions on the two processors are essentially identical.
# This should be fixed at some stage.
CPUFLAGS = -m5200
CC = $(CROSS_COMPILE)gcc
AS = $(CROSS_COMPILE)as
CXX = $(CROSS_COMPILE)g++
AR = $(CROSS_COMPILE)ar
LD = $(CROSS_COMPILE)ld
OBJCOPY = $(CROSS_COMPILE)objcopy
RANLIB = $(CROSS_COMPILE)ranlib
ELF2FLT = elf2flt
STRIPTOOL = $(CROSS_COMPILE)strip
STRIP = $(STRIPTOOL)
UCLINUX_BUILD_SET = 0 # have we set a special config below
###################################################################
#
# Settings for building user apps
#
#CFLAGS = -m5200 -msep-data -g
CFLAGS = -m5200 -msep-data
LDFLAGS = -Wl,-elf2flt
SYSLIBS = -lc -lstdc++ -lgcc
###################################################################
#
# fall through, do other config options perhaps
#
ifeq ($(UCLINUX_BUILD_SET),1)
endif
###################################################################
在config 目录下的config.in文件如下:
mainmenu_name 'uClinux Configuration'
mainmenu_option next_comment
comment 'Target Platform Selection'
comment 'Choose a Vendor/Product combination.'
choice 'Vendor/Product [Intel/i386 | Motorola/M5307C3] ' "1 CONFIG_DEFAULTS_INTEL_I386 \
2 CONFIG_DEFAULTS_MOTOROLA_M5307C3 \
" Intel/i386
endmenu
本文讨论了uClinux平台上程序设计必须关注的一些特点,并对在uClinux进行高效程序开发做了一些讨论。
由于uClinux是开源的,在uClinux上的开发努力永远不会停止。世界范围的技术专家在使用uClinux来构造商业化的产品,他们的工作的重要部分反过来对开源的社区作出了贡献。每当我们访问uClinux的网站,看到又出现了更新的源码发布或者更好的工具时,就会感觉到这个开发团体的热情和能力,并鞭策自己努力工作,争取为这个自由软件的发展作出自己的创造性贡献。