编译uclinux for 44B0 出错,请指教
# make image[ -d /root/embed/uClinux-dist/images ] || mkdir /root/embed/uClinux-dist/images
make ARCH=armnommu CROSS_COMPILE=arm-elf- -C /root/embed/uClinux-dist/vendors/Samsung/44B0/. image
make: Entering directory `/root/embed/uClinux-dist/vendors/Samsung/44B0'
[ -d /root/embed/uClinux-dist/images ] || mkdir -p /root/embed/uClinux-dist/images
genromfs -v -V "ROMdisk" -f /root/embed/uClinux-dist/images/romfs.img -d /root/embed/uClinux-dist/romfs
0 ROMdisk 37777777777, sz 0, at 0x0
1 . 0040755, sz 0, at 0x20
1 .. 0040755, sz 0, at 0x40
1 bin 0040755, sz 0, at 0x60
2 . 0040755, sz 0, at 0x80
2 .. 0040755, sz 0, at 0xa0
2 busybox 0100744, sz 157320, at 0xc0
2 cat 0100744, sz 0, at 0x26770
2 cp 0100744, sz 0, at 0x26790
2 date 0100744, sz 0, at 0x267b0
2 dd 0100744, sz 0, at 0x267d0
2 dmesg 0100744, sz 0, at 0x267f0
2 grep 0100744, sz 0, at 0x26810
2 gunzip 0100744, sz 0, at 0x26830
2 gzip 0100744, sz 0, at 0x26850
2 hostname 0100744, sz 0, at 0x26870
2 kill 0100744, sz 0, at 0x26890
2 ls 0100744, sz 0, at 0x268b0
2 mkdir 0100744, sz 0, at 0x268d0
2 more 0100744, sz 0, at 0x268f0
2 mount 0100744, sz 0, at 0x26910
2 mv 0100744, sz 0, at 0x26930
2 ping 0100744, sz 61420, at 0x26950
2 rm 0100744, sz 0, at 0x35960
2 rmdir 0100744, sz 0, at 0x35980
2 umount 0100744, sz 0, at 0x359a0
2 zcat 0100744, sz 0, at 0x359c0
2 reboot 0100744, sz 32464, at 0x359e0
2 route 0100744, sz 0, at 0x3d8d0
2 basename 0100744, sz 0, at 0x3d8f0
2 clear 0100744, sz 0, at 0x3d910
2 du 0100744, sz 0, at 0x3d930
2 find 0100744, sz 0, at 0x3d950
2 killall 0100744, sz 0, at 0x3d970
2 uptime 0100744, sz 0, at 0x3d990
2 dhcpcd 0100744, sz 87008, at 0x3d9b0
2 ftp 0100744, sz 114832, at 0x52db0
2 inetd 0100744, sz 38856, at 0x6ee60
2 expand 0100744, sz 28196, at 0x78650
2 init 0100744, sz 29136, at 0x7f4a0
2 login 0100744, sz 52968, at 0x86690
2 ifconfig 0100744, sz 70052, at 0x935a0
2 arp 0100744, sz 67216, at 0xa4770
2 sh 0100744, sz 76572, at 0xb4e20
2 shutdown 0100744, sz 29072, at 0xc7960
2 telnet 0100744, sz 117272, at 0xceb10
2 telnetd 0100744, sz 48988, at 0xeb550
1 dev 0040755, sz 0, at 0xf74d0
2 . 0040755, sz 0, at 0xf74f0
2 .. 0040755, sz 0, at 0xf7510
2 tty 0020644, sz 0, at 0xf7530
2 console 0020644, sz 0, at 0xf7550
2 cua0 0020644, sz 0, at 0xf7570
2 cua1 0020644, sz 0, at 0xf7590
2 mem 0020644, sz 0, at 0xf75b0
2 kmem 0020644, sz 0, at 0xf75d0
2 null 0020644, sz 0, at 0xf75f0
2 zero 0020644, sz 0, at 0xf7610
2 random 0020644, sz 0, at 0xf7630
2 urandom 0020644, sz 0, at 0xf7650
2 ram0 0060644, sz 0, at 0xf7670
2 ram1 0060644, sz 0, at 0xf7690
2 ptyp0 0020644, sz 0, at 0xf76b0
2 ptyp1 0020644, sz 0, at 0xf76d0
2 ptyp2 0020644, sz 0, at 0xf76f0
2 ptyp3 0020644, sz 0, at 0xf7710
2 ptyp4 0020644, sz 0, at 0xf7730
2 ptyp5 0020644, sz 0, at 0xf7750
2 ptyp6 0020644, sz 0, at 0xf7770
2 ptyp7 0020644, sz 0, at 0xf7790
2 ptyp8 0020644, sz 0, at 0xf77b0
2 ptyp9 0020644, sz 0, at 0xf77d0
2 ptypa 0020644, sz 0, at 0xf77f0
2 ptypb 0020644, sz 0, at 0xf7810
2 ptypc 0020644, sz 0, at 0xf7830
2 ptypd 0020644, sz 0, at 0xf7850
2 ptype 0020644, sz 0, at 0xf7870
2 ptypf 0020644, sz 0, at 0xf7890
2 rom0 0060644, sz 0, at 0xf78b0
2 rom1 0060644, sz 0, at 0xf78d0
2 rom2 0060644, sz 0, at 0xf78f0
2 rom3 0060644, sz 0, at 0xf7910
2 rom4 0060644, sz 0, at 0xf7930
2 rom5 0060644, sz 0, at 0xf7950
2 rom6 0060644, sz 0, at 0xf7970
2 rom7 0060644, sz 0, at 0xf7990
2 rom8 0060644, sz 0, at 0xf79b0
2 rom9 0060644, sz 0, at 0xf79d0
2 tty0 0020644, sz 0, at 0xf79f0
2 tty1 0020644, sz 0, at 0xf7a10
2 tty2 0020644, sz 0, at 0xf7a30
2 tty3 0020644, sz 0, at 0xf7a50
2 ttyS0 0020644, sz 0, at 0xf7a70
2 ttyS1 0020644, sz 0, at 0xf7a90
2 ttyp0 0020644, sz 0, at 0xf7ab0
2 ttyp1 0020644, sz 0, at 0xf7ad0
2 ttyp2 0020644, sz 0, at 0xf7af0
2 ttyp3 0020644, sz 0, at 0xf7b10
2 ttyp4 0020644, sz 0, at 0xf7b30
2 ttyp5 0020644, sz 0, at 0xf7b50
2 ttyp6 0020644, sz 0, at 0xf7b70
2 ttyp7 0020644, sz 0, at 0xf7b90
2 ttyp8 0020644, sz 0, at 0xf7bb0
2 ttyp9 0020644, sz 0, at 0xf7bd0
2 ttypa 0020644, sz 0, at 0xf7bf0
2 ttypb 0020644, sz 0, at 0xf7c10
2 ttypc 0020644, sz 0, at 0xf7c30
2 ttypd 0020644, sz 0, at 0xf7c50
2 ttype 0020644, sz 0, at 0xf7c70
2 ttypf 0020644, sz 0, at 0xf7c90
1 etc 0040755, sz 0, at 0xf7cb0
2 . 0040755, sz 0, at 0xf7cd0
2 .. 0040755, sz 0, at 0xf7cf0
2 rc 0100644, sz 299, at 0xf7d10
2 inittab 0100644, sz 47, at 0xf7e60
2 services 0100644, sz8205, at 0xf7eb0
2 motd 0100644, sz 296, at 0xf9ee0
2 passwd 0100644, sz 21, at 0xfa030
2 version 0100644, sz 61, at 0xfa070
2 ramfs2048.img 0100644, sz2598, at 0xfa0d0
2 inetd.conf 0100644, sz 44, at 0xfab20
2 ramfs.img 0100644, sz2874, at 0xfab70
1 home 0040755, sz 0, at 0xfb6d0
2 . 0040755, sz 0, at 0xfb6f0
2 .. 0040755, sz 0, at 0xfb710
1 lib 0040755, sz 0, at 0xfb730
2 . 0040755, sz 0, at 0xfb750
2 .. 0040755, sz 0, at 0xfb770
1 mnt 0040755, sz 0, at 0xfb790
2 . 0040755, sz 0, at 0xfb7b0
2 .. 0040755, sz 0, at 0xfb7d0
1 proc 0040755, sz 0, at 0xfb7f0
2 . 0040755, sz 0, at 0xfb810
2 .. 0040755, sz 0, at 0xfb830
1 usr 0040755, sz 0, at 0xfb850
2 . 0040755, sz 0, at 0xfb870
2 .. 0040755, sz 0, at 0xfb890
1 var 0040755, sz 0, at 0xfb8b0
2 . 0040755, sz 0, at 0xfb8d0
2 .. 0040755, sz 0, at 0xfb8f0
1 tmp 0120777, sz 8, at 0xfb910
1 sbin 0120777, sz 4, at 0xfb940
arm-elf-ld -r -o /root/embed/uClinux-dist/linux-2.4.x/romfs.o \
-b binary /root/embed/uClinux-dist/images/romfs.img
arm-elf-objcopy -O binary -R .note -R .comment \
-S /root/embed/uClinux-dist/linux-2.4.x/linux /root/embed/uClinux-dist/images/image.ram
arm-elf-objcopy: /root/embed/uClinux-dist/linux-2.4.x/linux: No such file or directory
make: *** Error 1
make: Leaving directory `/root/embed/uClinux-dist/vendors/Samsung/44B0'
make: *** Error 2
#
郁闷了几天,不知是什么原因! 这个是没有找到/root/embed/uClinux-dist/linux-2.4.x/linux这个文件,原因可能是编译的几个步骤的顺序问题,就是make depmake lib_onlymake user_onlymakeimage make等,也可能是你的文件参数没有设置好,没有生成这个linux文件 文件参数在哪儿设?在接下来的make又出现:
serial_21285.c:417: `ARMCSR_BASE' undeclared (first use in this function)
make: *** 错误 1
make: Leaving directory `/home/uClinux-dist/linux-2.4.x/drivers/char'
make: *** 错误 2
make: Leaving directory `/home/uClinux-dist/linux-2.4.x/drivers/char'
make: *** 错误 2
make: Leaving directory `/home/uClinux-dist/linux-2.4.x/drivers'
make: *** 错误 2
make: Leaving directory `/home/uClinux-dist/linux-2.4.x'
make: *** 错误 1
这个也是类似的问题吗? 中间件
根目录scripts下的各种脚本和C源文件都可以称作中间件。它们并不是内核组件的一部分,只是在kbuild执行过程中的辅助程序。以split-include为例,讲述配置文件的运作机理。
.config由关键字/值对组成,其内容类似于:
CONFIG_MPENTIUMIII=y
# CONFIG_MPENTIUM4 is not set
CONFIG_REISERFS_FS=m
这些信息在执行“make ”时自动生成。同时include/linux/autoconf.h依照.config的内容生成。它的格式类似于:
#define CONFIG_MPENTIUMIII 1
#undef CONFIG_MPENTIUM4
#undefCONFIG_REISERFS_FS
#define CONFIG_REISERFS_FS_MODULE 1
对比一下不难发现,include/linux/autoconf.h明确地洞悉了.config的意图:哪些组件不编译,哪些需要编译进内核,而哪些又要作为模块来编译?split-include根据include/linux/autoconf.h在include/config/下建立相关的目录和.h文件。每个.h文件只包括include/linux/autoconf.h中的某一行,比如在配置内核选项时支持NTFS文件系统,并把它编译进内核,在.config中就会生成“CONFIG_NTFS_FS=y”,相应地在include/linux/autoconf.h中会生成“#define CONFIG_NTFS_FS 1”一项。这样,所有与NTFS文件系统相关的C源文件都会包含include/config/ntfs/fs.h头文件。
如果以前编译过内核,并且没有使用过“make mrproper”,.config、include/linux/autoconf.h和include/linux/config/就不会被删除。这里涉及到新旧内核的配置问题。一个全新的内核代码是未经配置的。如果只在原内核的功能基础上增加对NTFS的支持,那么从头开始配置无疑是浪费时间。可以继续使用原内核的.config文件,而所有的配置信息不会有任何更改,并且可以直接在原配置的基础上增加新功能。
在复杂的情况下,保留的旧内核配置信息还要与新的配置信息进行比较:哪些旧信息需要覆盖,哪些需要保留?下面来看一下几种可能的情况:
旧值保存在include/config/下的.h文件中,新值保存在新生成的include/linux/autoconf.h文件中。split-include的代码不仅描述了如何处理这五种情况,还描述了include/config/下文件和子目录的生成过程。
页:
[1]