yashsingh1/xdaforums huggingface dataset:
[Android] brymaster5000:
i686-linux-android-gccgcc is your error. You have too many gcc's there

Sent from my One.
[Android] Samgarr:
I see, but how i can fix this? I dont use this in variable or config.
[Android] Ev3rtH:
Ok, so I just compiled my first kernel for my Xperia Z Ultra. Quick question googling doesn't really answer: how can I safely test my kernel?

- Is it possible to do a fastboot boot boot.img on Sony unlocked devices?

- Can I flash the stock boot.img while my current kernel/boot partition is corrupted?
[Android] Samgarr:
Ok, i figured this out:

[sam@wrk kernel]$ export ARCH=x86
[sam@wrk kernel]$ export CROSS_COMPILE=""
[sam@wrk kernel]$ make M=fs/cifs

WARNING: Symbol version dump /home/sam/Downloads/osc_4_blade2_kk_13_result/linux/kernel/Module.symvers
is missing; modules will have no dependencies and modversions.

Building modules, stage 2.
MODPOST 1 modules
CC fs/cifs/cifs.mod.o
LD [M] fs/cifs/cifs.ko

[sam@wrk kernel]$ adb shell
shell@YT2:/ $ su
root@YT2:/ # insmod /sdcard/cifs.ko
insmod: init_module '/sdcard/cifs.ko' failed (Required key not available)

Google told me problem is my module is not signed, but how to achieve this? I tried edit .config and recompile module, but this didnt help.

CONFIG_MODULE_SIG=y
CONFIG_MODULE_SIG_FORCE=y
[Android] Isriam:
quick question. all i want to do is take samsung sources and compile using your guide, however i want to add uv/oc ability to this. is this a module or something i have to edit in the defconfig?
[Android] desalesouche:
find on github similar kernel where uv/oc have been added and follow commits
[Android] c0d3r!pp3r:
Nice tutorial,, followed exactly & it's perfectly running... thanks to OP for this awesome tutorial
[Android] epiquiem:
I need help implementing faux123's intelli_plug in my kernel. It errors out when building.
[Android] naman18794:
How to get kernel source for non popular devices

my kernel source is not available easily on internet as you mentioned above. where can i get 'em ?

thanks in advance
[Android] boka18:
I have this error: mediatek/makefile:47 TARGET_PRODUCT/PROJECT is not set. Stop.

So i didn't knew what to do, than i search the internet and i found that i should make PROJECT=devicename.

When i do that.. i get in a boot loop, terminal displays something like this: warning:(VIDEO VIVI & FB .... )

i get that warning over and over.. it's not ending..

So please, what will the solution be? I'm trying to build kernel for MT6582 HTC Desire 310
[Android] farz2farz:
hi i want to port android cm12 form htc m7 to htc butterfly s. can i build lollipop kernel like this tutorial. pls help
[Android] adomol:
I was wondering if anyone had any idea's about this...

I successfully compiled the stock SlimKat kernel for Nexus 7 (grouper) with a patch to add f2fs support. I pretty much follow the instruction from the OP. I removed the original zImage and fstab and packed the zImage I birthed and an f2fs compatible fstab into the stock slim kernel boot.img . Then I put the boot.img into a SlimKat rom, tweaked the updater script and flashed the rom on a freshly wiped N7 with all f2fs partitions. And everything seems to be working fine. Then I flashed another f2fs kernel, the one I was normally using because I wanted to check something out and to my surprise when the device booted up and I went to check the kernel info, it shows that the kernel I compiled is still installed. I tried flashing the custom kernel again and my kernel still shows up in about tablet and in Trickster Mod.

Does anyone know what could cause this? All I did was grab the kernel source from the Slimroms git, apply a patch to add f2fs then built it with the arm-eabi-linaro-4.6.2 toolchain. The only thing I did in menuconfig was to change the stock label of the kernel.

I completely stumped. Any help would be greatly appreciated.
[Android] brymaster5000:
It sounds like the other kernel is in any kernel format and your ram disk is secure. I could be wrong, but check to make sure your boot.img includes insecure ram disk.

Sent from my One.
[Android] adomol:
Thanks!

That solved the mystery, I'll add this factoid to my personal kernel compiling cheatsheet.

May you have 1000 free days at LegoLand!
[Android] sumit yadav:
I was compiling cm11 kernel for galaxy s2 i9100 and got this "initramfs" error.
[Android] helloansuman:
Thanks for the info...

Thanks a lot for the info. Really helpful...
[Android] thicklizard:
Try executing this command.

Make - j2 ARCH=arm CROSS_COMPILE=/android/kernel/toolchains/arm-eabi-4.4.3/bin/arm-eabi-
[Android] thewadegeek:
Check your toolchain path.
[Android] DragunKorr:
ok thanks let ya know!:D
[Android] Amin`:
is that make difernces which tool/way do we compile?

for example in my source that is it(im not sure)

cross compile:i86linux

what am supose to do? do I need to change "i86linux" to "toolchain"?
[Android] qazsxdcfv:
Yo man , i want to ask some question ..

Right now im newbie to C/C++ development .. and Kernel thing ..

I'm reading the OP .. and great ..

1 thing i can only do is change the name of the kernel :D

Can you reccomend me the next step ? .. thx ..

And one again .. what is sweep2wake patch ? ..

Thanks

-"qazsxdcfv"-

Sent from my hTC Desire HD powered Sense 3 by LeeDrOid
[Android] dany547:
i get this error

/bin/sh: /home/dan/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-: not found
make[2]: *** [scripts/mod/empty.o] Error 127
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2

the ideea is that the path is defined in the Make file, and the toolchain is present there, cuz i used it on my other projects
[Android] DragunKorr:
Wanting to update or patch my kernel to newer version what needs to be edited? Thanks Guide has been working lika charm bro!

---------- Post added at 01:50 AM ---------- Previous post was at 01:48 AM ----------

Do this first you need permmissions!

cd ~/android/kernel/toolchains

sudo chmod 777 arm-eabi-4.4.3
[Android] Amin`:
I got this error:

amin@Amin-Aspire:~/android/kernel/kernel$ make -j2
scripts/kconfig/conf -s arch/arm/Kconfig
CHK include/linux/version.h
SYMLINK include/asm -> include/asm-arm
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
UPD include/linux/utsrelease.h
CC scripts/mod/empty.o
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
scripts/mod/modpost.c: In function ‘get_markers’:
scripts/mod/modpost.c:1542:12: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
scripts/mod/modpost.c: In function ‘add_marker’:
scripts/mod/modpost.c:1962:10: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
CC kernel/bounds.s
GEN include/linux/bounds.h
CC arch/arm/kernel/asm-offsets.s
GEN include/asm/asm-offsets.h
CALL scripts/checksyscalls.sh
CC init/main.o
HOSTCC usr/gen_init_cpio
GEN usr/initramfs_data.cpio.gz
In file included from include/linux/mempolicy.h:62:0,
from init/main.c:51:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:416:16: error: variable 'c' set but not used [-Werror=unused-but-set-variable]
AS usr/initramfs_data.o
LD usr/built-in.o
cc1: all warnings being treated as errors

make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2
make: *** Waiting for unfinished jobs....
[Android] dany547:
im pretty sure this is not the problem...
[Android] DragunKorr:
i need help whats goin on i did not have this issue before!

:mad::mad::mad::mad::mad::mad::mad:
[Android] DragunKorr:
never mind i got sorry to spam yur thread bro!!
[Android] qazsxdcfv:
You know the makefile ? , just write te "export blabla" there .. and you dont write that again on terminal , ...

Beside that , you doesn't config your kernel .. :D

Sent from my hTC Desire HD powered Sense 3 by LeeDrOid
[Android] Amin`:
I get this error:
[Android] djvoleur:
Gonna piggy back of this...like so...
[Android] qazsxdcfv:
ya like that , .. and on the first part , give "export CROSS_ blablabla" .. :D

look mine
[Android] ptolomeo:
great tutorial...

Great tutorial.

I have a couple of questions I would like to understand before trying to compile an Android Kernel.

1.- How do I add 'recovery functionality' (CWM) to the Kernel? I missed that one... If you don't have a custom recovery in your kernel... how can you fix a 'non booting kernel' (if you fail making your own kernel) for example?

Edit: Well, I think I found you have to integrate https://github.com/ClockworkMod into the Kernel... keep reading info...

2.- Has the source code for the jellyBean (Android 4.1) Kernel been released by Samsung yet? I browse their website http://opensource.samsung.com and cannot see any reference to 'JB' (just ICS and GB) for my mobile (N7000)
[Android] thewadegeek:
1. Custom Recoveries are beyond the scope of this guide, also there are other ways to flash a kernel besides a recovery.

2. That will be totally device dependent.
[Android] shank2:
great stuff for wanna be developer like me. huge thanks. (sorry ran out of thanks)
[Android] kairi_zeroblade:
for cyring out louds sake i did follow all the steps on the OP but i always end up like this..

SYSMAP System.map
SYSMAP .tmp_System.map
OBJCOPY arch/arm/boot/Image
Kernel: arch/arm/boot/Image is ready
AS arch/arm/boot/compressed/head.o
LZO arch/arm/boot/compressed/piggy.lzo
/bin/sh: 1: lzop: not found
make[2]: *** [arch/arm/boot/compressed/piggy.lzo] Error 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make: *** [zImage] Error 2

as far as i am getting to understand i am missing something related to lzo compression..

can some one here help?? me gulps..
[Android] Kostyan_nsk:
I've got strange issue. After all source files compiled successfully, linker gives a lot of errrors like this:

drivers/built-in.o:ad7146.c:dev_attr_enable: error: undefined reference to 'attr_ad7146_get_enable'

Declaration of function 'attr_ad7146_get_enable' and function body is in the same ad7146.c where error occurs.

I was trying to add

EXPORT_SYMBOL(attr_ad7146_get_enable)

but it didn't help.

Was trying different toolchains (linaro 4.9; google 4.6-4.9) - nothing changed.

Building under Linux Mint 17.

Where have I made a mistake?
[Android] Wahaj.47:
I am unable to seth the patb correctly can any one help ?

I m using cygwin on windows
[Android] hell_lock:
You shouldn't use cygwin for kernel building..
[Android] Shuttwind215:
[MENTION=5771316]Wahaj.47[/MENTION] Here is allready setup enivorment[what you need is a source code ,toolchain ,and you also need to do all the export things[don't update the system]:

[url]
http://xdaforums.com/showthread.php?t=2585828
[/url]
[Android] sumit yadav:
Guys, i am getting the error of not having ramdisk.cpio and ramdisk-recovery.cpio, I'm compiling cm11 kennel source, somebody please tell me how to get those ramdisk.cpio files, i can't download the full cm11 source, but i have device specific files.

#i have these files for cm11
[Android] roshan2989:
hello guys i just cherry-pick intelldemand governer to my kernel..i have error when compiling it

CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC drivers/cpufreq/cpufreq_intellidemand.o
CC drivers/cpufreq/freq_table.o
drivers/cpufreq/cpufreq_intellidemand.c: In function ‘dbs_check_cpu’:
drivers/cpufreq/cpufreq_intellidemand.c:670:3: error: implicit declaration of function ‘cpufreq_notify_utilization’ [-Werror=implicit-function-declaration]
cpufreq_notify_utilization(policy, load_at_max_freq);
^
cc1: some warnings being treated as errors
make[2]: *** [drivers/cpufreq/cpufreq_intellidemand.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....

Help would be apprieacted guys...im learning as much i can..
[Android] Tommy-Geenexus:
Have you cherry-picked all necessary patches?

Normally this one shouldn't pop up.

Either way you can either add the -WERROR flag to your Makefile or correct the function dbs_check_cpu.
[Android] roshan2989:
thanks for the reply sir,should i add the "-WERROR" in makefile..? and where should i check the dbs_check_cpu..

i have check the cherry-pick,its been insert correctly..
[Android] Tommy-Geenexus:
Do it like below.

Open your main Kernel Makefile.

Add the necessary lines.

Editing the function requires some c knowledge though.

Edit: it seems to me you haven't picked all patches for intellidemand, right?
[Android] sumit yadav:
Hey, Roshan which kernel are you compiling?
[Android] roshan2989:
thank you for replying sir,as i see in the makefile,the -werror is already included,i think i have to double check the patches.

before this i try to add some of the governer and but runs in error when compiling..

im compiling for Cm11 kernel for s2..personal use..
[Android] pec0ra:
Try Wno-error instead of Werror at this line !
[Android] sumit yadav:
Me too compiling cm11 kernel for s2, but getting ramdisk.cpio and ramdisk-recovery.cpio error!

Can you please pin me those ramdisk.cpio files
[Android] tom411:
Compile error

Hi, I'm trying to compile kernel and got this error. Thanks for any help.

make: /opt/toolchains/arm-eabi-4.6/bin/arm-eabi-gcc: Command not found
scripts/kconfig/conf --silentoldconfig Kconfig
arch/arm/mach-exynos/Kconfig:1502:warning: choice value used outside its choice group
arch/arm/mach-exynos/Kconfig:1503:warning: defaults for choice values not supported
drivers/misc/mdm_if/Kconfig:48:warning: defaults for choice values not supported
make: /opt/toolchains/arm-eabi-4.6/bin/arm-eabi-gcc: Command not found
CHK include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
/bin/sh: 1: /opt/toolchains/arm-eabi-4.6/bin/arm-eabi-gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
root@tom411:~/arm-eabi-4.6# cd /bin/arm-eabi-gcc
bash: cd: /bin/arm-eabi-gcc: Doesn't exist
[Android] brymaster5000:
Make sure your path is correct and that you are using ARCH=arm and then SUBARCH=arm.
[Android] jfpsb:
Help

Guys, I'm trying to build a kernel and I get this error. Can anybody help? Thanks

drivers/leds/leds-qpnp.c: In function 'qpnp_wled_init':
drivers/leds/leds-qpnp.c:1641:2: error: implicit declaration of function 'WLED1_LED1_CABC_EN' [-Werror=implicit-function-declaration]
drivers/leds/leds-qpnp.c:1642:4: error: 'WLED_CABC_EN_MASK' undeclared (first use in this function)
drivers/leds/leds-qpnp.c:1642:4: note: each undeclared identifier is reported only once for each function it appears in
drivers/leds/leds-qpnp.c:1642:22: error: 'WLED_CABC_EN_ON' undeclared (first use in this function)
cc1: some warnings being treated as errors

I searched in the leds-qpnp.c and the variables are only declared if CONFIG_MACH_LGE is set or something like that. Here's the code:

#ifdef CONFIG_MACH_LGE
#define WLED1_LED1_CABC_EN(base)	(base + 0x66) //CABC
#endif //

But where is this CONFIG_MACH_LGE defined? Thanks
[Android] pec0ra:
It's defined in the defconfig.
[Android] jfpsb:
heap_id_mask?

EDIT:

Sorry guys, I confused the threads and posted something that didn't belong here. =/
[Android] Luffy.d:
Hi Guys...need some help i am compiling kernel for my device and i m getting this error

not able to understand it...anyone can help me

source link

https://github.com/MiCode/H1S_kernel/blob/master/net/bluetooth/hci_conn.c
[Android] desalesouche:
https://github.com/Blefish/android_...mmit/2f6182ebdece23e64be55962548a2e3bcb376643

and another gcc 4.8 fix you might need:

https://github.com/Blefish/android_...mmit/1f6da887e610cdef64d0f5ab4f60f59872dcd260

happy new year
[Android] Luffy.d:
thanks a lot bro....i m using sabermod

getting lots of error but able to fix it only this one i didnt understand

thanks again...happy new year

edit : compile succefully bro thanks

but getting one weird issue..kernel booted but no display full black..can hear phone locking sound and all

any idea about this?
[Android] mdfzhi:
logcat and dmesg should give u more info on whats going on.
[Android] Toni5830:
I'm facing a strange problem:

I am using a prebuilt ramdisk to build a full kernel for my device

(initramfs tree)

.

├── cache

├── dev

│** └── block

├── init -> /stage1/init

├── mnt

├── proc

├── stage1

│** ├── boot.cpio

│** ├── busybox

│** ├── init

│** └── recovery.cpio

└── sys

as you can see inside it there is: boot.cpio (which is the real ramdisk) and recovery.cpio (which is recovery!).

The problem is with those two files:

-if I use prebuilt boot.cpio and recovery.cpio to build boot.img for my device, it works with no problem

-if I try to decompress those 2 archives and then recompress them (without making any change!!), after compiling a boot.img as I always do, phone will not boot!

Yes, I just decompress those archives, create another boot.cpio and recovery.cpio archives and if I build a kernel using the new ones it won't boot (with no recovery, since it is included in initramfs)

I'm on Ubuntu 14.04, I own a Samsung Galaxy S Advance (with a kk rom)

To extract archives I right click on file and choose "extract here", to compress them (see image):

View attachment 3097719

Any suggestion?
[Android] _that:
Use mkbootfs to build the cpio. Get it from the Android source tree (system/core/cpio) or from some kitchen.
[Android] Wahaj.47:
Help

i am trying to compile a kernel but get into this error .. can any one help me ??

arch/arm/mach-msm/htc_acoustic_8x60.c: In function 'acoustic_ioctl':
arch/arm/mach-msm/htc_acoustic_8x60.c:248:15: error: 'struct adie_codec_hwsetting_entry' has no member named 'voc_action'
arch/arm/mach-msm/htc_acoustic_8x60.c:249:15: error: 'struct adie_codec_hwsetting_entry' has no member named 'voc_action_sz'
arch/arm/mach-msm/htc_acoustic_8x60.c:252:15: error: 'struct adie_codec_hwsetting_entry' has no member named 'midi_action'
arch/arm/mach-msm/htc_acoustic_8x60.c:253:15: error: 'struct adie_codec_hwsetting_entry' has no member named 'midi_action_sz'
make[1]: *** [arch/arm/mach-msm/htc_acoustic_8x60.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
make: *** Waiting for unfinished jobs....
[Android] _that:
You're trying to compile "a kernel". Since you don't provide any details, I can just recommend that you read the error message, look at the source file and source line indicated in said error message, and fix your bug.
[Android] Luffy.d:
take a log nd dmesg....but you i m new to this not able to understand :p

can you take a look if you are free :fingers-crossed:
[Android] Wahaj.47:
OH Sorry dude

here is the error message

arch/arm/mach-msm/htc_acoustic_8x60.c: In function 'acoustic_ioctl':
arch/arm/mach-msm/htc_acoustic_8x60.c:248:15: error: 'struct adie_codec_hwsetting_entry' has no member named 'voc_action'
arch/arm/mach-msm/htc_acoustic_8x60.c:249:15: error: 'struct adie_codec_hwsetting_entry' has no member named 'voc_action_sz'
arch/arm/mach-msm/htc_acoustic_8x60.c:252:15: error: 'struct adie_codec_hwsetting_entry' has no member named 'midi_action'
arch/arm/mach-msm/htc_acoustic_8x60.c:253:15: error: 'struct adie_codec_hwsetting_entry' has no member named 'midi_action_sz'
make[1]: *** [arch/arm/mach-msm/htc_acoustic_8x60.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
make: *** Waiting for unfinished jobs....

AND....

I am compiling SebastianFM_defconfig while placing it in the source of another kernel . Both kernels are of HTC sensation

whenever i get into some error... I edit the source .. sometimes repace the whole file with the error or sometimes edit the (.c) file
[Android] desalesouche:
hi. here is what i understand from logcat, i hve been looking briefly at logcat cos i am just back from journey and i am quite tired...

it seems that you have some libXXX.so that are missing.. some others things also are missing. you have a problem with rmt_storage ...

will have a deeper look later.... :p
[Android] Luffy.d:
thank bro... and also one of the user say its framebuffer issue i have to compile rom with the kernel to get display working or make CAF Kernel

so bro any idea how to make my device kernel into caf kernel
[Android] desalesouche:
you should push your device tree on github, it might be easier to help you.

did you try to compile full rom or just kernel?

if you want your kernel to be caf---> add line 31 and 32 to your boardconfig.mk https://github.com/Blefish/android_...-common/blob/cm-11.0/BoardConfigCommon.mk#L31

then try to compile your rom /kernel and fix.
[Android] Luffy.d:
no i m only compiling kernel....isn't there any way to make the kernel caf without compiling with rom

here device tree
[Android] Nick_73:
I can't find a tut for doing this on Arch/Manjaro Linux... Any ideas?
[Android] savoca:
Didn't need anything special for Arch. Just make sure you're using python 2.7 during compile (depends on what you're compiling I guess)

Some useful binaries: http://savoca.codefi.re/dev-resources/
[Android] Luffy.d:
hi guys....i m upstreaming my kernel using patch from kernel.org and i getting some error but able to fix it but this one is going from my head

any one have any idea..please

CC drivers/usb/core/hub.o
drivers/usb/core/hub.c: In function 'usb_new_device':
drivers/usb/core/hub.c:2042:3: error: implicit declaration of function 'add_device_randomness' [-Werror=implicit-function-declaration]
add_device_randomness(udev->serial, strlen(udev->serial));
^
cc1: some warnings being treated as errors
make[3]: *** [drivers/usb/core/hub.o] Error 1
make[2]: *** [drivers/usb/core] Error 2
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error 2

is it ok to remove -Werror-implicit-function-declaration from makefile then compile.....

or remove the add_device_randomness(udev->serial, strlen(udev->serial)); from hub.c
[Android] pec0ra:
Yes it should be ok to add -Wno-implicit-function-declaration in Makefile.

The cleanest way to fix it however is to declare the function add_device_randomness before it is called. To do this, find where the function is defined. It's something like

TYPE add_device_randomness(ARGS) {
DEFINITION
}

Copy the first part

TYPE add_device_randomness(ARGS);

Without the brackets {} and paste it before line 2042, but not inside a function or block. This will be the declaration of the function.

In C you have a difference between function declaration and definition. You can Google it if you want more info =)
[Android] Tommy-Geenexus:
Add #include <linux/random.h> to the header inclusions, this will fix it.

It is caused by the 3.4.9 patch, i faced this issue myself too.

---------- Post added at 03:42 PM ---------- Previous post was at 03:41 PM ----------

Good find, but this isn't needed, a simple inclusion of the random header is sufficient.
[Android] Luffy.d:
thanks a lot for reply bro

the code is like this

/* Tell the world! */
announce_device(udev);

if (udev->serial)
add_device_randomness(udev->serial, strlen(udev->serial));
if (udev->product)
add_device_randomness(udev->product, strlen(udev->product));
if (udev->manufacturer)
add_device_randomness(udev->manufacturer,
strlen(udev->manufacturer));

device_enable_async_suspend(&udev->dev);

so i have to change it into this... right?....done and it work thank you bro

/* Tell the world! */
announce_device(udev);

Edit : [MENTION=5243932]Tommy-Geenexus[/MENTION]....including random.h also work bro

thank you very much
[Android] Luffy.d:
[MENTION=5243932]Tommy-Geenexus[/MENTION] and [MENTION=4466123]pec0ra[/MENTION]

any idea about this one too....

sound/core/hwdep.c: In function 'snd_hwdep_open':
sound/core/hwdep.c:104:3: error: implicit declaration of function 'snd_card_unref' [-Werror=implicit-function-declaration]
snd_card_unref(hw->card);
^
cc1: some warnings being treated as errors
[Android] brymaster5000:
Check hwdep.h for the same function and match the parameters. It's probably in include/linux/...