[problem]Kompilacija kernela

Rasprave u vezi Linux aplikacija.

Moderator/ica: Moderatori/ce

Avatar
shrike
Moderator
Postovi: 10322
Pridružen/a: 07 pro 2007, 18:07
Spol: Y
OS: utuntu 19.10
Kontakt:

Re: [problem]Kompilacija kernela

Post Postao/la shrike »

OK, skužio sam dio priče. Greška je u make-kpkg. Ako je crosscompiler instaliran, on bi na make-kpkg --arch i386 trebao kompilirati takav kernel, ALI to ipak ne radi.

Želim reći, sa --arch i386 vidim da kompilacija počne točno sa i386 flagovima ali krepa jer mi fali i486-gnu-gcc il ineki takav k*** koji uopće ne postoji kao paket igdje (iako je gcc multiarch instaliran)
Es gibt keinen Gott, kein Universum, keine menschliche Rasse, kein irdisches Leben, keinen Himmel, keine Hölle. Es ist alles ein Traum - ein grotesker und dummer Traum. Nichts existiert außer dir. Und du bist nur ein Gedanke - ein vagabundierender Gedanke, ein nutzloser Gedanke, ein heimatloser Gedanke, der verloren in der leeren Ewigkeit wandelt!
Avatar
drade
Postovi: 910
Pridružen/a: 12 svi 2010, 07:57
OS: linux

Re: [problem]Kompilacija kernela

Post Postao/la drade »

shrike je napisao/la:Ne, nisam ga niti dopustio da prođe jer već na početku kompiliranja vidim da daje x86_64 i amd64 pod ARCH= ili išta što liči na to. Ovo je samo jedan od starijih pokušaja. Uopće mi nije jasno u čemu je takav strašan problem da kompilira 32 bitnu verziju ?!
U stvari ,izuzetno je zabrinjavajuće to što on kompilira amd64 UNATOČ tome što mu kažeš da napravi i386.
Ajde ucini ono sto sam zadnje predlozio, pusti ga da napravi svoj posao. U medjuvremenu, postaj compile log, ili dio njega negdje da vidim o cemu se radi.

EDIT:
Instaliraj paket"
lib32gcc1
When you're a kid and you wanna go "Weee !", but you ain't got drugs yet ... You hold out for your life, hold on to your little GONADS ... and STRIFE.
Avatar
shrike
Moderator
Postovi: 10322
Pridružen/a: 07 pro 2007, 18:07
Spol: Y
OS: utuntu 19.10
Kontakt:

Re: [problem]Kompilacija kernela

Post Postao/la shrike »

U slučaju da slijedim tvoje upute uopće mi ne da da selektiram opciju 32 bitnog računala, već sa aktivira konfigurator koji mi nudi ISKLJUČIVO 64 bitne procesore. moram pokrenuti make ARCH=i386 xconfig da dobijem opcije 32 bitnog sustava.
Es gibt keinen Gott, kein Universum, keine menschliche Rasse, kein irdisches Leben, keinen Himmel, keine Hölle. Es ist alles ein Traum - ein grotesker und dummer Traum. Nichts existiert außer dir. Und du bist nur ein Gedanke - ein vagabundierender Gedanke, ein nutzloser Gedanke, ein heimatloser Gedanke, der verloren in der leeren Ewigkeit wandelt!
Avatar
drade
Postovi: 910
Pridružen/a: 12 svi 2010, 07:57
OS: linux

Re: [problem]Kompilacija kernela

Post Postao/la drade »

Glede problema s "i486-gnu-gcc" ili neki takav k ..., instaliraj gore navedeni paket. (to bi trebalo rijesiti taj problem).
When you're a kid and you wanna go "Weee !", but you ain't got drugs yet ... You hold out for your life, hold on to your little GONADS ... and STRIFE.
Avatar
shrike
Moderator
Postovi: 10322
Pridružen/a: 07 pro 2007, 18:07
Spol: Y
OS: utuntu 19.10
Kontakt:

Re: [problem]Kompilacija kernela

Post Postao/la shrike »

Već je instaliran i ne radi. Također, revision string koji si naveo nije ispravan. Probao sam staviti -m32 u CFLAGS u Makefile, i to stvarno forsira i386 kompilaciju, ali krepa jer mu fali i486-gnu. dapače, to se vidi jer se flagovi pojavljuju za i386, umjesto amd64 ili x86_64.
Es gibt keinen Gott, kein Universum, keine menschliche Rasse, kein irdisches Leben, keinen Himmel, keine Hölle. Es ist alles ein Traum - ein grotesker und dummer Traum. Nichts existiert außer dir. Und du bist nur ein Gedanke - ein vagabundierender Gedanke, ein nutzloser Gedanke, ein heimatloser Gedanke, der verloren in der leeren Ewigkeit wandelt!
Avatar
drade
Postovi: 910
Pridružen/a: 12 svi 2010, 07:57
OS: linux

Re: [problem]Kompilacija kernela

Post Postao/la drade »

shrike je napisao/la:Već je instaliran i ne radi. Također, revision string koji si naveo nije ispravan. Probao sam staviti -m32 u CFLAGS u Makefile, i to stvarno forsira i386 kompilaciju, ali krepa jer mu fali i486-gnu. dapače, to se vidi jer se flagovi pojavljuju za i386, umjesto amd64 ili x86_64.
Ajde postaj tocno, liniju na liniju, sto tocno tipces u terminal, od raspakiravanja kernel sourcea do buildanja.

Takodjer bi bilo izvanredno da postas "compile error".

EDIT:
Postaj ouput komande:

Kod: Označi sve

dpkg-architecture
When you're a kid and you wanna go "Weee !", but you ain't got drugs yet ... You hold out for your life, hold on to your little GONADS ... and STRIFE.
Avatar
shrike
Moderator
Postovi: 10322
Pridružen/a: 07 pro 2007, 18:07
Spol: Y
OS: utuntu 19.10
Kontakt:

Re: [problem]Kompilacija kernela

Post Postao/la shrike »

OK, evo što ja tipično radim i što znam da funkcionira (mislim, funkcionira i ovdje samo kompilira 64 bitnu):

Kod: Označi sve

tar xf linux-3.1.2.tar.gz
make ARCH=i386 xconfig (ovako dozvoli selektiranje 32 bitnih procesora)
zatim se otvori prozor i pod "Processor type and features" odaberem Pentium 4/celeron što je moj PC. Inače imam spreman light_experimental2.config datoteku sa sređenim što želim.

Kod: Označi sve

make-kpkg clean
i tu lete problemi, naime on izbaci ovo:

Kod: Označi sve

exec make kpkg_version=12.036+nmu1 -f /usr/share/kernel-package/ruleset/minimal.mk clean 
====== making target minimal_clean [new prereqs: ]======
This is kernel package version 12.036+nmu1.
test ! -f .config || cp -pf .config config.precious
test ! -e stamp-building || rm -f stamp-building
test ! -f Makefile || \
            make    ARCH=x86_64 distclean
make[1]: Ulazim u direktorij `/usr/src/linux-3.1.2'
  CLEAN   scripts/basic
  CLEAN   scripts/kconfig
  CLEAN   include/config include/generated
  CLEAN   .config
make[1]: Izlazim iz direktorija `/usr/src/linux-3.1.2'
test ! -f config.precious || mv -f config.precious .config
rm -f modules/modversions.h modules/ksyms.ver scripts/cramfs/cramfsck scripts/cramfs/mkcramfs  
Uoči da tu ima ARCH=x86_64 što NE BI SMJELO BITI jer sam odabrao 32 bitni procesor i čak dao ARCH=i386. Recimo da pokrenem:

Kod: Označi sve

make-kpkg clean --cross-compile - --arch=i386
Dobijem:

Kod: Označi sve

exec make kpkg_version=12.036+nmu1 -f /usr/share/kernel-package/ruleset/minimal.mk clean  KPKG_ARCH=i386   CROSS_COMPILE=- 
====== making target minimal_clean [new prereqs: ]======
This is kernel package version 12.036+nmu1.
test ! -f .config || cp -pf .config config.precious
test ! -e stamp-building || rm -f stamp-building
test ! -f Makefile || \
            make   CROSS_COMPILE='' ARCH=i386 distclean
make[1]: Ulazim u direktorij `/usr/src/linux-3.1.2'
  CLEAN   scripts/basic
  CLEAN   scripts/kconfig
  CLEAN   include/config include/generated
  CLEAN   .config
make[1]: Izlazim iz direktorija `/usr/src/linux-3.1.2'
test ! -f config.precious || mv -f config.precious .config
rm -f modules/modversions.h modules/ksyms.ver scripts/cramfs/cramfsck scripts/cramfs/mkcramfs  
Što je zapravo dobro.

Onda

Kod: Označi sve

fakeroot linux32 make-kpkg -j 5 --cross-compile - --arch=i386 --revision=01.shrikes kernel_image
Što sad za čudo prolazi (iako prije nije), na što dobijem

Kod: Označi sve

linux-image-3.1.2_01.shrikes_amd64.deb
dpkg -I

Kod: Označi sve

Package: linux-image-3.1.2
 Source: linux-source-3.1.2
 Version: 01.shrikes
 Architecture: amd64
 Maintainer: Unknown Kernel Package Maintainer <unknown@unconfigured.in.etc.kernel-pkg.conf>
 Installed-Size: 7080
 Pre-Depends: debconf (>= 0.2.17) | debconf-2.0
 Depends: coreutils (>= 5.96)
 Suggests: fdutils, linux-doc-3.1.2 | linux-source-3.1.2, ksymoops, linux-image-3.1.2-dbg
 Provides: linux-image, linux-image-3.1
 Section: kernel
 Priority: optional
 Description: Linux kernel binary image for version 3.1.2
  This package contains the Linux kernel image for version
  3.1.2.
  .
  It also contains the corresponding System.map file, and the modules
  built by the packager.  It also contains scripts that try to ensure
  that the system is not left in a unbootable state after an update.
  .
  Kernel image packages are generally produced using kernel-package,
  and it is suggested that you install that package if you wish to
  create a custom kernel from the sources. Please look at kernel-img.conf(5),
  and /usr/share/doc/kernel-package/README.gz  from the package kernel-package
  for details on how to tailor the  installation of this or any other kernel
  image package
tada. 64 bitni kernel:D

EDIT:
Inače greška na verziju izgleda ovako:

Kod: Označi sve

Error: The revision string may only contain
 alphanumerics and  the  characters ~ +  .
 If epochs are used, the colon : is also allowed
 The current value is: 1.shrikes_custom
 Aborting.
Ako sljedim tvoja uputstva do daske, bez minimuma promjena dobijem ovo:

Kod: Označi sve

#
# configuration written to .config
#
scripts/kconfig/conf --allmodconfig Kconfig
#
# configuration written to .config
#
exec make kpkg_version=12.036+nmu1 -f /usr/share/kernel-package/ruleset/minimal.mk clean  KPKG_ARCH=i386   CROSS_COMPILE=- 
====== making target minimal_clean [new prereqs: ]======
This is kernel package version 12.036+nmu1.
test ! -f .config || cp -pf .config config.precious
test ! -e stamp-building || rm -f stamp-building
test ! -f Makefile || \
            make   CROSS_COMPILE='' ARCH=i386 distclean
make[1]: Ulazim u direktorij `/usr/src/linux-3.1.2'
  CLEAN   scripts/basic
  CLEAN   scripts/kconfig
  CLEAN   include/config include/generated
  CLEAN   .config .config.old
make[1]: Izlazim iz direktorija `/usr/src/linux-3.1.2'
test ! -f config.precious || mv -f config.precious .config
rm -f modules/modversions.h modules/ksyms.ver scripts/cramfs/cramfsck scripts/cramfs/mkcramfs  
exec make kpkg_version=12.036+nmu1 -f /usr/share/kernel-package/ruleset/minimal.mk debian DEBIAN_REVISION=1shrike  APPEND_TO_VERSION=.271111  CROSS_COMPILE=--arch=i386  INITRD=YES 
====== making target debian/stamp/conf/minimal_debian [new prereqs: ]======
This is kernel package version 12.036+nmu1.
test -d debian             || mkdir debian
test ! -e stamp-building || rm -f stamp-building
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 -f debian/control || sed         -e 's/=V/3.1.2.271111/g'  \
                -e 's/=D/1shrike/g'         -e 's/=A/amd64/g'  \
		-e 's/=SA//g'  \
		-e 's/=I//g'				    \
		-e 's/=CV/3.1/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/3.1.2.271111/g'       \
            -e 's/=D/1shrike/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
chmod 0644 debian/control debian/changelog
test -d ./debian/stamp || mkdir debian/stamp 
make -f debian/rules debian/stamp/conf/kernel-conf
make[1]: Ulazim u direktorij `/usr/src/linux-3.1.2'
====== making target debian/stamp/conf/kernel-conf [new prereqs: ]======
make EXTRAVERSION=.271111  CROSS_COMPILE=--arch=i386- ARCH=x86_64 \
                    oldconfig;
make[2]: Ulazim u direktorij `/usr/src/linux-3.1.2'
scripts/kconfig/conf --oldconfig Kconfig
*
* Restart config...
*
*
* Processor type and features
*
Tickless System (Dynamic Ticks) (NO_HZ) [Y/n/?] y
High Resolution Timer Support (HIGH_RES_TIMERS) [Y/n/?] y
Symmetric multi-processing support (SMP) [Y/n/?] y
Enable MPS table (X86_MPPARSE) [Y/n/?] y
Support for extended (non-PC) x86 platforms (X86_EXTENDED_PLATFORM) [Y/n/?] y
ScaleMP vSMP (X86_VSMP) [N/y/?] (NEW) 
Single-depth WCHAN output (SCHED_OMIT_FRAME_POINTER) [Y/n/?] y
*
* Paravirtualized guest support
*
Paravirtualized guest support (PARAVIRT_GUEST) [Y/n/?] y
  Paravirtual steal time accounting (PARAVIRT_TIME_ACCOUNTING) [Y/n/?] y
  Xen guest support (XEN) [N/y/?] (NEW) 
  KVM paravirtualized clock (KVM_CLOCK) [Y/n/?] y
  KVM Guest support (KVM_GUEST) [Y/n/?] y
  Enable paravirtualization code (PARAVIRT) [Y/?] y
    Paravirtualization layer for spinlocks (PARAVIRT_SPINLOCKS) [Y/n/?] y
paravirt-ops debugging (PARAVIRT_DEBUG) [Y/n/?] y
Memtest (MEMTEST) [Y/n/?] y
Processor family
  1. Opteron/Athlon64/Hammer/K8 (MK8)
  2. Intel P4 / older Netburst based Xeon (MPSC) (NEW)
  3. Core 2/newer Xeon (MCORE2)
  4. Intel Atom (MATOM)
> 5. Generic-x86-64 (GENERIC_CPU) (NEW)
choice[1-5]: 
Uoči kako restarta config i nudi samo ovih 5 procesora, sve 64 bitna.
Zadnja izmjena: shrike, dana/u 27 stu 2011, 22:33, ukupno mijenjano 1 put.
Es gibt keinen Gott, kein Universum, keine menschliche Rasse, kein irdisches Leben, keinen Himmel, keine Hölle. Es ist alles ein Traum - ein grotesker und dummer Traum. Nichts existiert außer dir. Und du bist nur ein Gedanke - ein vagabundierender Gedanke, ein nutzloser Gedanke, ein heimatloser Gedanke, der verloren in der leeren Ewigkeit wandelt!
Avatar
glaskoncILLa
Postovi: 5678
Pridružen/a: 28 vel 2009, 16:36

Re: [problem]Kompilacija kernela

Post Postao/la glaskoncILLa »

mozda si napisao, ali da li si ti to chrootao?
...."Have you mooed today?"...
..It’s that time of the decade: I’m reinstalling Debian..
Avatar
drade
Postovi: 910
Pridružen/a: 12 svi 2010, 07:57
OS: linux

Re: [problem]Kompilacija kernela

Post Postao/la drade »

Pomoci cu ti s time sutra, sada idem ubiti oko.
When you're a kid and you wanna go "Weee !", but you ain't got drugs yet ... You hold out for your life, hold on to your little GONADS ... and STRIFE.
Avatar
shrike
Moderator
Postovi: 10322
Pridružen/a: 07 pro 2007, 18:07
Spol: Y
OS: utuntu 19.10
Kontakt:

Re: [problem]Kompilacija kernela

Post Postao/la shrike »

glaskoncILLa je napisao/la:mozda si napisao, ali da li si ti to chrootao?
pokušao sam pokrenuti kao root korisnik, shrike, i sa fakeroot u oba slučaja. Ne radi. Uopće mi nije jasno zašto bi i trebalo imati utjecaj, explicitno mu je rečeno da napravi i386 i on to odbije.

EDIT:
chroot na što uopće? nisam skužio da igdje postoji specifični i386 gcc kao takav već on običnom daje dodatne flagove ili nešto tog tipa.
Es gibt keinen Gott, kein Universum, keine menschliche Rasse, kein irdisches Leben, keinen Himmel, keine Hölle. Es ist alles ein Traum - ein grotesker und dummer Traum. Nichts existiert außer dir. Und du bist nur ein Gedanke - ein vagabundierender Gedanke, ein nutzloser Gedanke, ein heimatloser Gedanke, der verloren in der leeren Ewigkeit wandelt!
Odgovori