From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <3A59D3C1.2070903@lintec.minsk.by> From: Sviatoslav Sviridov Organization: Lintec Project JV User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.18-ipl1mdk-secure1svd i686; en-US; m18) Gecko/20001117 X-Accept-Language: en, ru MIME-Version: 1.0 To: devel@linux.iplabs.ru Content-Type: multipart/mixed; boundary="------------010803000104000409020605" Subject: [devel] kernel headers Sender: devel-admin@linux.iplabs.ru Errors-To: devel-admin@linux.iplabs.ru X-BeenThere: devel@linux.iplabs.ru X-Mailman-Version: 2.0 Precedence: bulk Reply-To: devel@linux.iplabs.ru List-Help: List-Post: List-Subscribe: , List-Id: IPLabs Linux Team Developers mailing list List-Unsubscribe: , List-Archive: X-Original-Date: Mon, 08 Jan 2001 16:50:41 +0200 Date: Mon, 08 Jan 2001 16:50:41 +0200 Archived-At: List-Archive: List-Post: This is a multi-part message in MIME format. --------------010803000104000409020605 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit День добрый! Захотел я установить custom-kernel "по правилам" - собрать .rpm и из него поставить ядро... Вылезли неприятности с /boot/kernel.h В вроде как есть намётки на поддержку custom-ядра, но это никак не согласовано ни с /boot/kernel.h, ни c kernel-*.spec... Да и /etc/init.d/kheader не очень хорошо разбирает какое ядро загружено... В моём случае: За основу конфига брал ...-secure.config, поэтому свой вариант обозвал secure1svd. При установке правильно создались {autoconf,modversions,version}-secure1svd.h... Но! kheader определяет загруженное ядро как "secure". Соответственно ничего из {autoconf,modversions,version}.h не работает :( Я попытался исправить эту ситуацию следующим образом: см. attachments Здесь столкнулся с такой проблемой: пришлось непосредственно перед #include делать "#undef linux", а потом восстанавливать. В противно случае "linux" заменяется на "1"... Это можно как-нить по-другому обойти? Другой вариант - можно необходимые инклуды для {autoconf,modversions,version} генерить из kheader так же как и /boot/kernel.h Что лучше? -- Sviatoslav Sviridov [mailto:svd@lintec.minsk.by] [ICQ#10845380] [Lintec Project] [MLUG] --------------010803000104000409020605 Content-Type: text/plain; name="autoconf.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="autoconf.diff" --- /usr/src/linux/include/linux/autoconf.h.orig Thu Oct 19 16:26:45 2000 +++ /usr/src/linux/include/linux/autoconf.h Mon Jan 8 16:01:06 2001 @@ -21,55 +21,19 @@ #undef __rh_autoconf_included_file__ #endif /* __rh_autoconf_included_file__ */ -#if defined(__BOOT_KERNEL_UP) && (__BOOT_KERNEL_UP == 1) -#include -#define __rh_autoconf_included_file__ 1 -#endif /* __BOOT_KERNEL_UP */ - -#if defined(__BOOT_KERNEL_FB) && (__BOOT_KERNEL_FB == 1) -#include -#define __rh_autoconf_included_file__ 1 -#endif /* __BOOT_KERNEL_FB */ - -#if defined(__BOOT_KERNEL_SMP) && (__BOOT_KERNEL_SMP == 1) -#include -#define __rh_autoconf_included_file__ 1 -#endif /* __BOOT_KERNEL_SMP */ - -#if defined(__BOOT_KERNEL_SECURE) && (__BOOT_KERNEL_SECURE == 1) -#include -#define __rh_autoconf_included_file__ 1 -#endif /* __BOOT_KERNEL_SECURE */ +#if defined(__BOOT_KERNEL_AUTOCONF_CURRENT) -#if defined(__BOOT_KERNEL_BOOT) && (__BOOT_KERNEL_BOOT == 1) -#include -#define __rh_autoconf_included_file__ 1 -#endif /* __BOOT_KERNEL_BOOT */ +#if defined(linux) +#undef linux +#include __BOOT_KERNEL_AUTOCONF_CURRENT +#define linux 1 +#else +#include __BOOT_KERNEL_AUTOCONF_CURRENT +#endif /* linux */ -#if defined(__BOOT_KERNEL_BOOTSMP) && (__BOOT_KERNEL_BOOTSMP == 1) -#include #define __rh_autoconf_included_file__ 1 -#endif /* __BOOT_KERNEL_BOOTSMP */ -#if defined(__BOOT_KERNEL_LDV) && (__BOOT_KERNEL_LDV == 1) -#include -#define __rh_autoconf_included_file__ 1 -#endif /* __BOOT_KERNEL_LDV */ - -#if defined(__BOOT_KERNEL_HQ) && (__BOOT_KERNEL_HQ == 1) -#include -#define __rh_autoconf_included_file__ 1 -#endif /* __BOOT_KERNEL_HQ */ - -#if defined(__BOOT_KERNEL_SOHO) && (__BOOT_KERNEL_SOHO == 1) -#include -#define __rh_autoconf_included_file__ 1 -#endif /* __BOOT_KERNEL_SOHO */ - -#if defined(__BOOT_KERNEL_CUSTOM) && (__BOOT_KERNEL_CUSTOM == 1) -#include -#define __rh_autoconf_included_file__ 1 -#endif /* __BOOT_KERNEL_CUSTOM */ +#endif /* __BOOT_KERNEL_CURRENT */ #if !defined(__rh_autoconf_included_file__) #include --------------010803000104000409020605 Content-Type: text/plain; name="kheader.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="kheader.diff" --- /etc/init.d/kheader.orig Mon Jan 8 09:48:37 2001 +++ /etc/init.d/kheader Mon Jan 8 15:25:21 2001 @@ -26,29 +26,11 @@ HQ=0 SOHO=0 case $k in - *fb*) - FB=1 - ;; - *linus*) - LINUS=1 - ;; - *smp*) - SMP=1 - ;; - *secure*) - SECURE=1 - ;; - *LDV*) - LDV=1 - ;; - *HQ*) - HQ=1 - ;; - *soho*) - SOHO=1 + -*) + CURRENT=$k ;; *) - UP=1 + CURRENT="-up" esac } @@ -60,36 +42,20 @@ #ifndef __BOOT_KERNEL_H_ #define __BOOT_KERNEL_H_ -#ifndef __BOOT_KERNEL_SMP -#define __BOOT_KERNEL_SMP $SMP -#endif - -#ifndef __BOOT_KERNEL_FB -#define __BOOT_KERNEL_FB $FB -#endif - -#ifndef __BOOT_KERNEL_SECURE -#define __BOOT_KERNEL_SECURE $SECURE -#endif - -#ifndef __BOOT_KERNEL_LINUS -#define __BOOT_KERNEL_LINUS $LINUS -#endif - -#ifndef __BOOT_KERNEL_UP -#define __BOOT_KERNEL_UP $UP +#ifndef __BOOT_KERNEL_CURRENT +#define __BOOT_KERNEL_CURRENT $CURRENT #endif -#ifndef __BOOT_KERNEL_LDV -#define __BOOT_KERNEL_LDV $LDV +#ifndef __BOOT_KERNEL_AUTOCONF_CURRENT +#define __BOOT_KERNEL_AUTOCONF_CURRENT #endif -#ifndef __BOOT_KERNEL_HQ -#define __BOOT_KERNEL_HQ $HQ +#ifndef __BOOT_KERNEL_MODVERSIONS_CURRENT +#define __BOOT_KERNEL_MODVERSIONS_CURRENT #endif -#ifndef __BOOT_KERNEL_SOHO -#define __BOOT_KERNEL_SOHO $SOHO +#ifndef __BOOT_KERNEL_VERSION_CURRENT +#define __BOOT_KERNEL_VERSION_CURRENT #endif #endif --------------010803000104000409020605 Content-Type: text/plain; name="modversions.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="modversions.diff" --- /usr/src/linux/include/linux/modversions.h.orig Mon Jan 8 15:09:48 2001 +++ /usr/src/linux/include/linux/modversions.h Mon Jan 8 15:59:11 2001 @@ -21,55 +21,19 @@ #undef __rh_modversion_included_file__ #endif /* __rh_modversion_included_file__ */ -#if defined(__BOOT_KERNEL_UP) && (__BOOT_KERNEL_UP == 1) -#include -#define __rh_modversion_included_file__ 1 -#endif /* __BOOT_KERNEL_UP */ - -#if defined(__BOOT_KERNEL_FB) && (__BOOT_KERNEL_FB == 1) -#include -#define __rh_modversion_included_file__ 1 -#endif /* __BOOT_KERNEL_FB */ - -#if defined(__BOOT_KERNEL_SMP) && (__BOOT_KERNEL_SMP == 1) -#include -#define __rh_modversion_included_file__ 1 -#endif /* __BOOT_KERNEL_SMP */ - -#if defined(__BOOT_KERNEL_SECURE) && (__BOOT_KERNEL_SECURE == 1) -#include -#define __rh_modversion_included_file__ 1 -#endif /* __BOOT_KERNEL_SECURE */ +#if defined(__BOOT_KERNEL_MODVERSIONS_CURRENT) -#if defined(__BOOT_KERNEL_BOOT) && (__BOOT_KERNEL_BOOT == 1) -#include -#define __rh_modversion_included_file__ 1 -#endif /* __BOOT_KERNEL_BOOT */ +#if defined(linux) +#undef linux +#include __BOOT_KERNEL_MODVERSIONS_CURRENT +#define linux 1 +#else +#include __BOOT_KERNEL_MODVERSIONS_CURRENT +#endif /* linux */ -#if defined(__BOOT_KERNEL_BOOTSMP) && (__BOOT_KERNEL_BOOTSMP == 1) -#include #define __rh_modversion_included_file__ 1 -#endif /* __BOOT_KERNEL_BOOTSMP */ -#if defined(__BOOT_KERNEL_LDV) && (__BOOT_KERNEL_LDV == 1) -#include -#define __rh_modversion_included_file__ 1 -#endif /* __BOOT_KERNEL_LDV */ - -#if defined(__BOOT_KERNEL_HQ) && (__BOOT_KERNEL_HQ == 1) -#include -#define __rh_modversion_included_file__ 1 -#endif /* __BOOT_KERNEL_HQ */ - -#if defined(__BOOT_KERNEL_SOHO) && (__BOOT_KERNEL_SOHO == 1) -#include -#define __rh_modversion_included_file__ 1 -#endif /* __BOOT_KERNEL_SOHO */ - -#if defined(__BOOT_KERNEL_CUSTOM) && (__BOOT_KERNEL_CUSTOM == 1) -#include -#define __rh_modversion_included_file__ 1 -#endif /* __BOOT_KERNEL_CUSTOM */ +#endif /* __BOOT_KERNEL_MODVERSIONS_CURRENT */ #if !defined(__rh_modversion_included_file__) #include --------------010803000104000409020605 Content-Type: text/plain; name="version.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="version.diff" --- /usr/src/linux/include/linux/version.h.orig Mon Jan 8 15:09:14 2001 +++ /usr/src/linux/include/linux/version.h Mon Jan 8 15:58:34 2001 @@ -21,55 +21,19 @@ #undef __rh_version_included_file__ #endif /* __rh_version_included_file__ */ -#if defined(__BOOT_KERNEL_UP) && (__BOOT_KERNEL_UP == 1) -#include -#define __rh_version_included_file__ 1 -#endif /* __BOOT_KERNEL_UP */ - -#if defined(__BOOT_KERNEL_FB) && (__BOOT_KERNEL_FB == 1) -#include -#define __rh_version_included_file__ 1 -#endif - -#if defined(__BOOT_KERNEL_SMP) && (__BOOT_KERNEL_SMP == 1) -#include -#define __rh_version_included_file__ 1 -#endif /* __BOOT_KERNEL_SMP */ - -#if defined(__BOOT_KERNEL_SECURE) && (__BOOT_KERNEL_SECURE == 1) -#include -#define __rh_version_included_file__ 1 -#endif /* __BOOT_KERNEL_SECURE */ +#if defined(__BOOT_KERNEL_VERSION_CURRENT) -#if defined(__BOOT_KERNEL_BOOT) && (__BOOT_KERNEL_BOOT == 1) -#include -#define __rh_version_included_file__ 1 -#endif /* __BOOT_KERNEL_BOOT */ +#if defined(linux) +#undef linux +#include __BOOT_KERNEL_VERSION_CURRENT +#define linux 1 +#else +#include __BOOT_KERNEL_VERSION_CURRENT +#endif /* linux */ -#if defined(__BOOT_KERNEL_BOOTSMP) && (__BOOT_KERNEL_BOOTSMP == 1) -#include #define __rh_version_included_file__ 1 -#endif /* __BOOT_KERNEL_BOOTSMP */ -#if defined(__BOOT_KERNEL_LDV) && (__BOOT_KERNEL_LDV == 1) -#include -#define __rh_version_included_file__ 1 -#endif /* __BOOT_KERNEL_LDV */ - -#if defined(__BOOT_KERNEL_HQ) && (__BOOT_KERNEL_HQ == 1) -#include -#define __rh_version_included_file__ 1 -#endif /* __BOOT_KERNEL_HQ */ - -#if defined(__BOOT_KERNEL_SOHO) && (__BOOT_KERNEL_SOHO == 1) -#include -#define __rh_version_included_file__ 1 -#endif /* __BOOT_KERNEL_SOHO */ - -#if defined(__BOOT_KERNEL_CUSTOM) && (__BOOT_KERNEL_CUSTOM == 1) -#include -#define __rh_version_included_file__ 1 -#endif /* __BOOT_KERNEL_CUSTOM */ +#endif /* __BOOT_KERNEL_VERSION_CURRENT */ #if !defined(__rh_version_included_file__) #include --------------010803000104000409020605-- _______________________________________________ Devel mailing list Devel@linux.iplabs.ru http://www.logic.ru/mailman/listinfo/devel