Hi, i'm actually playing with my new galaxy S phone, and i was trying to get a kernel framebuffer console output for debugging purpose. Has anyone succeed in this ? I saw that the "universal lagfix kernel" is using a graphs application, even this application do not output correctly to the framebuffer on my galaxy S. It seems the bootloader logo is running on top of the framebuffer, preventing a correct blitting. Some help here would be very helpful.
Else it seems the bootloader is overriding the kernel command line, does someone take a look at this ?
Thanks,
Cpasjuste.
Edit : take a look at post #3
Cpasjuste said:
Hi, i'm actually playing with my new galaxy S phone, and i was trying to get a kernel framebuffer console output for debugging purpose. Has anyone succeed in this ? I saw that the "universal lagfix kernel" is using a graphs application, even this application do not output correctly to the framebuffer on my galaxy S. It seems the bootloader logo is running on top of the framebuffer, preventing a correct blitting. Some help here would be very helpful.
Else it seems the bootloader is overriding the kernel command line, does someone take a look at this ?
Thanks,
Cpasjuste.
Click to expand...
Click to collapse
Agreed, it seems a bit strange. I've also tried this without much luck so far.
So basically, bump!
Just a little update, it's now easy to get framebuffer console working with the gingerthing kernel port found here :
- Initramfs : https://github.com/project-voodoo/nsonsgs-initramfs
- Kernel : https://github.com/galaxys-kernel/linux_samsung_galaxys_port/
In short :
Force the kernel cmdline in .config :
CONFIG_CMDLINE="console=tty0,115200 fbcon=rotate:1 fbcon=font:VGA8x8"
CONFIG_CMDLINE_FORCE=y
Then enable fb console :
CONFIG_VT=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
CONFIG_FONTS=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
(if it ask for vga console reply No)
It should now be easier to port your favorite distribution
a vanilla android boots how?
can you post a screenshot?
Sure, here is a photo :
f*** this is priceless!!!
thanks!
Cpasjuste, thank you it's works
BPaul said:
Cpasjuste, thank you it's works
Click to expand...
Click to collapse
The date...
Sent from my Galaxy Nexus using Tapatalk 2
DanielSanchez said:
The date...
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
haha
DanielSanchez said:
The date...
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
:laugh:
Does this apply to all android phones ?
Sent from my ALCATEL ONE TOUCH 918D using xda app-developers app
kenkitt said:
Does this apply to all android phones ?
Sent from my ALCATEL ONE TOUCH 918D using xda app-developers app
Click to expand...
Click to collapse
Most. BTW: Date...
Thanks
devloz said:
Most. BTW: Date...
Click to expand...
Click to collapse
I'm now compiling for MTK 6573 Alcatel OT-918D , hope it works.
About the kernel commandline what should I put, or maybe the one used here will work ?
---------- Post added at 10:10 AM ---------- Previous post was at 10:05 AM ----------
Building failed
drivers/video/console/fbcon.c:638: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:638: error: too few arguments to function 'info->fbops->fb_open'
drivers/video/console/fbcon.c: In function 'con2fb_release_oldinfo':
drivers/video/console/fbcon.c:670: warning: passing argument 1 of 'oldinfo->fbops->fb_release' from incompatible pointer type
drivers/video/console/fbcon.c:670: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:670: error: too few arguments to function 'oldinfo->fbops->fb_release'
drivers/video/console/fbcon.c:673: warning: passing argument 1 of 'newinfo->fbops->fb_release' from incompatible pointer type
drivers/video/console/fbcon.c:673: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:673: error: too few arguments to function 'newinfo->fbops->fb_release'
drivers/video/console/fbcon.c: In function 'fbcon_startup':
drivers/video/console/fbcon.c:868: warning: passing argument 1 of 'info->fbops->fb_open' from incompatible pointer type
drivers/video/console/fbcon.c:868: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:868: error: too few arguments to function 'info->fbops->fb_open'
drivers/video/console/fbcon.c: In function 'fbcon_exit':
drivers/video/console/fbcon.c:3388: warning: passing argument 1 of 'info->fbops->fb_release' from incompatible pointer type
drivers/video/console/fbcon.c:3388: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:3388: error: too few arguments to function 'info->fbops->fb_release'
make[3]: *** [drivers/video/console/fbcon.o] Error 1
make[2]: *** [drivers/video/console] Error 2
make[1]: *** [drivers/video] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
CC [M] ../mediatek/source/kernel/drivers/lttng/probes/net-extended-trace.o
CC [M] ../mediatek/source/kernel/drivers/lttng/probes/block-trace.o
CC ../mediatek/source/kernel/kernel/trace_mt65xx_mon.o
LD [M] ../mediatek/source/kernel/drivers/lttng/ltt-relay.o
CC ../mediatek/source/kernel/drivers/m4u/m4u_kernel.o
../mediatek/source/kernel/drivers/m4u/m4u_kernel.c: In function 'm4u_user_v2p':
../mediatek/source/kernel/drivers/m4u/m4u_kernel.c:66: warning: format '%d' expects type 'int', but argument 3 has type 'struct task_struct *'
Anyone know how to go about this ?
I'm trying to do this as well. It compiles fine but the device is stuck with a black screen, LCD backlight on and warming up after the bootloader logo.
This thread needs to be resurrected it's still a thing and an alternate to USB/Serial or JTAG debugging
nexolight said:
I'm trying to do this as well. It compiles fine but the device is stuck with a black screen, LCD backlight on and warming up after the bootloader logo.
This thread needs to be resurrected it's still a thing and an alternate to USB/Serial or JTAG debugging
Click to expand...
Click to collapse
You are right. My kernel compiles, but when it boots, it changes directly from the bootloader (penguin in the middle of the screen) to the boot logo (TWRP, in my case). I'm compiling the kernel for a Letv LeMax 1 (X900/Max1).
Just for getting the Linux penguin on screen at boot time, you can enable BOOT_LOGO on defconfig.
For getting the text to show up it's a different story, I'll try to compile a kernel for my device (pretty old, 2012) but that should be possible, after all the linux kernel is there and has native support for doing that kind of things!
Related
The Galaxy Tab source code is online at http://opensource.samsung.com/ section GT-P1000
Now we can manage this source code for inspecting memory problem of galaxy s 1080p video playback and hdmi out.
I'm not able to download it at the moment, by any chance is the source for the bootloaders included?
im uploading it now
http://www.mediafire.com/file/4qkxeg1fbi1exbe/GT-P1000_OpenSource.zip
Here you go !
Jeshter2000 said:
http://www.mediafire.com/file/4qkxeg1fbi1exbe/GT-P1000_OpenSource.zip
Here you go !
Click to expand...
Click to collapse
. Thanks!
From first look - a lot of debug options are disabled that were enabled in SGS config.
Edit: Also memory assignments are different, somewhere higher, somewhere lower ... On average I think number would be similar.
On general at least in config so far the difference seems bigger then I would expect.
Which means that we got a Froyo source that voodoo and cm can use?
jakaka said:
From first look - a lot of debug options are disabled that were enabled in SGS config.
Edit: Also memory assignments are different, somewhere higher, somewhere lower ... On average I think number would be similar.
On general at least in config so far the difference seems bigger then I would expect.
Click to expand...
Click to collapse
Is it possible to use the same memory assignments and have similar memory available in he sgs?
Compiling right now
thanks zulu99 !
I will take a look at the sound driver ^^ (and the rest)!
An ext4 modules in a few minutes!
I really like the fact that this time the ramdisk in included in sources.
Code:
sound/soc/s3c24xx/s3c-idma.c: In function 's3c_idma_hw_params':
sound/soc/s3c24xx/s3c-idma.c:230: warning: format '%x' expects type 'unsigned int', but argument 6 has type 'unsigned char *'
sound/soc/s3c24xx/s3c-idma.c: In function 's3c_idma_pointer':
sound/soc/s3c24xx/s3c-idma.c:318: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'unsigned char *'
make[3]: *** [sound/soc/s3c24xx/s3c-idma.o] Erreur 1
make[3]: *** Attente des tâches non terminées....
make[2]: *** [sound/soc/s3c24xx] Erreur 2
make[1]: *** [sound/soc] Erreur 2
make: *** [sound] Erreur 2
(compiling with trusty gcc 4.3.5 i use for Voodoo)
BOO !
Ext4 modules (no POSIX ACL or xattrs to keep it small)
PS: i doubt they insert in Galaxy S Froyo kernels, but who know, with a little help...
Samsung are releasing the Galaxy K (SHW-M130K) with froyo in South Korea soon. The Source code isn't on their site yet, but judging by their track record so far, we should see it very soon.
supercurio said:
Ext4 modules (no POSIX ACL or xattrs to keep it small)
PS: i doubt they insert in Galaxy S Froyo kernels, but who know, with a little help...
Click to expand...
Click to collapse
I've tried to compile them using samsung suggested toolset (in readme), but they won't insmod - device just reboots.
supercurio said:
Code:
sound/soc/s3c24xx/s3c-idma.c: In function 's3c_idma_hw_params':
sound/soc/s3c24xx/s3c-idma.c:230: warning: format '%x' expects type 'unsigned int', but argument 6 has type 'unsigned char *'
sound/soc/s3c24xx/s3c-idma.c: In function 's3c_idma_pointer':
sound/soc/s3c24xx/s3c-idma.c:318: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'unsigned char *'
make[3]: *** [sound/soc/s3c24xx/s3c-idma.o] Erreur 1
make[3]: *** Attente des tâches non terminées....
make[2]: *** [sound/soc/s3c24xx] Erreur 2
make[1]: *** [sound/soc] Erreur 2
make: *** [sound] Erreur 2
(compiling with trusty gcc 4.3.5 i use for Voodoo)
BOO !
Click to expand...
Click to collapse
Erreur... You got a little Clouseau in your compiler. No wonder it's giving you erreurs .. leul
vitalij said:
I've tried to compile them using samsung suggested toolset (in readme), but they won't insmod - device just reboots.
Click to expand...
Click to collapse
Okay. I suppose compiling them using at least Galaxy S .config would help
appelflap said:
Erreur... You got a little Clouseau in your compiler. No wonder it's giving you erreurs .. leul
Click to expand...
Click to collapse
HAHAHA, why everybody laugh at my erreurs
I'm trying to compile the source from HTC :
Droid Incredible by hTC – Froyo MR3 – 2.6.32 kernel source code 82.1 MB
http://dl4.htc.com/RomCode/Source_and_Binaries/incrediblec-MR3-2.6.32-g9a2fc16.tar.gz
Using heyitslou's kernel .config the kernel compiles, the only thing I'm changing is:
[*] Android gadget RNDIS ethernet function
after that the kernel no longer compiles. I get the following error.
Code:
:~/android/sources/dinc$ make
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CALL scripts/checksyscalls.sh
CHK include/linux/compile.h
CC drivers/usb/gadget/f_rndis.o
drivers/usb/gadget/f_rndis.c: In function 'rndis_bind':
drivers/usb/gadget/f_rndis.c:703: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_rndis.c:704: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_rndis.c: In function 'rndis_function_bind_config':
drivers/usb/gadget/f_rndis.c:880: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_rndis.c:880: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_rndis.c:881: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_rndis.c:881: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_rndis.c:882: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_rndis.c:882: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_rndis.c:884: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_rndis.c:886: error: dereferencing pointer to incomplete type
make[2]: *** [drivers/usb/gadget/f_rndis.o] Error 1
make[1]: *** [drivers/usb/gadget] Error 2
make: *** [drivers] Error 2
Can someone help me track down how to fix/get around this... all I'm looking for is a Froyo kernel with RNDIS (wired-tether) support. Unfortunately everyone likes wireless tether only, which doesn't work reliably enough for me over extended periods of time.
Hopefully someone can help me.
Thanks,
B
https://github.com/getitnowmarketing/Incrediblec-mr3/commit/d80716254f7c444955c3948a1fad97b052400883
This is from my personal non-released kernel. Its not a clone of ziggy's like most every other kernel is.
billygoat32 said:
I'm trying to compile the source from HTC :
Droid Incredible by hTC – Froyo MR3 – 2.6.32 kernel source code 82.1 MB
http://dl4.htc.com/RomCode/Source_and_Binaries/incrediblec-MR3-2.6.32-g9a2fc16.tar.gz
Using heyitslou's kernel .config the kernel compiles, the only thing I'm changing is:
[*] Android gadget RNDIS ethernet function
after that the kernel no longer compiles. I get the following error.
Code:
:~/android/sources/dinc$ make
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CALL scripts/checksyscalls.sh
CHK include/linux/compile.h
CC drivers/usb/gadget/f_rndis.o
drivers/usb/gadget/f_rndis.c: In function 'rndis_bind':
drivers/usb/gadget/f_rndis.c:703: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_rndis.c:704: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_rndis.c: In function 'rndis_function_bind_config':
drivers/usb/gadget/f_rndis.c:880: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_rndis.c:880: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_rndis.c:881: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_rndis.c:881: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_rndis.c:882: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_rndis.c:882: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_rndis.c:884: error: dereferencing pointer to incomplete type
drivers/usb/gadget/f_rndis.c:886: error: dereferencing pointer to incomplete type
make[2]: *** [drivers/usb/gadget/f_rndis.o] Error 1
make[1]: *** [drivers/usb/gadget] Error 2
make: *** [drivers] Error 2
Can someone help me track down how to fix/get around this... all I'm looking for is a Froyo kernel with RNDIS (wired-tether) support. Unfortunately everyone likes wireless tether only, which doesn't work reliably enough for me over extended periods of time.
Hopefully someone can help me.
Thanks,
B
Click to expand...
Click to collapse
Can you post the patch your trying to apply
Hey thanks for the quick reply, I appreciate your interest.
All I'm doing is downloading the source available from HTC, pulling the config.gz from my phone (which is running your kernel) moving it into the kernel source directory, `make menuconfig`, load the .config, * the android RNDIS option and then trying to make kernel from there.
Let me know if there is anything else I can do to assist.
Thanks again,
B
On a side note, I've tried this will all the available froyo sources from HTC, the Verizon ones, stock, etc
drellisdee said:
https://github.com/getitnowmarketing/Incrediblec-mr3/commit/d80716254f7c444955c3948a1fad97b052400883
This is from my personal non-released kernel. Its not a clone of ziggy's like most every other kernel is.
Click to expand...
Click to collapse
It seems that you need to apply the patches outlined in drellisdee's post.
shoot, I missed that. Thanks for pointing that out <face-palm>
HeyItsLou,
can you include the rndis support + patch from the post above into your kernel?
https://github.com/getitnowmarketin...0716254f7c444955c3948a1fad97b052400883#diff-0
RNDIS Support
For anyone that is interested I recompiled HeyItsLous kernel with rndis support. I didn't change anything other than adding rndis support for usb wired tether. Let me know if you want it and I'll post it somewhere.
I am kinda new to kernel development. I need to rebuild the kernel I'm using ((http://forum.xda-developers.com/showthread.php?t=2480353) Compulsion Kernel) with loadable module support. I have also tried other kernels. I also tried using the "-i" flag on make, but the errors kept getting worse, until the whole compilation output was errors...
I keep getting errors from the console output. For example:
Code:
net/bluetooth/hci_conn.c: In function 'hci_le_ltk_reply':
net/bluetooth/hci_conn.c:406:28: warning: argument to 'sizeof' in 'memcpy' call is the same pointer type '__u8 *' as the destination; expected '__u8' or an explicit length [-Wsizeof-pointer-memaccess]
error, forbidden warning: hci_conn.c:406
make[2]: [net/bluetooth/hci_conn.o] Error 1
-Wsizeof-pointer-memaccess errors pop up very often.
There are also file not found errors:
Code:
arm-eabi-ld: error: cannot open net/bluetooth/hci_conn.o: No such file or directory
make[2]: [net/bluetooth/bluetooth.o] Error 1
LD net/bluetooth/built-in.o
arm-eabi-ld: error: cannot open net/bluetooth/bluetooth.o: No such file or directory
make[2]: [net/bluetooth/built-in.o] Error 1
CC net/bridge/br_input.o
Heres another example:
Code:
CC net/bridge/br_ioctl.o
arch/arm/mach-msm/board-8974-sec.c:569:13: warning: 'modem_power_off' defined but not used [-Wunused-function]
error, forbidden warning: board-8974-sec.c:569
make[1]: [arch/arm/mach-msm/board-8974-sec.o] Error 1
LD arch/arm/mach-msm/built-in.o
CC drivers/gpu/ion/ion_cma_heap.o
arm-eabi-ld: error: cannot open arch/arm/mach-msm/bam_dmux.o: No such file or directory
arm-eabi-ld: error: cannot open arch/arm/mach-msm/board-8974-sec.o: No such file or directory
System information:
I attached my .config file. It is the default from the Compulsion kernel.
Compile commands (in order):
Code:
export VARIANT_DEFCONFIG=msm8974_sec_defconfig ##I added this because it wont generate .config if this variable is empty...
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=/home/julian/android-toolchain-eabi/bin/arm-eabi-
git pull
make clean
make msm8974_sec_defconfig
make -j4
Operating system: Fresh install of Linux Mint 16 (Petra)
Build-related packages I installed with apt: git-core, gnupg, flex, bison, gperf, libsdl-dev, libesd0-dev, libwxgtk2.6-dev, build-essential, zip, curl, libncurses5-dev, zlib1g-dev, ia32-libs, lib32z1-dev, lib32ncurses5-dev, gcc-multilib, g++-multilib, and Adb
Toolchain:
Tried linaro, the android NDK from Google's website, and various other toolchains. Same error.
Output of "echo $PATH"
Code:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/julian/android-toolchain-eabi/bin:/home/julian/androidkernel/N900T_Kernel
I think thats all the needed information
Thank you!
Your command for the configuration is incomplete. You need to type a command for the other files as well. Type this command "make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig".
djintrigue808 said:
Your command for the configuration is incomplete. You need to type a command for the other files as well. Type this command "make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig".
Click to expand...
Click to collapse
Still can't compile
No more file not found errors, but still getting:
Code:
arch/arm/mach-msm/bam_dmux.c: In function 'show_waketime':
arch/arm/mach-msm/bam_dmux.c:2440:29: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: bam_dmux.c:2440
make[1]: *** [arch/arm/mach-msm/bam_dmux.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
make: *** Waiting for unfinished jobs....
My compile script (easier then entering commands...)
#!/bin/bash
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
if [[ "$PATH" == *"/home/julian/android-toolchain-eabi/bin"* ]]; then
echo "PATH Contains toolchain"
else
export PATH=$PATH:/home/julian/android-toolchain-eabi/bin
echo "Toolchain added to PATH!"
fi
git pull
make clean -j4
echo "Building config..."
sleep 2
make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig -j4
sleep 1
read -p "Customize config? (Y/N): " yesno
if [ "$yesno" == "Y" ]; then
make menuconfig -j4
make -j4
else
make -j4
fi
Thank you!
Julian90090 said:
Still can't compile
No more file not found errors, but still getting:
Code:
arch/arm/mach-msm/bam_dmux.c: In function 'show_waketime':
arch/arm/mach-msm/bam_dmux.c:2440:29: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: bam_dmux.c:2440
make[1]: *** [arch/arm/mach-msm/bam_dmux.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
make: *** Waiting for unfinished jobs....
My compile script (easier then entering commands...)
#!/bin/bash
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
if [[ "$PATH" == *"/home/julian/android-toolchain-eabi/bin"* ]]; then
echo "PATH Contains toolchain"
else
export PATH=$PATH:/home/julian/android-toolchain-eabi/bin
echo "Toolchain added to PATH!"
fi
git pull
make clean -j4
echo "Building config..."
sleep 2
make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig -j4
sleep 1
read -p "Customize config? (Y/N): " yesno
if [ "$yesno" == "Y" ]; then
make menuconfig -j4
make -j4
else
make -j4
fi
Thank you!
Click to expand...
Click to collapse
Ok so I was messing around and decided to fix the -Wsizeof-pointer-memaccess errors. I opened bam_dmux.c and changed the line
Code:
return snprintf(buf, sizeof(buf), "%u\n", wakelock_timeout);
to
Code:
return snprintf(buf, (int)sizeof(buf), "%u\n", wakelock_timeout);
The kernel compiles now, but when I flash it to my device (mkbootimg), I get a ODIN message saying regular boot failed...
MORE UPDATES:
Tried flashing plain zImage in tar with ODIN, got a "unsupport dev_type" error on the device.
I fixed all the compile errors. I changed cross compilers to arm linux gnueabihf 4.7. There is still the task of getting the kernel on the device though... Thanks in advance!
EDIT AGAIN: Still can't get it to boot. Tried compiling stock kernel, leankernel, and Saber kernel. All same result after packing zImage and flashing with flashable zip...
Using repack-zImage.sh, I get a "gunzip result is oscillating between 'too small' and 'too large' at size: 7836575 7836576 7836577 7836578" error. There are no compile errors with any of the kernels. I attached my "finished" stock kernel flashable zip (doesn't work). I heard something about a mismatch between gzip and lzop... *feeling determined*
Any ideas?
EDIT:
Compile warnings about swp{b} although swp emulation is enabled in config. I still can't figure out how to get the zImage to work correctly on my device. I swapped the zImage out of the Saber kernel install zip boot.img and put my own in, flashed with TWRP, device doesn't boot until I go back and install the original kernel.
Julian90090 said:
Still can't compile
No more file not found errors, but still getting:
Code:
arch/arm/mach-msm/bam_dmux.c: In function 'show_waketime':
arch/arm/mach-msm/bam_dmux.c:2440:29: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: bam_dmux.c:2440
make[1]: *** [arch/arm/mach-msm/bam_dmux.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
make: *** Waiting for unfinished jobs....
My compile script (easier then entering commands...)
#!/bin/bash
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
if [[ "$PATH" == *"/home/julian/android-toolchain-eabi/bin"* ]]; then
echo "PATH Contains toolchain"
else
export PATH=$PATH:/home/julian/android-toolchain-eabi/bin
echo "Toolchain added to PATH!"
fi
git pull
make clean -j4
echo "Building config..."
sleep 2
make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig -j4
sleep 1
read -p "Customize config? (Y/N): " yesno
if [ "$yesno" == "Y" ]; then
make menuconfig -j4
make -j4
else
make -j4
fi
Thank you!
Click to expand...
Click to collapse
Please ignore if irrelevant or ignorant. I'm in my infancy and still grasping the basics.
My environment is quite different than yours, on a Mac and using a Sprint note 3, but I came across this thread with the same compiler error using the 4.8 tools in the NDK. If I use 4.6 gcc I make it pretty far into the compilation process before error (failing @net/netfilter/xt_TCPMSS.c). However, using 4.8 gave me the same error as you:
Code:
arch/arm/mach-msm/bam_dmux.c: In function 'show_waketime':
arch/arm/mach-msm/bam_dmux.c:2440:29: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: bam_dmux.c:2440
make[1]: *** [arch/arm/mach-msm/bam_dmux.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
Here's the layout of my toolchains folder and my broken build file (looks like yours)
Code:
z:toolchains anon$ pwd
/Volumes/android/ndk/toolchains
z:toolchains anon$ ls arm-linux-androideabi-4.*/prebuilt/darwin-x86_64/arm-linux-androideabi/bin
arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/arm-linux-androideabi/bin:
ar c++ gcc ld.bfd ld.mcld objcopy ranlib
as g++ ld ld.gold nm objdump strip
arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/arm-linux-androideabi/bin:
ar c++ gcc ld.bfd ld.mcld objcopy ranlib
as g++ ld ld.gold nm objdump strip
Broken Make file edit:
Code:
CROSS_COMPILE ?= /Volumes/android/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-
Change to 4.6 for new compile error:
Code:
CROSS_COMPILE ?= /Volumes/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-
Made is a helluva lot father in the compilation process, but still won't compile correctly.
Code:
net/netfilter/xt_TCPMSS.c:50:8: warning: 'struct xt_tcpmss_info' declared inside parameter list [enabled by default]
error, forbidden warning: xt_TCPMSS.c:50
make[2]: *** [net/netfilter/xt_TCPMSS.o] Error 1
make[1]: *** [net/netfilter] Error 2
make: *** [net] Error 2
Got my NDK from here:
Code:
http://dl.google.com/android/ndk/android-ndk-r9c-darwin-x86_64.tar.bz2
I don't, yet, understand the differences between the versions. Not sure if this will be helpful, samsungs open source community page sure isn't very friendly.
Julian90090 said:
Ok so I was messing around and decided to fix the -Wsizeof-pointer-memaccess errors. I opened bam_dmux.c and changed the line
Code:
return snprintf(buf, sizeof(buf), "%u\n", wakelock_timeout);
to
Code:
return snprintf(buf, (int)sizeof(buf), "%u\n", wakelock_timeout);
The kernel compiles now, but when I flash it to my device (mkbootimg), I get a ODIN message saying regular boot failed...
MORE UPDATES:
Tried flashing plain zImage in tar with ODIN, got a "unsupport dev_type" error on the device.
I fixed all the compile errors. I changed cross compilers to arm linux gnueabihf 4.7. There is still the task of getting the kernel on the device though... Thanks in advance!
EDIT AGAIN: Still can't get it to boot. Tried compiling stock kernel, leankernel, and Saber kernel. All same result after packing zImage and flashing with flashable zip...
Using repack-zImage.sh, I get a "gunzip result is oscillating between 'too small' and 'too large' at size: 7836575 7836576 7836577 7836578" error. There are no compile errors with any of the kernels. I attached my "finished" stock kernel flashable zip (doesn't work). I heard something about a mismatch between gzip and lzop... *feeling determined*
Click to expand...
Click to collapse
I dunno if it is still relevant to you, but in your code change this
Code:
return snprintf(buf, sizeof(buf), "%u\n", wakelock_timeout);
to this
Code:
return snprintf(buf, sizeof([COLOR="Red"]*[/COLOR]buf), "%u\n", wakelock_timeout);
Do that for all the files you get error in.
This error is because the toolchain you are using is higher version than GCC 4.8.*
Use any lower GCC version toolchain and those changes are not needed.
If you want the newer cross compiler, You need to make the cnanges. I hope this helps...
Cheers!!!
daxgirl said:
I dunno if it is still relevant to you, but in your code change this
Code:
return snprintf(buf, sizeof(buf), "%u\n", wakelock_timeout);
to this
Code:
return snprintf(buf, sizeof([COLOR="Red"]*[/COLOR]buf), "%u\n", wakelock_timeout);
Do that for all the files you get error in.
This error is because the toolchain you are using is higher version than GCC 4.8.*
Use any lower GCC version toolchain and those changes are not needed.
If you want the newer cross compiler, You need to make the cnanges. I hope this helps...
Cheers!!!
Click to expand...
Click to collapse
I did the same thing; i.e. I added (int) to the line also. The compiler seems to be ok with it, but I have not installed it on a device yet. I actually see a number of these errors. Do you think there should be another fix for it perhaps? Did you findout anything else about this? I appreciate a reply.
sansari123 said:
I did the same thing; i.e. I added (int) to the line also. The compiler seems to be ok with it, but I have not installed it on a device yet. I actually see a number of these errors. Do you think there should be another fix for it perhaps? Did you findout anything else about this? I appreciate a reply.
Click to expand...
Click to collapse
Yeah there is another fix. You add flags to your makefile for the cross cimpiler to basically accept those. Since they are not errors. Than you can use any chain. I managed to compile on sabermod 4.10 a kernel for s5, which was giving me the same trouble. Once I upload my sources I will send you a link to the repo so you can tweak your makefile accordingly ?
Sent from my SM-G900F using Tapatalk
Thanks. The latest message I get is the following:
Code:
drivers/cpufreq/cpufreq_interactive.c: In function 'show_target_loads':
drivers/cpufreq/cpufreq_interactive.c:813:6: warning: operation on 'ret' may be undefined [-Wsequence-point]
error, forbidden warning: cpufreq_interactive.c:813
make[2]: *** [drivers/cpufreq/cpufreq_interactive.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2
But this one is a warning also. I guess there is a flag for ignoring warning(s)? I'll wait to hear back from you.
daxgirl said:
Yeah there is another fix. You add flags to your makefile for the cross cimpiler to basically accept those. Since they are not errors. Than you can use any chain. I managed to compile on sabermod 4.10 a kernel for s5, which was giving me the same trouble. Once I upload my sources I will send you a link to the repo so you can tweak your makefile accordingly ?
Sent from my SM-G900F using Tapatalk
Click to expand...
Click to collapse
@daxgirl - I like to learn how to modify the flags. Did you find out which flags to modify by reading the Makefile documentation? I would really appreciate it if you tell me how I can learn which flags to modify and do it myself vs. copy your Makefile.
I am compiling cm 14 for core prime ve 3g (sm-g361h).
i am getting these error after executing mka bacon command (i have skipped all log above errors). I am building rom from source first time so i ain't got any clue what this error says (maybe a little bit but that ain't helping).
Code:
device/samsung/coreprimeve3g/ril/SamsungSPRDRIL.java:276: error: method does not override or implement a method from a supertype
@Override
^
device/samsung/coreprimeve3g/ril/SamsungSPRDRIL.java:314: error: method processSolicited in class RIL cannot be applied to given types;
return super.processSolicited(p);
^
required: Parcel,int
found: Parcel
reason: actual and formal argument lists differ in length
device/samsung/coreprimeve3g/ril/SamsungSPRDRIL.java:366: error: method does not override or implement a method from a supertype
@Override
^
device/samsung/coreprimeve3g/ril/SamsungSPRDRIL.java:422: error: method processUnsolicited in class RIL cannot be applied to given types;
super.processUnsolicited(p);
^
required: Parcel,int
found: Parcel
reason: actual and formal argument lists differ in length
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
[ 3% 1018/28725] host C++: libLLVMCor...2 <= external/llvm/lib/IR/Function.cpp
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/hamza/cm14'
#### make failed to build some targets (27:37 (mm:ss)) ####
bump
Closed per OP request
So i need to build a modified kernel to patch the usb host driver to hack a nintendo switch.
the patch is here
ive tried 2 kernel sources, here and here
and both are giving the same errors
Code:
CC arch/arm64/kernel/setup.o
arch/arm64/kernel/setup.c: In function 'c_show':
arch/arm64/kernel/setup.c:643:38: error: 'system_rev' undeclared (first use in this function)
seq_printf(m, "Revision\t: %04x\n", system_rev);
^
arch/arm64/kernel/setup.c:643:38: note: each undeclared identifier is reported only once for each function it appears in
arch/arm64/kernel/setup.c:645:4: error: 'system_serial_high' undeclared (first use in this function)
system_serial_high, system_serial_low);
^
arch/arm64/kernel/setup.c:645:24: error: 'system_serial_low' undeclared (first use in this function)
system_serial_high, system_serial_low);
^
scripts/Makefile.build:257: recipe for target 'arch/arm64/kernel/setup.o' failed
make[1]: *** [arch/arm64/kernel/setup.o] Error 1
Makefile:964: recipe for target 'arch/arm64/kernel' failed
make: *** [arch/arm64/kernel] Error 2
the variables i set are:
Code:
$echo $CROSS_COMPILE
/home/xxxx/Android/Sdk/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-
$echo $ARCH
arm64
for a config i used
Code:
arch/arm64/configs/msm8937_defconfig
set all "NEW" options to defaults. its my first kernel build, i have no idea what most of it is /shrug
if anyone can give me some tips or a .config that works, would be very much appreciated. i havent had any luck googling the errors yet