+ -
当前位置:首页 → 问答吧 → 怎么卸载新安装的2.6.37内核?

怎么卸载新安装的2.6.37内核?

时间:2009-09-25

来源:互联网

按照实验指导书所给的步骤,打上了lpc2200的补丁之后要进行uCLinux和文件系统的配置,首先要通过文本菜单方式配置uCLinux:
make menuconfig
这一步执行的没有任何问题,设置了处理器型号,内核版本和函数库版本就行了,然后就是建立源代码之间的依赖关系:
make dep
这一步也没有任何问题,关键在下一步,编译内核:
make
执行这个命令后本应该在终端所在目录生成两个文件系统目录的,结果出错了,提示是:
arm-elf-gcc -D__KERNEL__ -I/usr/src/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__ -g -DNO_MM -mapcs-32 -mtune=arm7tdmi -mshort-load-bytes -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] 错误 1
make[3]:正在离开目录 `/usr/src/uClinux-dist/linux-2.4.x/arch/armnommu/mach-dsc21'
make[2]: *** [first_rule] 错误 2
make[2]:正在离开目录 `/usr/src/uClinux-dist/linux-2.4.x/arch/armnommu/mach-dsc21'
make[1]: *** [_dir_arch/armnommu/mach-dsc21] 错误 2
make[1]:正在离开目录 `/usr/src/uClinux-dist/linux-2.4.x'
make: *** [linux] 错误 1
我查看了IO.C文件,并没有发现提示所说的 错误,请问这是怎呒么回事,该如何解决 ?
谢谢! 比较急,在线等

作者: letfly   发布时间: 2009-09-25

我的机子上默认的是gcc4.4.1版本的编译器,这就是那个有语法错误的io.c文件,请问该如何修改才能避免gcc4.4.1报错?
#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);
}

作者: letfly   发布时间: 2009-09-26

你好,我也碰到了与你一样的问题,不知道你是否已经解决了啊?

作者: runcoder   发布时间: 2011-02-13