uclinux 安装: make 失败

发布于 2021-11-12 22:37:08 字数 3124 浏览 893 评论 5

make menuconfig ;make dep success! make 出错。

错误代码:

make[3]: Entering directory `/home/joel/Downloads/uClinux-dist/linux-2.4.x/arch/armnommu/mach-dsc21'

arm-elf-gcc -D__KERNEL__ -I/home/joel/Downloads/uClinux-dist/linux-2.4.x/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fno-common -pipe -fno-builtin -D__linux__ -DNO_MM -mapcs-32  -mtune=arm7tdmi  -msoft-float   -nostdinc -iwithprefix include -DKBUILD_BASENAME=io  -c -o io.o io.c
io.c:35: parse error before `('
io.c:39: warning: type defaults to `int' in declaration of `__v'
io.c:39: warning: data definition has no type or storage class
io.c:39: parse error before `}'
io.c:42: parse error before `('
io.c:47: warning: type defaults to `int' in declaration of `__v'
io.c:47: warning: data definition has no type or storage class
io.c:47: parse error before `}'
io.c:50: parse error before `('
io.c:54: warning: type defaults to `int' in declaration of `__v'
io.c:54: warning: data definition has no type or storage class
io.c:54: parse error before `}'
io.c:57: parse error before `('
io.c:65: parse error before `('
io.c:73: parse error before `('
make[3]: *** [io.o] Error 1
make[3]: Leaving directory `/home/joel/Downloads/uClinux-dist/linux-2.4.x/arch/armnommu/mach-dsc21'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/home/joel/Downloads/uClinux-dist/linux-2.4.x/arch/armnommu/mach-dsc21'
make[1]: *** [_dir_arch/armnommu/mach-dsc21] Error 2

make[1]: *** Waiting for unfinished jobs....

内核uCliux-dist-20070130 ,交叉编译器arm-elf-tool-20040427, 主机 centos6.3

不知道是不是uClinux 版本问题呢,我还了uClinux-dist2012,也不行。

赋代码

#include <linux/kernel.h>
#include <asm/io.h>

void insl(unsigned int port, void *to, int len)
{
    int i;
    for (i = 0; i < len; i++)
        ((unsigned long *)to)[i] = inl(port);
}

void insw(unsigned int port, void *to, int len)
{
    int i;

    for (i = 0; i < len; i++)
        ((unsigned short *) to)[i] = inw(port);
}

void insb(unsigned int port, void *to, int len)
{
    int i;
    for (i = 0; i < len; i++)
        ((unsigned char *)to)[i] = inb(port);
}

void outsw(unsigned int port, const void *from, int len)
{
    int i;

    for (i = 0; i < len; i++)
        outw(((unsigned short *) from)[i], port);
}

void outsl(unsigned int port, const void *from, int len)
{
    int i;
    
    for (i = 0; i < len; i++)
        outl(((unsigned long *) from)[i], port);
}

void outsb(unsigned int port, const void *from, int len)
{
    int i;

    for (i = 0; i < len; i++)
        outb(((unsigned char *) from)[i], port);
}

void outswb(unsigned int port, const void *from, int len)
{
    outsw(port, from, len >> 2);
}

void inswb(unsigned int port, void *to, int len)
{
    int i;

    for (i = 0; i < len; i++)
        ((unsigned short *) to)[i] = inb(port);
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

谢绝鈎搭 2021-11-19 15:26:52

恩,确实,我的操作系统时centos6.3,可能时太新了。我用过uclinux-dist-20040408,arm-elf-tools-20030413,但是问题依旧,不好搞阿。

浅沫记忆 2021-11-19 10:57:23

貌似没人回答,是不是现在已经没有人玩 uClinux,la ,现在大家都在有什么嵌入式系统呢,大虾帮忙啊。

别再吹冷风 2021-11-19 02:56:19

貌似没人回答,是不是现在已经没有人玩 uClinux,la ,现在大家都在有什么嵌入式系统呢,大虾帮忙啊。

不再见 2021-11-18 17:27:30

这个问题还是没有解决,
我在make image 后也出现了很多问题,cp /home/joel/Downloads/uClinux-dist/linux-2.4.x/linux /home/joel/Downloads/uClinux-dist/images

cp: cannot stat `/home/joel/Downloads/uClinux-dist/linux-2.4.x/linux': No such file or directory

make[2]: *** [image] Error 1

make[2]: Leaving directory `/home/joel/Downloads/uClinux-dist/vendors/GDB/ARMulator'

make[1]: *** [image] Error 2

make[1]: Leaving directory `/home/joel/Downloads/uClinux-dist/vendors'

make: *** [image] Error 2

错误很多;

make linux 后更加严重

init.c: In function `paging_init':
init.c:573: `END_MEM' undeclared (first use in this function)
init.c:573: (Each undeclared identifier is reported only once
init.c:573: for each function it appears in.)
init.c:506: warning: unused variable `node'
make[3]: *** [init.o] Error 1
make[3]: Leaving directory `/home/joel/Downloads/uClinux-dist/linux-2.4.x/arch/armnommu/mm'

io.c:35: parse error before `('
io.c:39: warning: type defaults to `int' in declaration of `__v'
io.c:39: warning: data definition has no type or storage class
io.c:39: parse error before `}'
io.c:42: parse error before `('
io.c:47: warning: type defaults to `int' in declaration of `__v'
io.c:47: warning: data definition has no type or storage class
io.c:47: parse error before `}'
io.c:50: parse error before `('
io.c:54: warning: type defaults to `int' in declaration of `__v'
io.c:54: warning: data definition has no type or storage class
io.c:54: parse error before `}'
io.c:57: parse error before `('
io.c:65: parse error before `('
io.c:73: parse error before `('
make[3]: *** [io.o] Error 1
make[3]: Leaving directory `/home/joel/Downloads/uClinux-dist/linux-2.4.x/arch/armnommu/mach-dsc21'

别再吹冷风 2021-11-18 01:10:47

自己顶,一定可以解决的。

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文