Кому-нибудь удалось нормально скомпилить ядро Линуха 2.4.22 ???
А то у меня постоянно выдает какие-то ошибки!
Я даже брал оригинальные конфигурационные файлы (.config), поставляемые в пакете с ядром, ничего в них не менял и все-равно ничего не получилось!
Ошибки - в студию!!!
>Ошибки - в студию!!!Возьмем к примеру файлик kernel-2.4.22-i586.config, переименуем в .config и бросим в каталог с исходниками.
make dep clean - без проблем
make bzImage выдает следующее (привожу окончание):gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-1.2154.nptl.asp/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i586 -nostdinc -iwithprefix include -DKBUILD_BASENAME=pid -c -o pid.o pid.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-1.2154.nptl.asp/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i586 -nostdinc -iwithprefix include -DKBUILD_BASENAME=kksymoops -c -o kksymoops.o kksymoops.c
kksymoops.c: In function `print_modules':
kksymoops.c:70: warning: unused variable `i'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-1.2154.nptl.asp/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i586 -nostdinc -iwithprefix include -DKBUILD_BASENAME=uid16 -c -o uid16.o uid16.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-1.2154.nptl.asp/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i586 -nostdinc -iwithprefix include -DKBUILD_BASENAME=ksyms -DEXPORT_SYMTAB -c ksyms.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-1.2154.nptl.asp/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i586 -nostdinc -iwithprefix include -DKBUILD_BASENAME=pm -DEXPORT_SYMTAB -c pm.c
pm.c:61: error: redefinition of `pm_register'
/usr/src/linux-2.4.22-1.2154.nptl.asp/include/linux/pm.h:160: error: `pm_register' previously defined here
pm.c:85: error: redefinition of `pm_unregister'
/usr/src/linux-2.4.22-1.2154.nptl.asp/include/linux/pm.h:164: error: `pm_unregister' previously defined here
pm.c:114: error: redefinition of `pm_unregister_all'
/usr/src/linux-2.4.22-1.2154.nptl.asp/include/linux/pm.h:166: error: `pm_unregister_all' previously defined here
pm.c:154: error: redefinition of `pm_send'
/usr/src/linux-2.4.22-1.2154.nptl.asp/include/linux/pm.h:169: error: `pm_send' previously defined here
pm.c:233: error: redefinition of `pm_send_all'
/usr/src/linux-2.4.22-1.2154.nptl.asp/include/linux/pm.h:174: error: `pm_send_all' previously defined here
pm.c:276: error: redefinition of `pm_find'
/usr/src/linux-2.4.22-1.2154.nptl.asp/include/linux/pm.h:179: error: `pm_find' previously defined here
make[2]: *** [pm.o] Ошибка 1
make[2]: Выход из каталог `/usr/src/linux-2.4.22-1.2154.nptl.asp/kernel'
make[1]: *** [first_rule] Ошибка 2
make[1]: Выход из каталог `/usr/src/linux-2.4.22-1.2154.nptl.asp/kernel'
make: *** [_dir_kernel] Ошибка 2и все :(
>>Ошибки - в студию!!!
>
>Возьмем к примеру файлик kernel-2.4.22-i586.config, переименуем в .config и бросим в каталог
>с исходниками.
>
>make dep clean - без проблем
>make bzImage выдает следующее (привожу окончание):
>
>gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-1.2154.nptl.asp/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe
>-mpreferred-stack-boundary=2 -march=i586 -nostdinc -iwithprefix include -DKBUILD_BASENAME=pid -c -o
>pid.o pid.c
>gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-1.2154.nptl.asp/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe
>-mpreferred-stack-boundary=2 -march=i586 -nostdinc -iwithprefix include -DKBUILD_BASENAME=kksymoops -c -o
>kksymoops.o kksymoops.c
>kksymoops.c: In function `print_modules':
>kksymoops.c:70: warning: unused variable `i'
>gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-1.2154.nptl.asp/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe
>-mpreferred-stack-boundary=2 -march=i586 -nostdinc -iwithprefix include -DKBUILD_BASENAME=uid16 -c -o
>uid16.o uid16.c
>gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-1.2154.nptl.asp/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe
>-mpreferred-stack-boundary=2 -march=i586 -nostdinc -iwithprefix include -DKBUILD_BASENAME=ksyms -DEXPORT_SYMTAB -c
>ksyms.c
>gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-1.2154.nptl.asp/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe
>-mpreferred-stack-boundary=2 -march=i586 -nostdinc -iwithprefix include -DKBUILD_BASENAME=pm -DEXPORT_SYMTAB -c
>pm.c
>pm.c:61: error: redefinition of `pm_register'
>/usr/src/linux-2.4.22-1.2154.nptl.asp/include/linux/pm.h:160: error: `pm_register' previously defined here
>pm.c:85: error: redefinition of `pm_unregister'
>/usr/src/linux-2.4.22-1.2154.nptl.asp/include/linux/pm.h:164: error: `pm_unregister' previously defined here
>pm.c:114: error: redefinition of `pm_unregister_all'
>/usr/src/linux-2.4.22-1.2154.nptl.asp/include/linux/pm.h:166: error: `pm_unregister_all' previously defined here
>pm.c:154: error: redefinition of `pm_send'
>/usr/src/linux-2.4.22-1.2154.nptl.asp/include/linux/pm.h:169: error: `pm_send' previously defined here
>pm.c:233: error: redefinition of `pm_send_all'
>/usr/src/linux-2.4.22-1.2154.nptl.asp/include/linux/pm.h:174: error: `pm_send_all' previously defined here
>pm.c:276: error: redefinition of `pm_find'
>/usr/src/linux-2.4.22-1.2154.nptl.asp/include/linux/pm.h:179: error: `pm_find' previously defined here
>make[2]: *** [pm.o] Ошибка 1
>make[2]: Выход из каталог `/usr/src/linux-2.4.22-1.2154.nptl.asp/kernel'
>make[1]: *** [first_rule] Ошибка 2
>make[1]: Выход из каталог `/usr/src/linux-2.4.22-1.2154.nptl.asp/kernel'
>make: *** [_dir_kernel] Ошибка 2
>
>и все :(
дистр я так понимаю ASP ?ядро компилится так :
make mrproper - приводит ядро к нормальному виду
make menuconfig
make dep &&make clean &&make bzImage &&make modules &&make modules_installда и для редхат подобных дистров следует делать симлинк /usr/src/linux на дир где лежат исходники .
Уже давно (на kernel.org) валяются исходники с номером 2.4.27 (http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.27.tar...) - попытайся их скольпильнуть...
>>>Ошибки - в студию!!!
>>
>>Возьмем к примеру файлик kernel-2.4.22-i586.config, переименуем в .config и бросим в каталог
>>с исходниками.
>>
>>make dep clean - без проблем
>>make bzImage выдает следующее (привожу окончание):
>>
>>gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-1.2154.nptl.asp/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe
>>-mpreferred-stack-boundary=2 -march=i586 -nostdinc -iwithprefix include -DKBUILD_BASENAME=pid -c -o
>>pid.o pid.c
>>gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-1.2154.nptl.asp/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe
>>-mpreferred-stack-boundary=2 -march=i586 -nostdinc -iwithprefix include -DKBUILD_BASENAME=kksymoops -c -o
>>kksymoops.o kksymoops.c
>>kksymoops.c: In function `print_modules':
>>kksymoops.c:70: warning: unused variable `i'
>>gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-1.2154.nptl.asp/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe
>>-mpreferred-stack-boundary=2 -march=i586 -nostdinc -iwithprefix include -DKBUILD_BASENAME=uid16 -c -o
>>uid16.o uid16.c
>>gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-1.2154.nptl.asp/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe
>>-mpreferred-stack-boundary=2 -march=i586 -nostdinc -iwithprefix include -DKBUILD_BASENAME=ksyms -DEXPORT_SYMTAB -c
>>ksyms.c
>>gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-1.2154.nptl.asp/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe
>>-mpreferred-stack-boundary=2 -march=i586 -nostdinc -iwithprefix include -DKBUILD_BASENAME=pm -DEXPORT_SYMTAB -c
>>pm.c
>>pm.c:61: error: redefinition of `pm_register'
>>/usr/src/linux-2.4.22-1.2154.nptl.asp/include/linux/pm.h:160: error: `pm_register' previously defined here
>>pm.c:85: error: redefinition of `pm_unregister'
>>/usr/src/linux-2.4.22-1.2154.nptl.asp/include/linux/pm.h:164: error: `pm_unregister' previously defined here
>>pm.c:114: error: redefinition of `pm_unregister_all'
>>/usr/src/linux-2.4.22-1.2154.nptl.asp/include/linux/pm.h:166: error: `pm_unregister_all' previously defined here
>>pm.c:154: error: redefinition of `pm_send'
>>/usr/src/linux-2.4.22-1.2154.nptl.asp/include/linux/pm.h:169: error: `pm_send' previously defined here
>>pm.c:233: error: redefinition of `pm_send_all'
>>/usr/src/linux-2.4.22-1.2154.nptl.asp/include/linux/pm.h:174: error: `pm_send_all' previously defined here
>>pm.c:276: error: redefinition of `pm_find'
>>/usr/src/linux-2.4.22-1.2154.nptl.asp/include/linux/pm.h:179: error: `pm_find' previously defined here
>>make[2]: *** [pm.o] Ошибка 1
>>make[2]: Выход из каталог `/usr/src/linux-2.4.22-1.2154.nptl.asp/kernel'
>>make[1]: *** [first_rule] Ошибка 2
>>make[1]: Выход из каталог `/usr/src/linux-2.4.22-1.2154.nptl.asp/kernel'
>>make: *** [_dir_kernel] Ошибка 2
>>
>>и все :(
>
>
>дистр я так понимаю ASP ?
>
>ядро компилится так :
>
>make mrproper - приводит ядро к нормальному виду
>make menuconfig
>make dep &&make clean &&make bzImage &&make modules &&make modules_install
>
>да и для редхат подобных дистров следует делать симлинк /usr/src/linux на дир
>где лежат исходники .
Огромное спасибо!!!
Теперь компилируется нормально!