yashsingh1/xdaforums huggingface dataset:
[Kindle Fire Android Development] death2all110:
Thanks but we aren't worried about ICS right now....this is gingerbread.

---------- Post added at 02:30 PM ---------- Previous post was at 01:40 PM ----------

CC [M] drivers/misc/wl127x-rfkill.o
drivers/misc/wl127x-rfkill.c:31: warning: 'enum rfkill_state' declared inside parameter list
drivers/misc/wl127x-rfkill.c:31: warning: its scope is only this definition or declaration, which is probably not what you want
drivers/misc/wl127x-rfkill.c:31: error: parameter 2 ('state') has incomplete type
drivers/misc/wl127x-rfkill.c: In function 'wl127x_rfkill_set_power':
drivers/misc/wl127x-rfkill.c:36: error: 'RFKILL_STATE_UNBLOCKED' undeclared (first use in this function)
drivers/misc/wl127x-rfkill.c:36: error: (Each undeclared identifier is reported only once
drivers/misc/wl127x-rfkill.c:36: error: for each function it appears in.)
drivers/misc/wl127x-rfkill.c:39: error: 'RFKILL_STATE_SOFT_BLOCKED' undeclared (first use in this function)
drivers/misc/wl127x-rfkill.c: In function 'wl127x_rfkill_probe':
drivers/misc/wl127x-rfkill.c:52: error: variable 'default_state' has initializer but incomplete type
drivers/misc/wl127x-rfkill.c:52: error: 'RFKILL_STATE_SOFT_BLOCKED' undeclared (first use in this function)
drivers/misc/wl127x-rfkill.c:52: error: storage size of 'default_state' isn't known
drivers/misc/wl127x-rfkill.c:62: error: implicit declaration of function 'rfkill_set_default'
drivers/misc/wl127x-rfkill.c:63: error: type of formal parameter 2 is incomplete
drivers/misc/wl127x-rfkill.c:65: error: implicit declaration of function 'rfkill_allocate'
drivers/misc/wl127x-rfkill.c:65: warning: assignment makes pointer from integer without a cast
drivers/misc/wl127x-rfkill.c:69: error: dereferencing pointer to incomplete type
drivers/misc/wl127x-rfkill.c:70: error: dereferencing pointer to incomplete type
drivers/misc/wl127x-rfkill.c:72: error: dereferencing pointer to incomplete type
drivers/misc/wl127x-rfkill.c:73: error: dereferencing pointer to incomplete type
drivers/misc/wl127x-rfkill.c:74: error: dereferencing pointer to incomplete type
drivers/misc/wl127x-rfkill.c:75: error: dereferencing pointer to incomplete type
drivers/misc/wl127x-rfkill.c:80: error: implicit declaration of function 'rfkill_free'
drivers/misc/wl127x-rfkill.c:52: warning: unused variable 'default_state'
make[2]: *** [drivers/misc/wl127x-rfkill.o] Error 1
make[1]: *** [drivers/misc] Error 2
make: *** [drivers] Error 2
blake@darkxshadows:~/amazon/kindle_fire/kernel/android-2.6.35$

Now it errors out on the above.

I have to work 4-9 CST tonight.

Ill mess with it later.

By the way, once i get a complete kernel build I'll release my source code to github
[Kindle Fire Android Development] DooMLoRD:
good to see work has already started on kernel :)

i might be getting this device, may be in 2-3 weeks time...

try using 4.4.3 toolchain from CM repo... its the best to work with kernels...

here is the toolchain at my git repo:

https://github.com/DooMLoRD/android_prebuilt_toolchains

clone it and use the arm-eabi-4.4.3 toolchain

also if u guys are using 4.6.2 linaro then edit the makefiles and remove this flag "-Werror"
[Kindle Fire Android Development] death2all110:
I'm using the android NDK one. I was using just the one built into the android source code. the one in the ndk seems to be working better, but I'll give the CM one a shot later after work thanks!
[Kindle Fire Android Development] DooMLoRD:
nah the NDK ones are all screwed up... they throw a LOT of un-necessary errors...
[Kindle Fire Android Development] death2all110:
Alright. Settled. I'll use your CM one ;) Nice to see a kernel dev in here besides me. I only built kernels for the LG Ally. So I dont have a tremendous amount of experience but I have enough to get me by for the most part. Lol.
[Kindle Fire Android Development] DooMLoRD:
;)

i have kernels for X10, ARC, PLAY, SGS-SL and few more Xperia devices, but those i have stopped due to lack of time :P

BTW:

whts the kernel version ? .35? .37?
[Kindle Fire Android Development] terracode:
Sorry... had a typo in my post... I ment Gingerbread and not Honeycomb source available for Pandaboard.... No worries...
[Kindle Fire Android Development] ajq:
.35
[Kindle Fire Android Development] ajq:
Seg faulted on me during one of the sound drivers :(
[Kindle Fire Android Development] death2all110:
CC lib/vsprintf.o
AR lib/lib.a
LD vmlinux.o
MODPOST vmlinux.o
WARNING: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
KSYM .tmp_kallsyms1.S
AS .tmp_kallsyms1.o
LD .tmp_vmlinux2
KSYM .tmp_kallsyms2.S
AS .tmp_kallsyms2.o
CHK include/linux/version.h
HOSTCC scripts/unifdef
scripts/unifdef.c:201: error: conflicting types for ‘parseline’
/usr/include/stdio.h:671: note: previous declaration of ‘parseline’ was here
make[2]: *** [scripts/unifdef] Error 1
make[1]: *** [__headers] Error 2
make: *** [vmlinux] Error 2
blake@darkxshadows:~/amazon/kindle_fire/kernel/android-2.6.35$

Last part of the build and it fails then. GRR!

HELP ME!?
[Kindle Fire Android Development] DooMLoRD:
ahhh!!

almost there...

check that file:

scripts/unifdef.c @ 201

usr/include/stdio.h @ 671
[Kindle Fire Android Development] death2all110:
line201 of unifdef.c:

static Linetype parseline(void);

line671-673 of stdio.h

extern _IO_ssize_t parseline (char **__restrict __lineptr,
size_t *__restrict __n,
FILE *__restrict __stream) __wur;
[Kindle Fire Android Development] DooMLoRD:
check where it is used in other files and then correct the reference and remove the conflicting declarations...
[Kindle Fire Android Development] ajq:
how did you get wl127x-rfkill to compile? It was driving me so nuts I pulled it out of my config.
[Kindle Fire Android Development] DooMLoRD:
use correct toolchain
[Kindle Fire Android Development] death2all110:
Actually all the toolchains I tried wont compile wl127x-rfkill. And the cm one caused issues with other sections. The ndk has worked fine for me thus far.

And What do you mean remove the conflicting declarations?
[Kindle Fire Android Development] DooMLoRD:
hmmm... how do i explain...

wait do one thing push ur current sources to git and send me link i will try fixing it at my end...

also if possible send me the toolchain which worked for u (will save time) ;)

here i am at github: https://github.com/DooMLoRD
[Kindle Fire Android Development] ajq:
Same problem I was having; I tried a few of them. What did you end up doing, leaving it out? I gave up on it, heh.
[Kindle Fire Android Development] death2all110:
Doomlord, ill push em when I get home. I tried doing it last night but my tithing was acting up

And ajqi removed it from my configure.
[Kindle Fire Android Development] ajq:
[edit]

nevermind, got zimage.

Kernel: arch/arm/boot/zImage is ready

though I'm sure I left something out of the config that was necessary.

anybody wanna try it? I don't actually have my fire here at the office.

It will probably blow up.
[Kindle Fire Android Development] :
i'll take a look at the sources myself and see what I can do while I'm workin on my Vibrant stuff tonight. =] Although KF will be back seat to Vibrant as i dont own one =/
[Kindle Fire Android Development] death2all110:
I figured out the issue, I had an issue a long time ago with stdio.h and the solution was to change the 'getline' on line 671 to 'parseline'. Well, it also says to change it back when finished, guess what I didnt do.... xD
[Kindle Fire Android Development] death2all110:
IT BUILT!

Ill test soon!
[Kindle Fire Android Development] Thelgow:
Yes Igor! Throw the switch!
[Kindle Fire Android Development] ajq:
Grats mate. Hope it boots :)

Now to just figure out that rfkill stuff. I am afraid it is going to take a bit of doing, and my c is just too weak to bother with it.

I have a feeling amazon never bothered to make it work either because they didn't wire the chip that way or because they didn't want to take the time. Just like the OTG stuff throws a bunch of compile errors.
[Kindle Fire Android Development] death2all110:
My OTG stuff seemed to compile..
[Kindle Fire Android Development] ajq:
I should have said warnings - mine compiled as well.
[Kindle Fire Android Development] death2all110:
Well. Im stuck. Glad i didnt post the zImage..
[Kindle Fire Android Development] ajq:
Awe, c'mon, at least I said I didn't think it would work, lol. What happened, did you get anything in the way of feedback?

If the food at this German place weren't so awesome, I'd Say it would be worth my wife's ire to spend the evening at my bench playing around. :)
[Kindle Fire Android Development] death2all110:
No fastboot. No adb. Nothing. Just hangs at the Kindle Fire Logo.
[Kindle Fire Android Development] MrJandD:
Factory cable to the rescue, tommarow.
[Kindle Fire Android Development] ajq:
Bugger. I expect I'll brick mine shortly after 1. Will let you know. Check your PM?
[Kindle Fire Android Development] SikYou:
Did you fastboot flash or just boot? Long press power button give you anything?
[Kindle Fire Android Development] death2all110:
PM Replied to.

For DEVS ONLY:

http://github.com/death2all110/kindle_fire-2.6.35.7-DarkXShadows

As it stands now, the above WILL NOT boot when compiled.
[Kindle Fire Android Development] :
Did you have a ramdisk? =3
[Kindle Fire Android Development] death2all110:
Yes. I did
[Kindle Fire Android Development] DooMLoRD:
What mkbootimg parameters u used?

Sometimes the pagesize, cmdline, offset parameters can be wrong which causes issues...
[Kindle Fire Android Development] death2all110:
i used fastboot. And since trying the pin on the board to boot via usb i cant get my kindle fire to turn on. I hope the factory cable comes in tomorrow.
[Kindle Fire Android Development] DooMLoRD:
even if u used fastboot u need to create the boot.img right? so wht mkbootimg arguments u used?
[Kindle Fire Android Development] death2all110:
you dont need to use mkbootimg. fastboot does it for you.
[Kindle Fire Android Development] DooMLoRD:
ok...

from what i know for SE Xperia ARC, PLAY, X10, Samsung Galaxy S(C)L (i9003), Huawei Ideos X6; boot.img (zImage + ramdisk.cpio.gz) which is built using mkbootimg, needs correct arguments else device wont boot... the final boot.img needs to be flashed via fastboot...
[Kindle Fire Android Development] DooMLoRD:
@death2all110

i got the following from stock boot.img

i checked the sources u uploaded to git...

CMDline is already defined in .config so u need to worry only abt pagesize and offset...

as u can see from above image, u need to set pagesize to 4096..

as for offset u need to test a few things.... try the standard one used in N1:

0x20000000

OR

0x00200000

actually before u begin flashing ur own kernels u need to confirm that the stock kernel boots as is by unpacking and replacing it... just do a small change in ramdisk an verify that it boots...

if u guys are willing to test i can post some test boot.imgs based on stock kernel with insecure ramdisk, init.d support, etc...
[Kindle Fire Android Development] death2all110:
Base address/kernel offset is 0x80000000 which was also defined in the .config

I used fastboot boot <zImage> <ramdisk>

but without paying much attention, (I was side tracked) i ran fastboot flash:raw boot <zImage> <ramdisk>

I know none of you guys are judging me, I'm judging myself. And with that, I have to say I'm a f*cking idiot. Lol.
[Kindle Fire Android Development] DooMLoRD:
hehe

cool down bro i was just trying to help out...

if my help is not wanted let me know i wont bother posting here...
[Kindle Fire Android Development] ajq:
Did your cable come in today, at least?
[Kindle Fire Android Development] :
Nobody said you didn't, all are just offering help. If your wanting to figure it out by yourself why post?
[Kindle Fire Android Development] pyrostic:
Me thinks it's a coping mechanism. Sometimes people just like to post things on forums so they can see it for themselves.
[Kindle Fire Android Development] death2all110:
Lol. Sorry it came out that i was pissed off guys. I was irritated over my fire, but it wasnt directing it towards anyone, i was just saying what the base address/kernel offset was. and that i wrecked my fire by not being careful. Simply taking responsibility. Heh

Anyway, Yes, my cable came in, no it didnt do anything. :( New fire will be here tomorrow or monday.

Amazon has some of the best damn customer service ever. I don't think I've ever gotten off the phone with them and felt like i just got shafted. Its always been pleasant. So Kudos to amazon for having great customer service.

Again sorry my wording was off in my previous post.
[Kindle Fire Android Development] ajq:
ok, the kernel I just built boots. No sound though? wonder what I did (or didn't do, as the case may be) there.

Everything else seems to work fine as far as I can tell.

Will have a look at the sound drivers again and give it another go. Once I get a working boot.img squared away I will post my source to github.
[Kindle Fire Android Development] DooMLoRD:
great!

so i have a few questions:

did u flash the zImage or boot.img?

if it was boot.img wht arguments did u use to create it (mkbootimg arguments)

how did u flash it?

oh btw i dont have the device with me but really curious on how the development goes :)

thanks!
[Kindle Fire Android Development] ajq:
I got the sound working now, though I had to fudge a line in omap4_panda_aic31xx.c to do it. Should probably figure that out, as I don't think it ought to be the way I made it, heh.

I flashed boot.img; I used the ramdisk from the current 6.2 boot.img. I used the command-line from the current stuff as well, but put it in the .config

I used fastboot with a factory cable (wow, did I do a butcher job on this cable, but it works).

mkbootimg --kernel zImage --ramdisk boot.img-ramdisk.gz -o boot.img

$ fastboot -i 0x1949 boot boot.img
downloading 'boot.img'...
OKAY [ 0.839s]
booting...
OKAY [ 0.004s]
finished. total time: 0.842s

Need to leave the office, will get this stuff up on github after dinner. Glad I got this working, but now I have to work tomorrow to catch up on the crap I didn't do yesterday :)
[Kindle Fire Android Development] :
no worries =]

also to ajq

Great job on the booting kernel!
[Kindle Fire Android Development] ajq:
eh, not so much. it's acting weird now. still playing around tho.
[Kindle Fire Android Development] death2all110:
New fire should be here saturday or monday at the latest.
[Kindle Fire Android Development] pokey9000:
It's probably still in USB mode. In USB mode there's no display or led. Holding the button down for ~30 sec should get it out.

Or you could try the omap4boot and the new bootloader I posted to get you into fastboot.
[Kindle Fire Android Development] death2all110:
Nope, i tried that my linux machine and lsusb doesnt see it. Thats what I thought too. so I unplugged the battery and usb and let it sit for an hour plugged batter back in and still nothing. held power for almost 1.5 minute but nothing. its dead dead. i charged it all night and tried again when i got up. nothing. So I called amazon and the new one will be here tomorrow or monday.
[Kindle Fire Android Development] loki154:
Will we have to have a factory cable to flash kernels? Or can we just flash them from adb?
[Kindle Fire Android Development] death2all110:
you can flash with fastboot. I just have a factory cable just in case i screw something up, (again)
[Kindle Fire Android Development] atinm:
Have any of you uploaded your source tree to github if you've successfully compiled (and run ;) )? I'm waiting for a buildable kernel tree before I start to look at Kindle Fire and see about porting CM to it. I haven't had time to do the initial bootstrap of the kernel myself because I've been busy with SGS2 and ICS. If nothing else, a defconfig would be nice.

Thanks.
[Kindle Fire Android Development] riverzhou:
I am waiting for runnable kernel too .

Amazon delete the Makefile in plat-omap and mach-omap2 .

Don't know which broad file that kindle file used.

I think the broad file should be board-4430kc1.c and defconfig may be similar with android_4430pm_defconfig .
[Kindle Fire Android Development] death2all110:
I've uploaded mine to github, It builds. But doesn't boot.

http://github.com/death2all110
[Kindle Fire Android Development] riverzhou:
Which defconfig do you use?
[Kindle Fire Android Development] DooMLoRD:
Can someone try n pull defconfig from proc?

adb pull /proc/config.gz .

Btw what is the kernel version string?

adb shell uname -a
[Kindle Fire Android Development] atinm:
I don't think Amazon enabled the IKCONFIG CONFIG options to dump the config to /proc/config.gz for their builds (very few vendors do) - I wouldn't have asked for the config for a booting kernel build otherwise.
[Kindle Fire Android Development] riverzhou:
some information of stock kernel :

[ 0.000000] Initializing cgroup subsys cpu

[ 0.000000] Linux version 2.6.35.7+ (ubuntu@ip-10-170-73-78) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202) ) #1 SMP PREEMPT Wed Nov 23 03:44:46 UTC 2011

[ 0.000000] CPU: ARMv7 Processor [411fc093] revision 3 (ARMv7), cr=10c53c7f

[ 0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache

[ 0.000000] Machine: OMAP4430

[ 0.000000] Memory policy: ECC disabled, Data cache writealloc

[ 0.000000] On node 0 totalpages: 118528

[ 0.000000] free_area_init_node: node 0, pgdat c0668de0, node_mem_map c076d000

[ 0.000000] Normal zone: 926 pages used for memmap

[ 0.000000] Normal zone: 0 pages reserved

[ 0.000000] Normal zone: 117602 pages, LIFO batch:31

[ 0.000000] ***********************

[ 0.000000] OMAP4430 ES2.3 type(GP)

[ 0.000000] id-code (6b95c02f)

[ 0.000000] Die-id (4A560026-00000001-0A3BF73F-07007005)

[ 0.000000] Prod-id (000DB95C-000600F0)

[ 0.000000] Reset Reason(0x00000001)
[Kindle Fire Android Development] death2all110:
android_4430_defconfig

but i modified it from there...

I included my config file in my source upload.
[Kindle Fire Android Development] riverzhou:
Is there any way to redirect kernel boot output to screen or usb ?

Ant then we can know where is kernel hang up.
[Kindle Fire Android Development] death2all110:
I'm back! New KF arrived today!
[Kindle Fire Android Development] DooMLoRD:
great!

dont brick it again ;)
[Kindle Fire Android Development] riverzhou:
Congratulate!
[Kindle Fire Android Development] randallu:
Glad to hear your replacement device arrived!

FYI, I built your kernel using the linaro toolchain and can confirm that it doesn't boot :(. But at least you know it's less likely to be a configuration issue on your end.

Wish I could see the console -- pity there's no uart header on the motherboard...

EDIT: Just noticed in your config the board is 4430SDP; I'm spinning a new build for the "kc1" board -- that might stand a better chance of booting... we shall see.

EDIT2: Nope :(.
[Kindle Fire Android Development] death2all110:
Theres supposedly an unused 4 pin connector on the underside of the board. Possibly UART/Serial. I dunno. KC1 is the name of our board, so I would think because of it being imprinted on the board and other places. I was told to use SDP so thats what I used in my config. I just wish there was a way to debug and see where its hanging.
[Kindle Fire Android Development] intersectRaven:
Isn't it possible to enable the dumping of last_kmsg to /proc since you're building the kernel anyway? (I'm new to the Kindle Fire kernel so please excuse my ignorance if ever :) )
[Kindle Fire Android Development] randallu:
Not that useful when you have no way of getting it back... Kernel probably isn't getting far enough to mount disks anyway as it doesn't enumerate as a USB device.
[Kindle Fire Android Development] riverzhou:
The current situation is we can NOT boot kernel completed from source.

It will hang up when booting. So, how can I get something from /proc.
[Kindle Fire Android Development] intersectRaven:
Finished compiling the kernel...is it possible to use fastboot boot on this?
[Kindle Fire Android Development] antagonizt:
Has anyone tried the Sourcery build Amazon used to build the stock kernel?

https://sourcery.mentor.com/sgpp/lite/arm/portal/release1293

(gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202)
[Kindle Fire Android Development] ajq:
yup, for my last 100 or so builds, lol.. the one build I thought I had working ended up having some really odd problems. I have been struggling to get another to boot properly for some time now.

kc1 definitely seems like the way to go, board-wise. it's the only one where I can get the device to do anything.
[Kindle Fire Android Development] riverzhou:
The problem is Makefile config file and some drivers source code, not compiler.

For compiler, I think linaro is the best.
[Kindle Fire Android Development] intersectRaven:
Do you guys create the boot.img from the zImage then use the fastboot boot command to test? :confused:
[Kindle Fire Android Development] death2all110:
I cant even get the compiler amazon used to run on my system. at least not the one in the link above. Keeps complaining about cc1 no matter what i do when i run make menuconfig. and yes, it is in my path.

Im not sure what happened. but its even doing this on my old compiler....

blake@darkxshadows:~/amazon/kindle_fire/kernel/android-2.6.35$ make menuconfig
HOSTCC scripts/basic/fixdep
gcc: error trying to exec 'cc1': execvp: No such file or directory
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
[Kindle Fire Android Development] intersectRaven:
I got it to build easily. I even used my Mjolnir compiler for it. Just need to know how to test it safely. :)
[Kindle Fire Android Development] N23:
To see the console output, maybe we should try the Tegra UART Cable from here: http://xdaforums.com/showthread.php?t=1081743

I don't have my kindle yet, so i can't test that :o
[Kindle Fire Android Development] DooMLoRD:
hello intersectRaven,

great to see u here!

dd seems to be one way though some guys reported success using fastboot too...

though it would be best if we can hotboot (fastboot boot) kernels, atleast initially, before we can flash them...
[Kindle Fire Android Development] intersectRaven:
Is using dd safe? I don't want to risk my Fire being blown out. :p Anyways, I'm still reading about the links you posted on your thread. :)
[Kindle Fire Android Development] DooMLoRD:
ya dd is scary to use but a viable option for future :)

man its really great to see an expert kernel developer like urself here!

this device has a great time ahead :D

oh btw if the kernel boots please upload the source to git.. we all can start playing with it ;)
[Kindle Fire Android Development] intersectRaven:
Does anyone have the .config which ajq used? I just need to see where to insert the base address thing since I can't find it and maybe what else may be different in my config. I've already fixed the compile errors in the kernel properly so it can be compiled by any of the compilers we use out here. Anyways, I'm still searching on where I put my instructions on how to divide the boot.img into its component so I can get the ramdisk. :)
[Kindle Fire Android Development] ajq:
0x80000000 seems to work.
[Kindle Fire Android Development] DooMLoRD:
LOL!!!

unpack-bootimg.pl (http://android-dls.com/files/apps/unpack-bootimg.zip)

;)
[Kindle Fire Android Development] ajq:
Hotbooting works, I made a factory cable last week. Didn't want to take any chances. So I imagine getting into fastboot any other way ought to work as well.
[Kindle Fire Android Development] intersectRaven:
Is that the DUCATI_BASEIMAGE parameter?
[Kindle Fire Android Development] DooMLoRD:
nope i think thats the CONFIG_PHYS_OFFSET
[Kindle Fire Android Development] ajq:
Correct
[Kindle Fire Android Development] death2all110:
Build machine is back up and running!
[Kindle Fire Android Development] DooMLoRD:
just a thought.. may be plan for future ;)

since KF and galaxy nexus share the same chipset OMAP4430 we can try porting the 3.0 kernel for this device...

exiting repos for galaxy nexus:

https://bitbucket.org/paulobrien/android_kernel_galaxynexus/src

https://bitbucket.org/franciscofranco/galaxy-nexus/src