Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[S]Kernel ohne genkernel kompilieren?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
platinumviper
l33t
l33t


Joined: 12 Feb 2004
Posts: 647
Location: Munich, Germany

PostPosted: Sat Sep 15, 2012 2:20 am    Post subject: Reply with quote

Tinitus wrote:
Hallo,

ich habe es mal mit localmodeconfig versucht. Das hat geklappt.
Da meine verzeichnisse über mehrere Partitionen verteilt sind brauchte ich doch noch eine initrd. Deshalb konnte ich auch die Einträge in der menu.lst belassen.

Wenn die verwendeten Filesysteme fest einkompiliert sind, sollte eigentlich keine RAM-Disk nötig sein. Aber schön, das es geklappt hat. Jetzt ist eine gute Gelegenheit eine boot-fähige CD zu erzeugen: "make FDINITRD=/Pfad/zu/deiner/RAM-Disk isoimage", damit kannst du unter Umgehung des Boot-Managers direkt booten. Es soll ja bösartige Betriebssysteme geben, die als allererstes den Bootmanager massakrieren. ;-)
_________________
No money back garantee. In case of problems, don't call us, we call you.
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1921
Location: Schweiz

PostPosted: Thu Oct 04, 2012 6:20 am    Post subject: Reply with quote

Nun platinumviper ich habe es jetzt mal testweise so gemacht wie du das vorschlägst und siehe da schon das erste Paket das mit dieser Vorgehensweise offensichtlich nicht ganz einverstanden ist:
Code:
>>> Emerging (5 of 7) www-client/chromium-23.0.1271.10-r1
 * Fetching files in the background. To view fetch progress, run
 * `tail -f /var/log/emerge-fetch.log` in another terminal.
 * chromium-23.0.1271.10.tar.bz2 SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                            [ ok ]
 * Determining the location of the kernel source code
 * Unable to find kernel sources at /usr/src/linux
 * Please make sure that /usr/src/linux points at your running kernel,
 * (or the kernel you wish to build against).
 * Alternatively, set the KERNEL_DIR environment variable to the kernel sources location
 * Unable to calculate Linux Kernel version for build, attempting to use running version
 * Found kernel object directory:
 *     /home/schmidicom/Downloads/linux-3.5.4
 * Found sources for kernel version:
 *     3.5.4
 * Checking for suitable kernel configuration options...                                                                                                         [ ok ]
 * bindist disabled: Resulting binaries may not be legal to re-distribute.

Es hat den Kernel letzten Endes zwar doch gefunden aber gemerkt wurde trotzdem.
_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Thu Oct 04, 2012 10:09 am    Post subject: Reply with quote

schmidicom wrote:
Code:
 * Alternatively, set the KERNEL_DIR environment variable to the kernel sources location

Warum tust Du das nicht?
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1921
Location: Schweiz

PostPosted: Thu Oct 04, 2012 11:03 am    Post subject: Reply with quote

mv wrote:
schmidicom wrote:
Code:
 * Alternatively, set the KERNEL_DIR environment variable to the kernel sources location

Warum tust Du das nicht?

Weil es nicht nötig sein sollte?
_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Thu Oct 04, 2012 3:20 pm    Post subject: Reply with quote

schmidicom wrote:
Weil es nicht nötig sein sollte?

Selbstverständlich ist es nötig: Ebuilds, die kernel-Module bauen oder Details der Kernel-Version oder -Konfiguration übrprüfen, müssen das Kernel-Directory kennen. Der Name dieses Directories sollte auch die Hauptversionsnummer beinhalten.
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1921
Location: Schweiz

PostPosted: Thu Oct 04, 2012 4:10 pm    Post subject: Reply with quote

mv wrote:
schmidicom wrote:
Weil es nicht nötig sein sollte?

Selbstverständlich ist es nötig: Ebuilds, die kernel-Module bauen oder Details der Kernel-Version oder -Konfiguration übrprüfen, müssen das Kernel-Directory kennen. Der Name dieses Directories sollte auch die Hauptversionsnummer beinhalten.

Ich dachte genau dafür wären die beiden symlinks da die von "make modules_install" im dem Verzeichnis angelegt werden wo auch die Module liegen.
_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW
Back to top
View user's profile Send private message
platinumviper
l33t
l33t


Joined: 12 Feb 2004
Posts: 647
Location: Munich, Germany

PostPosted: Fri Oct 05, 2012 12:53 am    Post subject: Reply with quote

Wenn du mit dem neuen Kernel gebootet hast ist alles OK, dann reichen die Symlinks. Wenn du vor dem booten noch etwas kompilieren musst, z.B. nvidia-drivers, dann zeigt /lib/modules/`uname -r`/source auf die Sourcen des aktuellen Kernels und nicht auf die Sourcen des neuen Kernels, für den du eigentlich kompilieren willst. In dem Fall brauchst du die Variable $KERNEL_DIR. Ich habe beide in /etc/profile stehen.
_________________
No money back garantee. In case of problems, don't call us, we call you.
Back to top
View user's profile Send private message
bell
Guru
Guru


Joined: 27 Nov 2007
Posts: 508

PostPosted: Fri Oct 05, 2012 6:04 am    Post subject: Reply with quote

Normalerweise gehen alle Ebuilds auf den Symlink /usr/src/linux der auf den Kernel gesetzt sein sollte. KERNEL_DIR braucht man nur wenn man seinen kernel wo anders hat.
Quote:
* Unable to find kernel sources at /usr/src/linux
* Please make sure that /usr/src/linux points at your running kernel,

Also setze mal den Symlink sauber
Code:
eselect kernel list
eselect kernel set ..
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Fri Oct 05, 2012 6:48 am    Post subject: Reply with quote

bell wrote:
Normalerweise gehen alle Ebuilds auf den Symlink /usr/src/linux der auf den Kernel gesetzt sein sollte.

Es ging in dem Thread darum, dass die Existenz dieses Symlinks nicht unbedingt eine gute Idee ist, und z.B. von Kernel-Upstream explizit davon abgeraten wird.
Vor allem, wenn man selbst Ebuilds schreibt oder Sachen installiert, die nicht im Gentoo-Baum sind, will man zur Kontrolle gerne sicher stellen, dass diese nicht "hart" von /usr/src/linux abhängen.
Back to top
View user's profile Send private message
bell
Guru
Guru


Joined: 27 Nov 2007
Posts: 508

PostPosted: Fri Oct 05, 2012 6:56 am    Post subject: Reply with quote

Naja, wenn man LFS fährt, dann kann man selbst entscheiden wo der Kernel liegt und auch die Empfehlung befolgen nur als User zu kompilieren. In Gentoo ist es jedoch anders vorgesehen.
Wenn Du eigene Ebuilds schreibst, so solltest Du auch das linux-mod.eclass nutzen. Dort wird das KERNEL_DIR verwaltet.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Mon Oct 22, 2012 8:30 pm    Post subject: Reply with quote

bell wrote:
In Gentoo ist es jedoch anders vorgesehen.

KBUILD_OUTPUT wird von Gentoo vollkommen unterstützt.
Back to top
View user's profile Send private message
bell
Guru
Guru


Joined: 27 Nov 2007
Posts: 508

PostPosted: Tue Oct 23, 2012 7:57 am    Post subject: Reply with quote

Gut zu wissen. Danke mv. Ich habe KBUILD_OUTPUT noch in keiner einzigen Dokumentation / Howto gesehen. Daher ist die "Standard"-Vorgehensweise für mich als root im /usr/src zu kompilieren. Die Systemwartung sehe ich auch als eine Aufgabe von "root". Daher passt es. Aber gut zu wissen dass es eine Möglichkeit gibt als normaler User einen Kernel zu kompilieren, der als "root:root" auf der Platte liegt.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum