ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Sviatoslav Sviridov <svd@ns1.lintec.minsk.by>
To: devel@linux.iplabs.ru
Subject: [devel] kernel headers
Date: Mon, 08 Jan 2001 16:50:41 +0200
Message-ID: <3A59D3C1.2070903@lintec.minsk.by> (raw)

[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]

День добрый!

Захотел я установить custom-kernel "по правилам" - собрать .rpm и из 
него поставить ядро...
Вылезли неприятности с
<linux/autoconf.h>
<linux/modversions.h>
<linux/version.h>
/boot/kernel.h
В <linux/*.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]

[-- Attachment #2: autoconf.diff --]
[-- Type: text/plain, Size: 2281 bytes --]

--- /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 <linux/autoconf-up.h>
-#define __rh_autoconf_included_file__ 1
-#endif /* __BOOT_KERNEL_UP */
-
-#if defined(__BOOT_KERNEL_FB) && (__BOOT_KERNEL_FB == 1)
-#include <linux/autoconf-fb.h>
-#define __rh_autoconf_included_file__ 1
-#endif /* __BOOT_KERNEL_FB */
-
-#if defined(__BOOT_KERNEL_SMP) && (__BOOT_KERNEL_SMP == 1)
-#include <linux/autoconf-smp.h>
-#define __rh_autoconf_included_file__ 1
-#endif /* __BOOT_KERNEL_SMP */
-
-#if defined(__BOOT_KERNEL_SECURE) && (__BOOT_KERNEL_SECURE == 1)
-#include <linux/autoconf-secure.h>
-#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 <linux/autoconf-BOOT.h>
-#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 <linux/autoconf-BOOTsmp.h>
 #define __rh_autoconf_included_file__ 1
-#endif /* __BOOT_KERNEL_BOOTSMP */
 
-#if defined(__BOOT_KERNEL_LDV) && (__BOOT_KERNEL_LDV == 1)
-#include <linux/autoconf-LDV.h>
-#define __rh_autoconf_included_file__ 1
-#endif /* __BOOT_KERNEL_LDV */
-
-#if defined(__BOOT_KERNEL_HQ) && (__BOOT_KERNEL_HQ == 1)
-#include <linux/autoconf-HQ.h>
-#define __rh_autoconf_included_file__ 1
-#endif /* __BOOT_KERNEL_HQ */
-
-#if defined(__BOOT_KERNEL_SOHO) && (__BOOT_KERNEL_SOHO == 1)
-#include <linux/autoconf-soho.h>
-#define __rh_autoconf_included_file__ 1
-#endif /* __BOOT_KERNEL_SOHO */
-
-#if defined(__BOOT_KERNEL_CUSTOM) && (__BOOT_KERNEL_CUSTOM == 1)
-#include <linux/autoconf-custom.h>
-#define __rh_autoconf_included_file__ 1
-#endif /* __BOOT_KERNEL_CUSTOM */
+#endif /* __BOOT_KERNEL_CURRENT */
 
 #if !defined(__rh_autoconf_included_file__)
 #include <linux/autoconf-up.h>

[-- Attachment #3: kheader.diff --]
[-- Type: text/plain, Size: 1410 bytes --]

--- /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	<linux/autoconf$k.h>
 #endif
 
-#ifndef __BOOT_KERNEL_HQ
-#define __BOOT_KERNEL_HQ	$HQ
+#ifndef __BOOT_KERNEL_MODVERSIONS_CURRENT
+#define __BOOT_KERNEL_MODVERSIONS_CURRENT	<linux/modversions$k.h>
 #endif
 
-#ifndef __BOOT_KERNEL_SOHO
-#define __BOOT_KERNEL_SOHO	$SOHO
+#ifndef __BOOT_KERNEL_VERSION_CURRENT
+#define __BOOT_KERNEL_VERSION_CURRENT	<linux/version$k.h>
 #endif
 
 #endif

[-- Attachment #4: modversions.diff --]
[-- Type: text/plain, Size: 2367 bytes --]

--- /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 <linux/modversions-up.h>
-#define __rh_modversion_included_file__ 1
-#endif /* __BOOT_KERNEL_UP */
-
-#if defined(__BOOT_KERNEL_FB) && (__BOOT_KERNEL_FB == 1)
-#include <linux/modversions-fb.h>
-#define __rh_modversion_included_file__ 1
-#endif /* __BOOT_KERNEL_FB */
-
-#if defined(__BOOT_KERNEL_SMP) && (__BOOT_KERNEL_SMP == 1)
-#include <linux/modversions-smp.h>
-#define __rh_modversion_included_file__ 1
-#endif /* __BOOT_KERNEL_SMP */
-
-#if defined(__BOOT_KERNEL_SECURE) && (__BOOT_KERNEL_SECURE == 1)
-#include <linux/modversions-secure.h>
-#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 <linux/modversions-BOOT.h>
-#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 <linux/modversions-BOOTsmp.h>
 #define __rh_modversion_included_file__ 1
-#endif /* __BOOT_KERNEL_BOOTSMP */
 
-#if defined(__BOOT_KERNEL_LDV) && (__BOOT_KERNEL_LDV == 1)
-#include <linux/modversions-LDV.h>
-#define __rh_modversion_included_file__ 1
-#endif /* __BOOT_KERNEL_LDV */
-
-#if defined(__BOOT_KERNEL_HQ) && (__BOOT_KERNEL_HQ == 1)
-#include <linux/modversions-HQ.h>
-#define __rh_modversion_included_file__ 1
-#endif /* __BOOT_KERNEL_HQ */
-
-#if defined(__BOOT_KERNEL_SOHO) && (__BOOT_KERNEL_SOHO == 1)
-#include <linux/modversions-soho.h>
-#define __rh_modversion_included_file__ 1
-#endif /* __BOOT_KERNEL_SOHO */
-
-#if defined(__BOOT_KERNEL_CUSTOM) && (__BOOT_KERNEL_CUSTOM == 1)
-#include <linux/modversions-custom.h>
-#define __rh_modversion_included_file__ 1
-#endif /* __BOOT_KERNEL_CUSTOM */
+#endif /* __BOOT_KERNEL_MODVERSIONS_CURRENT */
 
 #if !defined(__rh_modversion_included_file__)
 #include <linux/modversions-up.h>

[-- Attachment #5: version.diff --]
[-- Type: text/plain, Size: 2237 bytes --]

--- /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 <linux/version-up.h>
-#define __rh_version_included_file__ 1
-#endif /* __BOOT_KERNEL_UP */
-
-#if defined(__BOOT_KERNEL_FB) && (__BOOT_KERNEL_FB == 1)
-#include <linux/version-fb.h>
-#define __rh_version_included_file__ 1
-#endif
-
-#if defined(__BOOT_KERNEL_SMP) && (__BOOT_KERNEL_SMP == 1)
-#include <linux/version-smp.h>
-#define __rh_version_included_file__ 1
-#endif /* __BOOT_KERNEL_SMP */
-
-#if defined(__BOOT_KERNEL_SECURE) && (__BOOT_KERNEL_SECURE == 1)
-#include <linux/version-secure.h>
-#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 <linux/version-BOOT.h>
-#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 <linux/version-BOOTsmp.h>
 #define __rh_version_included_file__ 1
-#endif /* __BOOT_KERNEL_BOOTSMP */
 
-#if defined(__BOOT_KERNEL_LDV) && (__BOOT_KERNEL_LDV == 1)
-#include <linux/version-LDV.h>
-#define __rh_version_included_file__ 1
-#endif /* __BOOT_KERNEL_LDV */
-
-#if defined(__BOOT_KERNEL_HQ) && (__BOOT_KERNEL_HQ == 1)
-#include <linux/version-HQ.h>
-#define __rh_version_included_file__ 1
-#endif /* __BOOT_KERNEL_HQ */
-
-#if defined(__BOOT_KERNEL_SOHO) && (__BOOT_KERNEL_SOHO == 1)
-#include <linux/version-soho.h>
-#define __rh_version_included_file__ 1
-#endif /* __BOOT_KERNEL_SOHO */
-
-#if defined(__BOOT_KERNEL_CUSTOM) && (__BOOT_KERNEL_CUSTOM == 1)
-#include <linux/version-custom.h>
-#define __rh_version_included_file__ 1
-#endif /* __BOOT_KERNEL_CUSTOM */
+#endif /* __BOOT_KERNEL_VERSION_CURRENT */
 
 #if !defined(__rh_version_included_file__)
 #include <linux/version-up.h>

             reply	other threads:[~2001-01-08 14:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-08 14:50 Sviatoslav Sviridov [this message]
2001-01-09  0:33 ` Dmitry V. Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A59D3C1.2070903@lintec.minsk.by \
    --to=svd@ns1.lintec.minsk.by \
    --cc=devel@linux.iplabs.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git