• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [Boost Mobile] kernel source code won't build

shinru2004

Android Expert
Recognized Developer
Has anyone been able to build the kernel from source code? I have edited the CPU freq tables but can't get it to build
 
nope, Ive tried it before but I got an error. I believe I might be able to build it now but I'm not sure
 
Ive tried multiple times, but I have no background in Linux so I have no clue where the issues could be. I've written a lot of programs in visual basic, but that's pretty much the easiest programming language ever ;)
 
Glad to see I'm not the only one. Been having all kinds of problems getting the zte source to build...even using the stock kernel settings. Got past some errors, but others are kicking my butt!

It seems like the files are configured for someone else's build environment. My latest error refers to a path thats, not even on my computer...?

internal error in relocate_special_relocatable, at /home/jingyu/projects/gcc/android-toolchainsrc/build/../binutils/binutils-2.19/gold/arm.cc:9524

Edit: For the record, jingyu is not a profile on my computer. (nor is the rest of the path)

Edit again: Disregard the error above. That path was related to the toolchain I was using, not the Zte files. (was just testing the 4.4.3 toolchain for the heck of it) Using 4.4.0, it's now showing a segmentation fault error. No clue where to start with that one. Had quite a few errors/warnings regarding output that was in one format, but was expected to be in another one too. Not sure why.
 
Lol I've been using the 4.4.3 tool chain. maybe that's the issue let me know if you get it to compile I'll send this file to unlock overclock
 
In one of the posts on here QuietStorm mentioned to that it was necessary to use an older toolchain like 4.4.0. FWIW, I tried building with multiple toolchains and seem to get different results with each one so I have no clue which is right. Looks like QuietStorm was able to make a kernel build though. I just wish I knew how he did it! lol
 
Out of curiosity, are you guys building on 32-bit systems or 64-bit? I'm on 64-bit and am wondering if that could be part of the problem.
 
I'm on a 32bit Linux mint. I haven't tried it on my 64bit Linux setup yet
 
im on ubuntu 10.10 x64

Code:
michael@michael-MS-7375:~/kernel$ make
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/docproc
  HOSTCC  scripts/basic/hash
  CC      kernel/bounds.s
  GEN     include/generated/bounds.h
  CC      arch/x86/kernel/asm-offsets.s
  GEN     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/bin2c
  CC      init/main.o
  CHK     include/generated/compile.h
  CC      init/version.o
  CC      init/do_mounts.o
  CC      init/do_mounts_rd.o
  CC      init/do_mounts_initrd.o
  LD      init/mounts.o
  CC      init/initramfs.o
  CC      init/calibrate.o
  LD      init/built-in.o
  HOSTCC  usr/gen_init_cpio
  GEN     usr/initramfs_data.cpio
  AS      usr/initramfs_data.o
  LD      usr/built-in.o
  LD      arch/x86/crypto/built-in.o
  CC      arch/x86/kernel/process_64.o
  CC      arch/x86/kernel/signal.o
  AS      arch/x86/kernel/entry_64.o
  CC      arch/x86/kernel/traps.o
  CC      arch/x86/kernel/irq.o
  CC      arch/x86/kernel/irq_64.o
  CC      arch/x86/kernel/dumpstack_64.o
  CC      arch/x86/kernel/time.o
  CC      arch/x86/kernel/ioport.o
  CC      arch/x86/kernel/ldt.o
  CC      arch/x86/kernel/dumpstack.o
  CC      arch/x86/kernel/setup.o
  CC      arch/x86/kernel/x86_init.o
  CC      arch/x86/kernel/i8259.o
  CC      arch/x86/kernel/irqinit.o
  CC      arch/x86/kernel/sys_x86_64.o
  CC      arch/x86/kernel/x8664_ksyms_64.o
  CC      arch/x86/kernel/syscall_64.o
  CC      arch/x86/kernel/vsyscall_64.o
  CC      arch/x86/kernel/bootflag.o
  CC      arch/x86/kernel/e820.o
  CC      arch/x86/kernel/pci-dma.o
  CC      arch/x86/kernel/quirks.o
  CC      arch/x86/kernel/i8237.o
  CC      arch/x86/kernel/topology.o
  CC      arch/x86/kernel/kdebugfs.o
  CC      arch/x86/kernel/alternative.o
  CC      arch/x86/kernel/i8253.o
  CC      arch/x86/kernel/pci-nommu.o
  CC      arch/x86/kernel/hw_breakpoint.o
  CC      arch/x86/kernel/tsc.o
  CC      arch/x86/kernel/io_delay.o
  CC      arch/x86/kernel/rtc.o
  CC      arch/x86/kernel/trampoline.o
  CC      arch/x86/kernel/process.o
  CC      arch/x86/kernel/i387.o
  CC      arch/x86/kernel/xsave.o
  CC      arch/x86/kernel/ptrace.o
  CC      arch/x86/kernel/step.o
  CC      arch/x86/kernel/stacktrace.o
  CC      arch/x86/kernel/acpi/boot.o
  CC      arch/x86/kernel/acpi/sleep.o
  LDS     arch/x86/kernel/acpi/realmode/wakeup.lds
  AS      arch/x86/kernel/acpi/realmode/wakeup.o
  CC      arch/x86/kernel/acpi/realmode/wakemain.o
  CC      arch/x86/kernel/acpi/realmode/video-mode.o
  AS      arch/x86/kernel/acpi/realmode/copy.o
  AS      arch/x86/kernel/acpi/realmode/bioscall.o
  CC      arch/x86/kernel/acpi/realmode/regs.o
  CC      arch/x86/kernel/acpi/realmode/video-vga.o
  CC      arch/x86/kernel/acpi/realmode/video-vesa.o
  CC      arch/x86/kernel/acpi/realmode/video-bios.o
  LD      arch/x86/kernel/acpi/realmode/wakeup.elf
  OBJCOPY arch/x86/kernel/acpi/realmode/wakeup.bin
  AS      arch/x86/kernel/acpi/wakeup_rm.o
  AS      arch/x86/kernel/acpi/wakeup_64.o
  CC      arch/x86/kernel/acpi/cstate.o
  LD      arch/x86/kernel/acpi/built-in.o
  CC      arch/x86/kernel/apic/apic.o
  CC      arch/x86/kernel/apic/apic_noop.o
  CC      arch/x86/kernel/apic/probe_64.o
  CC      arch/x86/kernel/apic/ipi.o
  CC      arch/x86/kernel/apic/nmi.o
  CC      arch/x86/kernel/apic/io_apic.o
  CC      arch/x86/kernel/apic/apic_flat_64.o
  LD      arch/x86/kernel/apic/built-in.o
  CC      arch/x86/kernel/cpu/intel_cacheinfo.o
  CC      arch/x86/kernel/cpu/addon_cpuid_features.o
  CC      arch/x86/kernel/cpu/proc.o
  MKCAP   arch/x86/kernel/cpu/capflags.c
  CC      arch/x86/kernel/cpu/capflags.o
  CC      arch/x86/kernel/cpu/powerflags.o
  CC      arch/x86/kernel/cpu/common.o
  CC      arch/x86/kernel/cpu/vmware.o
  CC      arch/x86/kernel/cpu/hypervisor.o
  CC      arch/x86/kernel/cpu/sched.o
  CC      arch/x86/kernel/cpu/mshyperv.o
  CC      arch/x86/kernel/cpu/bugs_64.o
  CC      arch/x86/kernel/cpu/intel.o
  CC      arch/x86/kernel/cpu/amd.o
  CC      arch/x86/kernel/cpu/centaur.o
  CC      arch/x86/kernel/cpu/perf_event.o
  LD      arch/x86/kernel/cpu/cpufreq/built-in.o
  CC      arch/x86/kernel/cpu/mtrr/main.o
  CC      arch/x86/kernel/cpu/mtrr/if.o
  CC      arch/x86/kernel/cpu/mtrr/generic.o
  CC      arch/x86/kernel/cpu/mtrr/cleanup.o
  LD      arch/x86/kernel/cpu/mtrr/built-in.o
  CC      arch/x86/kernel/cpu/perfctr-watchdog.o
  LD      arch/x86/kernel/cpu/built-in.o
  CC      arch/x86/kernel/reboot.o
  CC      arch/x86/kernel/early-quirks.o
  AS      arch/x86/kernel/trampoline_64.o
  CC      arch/x86/kernel/mpparse.o
  CC      arch/x86/kernel/module.o
  CC      arch/x86/kernel/early_printk.o
  CC      arch/x86/kernel/hpet.o
  CC      arch/x86/kernel/k8.o
  CC      arch/x86/kernel/test_rodata.o
  CC      arch/x86/kernel/pcspeaker.o
  CC      arch/x86/kernel/pci-swiotlb.o
  CC      arch/x86/kernel/pmtimer_64.o
  CC      arch/x86/kernel/pci-gart_64.o
  CC      arch/x86/kernel/aperture_64.o
  CC      arch/x86/kernel/vsmp_64.o
  LD      arch/x86/kernel/built-in.o
  AS      arch/x86/kernel/head_64.o
  CC      arch/x86/kernel/head64.o
  CC      arch/x86/kernel/head.o
  CC      arch/x86/kernel/init_task.o
  LDS     arch/x86/kernel/vmlinux.lds
  CC      arch/x86/mm/init.o
  CC      arch/x86/mm/init_64.o
  CC      arch/x86/mm/fault.o
  CC      arch/x86/mm/ioremap.o
  CC      arch/x86/mm/extable.o
  CC      arch/x86/mm/pageattr.o
  CC      arch/x86/mm/mmap.o
  CC      arch/x86/mm/pat.o
  CC      arch/x86/mm/pgtable.o
  CC      arch/x86/mm/physaddr.o
  CC      arch/x86/mm/gup.o
  CC      arch/x86/mm/setup_nx.o
  CC      arch/x86/mm/pat_rbtree.o
  LD      arch/x86/mm/built-in.o
  CC      arch/x86/vdso/vma.o
  LDS     arch/x86/vdso/vdso.lds
  AS      arch/x86/vdso/vdso-note.o
  CC      arch/x86/vdso/vclock_gettime.o
  CC      arch/x86/vdso/vgetcpu.o
  CC      arch/x86/vdso/vvar.o
  VDSO    arch/x86/vdso/vdso.so.dbg
  OBJCOPY arch/x86/vdso/vdso.so
  AS      arch/x86/vdso/vdso.o
  VDSOSYM arch/x86/vdso/vdso-syms.lds
  LD      arch/x86/vdso/built-in.o
  LD      arch/x86/built-in.o
  CC      kernel/sched.o
  CC      kernel/fork.o
  CC      kernel/exec_domain.o
  CC      kernel/panic.o
  CC      kernel/printk.o
  CC      kernel/cpu.o
  CC      kernel/exit.o
  CC      kernel/itimer.o
  TIMEC   kernel/timeconst.h
  CC      kernel/time.o
  CC      kernel/softirq.o
  CC      kernel/resource.o
  CC      kernel/sysctl.o
  CC      kernel/sysctl_binary.o
  CC      kernel/capability.o
  CC      kernel/ptrace.o
  CC      kernel/timer.o
  CC      kernel/user.o
  CC      kernel/signal.o
  CC      kernel/sys.o
  CC      kernel/kmod.o
  CC      kernel/workqueue.o
  CC      kernel/pid.o
  CC      kernel/rcupdate.o
  CC      kernel/extable.o
  CC      kernel/params.o
  CC      kernel/posix-timers.o
  CC      kernel/kthread.o
  CC      kernel/wait.o
  CC      kernel/kfifo.o
  CC      kernel/sys_ni.o
  CC      kernel/posix-cpu-timers.o
  CC      kernel/mutex.o
  CC      kernel/hrtimer.o
  CC      kernel/rwsem.o
  CC      kernel/nsproxy.o
  CC      kernel/srcu.o
  CC      kernel/semaphore.o
  CC      kernel/notifier.o
  CC      kernel/ksysfs.o
  CC      kernel/pm_qos_params.o
  CC      kernel/sched_clock.o
  CC      kernel/cred.o
  CC      kernel/async.o
  CC      kernel/range.o
  CC      kernel/early_res.o
  CC      kernel/groups.o
  CC      kernel/freezer.o
  CC      kernel/profile.o
  CC      kernel/stacktrace.o
  CC      kernel/irq/handle.o
  CC      kernel/irq/manage.o
  CC      kernel/irq/spurious.o
  CC      kernel/irq/resend.o
  CC      kernel/irq/chip.o
  CC      kernel/irq/devres.o
  CC      kernel/irq/autoprobe.o
  CC      kernel/irq/proc.o
  CC      kernel/irq/pm.o
  LD      kernel/irq/built-in.o
  CC      kernel/power/main.o
  CC      kernel/power/console.o
  CC      kernel/power/process.o
  CC      kernel/power/suspend.o
  CC      kernel/power/nvs.o
  CC      kernel/power/wakelock.o
  CC      kernel/power/userwakelock.o
  CC      kernel/power/earlysuspend.o
  CC      kernel/power/fbearlysuspend.o
  CC      kernel/power/poweroff.o
  CC      kernel/power/pm_monitor.o
  LD      kernel/power/built-in.o
  CC      kernel/time/timekeeping.o
  CC      kernel/time/ntp.o
  CC      kernel/time/clocksource.o
  CC      kernel/time/jiffies.o
  CC      kernel/time/timer_list.o
  CC      kernel/time/timecompare.o
  CC      kernel/time/timeconv.o
  CC      kernel/time/clockevents.o
  CC      kernel/time/tick-common.o
  CC      kernel/time/tick-broadcast.o
  CC      kernel/time/tick-oneshot.o
  CC      kernel/time/tick-sched.o
  CC      kernel/time/timer_stats.o
  LD      kernel/time/built-in.o
  CC      kernel/trace/trace_clock.o
  CC      kernel/trace/ring_buffer.o
  LD      kernel/trace/built-in.o
  CC      kernel/futex.o
  CC      kernel/rtmutex.o
  CC      kernel/dma.o
  CC      kernel/up.o
  CC      kernel/module.o
  CC      kernel/kallsyms.o
  CC      kernel/cgroup.o
  CC      kernel/cgroup_freezer.o
  GZIP    kernel/config_data.gz
  IKCFG   kernel/config_data.h
  CC      kernel/configs.o
  CC      kernel/res_counter.o
  CC      kernel/seccomp.o
  CC      kernel/rcutree.o
  CC      kernel/relay.o
  CC      kernel/utsname_sysctl.o
  CC      kernel/elfcore.o
  CC      kernel/slow-work.o
  CC      kernel/perf_event.o
  CC      kernel/hw_breakpoint.o
  LD      kernel/built-in.o
  CC      mm/bootmem.o
  CC      mm/filemap.o
  CC      mm/mempool.o
  CC      mm/oom_kill.o
  CC      mm/fadvise.o
  CC      mm/maccess.o
  CC      mm/page_alloc.o
  CC      mm/page-writeback.o
  CC      mm/readahead.o
  CC      mm/swap.o
  CC      mm/truncate.o
  CC      mm/vmscan.o
  CC      mm/shmem.o
  CC      mm/prio_tree.o
  CC      mm/util.o
  CC      mm/mmzone.o
  CC      mm/vmstat.o
  CC      mm/backing-dev.o
  CC      mm/page_isolation.o
  CC      mm/mm_init.o
  CC      mm/mmu_context.o
  CC      mm/fremap.o
  CC      mm/highmem.o
  CC      mm/madvise.o
  CC      mm/memory.o
  CC      mm/mincore.o
  CC      mm/mlock.o
  CC      mm/mmap.o
  CC      mm/mprotect.o
  CC      mm/mremap.o
  CC      mm/msync.o
  CC      mm/rmap.o
  CC      mm/vmalloc.o
  CC      mm/pagewalk.o
  CC      mm/init-mm.o
  CC      mm/bounce.o
  CC      mm/dmapool.o
  CC      mm/sparse.o
  CC      mm/sparse-vmemmap.o
  CC      mm/ashmem.o
mm/ashmem.c: In function
 
Thanks guys... Okay, so the 32-bit/64-bit thing might not be the issue. I'm pretty sure I've read things saying 64-bit was the best and others saying 32-bit was the one to use. I dunno.

Shinru - You may be able to edit your Makefile and see if that lets you go farther. I got a similar errors and this edit seemed to allow the script to continue somewhat. (though still crashed with other errors that I can't figure out)

In Makefile look for the KBUILD_CFLAGS area. Try removing the 2 lines that have "Werror" in them.

Old config: (disregard the "#"s...keeping stock config around just in case I need to roll back)
#KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
# -Werror \
# -fno-strict-aliasing -fno-common \
# -Werror-implicit-function-declaration \
# -Wno-format-security \
# -fno-delete-null-pointer-checks

New config:
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \
-Wno-format-security \
-fno-delete-null-pointer-checks
 
Snake - I think yours is a toolchain issue. When I see stuff like that, it's usually cuz I screwed something up in the toolchain setup.
 
Yeah I dont think I had it set up quite right or something. I will try again eventually but I cba to atm
 
think i finally managed to get a clean build of the kernel from source with overclock values. i will make a zimage and add it to the boot.img on a backup and see if i can overclock
 
think i finally managed to get a clean build of the kernel from source with overclock values. i will make a zimage and add it to the boot.img on a backup and see if i can overclock

That's good news! What did you do to get it to build right?
 
changed the toolkit and used your edit, but now i cant make the zImage file so its not fully compiled yet
 
That's a bummer. Was hoping you found some magic fix to correct all build issues. lol Oh well, at least you're getting farther than I am. :)
 
might have a deodexed rom up in a bit, then im gonna continue work on the kernel

cant get the rom to boot after deodex so apparently not all files are finished i will have to look into it more tomorrow
 
Alrighty, I'll try my hand at it. I'll be booting into linux and give u guys a report back on success/failure
 
This what it says in setcpu about the kernal, it says the gcc was 4.4.3?
42574afe-c927-14de.jpg
 
Interesting info... FWIW, here's the link where QuietStorm discussed the toolchain issue.

http://androidforums.com/warp-all-t...es-gingerbread-kernel-2-6-35-source-code.html

I've tried 4.4.0, 4.4.3 and more, but none have worked so far. Now I'm getting these stupid segmentation fault errors:

mm/page-writeback.c: In function 'write_cache_pages':
mm/page-writeback.c:822: internal compiler error: Segmentation fault

Seems that segmentation faults can be related to the gcc version or possibly indicate a hardware issue. Tried multiple gcc versions and it didn't help so maybe it's my system. I don't know. Also thought about trying an older version of the Java jdk (ver 5 instead of 6) and see if that makes a difference. Running out of ideas though.
 
I wonder if we can contact ZTE? I know Sebastian was in contact with someone from ZTE about source code or something of that nature. I'll see if I can find the link
 
Well I think either its not complete, or its got to be something in the build environment. I haven't got a stock kernal to build yet. Is there other libs needed to build the source if you are changing the stock configuration?
 
Back
Top Bottom