Kernel compile error "forbidden warning" - Android Q&A, Help & Troubleshooting

Edit: fixed the first problem by changing the variable in the function header from int to long, but got the same problem again at another position, which isn't that easy to fix:
Code:
fs/f2fs/inode.c: In function 'f2fs_evict_inode':
fs/f2fs/inode.c:576:5: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
error, forbidden warning: inode.c:576
Original post below:
---
I'm trying to make a new kernel, first time trying this.
I'm using this source / branch: https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/davinci-p-oss
At first I'm trying to just make it compile without adding any features.
I'm using this guide: https://forum.xda-developers.com/an...erence-how-to-compile-android-kernel-t3627297
Using googles toolchain aarch64-linux-android-4.9 on archlinux
I already fixed a few compile errors by myself but now I'm stuck here:
Code:
arch/arm64/mm/fault.c: In function 'mem_abort_decode':
arch/arm64/mm/fault.c:127:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'unsigned int' [-Wformat=]
error, forbidden warning: fault.c:127

me too

Related

[Q] Allwinner A13 - Flash NAND (A13-Olinuxino-WiFi Dev Board)

Hey guys,
I was hoping someone would be able to help me flash the NAND on the board. There are a couple avenues that I have taken, but I've gotten stuck right before completion each time. I have an image to flash, and access to the board via my 32-bit Linux PC.
The board that I have is the Olimex A13-OLinuXino-WiFi.
Here's the different methods I've attempted:
Using ADB
This is what I'm most familiar with. The only place I'm stuck is finding out what block to flash the image to.
From what I've heard...
Code:
/dev/block/nanda bootloader
/dev/block/nandc boot
/dev/block/nandg recovery
But, I have no clue if that applies to all A13's.
My assumption is to run the following code, but... that's what it is... an assumption. Anyone able to shed some light on this?
Code:
cat /sdcard/imagefile.img > /dev/block/nand<1?>
sync; sync; sync
echo -n boot | busybox dd of=/dev/block/nand<2?> count=1 conv=sync; sync
Using LiveSuit
LiveSuit is the toolset that AllWinner released for their A1X SoCs... the problem is it seems like they only have a Windows or 64-bit Linux version. Since I'm only on 32-bit Linux, I obviously can't compile it. I've searched everywhere for a 32-bit version
Using sunxi-tools
LiveSuit utilizes sunxi-tools to flash the board. However... I can't for the life of me find any documentation surrounding it or any type of process around how to flash the board. It's all a mystery. There are two tools that I have been told to look at: nand-part and fel*. nand-part is a tool to manage the NAND partitions, while fel is a tool for writing directly to the NAND (specifying blocks, start and size).
NAND Map Memory
Code:
-name- -start- -size-
bootloader : 100000 1000000
env : 1100000 200000
boot : 1300000 2000000
system : 3300000 10000000
data : 13300000 20000000
misc : 33300000 100000
recovery : 33400000 2000000
cache : 35400000 10000000
UDISK : 45400000 a8400000
Is it a safe assumption that these correspond with the blocks in /dev/block/?
As in, /dev/block/nanda = bootloader, /dev/block/nadab = env?
Using awutil
A new one! AllWinner Utilities has a tool called `awflash` which is supposed to be comparable to LiveSuit and flashes using the same method. The only problem is I can't get it to compile.
Code:
swivel-mac:awflash swivelgames$ make -k awflash
cc -I/Developer/Platforms/.de650d.245/.de650d.244/SDKs/iPhoneSimulator4.1.sdk/usr/include/pcap/ -L/usr/local/lib -Wall -o awflash awflash.c -lusb
awflash.c:67: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
awflash.c:114: warning: ‘struct usb_dev_handle’ declared inside parameter list
awflash.c:114: warning: its scope is only this definition or declaration, which is probably not what you want
awflash.c: In function ‘fex_xfer’:
awflash.c:137: warning: implicit declaration of function ‘usb_bulk_write’
awflash.c:144: warning: implicit declaration of function ‘usb_bulk_read’
awflash.c: At top level:
awflash.c:172: warning: ‘struct usb_dev_handle’ declared inside parameter list
awflash.c: In function ‘fex_command’:
awflash.c:174: warning: passing argument 1 of ‘fex_xfer’ from incompatible pointer type
awflash.c:182: warning: passing argument 1 of ‘fex_xfer’ from incompatible pointer type
awflash.c:199: warning: passing argument 1 of ‘fex_xfer’ from incompatible pointer type
awflash.c:209: warning: passing argument 1 of ‘fex_xfer’ from incompatible pointer type
awflash.c:221: warning: passing argument 1 of ‘fex_xfer’ from incompatible pointer type
awflash.c:230: warning: passing argument 1 of ‘fex_xfer’ from incompatible pointer type
awflash.c:240: warning: passing argument 1 of ‘fex_xfer’ from incompatible pointer type
awflash.c:245: warning: passing argument 1 of ‘fex_xfer’ from incompatible pointer type
awflash.c:257: warning: passing argument 1 of ‘fex_xfer’ from incompatible pointer type
awflash.c:274: warning: passing argument 1 of ‘fex_xfer’ from incompatible pointer type
awflash.c:280: warning: passing argument 1 of ‘fex_xfer’ from incompatible pointer type
awflash.c:296: warning: passing argument 1 of ‘fex_xfer’ from incompatible pointer type
awflash.c: In function ‘main’:
awflash.c:358: warning: implicit declaration of function ‘usb_init’
awflash.c:360: warning: implicit declaration of function ‘usb_set_debug’
awflash.c:362: warning: implicit declaration of function ‘locate_device’
awflash.c:362: warning: assignment makes pointer from integer without a cast
awflash.c:367: warning: implicit declaration of function ‘usb_set_configuration’
awflash.c:371: warning: implicit declaration of function ‘usb_claim_interface’
awflash.c:375: warning: implicit declaration of function ‘usb_set_altinterface’
awflash.c:417: warning: passing argument 1 of ‘fex_xfer’ from incompatible pointer type
awflash.c:420: warning: passing argument 1 of ‘fex_xfer’ from incompatible pointer type
awflash.c:423: warning: passing argument 1 of ‘fex_xfer’ from incompatible pointer type
make: *** [awflash] Error 1
Anyone able to help me out with any of these methods? You would think with four options there would be SOME sort of resource or documentation out there to help me out. But, you know...
Any help would be appreciated!
I finally got `awflash` to compile! Turned out none of my usb libs had usb_dev_handle in them. I had to use MacPorts to install libusb-legacy and that worked perfectly. After wrestling with the makefile a little bit to force it to see the library (lol) it finally built.
I'll search around for awflash documentation so I can become a bit familiar with it before blindly flashing it.
If anyone has any resources or documentation surrounding awflash, that'd be a huge help.

[Q] Compile error, linaro 4.8, fsnotify.h

First time for me trying to compile kernel. Other stuff easy to compile, kernel is a pain.
Code:
odule.o
In file included from include/linux/security.h:26:0,
from init/main.c:32:
include/linux/fsnotify.h: In function 'fsnotify_perm':
include/linux/fsnotify.h:41:9: error: implicit declaration of function 'file_inode' [-Werror=implicit-function-declaration]
struct inode *inode = file_inode(file);
^
include/linux/fsnotify.h:41:24: warning: initialization makes pointer from integer without a cast [enabled by default]
error, forbidden warning: fsnotify.h:41
The source I'm using I was told compiled in 4.7, I would like to fix code so I can compile but I have no idea how to
Sent from my PG86100 using Tapatalk

[Q] Custom CyanogenMod Kernel (Samsung S3 i9300) - mac80211 Drivers

Hi Everyone
I am fairly new to android customisation, rooting, etc. and have been playing around with creating a custom CyanogenMod kernel to support a TP-Link USB wifi dongle.
The primary reference article for this can be found here - http://forum.xda-developers.com/showthread.php?t=2338179. However I have made some changes as listed below.
Keen to hack this further and any advice or guidance will be greatly appreciated.
Technical Spec:
Ubuntu 12.04 (32 Bit)
Samsung S3 (Cyanogenmod ROM)
Kernel = https://github.com/CyanogenMod/android_kernel_samsung_smdk4412
.config = https://github.com/CyanogenMod/andr.../arch/arm/configs/cyanogenmod_i9300_defconfig
Note - There is no /proc/config.gz on my device, hence the above use of the config.
gcc-arm-linux-gnueabi libstdc++6 libncurses5 libncurses5-dev - exports correctly setup.
Objective
Getting an TP-Link TL-WN821N USB Wifi Dongle to work.
The relevant drivers are already available in mac80211 - http://www.aircrack-ng.org/doku.php?id=mac80211
Error Message
CC net/mac80211/agg-rx.o
CC net/mac80211/ibss.o
CC net/mac80211/mlme.o
net/mac80211/mlme.c: In function ‘ieee80211_mgd_auth’:
net/mac80211/mlme.c:2317:9: error: ‘struct cfg80211_auth_request’ has no member named ‘local_state_change’
net/mac80211/mlme.c: In function ‘ieee80211_assoc_done’:
net/mac80211/mlme.c:2419:2: warning: passing argument 2 of ‘cfg80211_send_rx_assoc’ from incompatible pointer type [enabled by default]
include/net/cfg80211.h:2802:6: note: expected ‘struct cfg80211_bss *’ but argument is of type ‘unsigned char *’
net/mac80211/mlme.c:2419:2: warning: passing argument 3 of ‘cfg80211_send_rx_assoc’ makes pointer from integer without a cast [enabled by default]
include/net/cfg80211.h:2802:6: note: expected ‘const u8 *’ but argument is of type ‘unsigned int’
net/mac80211/mlme.c:2419:2: error: too few arguments to function ‘cfg80211_send_rx_assoc’
include/net/cfg80211.h:2802:6: note: declared here
net/mac80211/mlme.c: In function ‘ieee80211_mgd_deauth’:
net/mac80211/mlme.c:2560:19: error: ‘struct cfg80211_deauth_request’ has no member named ‘bss’
net/mac80211/mlme.c:2561:30: error: ‘struct cfg80211_deauth_request’ has no member named ‘bss’
net/mac80211/mlme.c:2581:18: error: ‘struct cfg80211_deauth_request’ has no member named ‘bss’
net/mac80211/mlme.c:2600:4: error: implicit declaration of function ‘__cfg80211_auth_canceled’ [-Werror=implicit-function-declaration]
net/mac80211/mlme.c:2610:16: error: ‘struct cfg80211_deauth_request’ has no member named ‘local_state_change’
cc1: some warnings being treated as errors
make[2]: *** [net/mac80211/mlme.o] Error 1
make[1]: *** [net/mac80211] Error 2
make: *** [net] Error 2
franna81 said:
Hi Everyone
I am fairly new to android customisation, rooting, etc. and have been playing around with creating a custom CyanogenMod kernel to support a TP-Link USB wifi dongle.
The primary reference article for this can be found here - http://forum.xda-developers.com/showthread.php?t=2338179. However I have made some changes as listed below.
Keen to hack this further and any advice or guidance will be greatly appreciated.
Technical Spec:
Ubuntu 12.04 (32 Bit)
Samsung S3 (Cyanogenmod ROM)
Kernel = https://github.com/CyanogenMod/android_kernel_samsung_smdk4412
.config = https://github.com/CyanogenMod/andr.../arch/arm/configs/cyanogenmod_i9300_defconfig
Note - There is no /proc/config.gz on my device, hence the above use of the config.
gcc-arm-linux-gnueabi libstdc++6 libncurses5 libncurses5-dev - exports correctly setup.
Objective
Getting an TP-Link TL-WN821N USB Wifi Dongle to work.
The relevant drivers are already available in mac80211 - http://www.aircrack-ng.org/doku.php?id=mac80211
Error Message
CC net/mac80211/agg-rx.o
CC net/mac80211/ibss.o
CC net/mac80211/mlme.o
net/mac80211/mlme.c: In function ‘ieee80211_mgd_auth’:
net/mac80211/mlme.c:2317:9: error: ‘struct cfg80211_auth_request’ has no member named ‘local_state_change’
net/mac80211/mlme.c: In function ‘ieee80211_assoc_done’:
net/mac80211/mlme.c:2419:2: warning: passing argument 2 of ‘cfg80211_send_rx_assoc’ from incompatible pointer type [enabled by default]
include/net/cfg80211.h:2802:6: note: expected ‘struct cfg80211_bss *’ but argument is of type ‘unsigned char *’
net/mac80211/mlme.c:2419:2: warning: passing argument 3 of ‘cfg80211_send_rx_assoc’ makes pointer from integer without a cast [enabled by default]
include/net/cfg80211.h:2802:6: note: expected ‘const u8 *’ but argument is of type ‘unsigned int’
net/mac80211/mlme.c:2419:2: error: too few arguments to function ‘cfg80211_send_rx_assoc’
include/net/cfg80211.h:2802:6: note: declared here
net/mac80211/mlme.c: In function ‘ieee80211_mgd_deauth’:
net/mac80211/mlme.c:2560:19: error: ‘struct cfg80211_deauth_request’ has no member named ‘bss’
net/mac80211/mlme.c:2561:30: error: ‘struct cfg80211_deauth_request’ has no member named ‘bss’
net/mac80211/mlme.c:2581:18: error: ‘struct cfg80211_deauth_request’ has no member named ‘bss’
net/mac80211/mlme.c:2600:4: error: implicit declaration of function ‘__cfg80211_auth_canceled’ [-Werror=implicit-function-declaration]
net/mac80211/mlme.c:2610:16: error: ‘struct cfg80211_deauth_request’ has no member named ‘local_state_change’
cc1: some warnings being treated as errors
make[2]: *** [net/mac80211/mlme.o] Error 1
make[1]: *** [net/mac80211] Error 2
make: *** [net] Error 2
Click to expand...
Click to collapse
Exactly the same issue here, bump :/
When I had to build a mac80211 driver (rt2800usb), I had to apply the following changes on top of cm-10.2.0 (d6f2f4ae4e593067dc59e2ac63f022434199f673):
Code:
# Depends on 3.4 backport that breaks mac80211.
git revert d6f2f4ae4e593067dc59e2ac63f022434199f673 # "Add support for Note 8 (N5100 and N5110)"
git revert c421809918b7106b40a81134f9fb5103146fc715 # "update bcmdhd driver from GT-9505 Source"
git revert 44655588a0b361afa15761b5c58f5a558c1c181c # "WIFI: Use kernel version 3.4 ifdef's."
git revert 3cedbff33e9884fdf3f7aaaa83ab9774d8145d1f # "wireless backport from 3.4"
# Another build fix:
Date: Sun Nov 24 12:04:33 2013 +0100
lib: fix compile of lib/genalloc.c
Taken from commit 3cedbff ("wireless backport from 3.4").
lib/genalloc.c | 54 ++++++++++++++++++++++++++++++++----------------------
1 file changed, 32 insertions(+), 22 deletions(-)
After that I was able to build rt2x00 from 3.4.70 (after enabling MAC80211 in config).. Note: these patches do not seem to revert cleanly on cm-11.0
For cm-11.0 (HEAD was 22cbf2cfb211cef2e493c5984d237d0509bf98ce, "otg: when removing ED from readyQ also set flag"), I now do:
Code:
# v--- 2014-11-06 (CM 11.0)
- revert c421809 # update bcmdhd driver from GT-9505 Source
Conflict in drivers/net/wireless/bcmdhd/Makefile, remove -DPASS_IPV4_SUSPEND
and DEBUGFS_CFG80211 (unused), all that remains is:
DHDCFLAGS += -DBLOCK_IPV6_PACKET
Conflict in drivers/net/wireless/bcmdhd/dhd_sec_feature.h, remove:
CONFIG_MACH_KONA
.config:
BCMDHD=M (was =Y, but this allows debugging)
DHD_USE_STATIC_BUF=N
DHD_USE_SCHED_SCAN=N
- revert 4465558 # WIFI: Use kernel version 3.4 ifdef's.
- revert 3cedbff # wireless backport from 3.4
- git checkout 3cedbff -- include/linux/{export,module}.h lib/genalloc.c
git commit -m 'Build fixes from 3cedbff'
Compile fixes, also used by d90b43b "mali: add r3p1 for devices that need it"
This compiles (with CONFIG_MAC80211=M), I have yet to try the newer rt2x00 for my purposes.

[Q] Carbon Build Errors

Hey guys. So I'm trying to build CarbonRom for my device. I editing the device specific sources of my device to be compatible with carbon, but maybe I missed something. I get this error when trying to build.
target thumb C: bml_over_mtd <= bootable/recovery/mtdutils/bml_over_mtd.c
make: *** No rule to make target `system/media/bootanimation.zip', needed by `/home/epicboy/carbon/out/target/product/vibrantmtd/'. Stop.
make: *** Waiting for unfinished jobs....
bootable/recovery/mtdutils/bml_over_mtd.c: In function 'bml_over_mtd_write_block':
bootable/recovery/mtdutils/bml_over_mtd.c:548:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'off_t' [-Wformat]
bootable/recovery/mtdutils/bml_over_mtd.c:553:2: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'off_t' [-Wformat]
external/javasqlite/src/main/native/sqlite_jni.c: In function 'Java_SQLite_Database_stmt_1prepare':
external/javasqlite/src/main/native/sqlite_jni.c:3597:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Click to expand...
Click to collapse
Any ideas how to fix these issues?

[Q]Building AOSP on MAC compiling errors

Hi!
I have been scratching my head over this for 3 days now, no amount of googling and searching here has given me any results.
Build environment is MAC OS X Yosemite with xcode 6 and 5.1.1 command tools installed, 100 gb sparse image file to work on.
Here is the error:
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c: In function ‘load_dtqc_block’:
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:170: error: ‘fname’ undeclared (first use in this function)
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:170: error: (Each undeclared identifier is reported only once
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:170: error: for each function it appears in.)
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c: In function ‘write_padding’:
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:382: warning: comparison between signed and unsigned
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c: In function ‘main’:
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:491: warning: pointer targets in passing argument 1 of ‘__builtin___strcpy_chk’ differ in signedness
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:491: warning: pointer targets in passing argument 1 of ‘__inline_strcpy_chk’ differ in signedness
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:559: warning: comparison between signed and unsigned
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:562: warning: comparison between signed and unsigned
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:566: warning: comparison between signed and unsigned
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:571: warning: comparison between signed and unsigned
make: *** [out/host/darwin-x86/obj32/EXECUTABLES/mkqcdtbootimg_intermediates/mkqcdtbootimg.o] Error 1
make: *** Waiting for unfinished jobs....
Any help is appretiated
I'm still completely lost on this matter and is driving me crazy
I hit a similar error, but with PATH_MAX as undefined. Basically what it is complaining is that fname is not defined anywhere, which is weird. Try installing Brew (for Mac) and install automake (brew install automake).
To solve my error, I had to edit the file mkqcdtbootimg.c and add these lines after all the C variable defines (right after #include "bootimg.h", in new lines):
#ifndef PATH_MAX
#define PATH_MAX 4096
I used this as a reference: http://serverfault.com/questions/9546/filename-length-limits-on-linux
dferreira said:
I hit a similar error, but with PATH_MAX as undefined. Basically what it is complaining is that fname is not defined anywhere, which is weird. Try installing Brew (for Mac) and install automake (brew install automake).
To solve my error, I had to edit the file mkqcdtbootimg.c and add these lines after all the C variable defines (right after #include "bootimg.h", in new lines):
#ifndef PATH_MAX
#define PATH_MAX 4096
I used this as a reference: http://serverfault.com/questions/9546/filename-length-limits-on-linux
Click to expand...
Click to collapse
Thanks, I´m going to test that brew thing

Categories

Resources