[+] Kompilacja kernela na zewn

Ogólne pytania dotyczące systemu
sidjestgit
Beginner
Posty: 181
Rejestracja: 06 grudnia 2008, 17:55

[+] Kompilacja kernela na zewnętrznej maszynie

Post autor: sidjestgit »

Witam.
Na laptopie z procesorem intel mobil 1,6GHz (1 core - nie 64bit) próbuję kompilować kernel.
Mam na tym komputerze Debiana Lenny 32Bit, pościągane odpowiednie paczki - całość jest dopięta.
Problem w tym, że laptop szybko się nagrzewa i po 3-5min wyłącza się (zabezpieczenie przed spaleniem) - i z kompilowania nici.
Mam obok mocny komputer (4 core - dużo RAMu) ten się nie przegrzeje. Jest na nim obecnie zainstalowany Ubuntu 64bit.
Czy mogę "normalnie" na nim kompilować sobie jajko pod laptopa bez jakichś specjalnych/dodatkowych zabiegów?

Plan jest taki: http://debian.linux.pl/viewtopic.php?p=42284
myślę o kompilowaniu jajka tym sposobem - następnie DEBy skopiowałbym na laptopa i zainstalował.

Czy do opcji

Kod: Zaznacz cały

make-kpkg linux-image linux-headers --initrd
dodać coś jeszcze?

Edit:
I nic nie wychodzi:

Kod: Zaznacz cały

root@nick:/usr/src/linux-2.6.27.8# make-kpkg linux-image linux-headers --initrd
exec make -f /usr/share/kernel-package/ruleset/minimal.mk debian INITRD=YES 
====== making target minimal_debian [new prereqs: ]======
This is kernel package version .
test -d debian || mkdir debian
test ! -e stamp-building || rm -f stamp-building
test -f debian/control || sed         -e 's/=V/2.6.27.8/g'        \
                -e 's/=D/2.6.27.8-10.00.Custom/g'         -e 's/=A/amd64/g'  \
	        -e 's/=SA//g'   -e 's/=L/ /g' \
                -e 's/=I//g'                                    \
                -e 's/=CV/2.6/g'                       \
                -e 's/=M/Unknown Kernel Package Maintainer <unknown@unconfigured.in.etc.kernel-pkg.conf>/g'                        \
                -e 's/=ST/linux/g'      -e 's/=B/x86_64/g'    \
		         /usr/share/kernel-package/Control > debian/control
test -f debian/changelog ||  sed -e 's/=V/2.6.27.8/g'             \
	    -e 's/=D/2.6.27.8-10.00.Custom/g'        -e 's/=A/amd64/g'       \
            -e 's/=ST/linux/g'     -e 's/=B/x86_64/g'         \
	    -e 's/=M/Unknown Kernel Package Maintainer <unknown@unconfigured.in.etc.kernel-pkg.conf>/g' 	                    \
             /usr/share/kernel-package/changelog > debian/changelog
install -p -m 755 /usr/share/kernel-package/rules debian/rules
for file in ChangeLog  Control  Control.bin86 config templates.in rules; do                                      \
            cp -f  /usr/share/kernel-package/$file ./debian/;                               \
        done
for dir  in Config docs examples ruleset scripts pkg po;  do                                      \
          cp -af /usr/share/kernel-package/$dir  ./debian/;                                 \
        done
test -d ./debian/stamps || mkdir debian/stamps 
exec debian/rules  INITRD=YES  linux-image linux-headers 

====== making target CONFIG-common [new prereqs: testdir]======

====== making target debian/stamp-conf [new prereqs: ]======
# work around idiocy in recent kernel versions
test ! -e scripts/package/builddeb || \
            mv -f scripts/package/builddeb scripts/package/builddeb.kpkg-dist
test ! -e scripts/package/Makefile || \
            (mv -f scripts/package/Makefile scripts/package/Makefile.kpkg-dist && \
               (echo "# Dummy file "; echo "help:") >  scripts/package/Makefile)
test -d debian || mkdir ./debian
test ! -e stamp-building || rm -f stamp-building
test ! -f ./debian || test -f stamp-debian || test -f debian/official || \
               (rm -rf ./debian && mkdir ./debian)
test -f stamp-debian  ||                                           \
          ( test -f debian/official && test -f debian/control) ||          \
	   sed -e 's/=V/2.6.27.8/g'         -e 's/=D/2.6.27.8-10.00.Custom/g'        \
	       -e 's/=A/amd64/g'   -e 's/=SA//g'  \
                -e 's/=L/lilo (>= 19.1) | grub, /g' -e 's/=I/initramfs-tools (>= 0.53) | yaird (>= 0.0.11) | linux-initramfs-tool, /g'     \
                -e 's/=CV/2.6/g'                      \
                -e 's/=M/Unknown Kernel Package Maintainer <unknown@unconfigured.in.etc.kernel-pkg.conf>/g'                       \
                -e 's/=ST/linux/g'      -e 's/=B/x86_64/g'   \
		         /usr/share/kernel-package/Control> debian/control
test -f stamp-debian  ||    test -f debian/official ||                \
           sed -e 's/=V/2.6.27.8/g' -e 's/=D/2.6.27.8-10.00.Custom/g'                   \
	    -e 's/=A/amd64/g' -e 's/=M/Unknown Kernel Package Maintainer <unknown@unconfigured.in.etc.kernel-pkg.conf>/g' \
            -e 's/=ST/linux/g'     -e 's/=B/x86_64/g'           \
		/usr/share/kernel-package/changelog > debian/changelog
test  -f debian/rules || install -p -m 755 /usr/share/kernel-package/rules debian/rules
test  -f stamp-debian || test -f debian/official ||                     \
	   for file in ChangeLog  Control  Control.bin86 config templates.in rules; do                                      \
               cp -f  /usr/share/kernel-package/$file ./debian/;                               \
           done
test  -f stamp-debian || test -f debian/official ||                     \
	   for dir  in Config docs examples ruleset scripts pkg po;  do                                      \
             cp -af /usr/share/kernel-package/$dir  ./debian/;                                 \
           done
echo done >  stamp-debian
echo done >  debian/stamp-conf
====== making target CONFIG-common [new prereqs: stamp-conf]======
This is kernel package version 11.001-0.1.
====== making target stamp-arch-conf [new prereqs: CONFIG-common]======

====== making target CONFIG-arch [new prereqs: stamp-arch-conf]======
====== making target conf.vars [new prereqs: Makefile .config]======

====== making target CONFIG-arch [new prereqs: .config conf.vars]======
This is kernel package version 11.001-0.1.
====== making target CONFIG/linux-headers-2.6.27.8 [new prereqs: CONFIG-arch]======

====== making target CONFIG/linux-image-2.6.27.8 [new prereqs: CONFIG-arch]======

====== making target CONFIG/linux-uml-2.6.27.8 [new prereqs: CONFIG-arch]======

====== making target CONFIG/linux-xen0-2.6.27.8 [new prereqs: CONFIG-arch]======

====== making target CONFIG/linux-xenu-2.6.27.8 [new prereqs: CONFIG-arch]======

====== making target stamp-configure-arch [new prereqs: linux-headers-2.6.27.8 linux-image-2.6.27.8 linux-uml-2.6.27.8 linux-xen0-2.6.27.8 linux-xenu-2.6.27.8]======
====== making target configure-arch [new prereqs: stamp-configure-arch]======
====== making target stamp-indep-conf [new prereqs: CONFIG-common]======

====== making target CONFIG-indep [new prereqs: stamp-indep-conf]======
====== making target debian/stamp-kernel-conf [new prereqs: .config Makefile]======
/usr/bin/make    ARCH=x86_64 \
                oldconfig
make[1]: Wejście do katalogu `/usr/src/linux-2.6.27.8'
scripts/kconfig/conf -o arch/x86/Kconfig
#
# configuration written to .config
#
make[1]: Opuszczenie katalogu `/usr/src/linux-2.6.27.8'
/usr/bin/make    ARCH=x86_64 prepare
make[1]: Wejście do katalogu `/usr/src/linux-2.6.27.8'
scripts/kconfig/conf -s arch/x86/Kconfig
make[1]: Opuszczenie katalogu `/usr/src/linux-2.6.27.8'
make[1]: Wejście do katalogu `/usr/src/linux-2.6.27.8'
  CHK     include/linux/version.h
  UPD     include/linux/version.h
  CHK     include/linux/utsrelease.h
  UPD     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
  CC      kernel/bounds.s
  GEN     include/linux/bounds.h
  CC      arch/x86/kernel/asm-offsets.s
In file included from include/asm/page.h:42,
                 from include/asm/pda.h:8,
                 from include/asm/current.h:19,
                 from include/asm/processor.h:15,
                 from include/linux/prefetch.h:14,
                 from include/linux/list.h:6,
                 from include/linux/module.h:9,
                 from include/linux/crypto.h:21,
                 from arch/x86/kernel/asm-offsets_64.c:7,
                 from arch/x86/kernel/asm-offsets.c:4:
include/asm/page_64.h:46:2: error: #error "CONFIG_PHYSICAL_START must be a multiple of 2MB"
make[2]: *** [arch/x86/kernel/asm-offsets.s] Błąd 1
make[1]: *** [prepare0] Błąd 2
make[1]: Opuszczenie katalogu `/usr/src/linux-2.6.27.8'
make: *** [debian/stamp-kernel-conf] Błąd 2
root@nick:/usr/src/linux-2.6.27.8#
Czy może ktoś pomóc?
Utumno
Beginner
Posty: 432
Rejestracja: 09 listopada 2008, 13:04
Lokalizacja: Gdansk

Post autor: Utumno »

1) CONFIG_PHYSICAL_START masz jakims cudem zle ustawione. Przegrepuj swoj config i zobacz.

2) polecam wkompilowac moduly do dysku i filesystemu do kernela i pozbyc sie initrd. To duzo upraszcza sprawe.

3) na maszynie o architekrurze AMD64 kompilujesz kernel dla archtektury i386. Bez specjalnych zabiegow nie zadziala Ci to.
Awatar użytkownika
lis6502
Member
Posty: 1798
Rejestracja: 05 listopada 2008, 20:14
Lokalizacja: Miasto Szybowców

Post autor: lis6502 »

3) czytaj: potrzebujesz całego zestawu narzędzi dla docelowej architektury, tj binutils, glibc, gcc, gdb i jeszcze paru innych. Niezłe są jaja z tym, jak wciąż jesteś zainteresowany, podam Ci karmę dla wujka Google : crosstool 0.43.
sidjestgit
Beginner
Posty: 181
Rejestracja: 06 grudnia 2008, 17:55

Post autor: sidjestgit »

Dziekuje lis6502, Utumno

Zainstaluje zaraz obok wersje 32bit to bedzie prostsze chyba od crosstool
(z crosstool-em zapoznam sie przy innej okazji)

Myslalem ze sie da tak "mieszac" architektury - no coz.
giaur
Member
Posty: 1915
Rejestracja: 25 maja 2007, 22:16

Post autor: giaur »

Po co tak kombinowac jak kon pod gore - odpal jakiegos 32-bitowego siduxa albo knoppixa na swoim kompie stacjonarnym, skompiluj kernel metoda debianowa i bedziesz miec 32-bitowe deby.
sidjestgit
Beginner
Posty: 181
Rejestracja: 06 grudnia 2008, 17:55

Post autor: sidjestgit »

Wiec.
Ubuntu 8.10 jest tak kompatybilne z Debianem Sid jak wielblad z zyrafa.

Postawilem wersje Ubuntu 8.10 skompilowalem jajko potem przez scp przenioslem na laptopa - jajko nie chcialo sie instalowac (zaleznosci byly niespelnione).

Nastepnie zrobilem tak jak radzil giaur - LiveCD.
Mialem pod reka CDLinuksa. Zainstalowalem go i uaktualnilem do Lenny - przy okazji zrobilem nowa LiveCD (i tak mialem to w planach).
Skompilowalem kernel, przenioslem na laptopa i zainstalowalem bez najmniejszego problemu - kernel instalowal sie tak jakby pochodzil z repozytorium.

Wniosek - nalezy zachowac kompatybilnosc. 32 - 64bit. te same wersje GCC i innych "paczek"...

Dzieki.
ODPOWIEDZ