QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3091|回复: 3

编译uclinux for 44B0 出错,请指教

[复制链接]
发表于 2007-1-21 20:04:48 | 显示全部楼层 |阅读模式
[root@localhost uClinux-dist]# 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[1]: 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              [0xffffffff, 0xffffffff] 37777777777, sz     0, at 0x0
1    .                    [0x30a     , 0x4d4c1   ] 0040755, sz     0, at 0x20
1    ..                   [0x30a     , 0x64884   ] 0040755, sz     0, at 0x40     [link to 0x20    ]
1    bin                  [0x30a     , 0x4d4c2   ] 0040755, sz     0, at 0x60
2    .                    [0x30a     , 0x4d4c2   ] 0040755, sz     0, at 0x80     [link to 0x60    ]
2    ..                   [0x30a     , 0x4d4c1   ] 0040755, sz     0, at 0xa0     [link to 0x20    ]
2    busybox              [0x30a     , 0x4d510   ] 0100744, sz 157320, at 0xc0
2    cat                  [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x26770  [link to 0xc0    ]
2    cp                   [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x26790  [link to 0xc0    ]
2    date                 [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x267b0  [link to 0xc0    ]
2    dd                   [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x267d0  [link to 0xc0    ]
2    dmesg                [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x267f0  [link to 0xc0    ]
2    grep                 [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x26810  [link to 0xc0    ]
2    gunzip               [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x26830  [link to 0xc0    ]
2    gzip                 [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x26850  [link to 0xc0    ]
2    hostname             [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x26870  [link to 0xc0    ]
2    kill                 [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x26890  [link to 0xc0    ]
2    ls                   [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x268b0  [link to 0xc0    ]
2    mkdir                [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x268d0  [link to 0xc0    ]
2    more                 [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x268f0  [link to 0xc0    ]
2    mount                [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x26910  [link to 0xc0    ]
2    mv                   [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x26930  [link to 0xc0    ]
2    ping                 [0x30a     , 0x4d518   ] 0100744, sz 61420, at 0x26950
2    rm                   [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x35960  [link to 0xc0    ]
2    rmdir                [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x35980  [link to 0xc0    ]
2    umount               [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x359a0  [link to 0xc0    ]
2    zcat                 [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x359c0  [link to 0xc0    ]
2    reboot               [0x30a     , 0x4d51d   ] 0100744, sz 32464, at 0x359e0
2    route                [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x3d8d0  [link to 0xc0    ]
2    basename             [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x3d8f0  [link to 0xc0    ]
2    clear                [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x3d910  [link to 0xc0    ]
2    du                   [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x3d930  [link to 0xc0    ]
2    find                 [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x3d950  [link to 0xc0    ]
2    killall              [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x3d970  [link to 0xc0    ]
2    uptime               [0x30a     , 0x4d510   ] 0100744, sz     0, at 0x3d990  [link to 0xc0    ]
2    dhcpcd               [0x30a     , 0x4d511   ] 0100744, sz 87008, at 0x3d9b0
2    ftp                  [0x30a     , 0x4d512   ] 0100744, sz 114832, at 0x52db0
2    inetd                [0x30a     , 0x4d513   ] 0100744, sz 38856, at 0x6ee60
2    expand               [0x30a     , 0x4d515   ] 0100744, sz 28196, at 0x78650
2    init                 [0x30a     , 0x4d516   ] 0100744, sz 29136, at 0x7f4a0
2    login                [0x30a     , 0x4d517   ] 0100744, sz 52968, at 0x86690
2    ifconfig             [0x30a     , 0x4d51a   ] 0100744, sz 70052, at 0x935a0
2    arp                  [0x30a     , 0x4d51b   ] 0100744, sz 67216, at 0xa4770
2    sh                   [0x30a     , 0x4d51c   ] 0100744, sz 76572, at 0xb4e20
2    shutdown             [0x30a     , 0x4d51e   ] 0100744, sz 29072, at 0xc7960
2    telnet               [0x30a     , 0x4d51f   ] 0100744, sz 117272, at 0xceb10
2    telnetd              [0x30a     , 0x4d520   ] 0100744, sz 48988, at 0xeb550
1    dev                  [0x30a     , 0x4d4c3   ] 0040755, sz     0, at 0xf74d0
2    .                    [0x30a     , 0x4d4c3   ] 0040755, sz     0, at 0xf74f0  [link to 0xf74d0 ]
2    ..                   [0x30a     , 0x4d4c1   ] 0040755, sz     0, at 0xf7510  [link to 0x20    ]
2    tty                  [0x30a     , 0x4d4cb   ] 0020644, sz     0, at 0xf7530
2    console              [0x30a     , 0x4d4cc   ] 0020644, sz     0, at 0xf7550
2    cua0                 [0x30a     , 0x4d4cd   ] 0020644, sz     0, at 0xf7570
2    cua1                 [0x30a     , 0x4d4ce   ] 0020644, sz     0, at 0xf7590
2    mem                  [0x30a     , 0x4d4cf   ] 0020644, sz     0, at 0xf75b0
2    kmem                 [0x30a     , 0x4d4d0   ] 0020644, sz     0, at 0xf75d0
2    null                 [0x30a     , 0x4d4d1   ] 0020644, sz     0, at 0xf75f0
2    zero                 [0x30a     , 0x4d4d2   ] 0020644, sz     0, at 0xf7610
2    random               [0x30a     , 0x4d4d3   ] 0020644, sz     0, at 0xf7630
2    urandom              [0x30a     , 0x4d4d4   ] 0020644, sz     0, at 0xf7650
2    ram0                 [0x30a     , 0x4d4d5   ] 0060644, sz     0, at 0xf7670
2    ram1                 [0x30a     , 0x4d4d6   ] 0060644, sz     0, at 0xf7690
2    ptyp0                [0x30a     , 0x4d4d7   ] 0020644, sz     0, at 0xf76b0
2    ptyp1                [0x30a     , 0x4d4d8   ] 0020644, sz     0, at 0xf76d0
2    ptyp2                [0x30a     , 0x4d4d9   ] 0020644, sz     0, at 0xf76f0
2    ptyp3                [0x30a     , 0x4d4da   ] 0020644, sz     0, at 0xf7710
2    ptyp4                [0x30a     , 0x4d4db   ] 0020644, sz     0, at 0xf7730
2    ptyp5                [0x30a     , 0x4d4dc   ] 0020644, sz     0, at 0xf7750
2    ptyp6                [0x30a     , 0x4d4dd   ] 0020644, sz     0, at 0xf7770
2    ptyp7                [0x30a     , 0x4d4de   ] 0020644, sz     0, at 0xf7790
2    ptyp8                [0x30a     , 0x4d4df   ] 0020644, sz     0, at 0xf77b0
2    ptyp9                [0x30a     , 0x4d4e0   ] 0020644, sz     0, at 0xf77d0
2    ptypa                [0x30a     , 0x4d4e1   ] 0020644, sz     0, at 0xf77f0
2    ptypb                [0x30a     , 0x4d4e2   ] 0020644, sz     0, at 0xf7810
2    ptypc                [0x30a     , 0x4d4e3   ] 0020644, sz     0, at 0xf7830
2    ptypd                [0x30a     , 0x4d4e4   ] 0020644, sz     0, at 0xf7850
2    ptype                [0x30a     , 0x4d4e5   ] 0020644, sz     0, at 0xf7870
2    ptypf                [0x30a     , 0x4d4e6   ] 0020644, sz     0, at 0xf7890
2    rom0                 [0x30a     , 0x4d4e7   ] 0060644, sz     0, at 0xf78b0
2    rom1                 [0x30a     , 0x4d4e8   ] 0060644, sz     0, at 0xf78d0
2    rom2                 [0x30a     , 0x4d4e9   ] 0060644, sz     0, at 0xf78f0
2    rom3                 [0x30a     , 0x4d4ea   ] 0060644, sz     0, at 0xf7910
2    rom4                 [0x30a     , 0x4d4eb   ] 0060644, sz     0, at 0xf7930
2    rom5                 [0x30a     , 0x4d4ec   ] 0060644, sz     0, at 0xf7950
2    rom6                 [0x30a     , 0x4d4ed   ] 0060644, sz     0, at 0xf7970
2    rom7                 [0x30a     , 0x4d4ee   ] 0060644, sz     0, at 0xf7990
2    rom8                 [0x30a     , 0x4d4ef   ] 0060644, sz     0, at 0xf79b0
2    rom9                 [0x30a     , 0x4d4f0   ] 0060644, sz     0, at 0xf79d0
2    tty0                 [0x30a     , 0x4d4f1   ] 0020644, sz     0, at 0xf79f0
2    tty1                 [0x30a     , 0x4d4f2   ] 0020644, sz     0, at 0xf7a10
2    tty2                 [0x30a     , 0x4d4f3   ] 0020644, sz     0, at 0xf7a30
2    tty3                 [0x30a     , 0x4d4f4   ] 0020644, sz     0, at 0xf7a50
2    ttyS0                [0x30a     , 0x4d4f5   ] 0020644, sz     0, at 0xf7a70
2    ttyS1                [0x30a     , 0x4d4f6   ] 0020644, sz     0, at 0xf7a90
2    ttyp0                [0x30a     , 0x4d4f7   ] 0020644, sz     0, at 0xf7ab0
2    ttyp1                [0x30a     , 0x4d4f8   ] 0020644, sz     0, at 0xf7ad0
2    ttyp2                [0x30a     , 0x4d4f9   ] 0020644, sz     0, at 0xf7af0
2    ttyp3                [0x30a     , 0x4d4fa   ] 0020644, sz     0, at 0xf7b10
2    ttyp4                [0x30a     , 0x4d4fb   ] 0020644, sz     0, at 0xf7b30
2    ttyp5                [0x30a     , 0x4d4fc   ] 0020644, sz     0, at 0xf7b50
2    ttyp6                [0x30a     , 0x4d4fd   ] 0020644, sz     0, at 0xf7b70
2    ttyp7                [0x30a     , 0x4d4fe   ] 0020644, sz     0, at 0xf7b90
2    ttyp8                [0x30a     , 0x4d4ff   ] 0020644, sz     0, at 0xf7bb0
2    ttyp9                [0x30a     , 0x4d500   ] 0020644, sz     0, at 0xf7bd0
2    ttypa                [0x30a     , 0x4d501   ] 0020644, sz     0, at 0xf7bf0
2    ttypb                [0x30a     , 0x4d502   ] 0020644, sz     0, at 0xf7c10
2    ttypc                [0x30a     , 0x4d503   ] 0020644, sz     0, at 0xf7c30
2    ttypd                [0x30a     , 0x4d504   ] 0020644, sz     0, at 0xf7c50
2    ttype                [0x30a     , 0x4d505   ] 0020644, sz     0, at 0xf7c70
2    ttypf                [0x30a     , 0x4d506   ] 0020644, sz     0, at 0xf7c90
1    etc                  [0x30a     , 0x4d4c4   ] 0040755, sz     0, at 0xf7cb0
2    .                    [0x30a     , 0x4d4c4   ] 0040755, sz     0, at 0xf7cd0  [link to 0xf7cb0 ]
2    ..                   [0x30a     , 0x4d4c1   ] 0040755, sz     0, at 0xf7cf0  [link to 0x20    ]
2    rc                   [0x30a     , 0x4d509   ] 0100644, sz   299, at 0xf7d10
2    inittab              [0x30a     , 0x4d50a   ] 0100644, sz    47, at 0xf7e60
2    services             [0x30a     , 0x4d50b   ] 0100644, sz  8205, at 0xf7eb0
2    motd                 [0x30a     , 0x4d50c   ] 0100644, sz   296, at 0xf9ee0
2    passwd               [0x30a     , 0x4d50d   ] 0100644, sz    21, at 0xfa030
2    version              [0x30a     , 0x4d50e   ] 0100644, sz    61, at 0xfa070
2    ramfs2048.img        [0x30a     , 0x4d50f   ] 0100644, sz  2598, at 0xfa0d0
2    inetd.conf           [0x30a     , 0x4d514   ] 0100644, sz    44, at 0xfab20
2    ramfs.img            [0x30a     , 0x4d519   ] 0100644, sz  2874, at 0xfab70
1    home                 [0x30a     , 0x4d4c5   ] 0040755, sz     0, at 0xfb6d0
2    .                    [0x30a     , 0x4d4c5   ] 0040755, sz     0, at 0xfb6f0  [link to 0xfb6d0 ]
2    ..                   [0x30a     , 0x4d4c1   ] 0040755, sz     0, at 0xfb710  [link to 0x20    ]
1    lib                  [0x30a     , 0x4d4c6   ] 0040755, sz     0, at 0xfb730
2    .                    [0x30a     , 0x4d4c6   ] 0040755, sz     0, at 0xfb750  [link to 0xfb730 ]
2    ..                   [0x30a     , 0x4d4c1   ] 0040755, sz     0, at 0xfb770  [link to 0x20    ]
1    mnt                  [0x30a     , 0x4d4c7   ] 0040755, sz     0, at 0xfb790
2    .                    [0x30a     , 0x4d4c7   ] 0040755, sz     0, at 0xfb7b0  [link to 0xfb790 ]
2    ..                   [0x30a     , 0x4d4c1   ] 0040755, sz     0, at 0xfb7d0  [link to 0x20    ]
1    proc                 [0x30a     , 0x4d4c8   ] 0040755, sz     0, at 0xfb7f0
2    .                    [0x30a     , 0x4d4c8   ] 0040755, sz     0, at 0xfb810  [link to 0xfb7f0 ]
2    ..                   [0x30a     , 0x4d4c1   ] 0040755, sz     0, at 0xfb830  [link to 0x20    ]
1    usr                  [0x30a     , 0x4d4c9   ] 0040755, sz     0, at 0xfb850
2    .                    [0x30a     , 0x4d4c9   ] 0040755, sz     0, at 0xfb870  [link to 0xfb850 ]
2    ..                   [0x30a     , 0x4d4c1   ] 0040755, sz     0, at 0xfb890  [link to 0x20    ]
1    var                  [0x30a     , 0x4d4ca   ] 0040755, sz     0, at 0xfb8b0
2    .                    [0x30a     , 0x4d4ca   ] 0040755, sz     0, at 0xfb8d0  [link to 0xfb8b0 ]
2    ..                   [0x30a     , 0x4d4c1   ] 0040755, sz     0, at 0xfb8f0  [link to 0x20    ]
1    tmp                  [0x30a     , 0x4d507   ] 0120777, sz     8, at 0xfb910
1    sbin                 [0x30a     , 0x4d508   ] 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[1]: *** [image] Error 1
make[1]: Leaving directory `/root/embed/uClinux-dist/vendors/Samsung/44B0'
make: *** [image] Error 2
[root@localhost uClinux-dist]#

郁闷了几天,不知是什么原因!
发表于 2007-1-22 23:34:12 | 显示全部楼层
这个是没有找到/root/embed/uClinux-dist/linux-2.4.x/linux这个文件,原因可能是编译的几个步骤的顺序问题,就是make dep  make lib_only  make user_only  make  image make等,也可能是你的文件参数没有设置好,没有生成这个linux文件
回复

使用道具 举报

发表于 2007-1-23 12:30:07 | 显示全部楼层
文件参数在哪儿设?在接下来的make又出现:
serial_21285.c:417: `ARMCSR_BASE' undeclared (first use in this function)
make[4]: *** [serial_21285.o] 错误 1
make[4]: Leaving directory `/home/uClinux-dist/linux-2.4.x/drivers/char'
make[3]: *** [first_rule] 错误 2
make[3]: Leaving directory `/home/uClinux-dist/linux-2.4.x/drivers/char'
make[2]: *** [_subdir_char] 错误 2
make[2]: Leaving directory `/home/uClinux-dist/linux-2.4.x/drivers'
make[1]: *** [_dir_drivers] 错误 2
make[1]: Leaving directory `/home/uClinux-dist/linux-2.4.x'
make: *** [linux] 错误 1
这个也是类似的问题吗?
回复

使用道具 举报

发表于 2007-1-23 13:46:34 | 显示全部楼层
中间件

根目录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
#undef  CONFIG_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/下文件和子目录的生成过程。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-3-29 16:20 , Processed in 0.113503 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表