Kernel kompilieren

P

patrick37

Gast
Hallo Zusammen

Das ist sicher nicht der erste Thread zu diesem Thema.
Leider finde ich aber nirgends die Info die ich brauche.

Mein Ziel: Den AOSP Kernel vom Xperia Z zu kompilieren
Ich hab mir dazu auch schon die Source von hier heruntergeladen => https://github.com/sonyxperiadev/kernel Branch: yuga-aosp

Aber was muss ich jetzt machen? Hab echt keinen Plan!
Den ich denke ein sudo make reicht da wohl nicht aus?

Ich brauch keine Anleitung, eine Übersicht a la
1) Kernel herunterladen
2) *** Datei für dein Gerät da hin kopieren
3) ***.sh ausführen
4) Kernel flashen

würde mir vörig reichen.

Gruss
patrick37
 
Hab den Thread auch gefunden, schau ihn mir nochmals genauer an.

Der ursprüngliche Beitrag von 20:20 Uhr wurde um 20:52 Uhr ergänzt:

Habe jetzt nach deiner Anleitung einen Cross Compiler für dem Mac aufgesetzt und dann deine Anleitung weiter befolgt. Nun konnte ich auch den Kernel soweit konfigurieren.
Beim letzten Schritt, dem builden erscheint leider eine Fehlermeldung.
Hier mein Log. Falls du gerade weisst was das soll, danke ansonsten werde ich nach deiner Rückmeldung selber mal suchen:
Code:
Patricks-MacBook-Pro:kernel-yuga-aosp ***$ sudo make ARCH=arm CROSS_COMPILE=/Volumes/Image -j
make: /Volumes/Imagegcc: Command not found
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
make: /Volumes/Imagegcc: Command not found
  WRAP    arch/arm/include/generated/asm/bitsperlong.h
  WRAP    arch/arm/include/generated/asm/auxvec.h
  WRAP    arch/arm/include/generated/asm/cputime.h
  WRAP    arch/arm/include/generated/asm/emergency-restart.h
  WRAP    arch/arm/include/generated/asm/ioctl.h
  WRAP    arch/arm/include/generated/asm/errno.h
  WRAP    arch/arm/include/generated/asm/local.h
  WRAP    arch/arm/include/generated/asm/local64.h
  WRAP    arch/arm/include/generated/asm/irq_regs.h
  WRAP    arch/arm/include/generated/asm/percpu.h
  WRAP    arch/arm/include/generated/asm/resource.h
  WRAP    arch/arm/include/generated/asm/poll.h
  WRAP    arch/arm/include/generated/asm/sections.h
  WRAP    arch/arm/include/generated/asm/kdebug.h
  WRAP    arch/arm/include/generated/asm/siginfo.h
  WRAP    arch/arm/include/generated/asm/sizes.h
  CHK     include/linux/version.h
  UPD     include/linux/version.h
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/conmakehash
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
/bin/sh: /Volumes/Imagegcc: No such file or directory
make[2]: *** [scripts/mod/empty.o] Error 1
make[2]: *** Waiting for unfinished jobs....
scripts/mod/mk_elfconfig.c:4:17: error: elf.h: No such file or directory
scripts/mod/mk_elfconfig.c: In function ‘main’:
scripts/mod/mk_elfconfig.c:9: error: ‘EI_NIDENT’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:9: error: (Each undeclared identifier is reported only once
scripts/mod/mk_elfconfig.c:9: error: for each function it appears in.)
scripts/mod/mk_elfconfig.c:16: error: ‘ELFMAG’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:16: error: ‘SELFMAG’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:20: error: ‘EI_CLASS’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:21: error: ‘ELFCLASS32’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:24: error: ‘ELFCLASS64’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:30: error: ‘EI_DATA’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:31: error: ‘ELFDATA2LSB’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:34: error: ‘ELFDATA2MSB’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:9: warning: unused variable ‘ei’
make[2]: *** [scripts/mod/mk_elfconfig] Error 1
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  Generating include/generated/mach-types.h
  CC      kernel/bounds.s
/bin/sh: /Volumes/Imagegcc: No such file or directory
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....
make: *** [scripts] Error 2
 
Viele (wenn nicht alle) build scripts basieren auf Linux und reagieren empfindlich auf den Toolchain. Für Kernels würde ich also dringend zu einem Linux System raten. ;)

Hier mal mein Build-Script für 4.3 Nozomi (Xperia S) unter Kubuntu 12.04:

Code:
#!/bin/bash

export PATH=/home/detlef/Development/Android/AOSP/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH
export CROSS_COMPILE=arm-eabi-
export ARCH=arm
export SUBARCH=arm
make mrproper
rm -rf /home/detlef/Development/Android/AOSP/out/target/product/nozomi/obj/KERNEL_OBJ
mkdir -p /home/detlef/Development/Android/AOSP/out/target/product/nozomi/obj/KERNEL_OBJ
make ARCH=arm CROSS_COMPILE=arm-eabi-  O=/home/detlef/Development/Android/AOSP/out/target/product/nozomi/obj/KERNEL_OBJ/ nozomi_defconfig
make ARCH=arm CROSS_COMPILE=arm-eabi-  O=/home/detlef/Development/Android/AOSP/out/target/product/nozomi/obj/KERNEL_OBJ/ headers_install
time make -j16 ARCH=arm CROSS_COMPILE=arm-eabi-  O=/home/detlef/Development/Android/AOSP/out/target/product/nozomi/obj/KERNEL_OBJ/
time make -j16 ARCH=arm CROSS_COMPILE=arm-eabi-  O=/home/detlef/Development/Android/AOSP/out/target/product/nozomi/obj/KERNEL_OBJ/ modules
cp /home/detlef/Development/Android/AOSP/out/target/product/nozomi/obj/KERNEL_OBJ/arch/arm/boot/zImage /home/detlef/Development/Android/nozomi_kernel
Vielleicht hilft es dir.
Ich denke, dein CROSS_COMPILE= ist flasch. ;)
 
Ich hab ja Ubuntu versucht auf VirtualBox zu installieren.
Aber das hat sowas von gelaggt. Das war nicht auszuhalten!

Vergesst das, ich hab selber einen Fehler gemacht :)


Der ursprüngliche Beitrag von 21:23 Uhr wurde um 21:37 Uhr ergänzt:

So es geht wieder mal nicht :(
Log:
Code:
Patricks-MacBook-Pro:kernel-yuga-aosp ***USERNAME***$ make cross_compile=/volumes/Image -j4
scripts/kconfig/conf --silentoldconfig Kconfig

*** Error during update of the configuration.

make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make[1]: Nothing to be done for `all'.
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'.  Stop.
make: *** Waiting for unfinished jobs....
  HOSTCC  arch/x86/tools/relocs
arch/x86/tools/relocs.c:8:17: error: /usr/include/elf.h: Permission denied
arch/x86/tools/relocs.c:9:22: error: byteswap.h: No such file or directory
arch/x86/tools/relocs.c:11:20: error: endian.h: No such file or directory
In file included from arch/x86/tools/relocs.c:13:
/Users/***USERNAME***/WORKING_DIRECTORY/kernel-yuga-aosp/tools/include/tools/le_byteshift.h:4:25: error: linux/types.h: No such file or directory
In file included from arch/x86/tools/relocs.c:13:
/Users/***USERNAME***/WORKING_DIRECTORY/kernel-yuga-aosp/tools/include/tools/le_byteshift.h:6: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__get_unaligned_le16’
/Users/***USERNAME***/WORKING_DIRECTORY/kernel-yuga-aosp/tools/include/tools/le_byteshift.h:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__get_unaligned_le32’
/Users/***USERNAME***/WORKING_DIRECTORY/kernel-yuga-aosp/tools/include/tools/le_byteshift.h:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__get_unaligned_le64’
/Users/***USERNAME***/WORKING_DIRECTORY/kernel-yuga-aosp/tools/include/tools/le_byteshift.h:22: error: expected ‘)’ before ‘val’
/Users/***USERNAME***/WORKING_DIRECTORY/kernel-yuga-aosp/tools/include/tools/le_byteshift.h:28: error: expected ‘)’ before ‘val’
/Users/***USERNAME***/WORKING_DIRECTORY/kernel-yuga-aosp/tools/include/tools/le_byteshift.h:34: error: expected ‘)’ before ‘val’
/Users/***USERNAME***/WORKING_DIRECTORY/kernel-yuga-aosp/tools/include/tools/le_byteshift.h:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘get_unaligned_le16’
/Users/***USERNAME***/WORKING_DIRECTORY/kernel-yuga-aosp/tools/include/tools/le_byteshift.h:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘get_unaligned_le32’
/Users/***USERNAME***/WORKING_DIRECTORY/kernel-yuga-aosp/tools/include/tools/le_byteshift.h:50: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘get_unaligned_le64’
/Users/***USERNAME***/WORKING_DIRECTORY/kernel-yuga-aosp/tools/include/tools/le_byteshift.h:55: error: expected ‘)’ before ‘val’
/Users/***USERNAME***/WORKING_DIRECTORY/kernel-yuga-aosp/tools/include/tools/le_byteshift.h:60: error: expected ‘)’ before ‘val’
/Users/***USERNAME***/WORKING_DIRECTORY/kernel-yuga-aosp/tools/include/tools/le_byteshift.h:65: error: expected ‘)’ before ‘val’
arch/x86/tools/relocs.c:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ehdr’
arch/x86/tools/relocs.c:25: error: expected specifier-qualifier-list before ‘Elf32_Shdr’
arch/x86/tools/relocs.c: In function ‘sym_type’:
arch/x86/tools/relocs.c:129: error: ‘STT_NOTYPE’ undeclared (first use in this function)
arch/x86/tools/relocs.c:129: error: (Each undeclared identifier is reported only once
arch/x86/tools/relocs.c:129: error: for each function it appears in.)
arch/x86/tools/relocs.c:129: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:129: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:130: error: ‘STT_OBJECT’ undeclared (first use in this function)
arch/x86/tools/relocs.c:130: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:130: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:131: error: ‘STT_FUNC’ undeclared (first use in this function)
arch/x86/tools/relocs.c:131: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:131: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:132: error: ‘STT_SECTION’ undeclared (first use in this function)
arch/x86/tools/relocs.c:132: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:132: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:133: error: ‘STT_FILE’ undeclared (first use in this function)
arch/x86/tools/relocs.c:133: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:133: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:134: error: ‘STT_COMMON’ undeclared (first use in this function)
arch/x86/tools/relocs.c:134: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:134: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:135: error: ‘STT_TLS’ undeclared (first use in this function)
arch/x86/tools/relocs.c:135: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:135: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c: In function ‘sym_bind’:
arch/x86/tools/relocs.c:149: error: ‘STB_LOCAL’ undeclared (first use in this function)
arch/x86/tools/relocs.c:149: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:149: error: (near initialization for ‘bind_name’)
arch/x86/tools/relocs.c:150: error: ‘STB_GLOBAL’ undeclared (first use in this function)
arch/x86/tools/relocs.c:150: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:150: error: (near initialization for ‘bind_name’)
arch/x86/tools/relocs.c:151: error: ‘STB_WEAK’ undeclared (first use in this function)
arch/x86/tools/relocs.c:151: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:151: error: (near initialization for ‘bind_name’)
arch/x86/tools/relocs.c: In function ‘sym_visibility’:
arch/x86/tools/relocs.c:165: error: ‘STV_DEFAULT’ undeclared (first use in this function)
arch/x86/tools/relocs.c:165: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:165: error: (near initialization for ‘visibility_name’)
arch/x86/tools/relocs.c:166: error: ‘STV_INTERNAL’ undeclared (first use in this function)
arch/x86/tools/relocs.c:166: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:166: error: (near initialization for ‘visibility_name’)
arch/x86/tools/relocs.c:167: error: ‘STV_HIDDEN’ undeclared (first use in this function)
arch/x86/tools/relocs.c:167: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:167: error: (near initialization for ‘visibility_name’)
arch/x86/tools/relocs.c:168: error: ‘STV_PROTECTED’ undeclared (first use in this function)
arch/x86/tools/relocs.c:168: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:168: error: (near initialization for ‘visibility_name’)
arch/x86/tools/relocs.c: In function ‘rel_type’:
arch/x86/tools/relocs.c:182: error: ‘R_386_NONE’ undeclared (first use in this function)
arch/x86/tools/relocs.c:182: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:182: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:183: error: ‘R_386_32’ undeclared (first use in this function)
arch/x86/tools/relocs.c:183: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:183: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:184: error: ‘R_386_PC32’ undeclared (first use in this function)
arch/x86/tools/relocs.c:184: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:184: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:185: error: ‘R_386_GOT32’ undeclared (first use in this function)
arch/x86/tools/relocs.c:185: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:185: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:186: error: ‘R_386_PLT32’ undeclared (first use in this function)
arch/x86/tools/relocs.c:186: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:186: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:187: error: ‘R_386_COPY’ undeclared (first use in this function)
arch/x86/tools/relocs.c:187: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:187: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:188: error: ‘R_386_GLOB_DAT’ undeclared (first use in this function)
arch/x86/tools/relocs.c:188: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:188: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:189: error: ‘R_386_JMP_SLOT’ undeclared (first use in this function)
arch/x86/tools/relocs.c:189: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:189: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:190: error: ‘R_386_RELATIVE’ undeclared (first use in this function)
arch/x86/tools/relocs.c:190: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:190: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:191: error: ‘R_386_GOTOFF’ undeclared (first use in this function)
arch/x86/tools/relocs.c:191: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:191: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:192: error: ‘R_386_GOTPC’ undeclared (first use in this function)
arch/x86/tools/relocs.c:192: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:192: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:193: error: ‘R_386_8’ undeclared (first use in this function)
arch/x86/tools/relocs.c:193: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:193: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:194: error: ‘R_386_PC8’ undeclared (first use in this function)
arch/x86/tools/relocs.c:194: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:194: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:195: error: ‘R_386_16’ undeclared (first use in this function)
arch/x86/tools/relocs.c:195: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:195: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c:196: error: ‘R_386_PC16’ undeclared (first use in this function)
arch/x86/tools/relocs.c:196: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:196: error: (near initialization for ‘type_name’)
arch/x86/tools/relocs.c: In function ‘sec_name’:
arch/x86/tools/relocs.c:210: error: ‘ehdr’ undeclared (first use in this function)
arch/x86/tools/relocs.c:213: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:215: error: ‘SHN_ABS’ undeclared (first use in this function)
arch/x86/tools/relocs.c:218: error: ‘SHN_COMMON’ undeclared (first use in this function)
arch/x86/tools/relocs.c: At top level:
arch/x86/tools/relocs.c:224: error: expected declaration specifiers or ‘...’ before ‘Elf32_Sym’
arch/x86/tools/relocs.c: In function ‘sym_name’:
arch/x86/tools/relocs.c:228: error: ‘sym’ undeclared (first use in this function)
arch/x86/tools/relocs.c: In function ‘read_ehdr’:
arch/x86/tools/relocs.c:260: error: ‘ehdr’ undeclared (first use in this function)
arch/x86/tools/relocs.c:264: error: ‘ELFMAG’ undeclared (first use in this function)
arch/x86/tools/relocs.c:264: error: ‘SELFMAG’ undeclared (first use in this function)
arch/x86/tools/relocs.c:267: error: ‘EI_CLASS’ undeclared (first use in this function)
arch/x86/tools/relocs.c:267: error: ‘ELFCLASS32’ undeclared (first use in this function)
arch/x86/tools/relocs.c:270: error: ‘EI_DATA’ undeclared (first use in this function)
arch/x86/tools/relocs.c:270: error: ‘ELFDATA2LSB’ undeclared (first use in this function)
arch/x86/tools/relocs.c:273: error: ‘EI_VERSION’ undeclared (first use in this function)
arch/x86/tools/relocs.c:273: error: ‘EV_CURRENT’ undeclared (first use in this function)
arch/x86/tools/relocs.c:291: error: ‘ET_EXEC’ undeclared (first use in this function)
arch/x86/tools/relocs.c:291: error: ‘ET_DYN’ undeclared (first use in this function)
arch/x86/tools/relocs.c:294: error: ‘EM_386’ undeclared (first use in this function)
arch/x86/tools/relocs.c:300: error: ‘Elf32_Ehdr’ undeclared (first use in this function)
arch/x86/tools/relocs.c:303: error: ‘Elf32_Phdr’ undeclared (first use in this function)
arch/x86/tools/relocs.c:306: error: ‘Elf32_Shdr’ undeclared (first use in this function)
arch/x86/tools/relocs.c: In function ‘read_shdrs’:
arch/x86/tools/relocs.c:317: error: ‘Elf32_Shdr’ undeclared (first use in this function)
arch/x86/tools/relocs.c:317: error: expected ‘;’ before ‘shdr’
arch/x86/tools/relocs.c:319: error: ‘ehdr’ undeclared (first use in this function)
arch/x86/tools/relocs.c:330: error: ‘shdr’ undeclared (first use in this function)
arch/x86/tools/relocs.c:333: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:334: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:335: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:336: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:337: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:338: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:339: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:340: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:341: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:342: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:343: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:344: error: ‘struct section’ has no member named ‘link’
arch/x86/tools/relocs.c:344: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c: In function ‘read_strtabs’:
arch/x86/tools/relocs.c:352: error: ‘ehdr’ undeclared (first use in this function)
arch/x86/tools/relocs.c:354: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:354: error: ‘SHT_STRTAB’ undeclared (first use in this function)
arch/x86/tools/relocs.c:357: error: ‘struct section’ has no member named ‘strtab’
arch/x86/tools/relocs.c:357: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:358: error: ‘struct section’ has no member named ‘strtab’
arch/x86/tools/relocs.c:360: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:362: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:364: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:366: error: ‘struct section’ has no member named ‘strtab’
arch/x86/tools/relocs.c:366: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:367: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c: In function ‘read_symtabs’:
arch/x86/tools/relocs.c:377: error: ‘ehdr’ undeclared (first use in this function)
arch/x86/tools/relocs.c:379: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:379: error: ‘SHT_SYMTAB’ undeclared (first use in this function)
arch/x86/tools/relocs.c:382: error: ‘struct section’ has no member named ‘symtab’
arch/x86/tools/relocs.c:382: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:383: error: ‘struct section’ has no member named ‘symtab’
arch/x86/tools/relocs.c:385: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:387: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:389: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:391: error: ‘struct section’ has no member named ‘symtab’
arch/x86/tools/relocs.c:391: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:392: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:396: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:396: error: ‘Elf32_Sym’ undeclared (first use in this function)
arch/x86/tools/relocs.c:397: error: ‘sym’ undeclared (first use in this function)
arch/x86/tools/relocs.c:397: error: ‘struct section’ has no member named ‘symtab’
arch/x86/tools/relocs.c: In function ‘read_relocs’:
arch/x86/tools/relocs.c:410: error: ‘ehdr’ undeclared (first use in this function)
arch/x86/tools/relocs.c:412: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:412: error: ‘SHT_REL’ undeclared (first use in this function)
arch/x86/tools/relocs.c:415: error: ‘struct section’ has no member named ‘reltab’
arch/x86/tools/relocs.c:415: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:416: error: ‘struct section’ has no member named ‘reltab’
arch/x86/tools/relocs.c:418: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:420: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:422: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:424: error: ‘struct section’ has no member named ‘reltab’
arch/x86/tools/relocs.c:424: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:425: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:429: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:429: error: ‘Elf32_Rel’ undeclared (first use in this function)
arch/x86/tools/relocs.c:430: error: ‘rel’ undeclared (first use in this function)
arch/x86/tools/relocs.c:430: error: ‘struct section’ has no member named ‘reltab’
arch/x86/tools/relocs.c: In function ‘print_absolute_symbols’:
arch/x86/tools/relocs.c:443: error: ‘ehdr’ undeclared (first use in this function)
arch/x86/tools/relocs.c:448: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:448: error: ‘SHT_SYMTAB’ undeclared (first use in this function)
arch/x86/tools/relocs.c:451: error: ‘struct section’ has no member named ‘link’
arch/x86/tools/relocs.c:452: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:452: error: ‘Elf32_Sym’ undeclared (first use in this function)
arch/x86/tools/relocs.c:453: error: ‘sym’ undeclared (first use in this function)
arch/x86/tools/relocs.c:455: error: ‘struct section’ has no member named ‘symtab’
arch/x86/tools/relocs.c:456: error: too many arguments to function ‘sym_name’
arch/x86/tools/relocs.c:457: error: ‘SHN_ABS’ undeclared (first use in this function)
arch/x86/tools/relocs.c:462: warning: implicit declaration of function ‘ELF32_ST_TYPE’
arch/x86/tools/relocs.c:463: warning: implicit declaration of function ‘ELF32_ST_BIND’
arch/x86/tools/relocs.c:464: warning: implicit declaration of function ‘ELF32_ST_VISIBILITY’
arch/x86/tools/relocs.c: In function ‘print_absolute_relocs’:
arch/x86/tools/relocs.c:475: error: ‘ehdr’ undeclared (first use in this function)
arch/x86/tools/relocs.c:479: error: ‘Elf32_Sym’ undeclared (first use in this function)
arch/x86/tools/relocs.c:479: error: ‘sh_symtab’ undeclared (first use in this function)
arch/x86/tools/relocs.c:481: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:481: error: ‘SHT_REL’ undeclared (first use in this function)
arch/x86/tools/relocs.c:484: error: ‘struct section’ has no member named ‘link’
arch/x86/tools/relocs.c:485: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:486: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:486: error: ‘SHF_ALLOC’ undeclared (first use in this function)
arch/x86/tools/relocs.c:489: error: ‘struct section’ has no member named ‘symtab’
arch/x86/tools/relocs.c:490: error: ‘struct section’ has no member named ‘link’
arch/x86/tools/relocs.c:491: error: ‘struct section’ has no member named ‘shdr’
arch/x86/tools/relocs.c:491: error: ‘Elf32_Rel’ undeclared (first use in this function)
arch/x86/tools/relocs.c:492: error: ‘rel’ undeclared (first use in this function)
arch/x86/tools/relocs.c:493: error: ‘sym’ undeclared (first use in this function)
arch/x86/tools/relocs.c:495: error: ‘struct section’ has no member named ‘reltab’
arch/x86/tools/relocs.c:496: warning: implicit declaration of function ‘ELF32_R_SYM’
arch/x86/tools/relocs.c:497: error: too many arguments to function ‘sym_name’
arch/x86/tools/relocs.c:498: error: ‘SHN_ABS’ undeclared (first use in this function)
arch/x86/tools/relocs.c:529: warning: implicit declaration of function ‘ELF32_R_TYPE’
arch/x86/tools/relocs.c: At top level:
arch/x86/tools/relocs.c:539: error: expected ‘)’ before ‘*’ token
arch/x86/tools/relocs.c:540: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
arch/x86/tools/relocs.c:631: error: expected ‘)’ before ‘*’ token
arch/x86/tools/relocs.c:639: error: expected ‘)’ before ‘*’ token
arch/x86/tools/relocs.c: In function ‘write32’:
arch/x86/tools/relocs.c:659: warning: implicit declaration of function ‘put_unaligned_le32’
arch/x86/tools/relocs.c: In function ‘emit_relocs’:
arch/x86/tools/relocs.c:668: warning: implicit declaration of function ‘walk_relocs’
arch/x86/tools/relocs.c:668: error: ‘count_reloc’ undeclared (first use in this function)
arch/x86/tools/relocs.c:682: error: ‘collect_reloc’ undeclared (first use in this function)
make[1]: *** [arch/x86/tools/relocs] Error 1
make: *** [archscripts] Error 2


Der ursprüngliche Beitrag von 21:37 Uhr wurde um 21:55 Uhr ergänzt:

So versuche mein Glück nochmals mit Ubuntu Mini und VMware Fusion.
Werde dann mal berichten...
 
Zuletzt bearbeitet von einem Moderator:
arch/x86/tools/relocs.c:
Da ist was flasch! Kontrolliere, ob das Cross-Build paßt. Versuche mal "CROSS_BUILD=arm-eabi-".
 
Ich werde euch berichten sobald alles unter Ubuntu läuft.
 
EDiT:
Hab das ganze jetzt mal mit einer anderen Anleitung versucht:
Jetzt stosse ich auf das folgende Problem:
CC arch/arm/kernel/bios32.o
CC arch/arm/kernel/isa.o
AS arch/arm/kernel/sleep.o
arch/arm/kernel/bios32.c: In function 'pci_fixup_83c553':
arch/arm/kernel/bios32.c:128:2: error: implicit declaration of function 'uncached_logk' [-Werror=implicit-function-declaration]
arch/arm/kernel/bios32.c:128:2: error: 'LOGK_WRITEL' undeclared (first use in this function)
arch/arm/kernel/bios32.c:128:2: note: each undeclared identifier is reported only once for each function it appears in
arch/arm/kernel/bios32.c:128:2: error: 'ETB_WAYPOINT' undeclared (first use in this function)
arch/arm/kernel/bios32.c:128:1: error: 'LOG_BARRIER' undeclared (first use in this function)
cc1: some warnings being treated as errors
make[1]: *** [arch/arm/kernel/bios32.o] Fehler 1
make[1]: *** Warte auf noch nicht beendete Prozesse...

EDiT:
Kernel habe ich diese Mal damit verusucht zu kompilieren, Befehl den ich ausgeführt habe war:
make ARCH=arm CROSS_COMPILE=/home/albrechtpatr/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/arm-none-linux-gnueabi- distclean
make ARCH=arm CROSS_COMPILE=/home/albrechtpatr/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/arm-none-linux-gnueabi- menuconfig
make ARCH=arm CROSS_COMPILE=/home/albrechtpatr/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/arm-none-linux-gnueabi- -j4
 
Zuletzt bearbeitet von einem Moderator:
Kann hier niemand helfen? :(
 
Eine mögliche Ursache kann die Kernel-Konfiguration sein.

Wenn die Konfiguration nicht mit Menuconfig erzeugt wurde, kann das sehr leicht passieren. Aber selbst mit Menuconfig hatte ich schon den Fall, dass sich ein Modul nicht erstellen ließ.

Ansonsten musst Du Du Dir die Sourcen angucken, ob dort Dateien eingebunden werden müssten in denen die fehlende Funktion declariert wird.

MfG Uwe
 
Also kannst du mir nicht helfen und mir fehlt die Zeit, die Englischkentnisse, die Linuxkenntnisse und der Wille um hier weiterzumachen. Schade :(

@Mod: Kann geschlossen werden.
 
Erwartet Du vielleicht dass ich für Dich die Konfig und die Sourcen sichte?

Wenn ich an einem Kernel rum schrauben will, muss ich mich in das Thema einarbeiten, da gehört Fleiss und Wille dazu.

Und natürlich lassen wir das Thema offen, vielleicht haben andere User Fragen oder Anregungen zu dem Thema.

MfG Uwe
 
  • Danke
Reaktionen: Dirk64
Ich erwarte das nicht, aber für mich ist das zu wenig interessant und mir fehlen die oben gennanten Sachen damit ich da mich noch länger reinknien könnte.

Was nicht heisst das ich nicht durchbeissen könnte oder ähnliches.
Beim Flashen vom ROM's und ähnlichem hatte ich manchmal tagelang kein funktionierends Handy und ich hab trotzdem weitergemacht. Wo dort aber eine Motivation da war, kann ich hier keine finden.

Und wegen dem Fleiss und Wille:
Ich müsste zuerst einmal das ganze verstehen damit ich ein Problem lösen könnte.
Ich kann mit den Fehlermeldungen überhaupt nicht anfangen.
Ich mein wenn dort steht "librar" Command not found dann weiss ich dass ich nach dem Paket librar suchen muss, aber wenn die Fehlermeldung:
rch/arm/kernel/bios32.c:128:2: error: implicit declaration of function 'uncached_logk'
Dort steht und Google mir KEINE einzige Lösung zeigt vegeht mir die Lust.
 
patrick37 schrieb:
Hab den Thread auch gefunden, schau ihn mir nochmals genauer an.

Der ursprüngliche Beitrag von 20:20 Uhr wurde um 20:52 Uhr ergänzt:

Habe jetzt nach deiner Anleitung einen Cross Compiler für dem Mac aufgesetzt und dann deine Anleitung weiter befolgt. Nun konnte ich auch den Kernel soweit konfigurieren.
Beim letzten Schritt, dem builden erscheint leider eine Fehlermeldung.
Hier mein Log. Falls du gerade weisst was das soll, danke ansonsten werde ich nach deiner Rückmeldung selber mal suchen:
Code:
Patricks-MacBook-Pro:kernel-yuga-aosp ***$ sudo make ARCH=arm CROSS_COMPILE=/Volumes/Image -j
make: /Volumes/Imagegcc: Command not found
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
make: /Volumes/Imagegcc: Command not found
  WRAP    arch/arm/include/generated/asm/bitsperlong.h
  WRAP    arch/arm/include/generated/asm/auxvec.h
  WRAP    arch/arm/include/generated/asm/cputime.h
  WRAP    arch/arm/include/generated/asm/emergency-restart.h
  WRAP    arch/arm/include/generated/asm/ioctl.h
  WRAP    arch/arm/include/generated/asm/errno.h
  WRAP    arch/arm/include/generated/asm/local.h
  WRAP    arch/arm/include/generated/asm/local64.h
  WRAP    arch/arm/include/generated/asm/irq_regs.h
  WRAP    arch/arm/include/generated/asm/percpu.h
  WRAP    arch/arm/include/generated/asm/resource.h
  WRAP    arch/arm/include/generated/asm/poll.h
  WRAP    arch/arm/include/generated/asm/sections.h
  WRAP    arch/arm/include/generated/asm/kdebug.h
  WRAP    arch/arm/include/generated/asm/siginfo.h
  WRAP    arch/arm/include/generated/asm/sizes.h
  CHK     include/linux/version.h
  UPD     include/linux/version.h
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/conmakehash
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
/bin/sh: /Volumes/Imagegcc: No such file or directory
make[2]: *** [scripts/mod/empty.o] Error 1
make[2]: *** Waiting for unfinished jobs....
scripts/mod/mk_elfconfig.c:4:17: error: elf.h: No such file or directory
scripts/mod/mk_elfconfig.c: In function ‘main’:
scripts/mod/mk_elfconfig.c:9: error: ‘EI_NIDENT’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:9: error: (Each undeclared identifier is reported only once
scripts/mod/mk_elfconfig.c:9: error: for each function it appears in.)
scripts/mod/mk_elfconfig.c:16: error: ‘ELFMAG’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:16: error: ‘SELFMAG’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:20: error: ‘EI_CLASS’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:21: error: ‘ELFCLASS32’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:24: error: ‘ELFCLASS64’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:30: error: ‘EI_DATA’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:31: error: ‘ELFDATA2LSB’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:34: error: ‘ELFDATA2MSB’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:9: warning: unused variable ‘ei’
make[2]: *** [scripts/mod/mk_elfconfig] Error 1
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  Generating include/generated/mach-types.h
  CC      kernel/bounds.s
/bin/sh: /Volumes/Imagegcc: No such file or directory
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....
make: *** [scripts] Error 2
Hi,
sorry das ich das hier komplett zitiere aber:

Punkt 1. das mühsamste ist deine (source) Rechner aufzusetzen. Ich arbeite an einer Linux (ubuntu 10.04) Mashine.
Über Mac leider keine ahnung, aber man verzweifelt gern schon beim aufsetzen!

Punkt 2. Dein Makefile in der Kernel source findet ja keinen cross compiler. du gibst den weg (datei pfad) nicht an, so kann das make ja nichts mit der Kernel Source anfangen.

Code:
adb pull /proc/config.gz ~/android/kernel/kernel source/config.gz cat config.gz | gunzip > .config
make file aufrufen:

Code:
make ARCH=arm CROSS_COMPILE=$CCOMPILER menuconfig
Code:
make ARCH=arm CROSS_COMPILE=/path/zu deine tollchain (/bin/arm-eabi-)
ps: da es für mich einfach und einfach ist bin ich nicht gut im erklären! eine Gute Seite gibt es vergiss einfach was cm angeht die Schritte sind die gleichen. Rom wird auch nicht an einem Tag gebaut.

http://oldwiki.cyanogenmod.org/wiki/Building_Kernel_from_source
 
Zuletzt bearbeitet von einem Moderator:
Sorry wenn du dir vergebene Mühe machst aber ich arbeite jetzt nicht mehr mit dem Mac und bin ebenfalls auf Ubuntu umgestiegen hier mal das aktuelle Log:
Code:
CC      arch/arm/kernel/bios32.o
  CC      arch/arm/kernel/isa.o
  AS      arch/arm/kernel/sleep.o
arch/arm/kernel/bios32.c: In function 'pci_fixup_83c553':
arch/arm/kernel/bios32.c:128:2: error: implicit declaration of function 'uncached_logk' [-Werror=implicit-function-declaration]
arch/arm/kernel/bios32.c:128:2: error: 'LOGK_WRITEL' undeclared (first use in this function)
arch/arm/kernel/bios32.c:128:2: note: each undeclared identifier is reported only once for each function it appears in
arch/arm/kernel/bios32.c:128:2: error: 'ETB_WAYPOINT' undeclared (first use in this function)
arch/arm/kernel/bios32.c:128:1: error: 'LOG_BARRIER' undeclared (first use in this function)
cc1: some warnings being treated as errors
make[1]: *** [arch/arm/kernel/bios32.o] Fehler 1
make[1]: *** Warte auf noch nicht beendete Prozesse...
Aufgerufen hab ich das ganzen mit den drei folgenden Befehlen:
make ARCH=arm CROSS_COMPILE=/home/albrechtpatr/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/arm-none-linux-gnueabi- distclean
make ARCH=arm CROSS_COMPILE=/home/albrechtpatr/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/arm-none-linux-gnueabi- menuconfig
make ARCH=arm CROSS_COMPILE=/home/albrechtpatr/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/arm-none-linux-gnueabi- -j4

Der ursprüngliche Beitrag von 20:00 Uhr wurde um 20:01 Uhr ergänzt:

Und dieser Befehl:
adb pull /proc/config.gz ~/android/kernel/kernel source/config.gz cat config.gz | gunzip > .config
holt die Konfig Datei vom Handy ab oder?
 
Wie ich geschrieben habe, damit hast du die Kernel config vom Phone, geht aber auch über die boot.img wie im link den ich gepostet habe.

(du musst den befehl im Ordner ((konsole)) im root verzeichniss der kernel source ausführen) dann wird die config al versteckte Datei rein geschrieben. Sichtbar mit natilus (taste strg+t) kannst du auch über notepad bearbeiten.

Du hast den Pfad zum cross compiler nicht richtig gesetzt. (siehe fehlermeldung)

zb: make ARCH=arm CROSS_COMPILE=${HOME}/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-

das sollte dich weiter bringen !

lg Isa
 
Gebe ich deinen Befehl ein sagt er mir dass es er den Command nicht fände.

Der Pfad /home/albrechtpatr/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/arm-none-linux-gnueabi-ist schon richtig, alle anderen Pfäde gehen nicht.
Und ja ich führe den make natürlich im (Root-)Verzeichnis des Kernels aus.
 
du meinst:

adb pull /proc/config.gz

wenn das im orginal (hersteller kernel geblockt ist geht das natürlich nicht)

meine Meinung nach hast du den falschen compiler:

arch/arm/kernel/bios32.c:128:2: error

Datei: arch/arm/bios32 in dieser datei schmeist es dich raus in Zeile 128
 
Schau mir das heute Abend nochmals an, arbeite nicht auf dem gleichen System.
 

Ähnliche Themen

M
  • Moonblast
Antworten
1
Aufrufe
1.126
swa00
swa00
C
Antworten
0
Aufrufe
1.213
Cortablo
C
F
Antworten
0
Aufrufe
1.254
Fr33l4nc3r
F
Zurück
Oben Unten