• 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

Hi All

I can get the kernel source code to build, and I can also get the zImage that I have compiled to boot to an adb prompt, but I cannot get it to boot Android, and I am experiencing some weird security stuff when trying to run some commands in adb

Let me first explain how I build my zImage
After I have downloaded and unzipped (twice) and un-tarred the files (jeeze)
I edit the Makefile and change this section

From
Code:
export KBUILD_BUILDHOST := $(SUBARCH)
ARCH        ?= $(SUBARCH)
CROSS_COMPILE    ?=
CROSS_COMPILE    ?= $(CONFIG_CROSS_COMPILE:"%"=%)

To
Code:
export KBUILD_BUILDHOST := $(SUBARCH)
ARCH        ?= arm
CROSS_COMPILE    ?= /home/hroark13/arm-eabi-4.4.3/bin/arm-eabi-


I copy the config file from the phone into the kernel directory



Code:
adb pull /proc/config.gz /home/hroark13/kernel/config.gz
cd kernel
cat config.gz | gunzip > .config

Then I build the zImage

Code:
make ARCH=arm


After about 15 minutes I get a zImage in /home/hroark13/kernel/arch/arm/boot

I pack this zImage with a ramdisk that I have made, which is a modified version of my CM7 ramdisk

I use my packer for this

http://androidforums.com/warp-all-things-root/520947-warp-kernel-packer.html



The mods that I made that are getting me into adb are in the "on init" section of the init.arthur.rc

Code:
on init

    setprop persist.service.adb.enable 1
    setprop persist.sys.usb.enable_switch 1
    setprop persist.sys.usb.linux_switch 1
    setprop persist.sys.usb.switch_pid 0x1354
    setprop persist.sys.usb.linux_pid 0x1350
    setprop persist.sys.usb.default.pid 0x83
    setprop persist.sys.usb.switch_pid 0x1351
    setprop persist.sys.usb.unique_sn 1
    setprop ro.secure 0
    setprop ro.allow.mock.location 1
    setprop ro.debuggable 1
    setprop persist.sys.usb.config adb
    setprop sys.usb.config adb
    setprop sys.usb.state $sys.usb.config
    exec /sbin/usbconfig
    write /sys/class/usb_composite/adb/enable 1
    exec /sbin/adbd
and i also copied a lot of files from CWM sbin, CM7 bin and CM7 xbin into the sbin folder


and it boots into adb, but will not boot Android


It does not want to mount the partitions

I have tried making scripts and and stuff to get the partitions to mount from the init.arthur.rc, but it will not work


however once I get into adb I can run a mount command and mount the partitions

I also get permission erors trying to run some commands

I am not a kernel or Linux expert, so maybe some of this info will shed some light on what is happening

Maybe we can put some diagnostic binaries in the ramdisk and figure out what the heck is wrong with the zImage that gets compiled


Here is the file i produced, it is flashed with CWM, you guys / gals can un-pack the ramdisk and try to produce your own zImages to see if you get the same results


make sure you backup before you flash it


zImage_test.zip




,
 
  • Like
Reactions: Table83
Upvote 0
Im still trying to figure out why the kernel isnt booting, I got about as far as you did hroark. Wouldnt mount partitions, was able to start adb.. etc etc. mind racking crap here..


yeah, it is weird

but at least it is booting into adb, so we are making some progress,

and maybe we can get some Linux kernel gurus to run some commands and figure some stuff out
 
  • Like
Reactions: Table83
Upvote 0
OK


so I have made some more progress


I am now able to have my compiled zImage boot my CM7 (i have not tried stock yet)

The problems is, that after about 20 seconds the phone shuts down, it did this before, but now it is just boot looping on the boot animation

this is definitely farther then we have been getting, and I think we will eventually hone in on the issue


What I have done to get this to work is modify the board-zte-arthur.c

I compared it to the board-zte-v9plus.c found in the V9 Plus source code

and changed a lot of the settings to match the V9 Plus file

The Warp and V9 source code is just about identical

attached is a zip file with

board-zte-arthur.c.org (original)
board-zte-arthur.c.v9mod (my mod)
board-zte-v9plus.c (found in v9 Plus source)
dconfig (the config I am using with debug enabled)

krnlmods.zip



if you want to try my modded board file, rename it to board-zte-arthur.c

and overwrite the file located in /arch/arm/mach-msm

if you want to use my dconfig

cp dconfig .config


This is not done yet, and is only for testing

But I do need some help with this, because I am a little out of my element

Like I said I have not tried this with a stock ROM, I have CM7 on my phone and I am testing with that
 
  • Like
Reactions: Table83
Upvote 0
ok

so I have decided to go back and change on thing at a time in the and use the original config (instead of the debug config)

board-zte-arthur.c

and it I was able to produce the same results with adding just one line that the v9 plus had

#include <linux/init.h>

it should look something like this at the top if you make the change



Code:
#include <linux/i2c/isa1200.h>
#include <linux/pwm.h>
#include <linux/pmic8058-pwm.h>
#include <linux/i2c/tsc2007.h>
#include <linux/input/kp_flip_switch.h>
#include <linux/leds-pmic8058.h>
#include <linux/input/cy8c_ts.h>
#include <linux/input/synaptics_i2c_rmi.h>
#include <linux/input/ft5x0x_ts.h>
#include <linux/msm_adc.h>
[COLOR=Red][B]#include <linux/init.h>[/B][/COLOR]

#include <linux/pmic8058-othc.h> 
#include <linux/regulator/consumer.h> //zrlean


ok so now I am going to see if I can figure out why it is boot looping
 
Upvote 0
I have and cant even get it to build, even tried editing it. But the files are different when compared to the warp source

at first i thaught it was the warp source when i first seen it but then relized it said n850 it was released 3-26-12 and had the same kernal name

i tryied again to send an email to zte and they told me it was highly confidental instead of dirrecting me some place else
 
Upvote 0
ZTE had sent me a message on Twitter asking me to follow them so they can send me a DM.... not sure if its going to be any help, or just a way to bump their numbers up..


if you boot your device with a regular kernel and then use and ADB shell look at dmesg, the VERY first line will tell you which version of GCC was used to build it.

the only way I could get the raw source to build was to use the tool chain that came with android-ndk-r5c, (ie 4.4.0).
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones