Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOWTO] Reiser4 per Gentoo-dev-source o Vanilla-sources
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools)
View previous topic :: View next topic  
Author Message
Dhaki
Guru
Guru


Joined: 16 Jun 2004
Posts: 325
Location: Ticino - CH

PostPosted: Sat Feb 19, 2005 9:11 pm    Post subject: [HOWTO] Reiser4 per Gentoo-dev-source o Vanilla-sources Reply with quote

Anche se io personalmente uso i morph-sources, ho pensato che a qualcuno sarebbe interessato poter usare reiser4 con i gentoo-dev-sources o i vanilla, e ho quindi tradotto questo HOWTO.
-----------------------------------------------
Io, come altre persone, voglio realmente il supporto a reiser nel kernel linux.
Sono stato forzatamente costretto a usare i kernel patchati come mm o ck sources, che sono un pò instabili per i miei gusti.
Ho quindi fatto qualche ebuild per permettere ad altri utenti di patchare facilmente i gentoo-dev-soruce o i vanilla-sources per avere reiser4.

Ecco come.

STEP 1: Impostare il portage overlay

Controlla di avere PORTDIR_OVERLAY=/usr/local/portage impostato nel tuo make.conf. Usa il tuo favorito editor per aggiungere questa linea se fosse il caso.

Adesso configuriamo l'albero delle directory nel nostra overlay directory come descritto nell'handbook.

Vanilla-sources
Code:
mkdir /usr/local/portage
mkdir /usr/local/portage/sys-kernel
mkdir /usr/local/portage/sys-kernel/reiser4-sources
mkdir /usr/local/portage/sys-kernel/reiser4-sources/files


Gentoo-dev-sources
Code:
mkdir /usr/local/portage
mkdir /usr/local/portage/sys-kernel
mkdir /usr/local/portage/sys-kernel/reiser4-gentoo-dev-sources
mkdir /usr/local/portage/sys-kernel/reiser4-gentoo-dev-sources/files


STEP 2: Creare gli ebuild e i file di portage

Adesso siamo pronti per creare i nostri ebuild.
Dobbiamo creare il file nella corretta directory per la versione che vogliamo.

Vanilla source code
Nella cartella /usr/local/portage/sys-kernel/reiser4-sources crea un file chiamato reiser4-sources-2.6.10-r1.ebuild
Questo file conterrà il codice riportato sotto.

NB: Il codice dell'ebuild funziona attualmente per una delle seguenti versioni del kernel:
2.6.9-r1
2.6.9-r2
2.6.9-r3
2.6.9-r4
2.6.10-r1

Descriverò adesso l'ebuild per il kernel 2.6.10-r1. Se si vuole patchare un altra versione, é sufficente cambiare il nome nella versione desiderata ( per esempio, mettendo reiser4-sources-2.6.9-r1.ebuild ma lasciando il contenuto dell'ebuild uguale, verrà patchato il kernel 2.6.9-r1)

reiser4-sources-2.6.10-r1.ebuild
Code:
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

UNIPATCH_LIST="${DISTDIR}/reiser4-for-$(TEMP=${KV/reiser4/};echo ${TEMP/-0/}).gz"
K_PREPATCHED="yes"
UNIPATCH_STRICTORDER="yes"

K_NOUSENAME="yes"
ETYPE="sources"
inherit kernel-2
detect_version
IUSE=""

DESCRIPTION="Standard vanilla kernel, patched for reiser4 support"
HOMEPAGE="http:://www.namesys.com/"
SRC_URI="${KERNEL_URI} ftp://ftp.namesys.com/pub/reiser4-for-2.6/${KV%%-reiser4*}/reiser4-for-$(TEMP=${KV/reiser4/};echo ${TEMP/-0/}).gz"

KEYWORDS="~x86 ~amd64"

pkg_postinst() {
   postinst_sources

   ewarn "IMPORTANT:"
   ewarn "The reiser4 filesystem is not concidered stable in linux yet. The filesystem is considered stable though."
   ewarn "ALWAYS keep a second stable and bootable kernel apart in your boot manager. Do NOT use reiser4 for your /boot"
   ewarn "partition unless you really know what you are doing... even then I do not recommend it."
   echo
   ewarn "Make sure that 4Kb stacks are turned OFF in the kernel. Found under kernel hacking subsection in the kernel config"
   echo
}


Adesso bisogna creare il digest dell'ebuild nel portage. Questo creerà il nostro metadata file per il nuovo ebuild

Code:
ebuild /usr/local/portage/sys-kernel/reiser4-sources/reiser4-sources-2.6.10-r1.ebuild digest


Dovresti vedere qualche download. Probabilmente riceverai degli errori nel downlaod, dato che cerca nei mirror di default prima.

Successo. Dovresti vedere i tuo file nel portage adesso. Proviamoli!

Code:
emerge -s reiser4-sources



Gentoo-dev-sources
Nella cartella /usr/local/portage/sys-kernel/reiser4-gentoo-dev-sources crea un file chiamato reiser4-gentoo-dev-sources-2.6.10-r1.ebuild
Il file conterrà il codice riportato sotto.

Sililmente ai vanilla kernel, questo ebuild può funzionare con altre versioni dei gentoo-dev-kernel benché non sia stato testato. Per farlo semplicemente cambia il nome dell'ebuild e segui gli altri punti.

reiser4-gentoo-dev-sources-2.6.10-r7.ebuild
Code:
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

ETYPE="sources"
IUSE="ultra1"
inherit kernel-2
detect_version
detect_arch

#version of gentoo patchset
GPV="10.08"
GPV_SRC="mirror://gentoo/genpatches-${KV_MAJOR}.${KV_MINOR}-${GPV}-base.tar.bz2
   mirror://gentoo/genpatches-${KV_MAJOR}.${KV_MINOR}-${GPV}-extras.tar.bz2"

KEYWORDS="~x86 ~ppc ~amd64 ~ppc64"

HOMEPAGE="http://dev.gentoo.org/~dsd/gentoo-dev-sources"

UNIPATCH_LIST="${DISTDIR}/genpatches-${KV_MAJOR}.${KV_MINOR}-${GPV}-base.tar.bz2
          ${DISTDIR}/genpatches-${KV_MAJOR}.${KV_MINOR}-${GPV}-extras.tar.bz2
          ${DISTDIR}/reiser4-for-${KV/-reiser4*/-1}.gz"
UNIPATCH_DOCS="${WORKDIR}/patches/genpatches-${KV_MAJOR}.${KV_MINOR}-${GPV}/0000_README"

DESCRIPTION="Full sources including the gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree and extra patches for reiser4 support"
SRC_URI="${KERNEL_URI} ${GPV_SRC} ${ARCH_URI} ftp://ftp.namesys.com/pub/reiser4-for-${KV_MAJOR}.${KV_MINOR}/${KV%%-reiser4*}/reiser4-for-${KV/-reiser4*/-1}.gz"

pkg_setup() {
   if use sparc; then
      # hme lockup hack on ultra1
      use ultra1 || UNIPATCH_EXCLUDE="${UNIPATCH_EXCLUDE} 1399_sparc-U1-hme-lockup.patch"
   fi
}

pkg_postinst() {
   postinst_sources

   echo

   if [ "${ARCH}" = "sparc" ]; then
      if [ x"`cat /proc/openprom/name 2>/dev/null`" \
          = x"'SUNW,Ultra-1'" ]; then
         einfo "For users with an Enterprise model Ultra 1 using the HME"
         einfo "network interface, please emerge the kernel using the"
         einfo "following command: USE=ultra1 emerge ${PN}"
      fi
   fi
   einfo "For more info on this patchset, and how to report problems, see:"
   einfo "${HOMEPAGE}"
   
   echo
   echo
   ewarn "IMPORTANT:"
   ewarn "The reiser4 filesystem is not concidered stable in linux yet. The filesystem"
   ewarn "is very much usable though."
   ewarn "ALWAYS keep a second stable and bootable kernel apart in your boot manager."
   ewarn "Do NOT use reiser4 for your /boot partition unless you really know what you"
   ewarn "are doing... even then I do not recommend it."
   echo
   ewarn "Make sure that 4Kb stacks are turned OFF in the kernel. Found under kernel hacking subsection in the kernel config"
   echo
   
}


Adesso bisogna creare il digest dell'ebuild nel portage. Questo creerà il nostro metadata file per il nuovo ebuild

Code:
ebuild /usr/local/portage/sys-kernel/reiser4-gentoo-dev-sources/reiser4-gentoo-dev-sources-2.6.10-r1.ebuild digest


Dovresti vedere qualche download. Probabilmente riceverai degli errori nel downlaod, dato che cerca nei mirror di default prima.

Successo. Dovresti vedere i tuo file nel portage adesso. Proviamoli!

Code:
emerge -s reiser4-gentoo-devsources


STEP 3: Emergi i nuovi file
Se tutto é andato bene dovremmo poter semplicemente emergere i nuovi sources ai quali verrebbero applicate le patch

Vanilla-sources
Code:
ACCEPT_KEYWORDS="~x86" emerge reiser4-sources


Gentoo-dev-sources
Code:
ACCEPT_KEYWORDS="~x86" emerge reiser4-gentoo-dev-sources


Adesso creiamo un nuovo symlink per la directory dei sorgenti
Vanilla-sources
Code:
cd /usr/src/
 rm -i linux
ln -s linux-2.6.10-reiser41 linux
cd linux
make menuconfig


Gentoo-dev-sources
Code:
cd /usr/src/
 rm -i linux
ln -s linux-2.6.10-reiser4-r7 linux
cd linux
make menuconfig


Ci sono altri howto per configurare il kernel

Non dimenticare di disattivare "4Kb stacking" nel kernel (nella sottosezione "Kernel hacking" nella configurazione del kernel)

Dopo aver finito di configurare controlla che /boot sia montato
[code]mount /boot[code]

Complila e installa il tuo nuovo kernel
[code]make; make modules_install; make install[/code]

Modifica il tuo grub.conf (o lilo.conf) per controllare che puoi ancora avviare con il tuo vecchio kernel.
Ci sono altri howto per fare questo.

Tempo di reboot!

Have fun!
Back to top
View user's profile Send private message
Dhaki
Guru
Guru


Joined: 16 Jun 2004
Posts: 325
Location: Ticino - CH

PostPosted: Sat Feb 19, 2005 9:13 pm    Post subject: Reply with quote

Perdonatemi ho postato due volte... Qualche mod potrebbe cancellare l'altro 3d? Grazie
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Sat Feb 19, 2005 9:21 pm    Post subject: Reply with quote

Dhaki wrote:
Perdonatemi ho postato due volte... Qualche mod potrebbe cancellare l'altro 3d? Grazie


Ehmmm non per dire ma dovresti essere in grado di farlo da solo clicckando sulla "x" a fianco al bottone di edit :roll:
_________________
Ciao da me!
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Sat Feb 19, 2005 9:24 pm    Post subject: Reply with quote

L'ho tolto io visto che credo che per stasera non l'avrebbe fatto.
_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
btbbass
Apprentice
Apprentice


Joined: 15 Feb 2005
Posts: 287
Location: Asti o Torino

PostPosted: Fri Mar 18, 2005 7:08 pm    Post subject: Reply with quote

Ciao, in questi giorni sono usciti i gentoo-dev-sources-2.6.11-r4... la patch è applicabile anche a questo kernel?
_________________
Chi dice che è impossibile non interrompa chi lo sta facendo

-Proverbio Cinese -
___________________________________
Back to top
View user's profile Send private message
emix
Veteran
Veteran


Joined: 30 Nov 2003
Posts: 1014

PostPosted: Fri Mar 18, 2005 7:19 pm    Post subject: Reply with quote

btbbass wrote:
Ciao, in questi giorni sono usciti i gentoo-dev-sources-2.6.11-r4... la patch è applicabile anche a questo kernel?

Purtroppo no, perché non sono state rilasciate le patch per i kernel vanilla della serie 2.6.11. In questi giorni proverò ad usare le patch relative a reiser4 presenti negli mm-sources, e vediamo che succede :wink:
Back to top
View user's profile Send private message
btbbass
Apprentice
Apprentice


Joined: 15 Feb 2005
Posts: 287
Location: Asti o Torino

PostPosted: Fri Mar 18, 2005 7:24 pm    Post subject: Reply with quote

Ah, ok... mi interessava soprattutto per poter mettere il portage in un fs raiser4 per poter risparmiar spazio prezioso, così come scritto da xcris... Nn resta che aspettare :?
_________________
Chi dice che è impossibile non interrompa chi lo sta facendo

-Proverbio Cinese -
___________________________________
Back to top
View user's profile Send private message
emix
Veteran
Veteran


Joined: 30 Nov 2003
Posts: 1014

PostPosted: Fri Mar 18, 2005 9:45 pm    Post subject: Reply with quote

Allora, ho provato ed è possibile patchare i development-sources (e quindi anche i gentoo-dev-sources) con le patch per reiser4 presenti sui nitro-sources (prese dal ramo -mm). Basta scaricare le patch:

- reiser4_from_2.6.11-mm3
- reiser4-update.patch

e applicarle in quest'ordine col comando (da eseguire all'interno della directory dei sorgenti del kernel):
Code:
# cat <file_di_patch> | patch -p1


Se non ho scritto qualche stupidata dovrebbe andare tutto bene :wink:
Back to top
View user's profile Send private message
btbbass
Apprentice
Apprentice


Joined: 15 Feb 2005
Posts: 287
Location: Asti o Torino

PostPosted: Sat Mar 19, 2005 10:47 am    Post subject: Reply with quote

Danke!!
Proverò subito!!
_________________
Chi dice che è impossibile non interrompa chi lo sta facendo

-Proverbio Cinese -
___________________________________
Back to top
View user's profile Send private message
_sys/sid
Guru
Guru


Joined: 27 Aug 2004
Posts: 346
Location: Asola (Mantova)

PostPosted: Tue Mar 22, 2005 6:32 pm    Post subject: Reply with quote

E' uscito il 2.6.11
ftp://ftp.namesys.com/pub/reiser4-for-2.6/
_________________
http://th30z.netsons.org/
Back to top
View user's profile Send private message
_sys/sid
Guru
Guru


Joined: 27 Aug 2004
Posts: 346
Location: Asola (Mantova)

PostPosted: Sun Apr 03, 2005 4:51 pm    Post subject: Gentoo Sources 2.6.11-r5 + Reiser4 Reply with quote

Gentoo Sources 2.6.11-r5 + Reiser4
Code:

# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

ETYPE="sources"
IUSE="ultra1"
inherit kernel-2
detect_version
detect_arch

#version of gentoo patchset
GPV="11.05"
GPV_SRC="mirror://gentoo/genpatches-${KV_MAJOR}.${KV_MINOR}-${GPV}-base.tar.bz2
   mirror://gentoo/genpatches-${KV_MAJOR}.${KV_MINOR}-${GPV}-extras.tar.bz2"

KEYWORDS="~x86 ~ppc ~amd64 ~ppc64"

HOMEPAGE="http://dev.gentoo.org/~dsd/gentoo-dev-sources"

UNIPATCH_LIST="${DISTDIR}/genpatches-${KV_MAJOR}.${KV_MINOR}-${GPV}-base.tar.bz2
          ${DISTDIR}/genpatches-${KV_MAJOR}.${KV_MINOR}-${GPV}-extras.tar.bz2
          ${DISTDIR}/reiser4-for-${KV/-reiser4*/-3}.patch.gz"
UNIPATCH_DOCS="${WORKDIR}/patches/genpatches-${KV_MAJOR}.${KV_MINOR}-${GPV}/0000_README"

DESCRIPTION="Full sources including the gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree and extra patches for reiser4 support"
SRC_URI="${KERNEL_URI} ${GPV_SRC} ${ARCH_URI}
ftp://ftp.namesys.com/pub/reiser4-for-${KV_MAJOR}.${KV_MINOR}/${KV%%-reiser4*}/reiser4-for-${KV/-reiser4*/-3}.patch.gz"

pkg_setup() {
   if use sparc; then
      # hme lockup hack on ultra1
      use ultra1 || UNIPATCH_EXCLUDE="${UNIPATCH_EXCLUDE} 1399_sparc-U1-hme-lockup.patch"
   fi
}

pkg_postinst() {
   postinst_sources

   echo

   if [ "${ARCH}" = "sparc" ]; then
      if [ x"`cat /proc/openprom/name 2>/dev/null`" \
          = x"'SUNW,Ultra-1'" ]; then
         einfo "For users with an Enterprise model Ultra 1 using the HME"
         einfo "network interface, please emerge the kernel using the"
         einfo "following command: USE=ultra1 emerge ${PN}"
      fi
   fi
   einfo "For more info on this patchset, and how to report problems, see:"
   einfo "${HOMEPAGE}"

   echo
   echo
   ewarn "IMPORTANT:"
   ewarn "The reiser4 filesystem is not concidered stable in linux yet. The filesystem"
   ewarn "is very much usable though."
   ewarn "ALWAYS keep a second stable and bootable kernel apart in your boot manager."
   ewarn "Do NOT use reiser4 for your /boot partition unless you really know what you"
   ewarn "are doing... even then I do not recommend it."
   echo
   ewarn "Make sure that 4Kb stacks are turned OFF in the kernel. Found under kernel hacking subsection in the kernel config"
   echo

}

_________________
http://th30z.netsons.org/
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4788
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Sun Oct 09, 2005 3:58 pm    Post subject: Reply with quote

Fino al 2.6.12, ho usato un clone degli ebuild sopra riportati scritto in questo modo:

omissis: ingombrava :)

Per la semplice installazione del software funziona. Purtroppo, però, almeno per amd64, la patch scaricata contiene un baco che dovrebbe essere risolta da alcuni altri file contenuti (ad esempio) all'indirizzo ftp://ftp.namesys.com/pub/reiser4-for-2.6/2.6.13 .
Io purtroppo, non ho saputo comandare all'ebuild di caricarli, e di conseguenza la compilazione fallisce.
Qualcuno potrebbe darmi una mano?

edit: che sciocco: c'era il wiki
_________________
vu vu vu
gentù
mi piaci tu


Last edited by cloc3 on Fri Oct 21, 2005 12:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
SilverXXX
l33t
l33t


Joined: 18 Sep 2004
Posts: 885

PostPosted: Sun Oct 09, 2005 4:45 pm    Post subject: Reply with quote

Speriamo lo includano in fretta
_________________
about:mozilla
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools) All times are GMT
Page 1 of 1

 
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