我也问个有关uClinux编译的问题。
我刚接触linux不久,对编译器和make的规则都不了解。前几天在某大虾的博客http://blog.iyi.cn/hily/archives/2006/09/uclinuxsamsung_s3c44b0x.html上看到一篇移植的经验,就照猫画虎的模仿,所有的东西都是照搬的,结果也都一样,只是到了下面的地方出了错。# make user_only
[ ! -d "user" ] || make ARCH=arm CROSS_COMPILE=arm-elf- -C user
make: Entering directory `/home/work/uClinux-dist/user'
for i in games ramimage sash /home/work/uClinux-dist/vendors/Samsung/44B0X/. /home/work/uClinux-dist/prop; do \
if [ -d $i ]; then \
touch $i/.sgbuilt_user; \
make -C $i || exit $? ; \
fi; \
done
make: Entering directory `/home/work/uClinux-dist/user/games'
for i indummy ; do \
[ $i = dummy ] || make -C $i || exit; \
done
make: Leaving directory `/home/work/uClinux-dist/user/games'
make: Entering directory `/home/work/uClinux-dist/user/ramimage'
make: Nothing to be done for `all'.
make: Leaving directory `/home/work/uClinux-dist/user/ramimage'
make: Entering directory `/home/work/uClinux-dist/user/sash'
ucfront-gcc arm-elf-gcc-O2 -g -fomit-frame-pointer -fno-common -fno-builtin -Wall -DEMBED -Dlinux -D__linux__ -Dunix -D__uClinux__ -c -o sash.o sash.c
make: *** 段错误
make: Leaving directory `/home/work/uClinux-dist/user/sash'
make: *** 错误 2
make: Leaving directory `/home/work/uClinux-dist/user'
make: *** 错误 2
我看了/user/sash路径下的makefile,内容如下:
ifdef CONFIG_USER_SASH_SH
SH = sh
SHOBJS = sash.o cmds.o cmd_uclinux.o ls.o hexdump.o df.o free.o \
hostname.o date.o
endif
ifdef CONFIG_USER_SASH_SHUTDOWN
SHUTDOWN = shutdown
SHUTDOWNOBJS = shutdown.o
endif
ifdef CONFIG_USER_SASH_REBOOT
REBOOT = reboot
REBOOTOBJS = reboot.o
endif
ifdef CONFIG_USER_SASH_PS
SHOBJS += ps.o
CFLAGS += -DCONFIG_USER_SASH_PS
endif
LIBSASH = libsash/libsash.a
ifdef CONFIG_USER_SASH_HISTORY
CFLAGS += -DCOMMAND_HISTORY
endif
all: $(SH) $(SHUTDOWN) $(REBOOT)
$(SH): $(SHOBJS) $(LIBSASH)
$(CC) $(LDFLAGS) -o $@ $(SHOBJS) $(LIBSASH) $(LDLIBS$(LDLIBS_$@))
$(SHUTDOWN): $(SHUTDOWNOBJS) $(LIBSASH)
$(CC) $(LDFLAGS) -o $@ $(SHUTDOWNOBJS) $(LIBSASH) $(LDLIBS)
$(REBOOT): $(REBOOTOBJS) $(LIBSASH)
$(CC) $(LDFLAGS) -o $@ $(REBOOTOBJS) $(LIBSASH) $(LDLIBS$(LDLIBS_$@))
romfs:
$(ROMFSINST) -e CONFIG_USER_SASH_SH /bin/sh
$(ROMFSINST) -e CONFIG_USER_SASH_REBOOT /bin/reboot
$(ROMFSINST) -e CONFIG_USER_SASH_REBOOT_SNAPGEAR reboot-snapgear.sh /bin/reboot
$(ROMFSINST) -e CONFIG_USER_SASH_SHUTDOWN /bin/shutdown
dummy_target:
$(LIBSASH): dummy_target
$(MAKE) -C libsash
clean:
-rm -f $(SH) $(SHUTDOWN) $(REBOOT) *.elf *.gdb *.o
$(MAKE) -C libsash clean
不知该怎么做了,请各位大哥指点迷津。我在此先谢过了 。
我的系统是fc6。 可以在 make menuconfig 的时候,把 user 下面的 sash 应用不选中。 :wink: 我还以为没人回复了,真是感动阿,实际上我只有在不编译shell时才能通过,只要用任一个都有某个文件段错误。
页:
[1]