Lenovo failing to provide working kernel sources that can be compiled for TB-8704F - Thinkpad Tablet Android Development

On the Lenovo website, I have finally found source code for the kernel of the Lenovo Tab 4 8 Plus. I downloaded the source, made defconfig, and enabled KVM in the kernel and then compiled. I got several errors which couldn't be fixed. I wondered if this was the cause of KVM, so I disabled KVM and tried again. Same errors. Strange that the archive containing the sources for the Lenovo Tab 4 10 Plus is much larger than that of the Lenovo Tab 4 8 Plus, which suggests that the Tab 4 8 Plus sources are not complete yet they both have the same SoC. Shame on Lenovo! This is the last time I get a product from them unless things improve. When I went to complain on the forums, I couldn't even start a thread, even though I had logged in and had verified my email, which is why I'm complaining here. They're also violating the GPL. The Tab 4 series were released in 2017 yet only in 2019 has Lenovo started releasing the kernel source code, clearly a GPL violation. I wanted to start learning ROM development and possibly port Android Pie to the Tab 4 8 Plus but because of this I can't. I love my Tab 4 8 Plus and my Ideapad 310 laptop but I think I'm done with Lenovo after this unless things improve.

code_exec said:
Shame on Lenovo! This is the last time I get a product from them unless things improve. When I went to complain on the forums, I couldn't even start a thread, even though I had logged in and had verified my email, which is why I'm complaining here. They're also violating the GPL. The Tab 4 series were released in 2017 yet only in 2019 has Lenovo started releasing the kernel source code, clearly a GPL violation.
Click to expand...
Click to collapse
I completely agree with your opinion on Lenovo. However, cannot confirm the problem with their forum. Also, they would have published the kernel sources much sooner if someone had asked earlier - which doesn't excuse the fact that they should publish the kernels immediately on their own.
I asked for the kernel source for the 10 Plus and the 8 Plus and got both after a longer wait.
code_exec said:
On the Lenovo website, I have finally found source code for the kernel of the Lenovo Tab 4 8 Plus. I downloaded the source, made defconfig, and enabled KVM in the kernel and then compiled. I got several errors which couldn't be fixed. I wondered if this was the cause of KVM, so I disabled KVM and tried again. Same errors. Strange that the archive containing the sources for the Lenovo Tab 4 10 Plus is much larger than that of the Lenovo Tab 4 8 Plus, which suggests that the Tab 4 8 Plus sources are not complete yet they both have the same SoC.
Click to expand...
Click to collapse
This isn't right. Text can be compressed very well. You have to compare the sources after unpacking, the code of the 8 Plus is compressed twice and therefore much smaller. At first view the kernel looks ok. But I didn't compile it, so you can still be right with your error messages, but the size of an archive is not an argument.
To compare two directories I use the tool Meld.
code_exec said:
I wanted to start learning ROM development and possibly port Android Pie to the Tab 4 8 Plus but because of this I can't. I love my Tab 4 8 Plus and my Ideapad 310 laptop but I think I'm done with Lenovo after this unless things improve.
Click to expand...
Click to collapse
I started with rom development for the same reasons as you, only that I have the Tab4 10 Plus. I want to motivate you not to give up at this point. You have actually very good conditions to develop a working rom, because the Tab3 8 Plus has one or more device tree and kernel and you can use my work on the 10 Plus as well.

LumenReaper said:
I started with rom development for the same reasons as you, only that I have the Tab4 10 Plus. I want to motivate you not to give up at this point. You have actually very good conditions to develop a working rom, because the Tab3 8 Plus has one or more device tree and kernel and you can use my work on the 10 Plus as well.
Click to expand...
Click to collapse
Does the 10 Plus kernel work on the 8 Plus though?

code_exec said:
Does the 10 Plus kernel work on the 8 Plus though?
Click to expand...
Click to collapse
Not without adjustments.
The archive of the X704F contains build instructions from Lenovo and a working defconfig.
Compare the defconfig of the 10 Plus with your own. And as already said, compare the sources with Meld. I'm pretty sure you could get a working kernel out of it.

LumenReaper said:
Not without adjustments.
The archive of the X704F contains build instructions from Lenovo and a working defconfig.
Compare the defconfig of the 10 Plus with your own. And as already said, compare the sources with Meld. I'm pretty sure you could get a working kernel out of it.
Click to expand...
Click to collapse
Here's the actual error I get when compiling: https://pastebin.com/mJyei1Y9

code_exec said:
Here's the actual error I get when compiling: https://pastebin.com/mJyei1Y9
Click to expand...
Click to collapse
Can you send me your defconfig please? I will look into it but probably not today.

LumenReaper said:
Can you send me your defconfig please? I will look into it but probably not today.
Click to expand...
Click to collapse
It's just called defconfig and is located in arch/arm64/configs. The MSM ones appear to be for the Snapdragon 430 and not the Snapdragon 625 the Tab 4 8 Plus uses.

code_exec said:
Here's the actual error I get when compiling: https://pastebin.com/mJyei1Y9
Click to expand...
Click to collapse
interestingly, I get a different error:
HTML:
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC arch/arm64/mm/dma-mapping.o
In file included from ./arch/arm64/include/asm/dma-iommu.h:12:0,
from arch/arm64/mm/dma-mapping.c:33:
include/linux/dma-mapping-fast.h:46:15: warning: 'struct dma_iommu_mapping' declared inside parameter list
error, forbidden warning: dma-mapping-fast.h:46
scripts/Makefile.build:257: recipe for target 'arch/arm64/mm/dma-mapping.o' failed
make[1]: *** [arch/arm64/mm/dma-mapping.o] Error 1
Makefile:946: recipe for target 'arch/arm64/mm' failed
make: *** [arch/arm64/mm] Error 2
and using the kernel config extracted from the kernel in build 180906 for the TB-8704X (I don't have the tablet yet):
HTML:
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
CC drivers/net/ethernet/msm/rndis_ipa.o
In file included from drivers/net/ethernet/msm/rndis_ipa_trace.h:81:0,
from drivers/net/ethernet/msm/rndis_ipa.c:32:
include/trace/define_trace.h:83:43: fatal error: ./rndis_ipa_trace.h: No such file or directory
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^
compilation terminated.
scripts/Makefile.build:257: recipe for target 'drivers/net/ethernet/msm/rndis_ipa.o' failed
make[4]: *** [drivers/net/ethernet/msm/rndis_ipa.o] Error 1
scripts/Makefile.build:402: recipe for target 'drivers/net/ethernet/msm' failed
make[3]: *** [drivers/net/ethernet/msm] Error 2
scripts/Makefile.build:402: recipe for target 'drivers/net/ethernet' failed
make[2]: *** [drivers/net/ethernet] Error 2
scripts/Makefile.build:402: recipe for target 'drivers/net' failed
make[1]: *** [drivers/net] Error 2
Makefile:946: recipe for target 'drivers' failed
make: *** [drivers] Error 2
I'll play with it some more when I get mine sometime next week and update it and extract the kernel config
I haven't had any luck playing with merging the TB-X704L and TB-8704X sources, still getting the same error.
Edit: I get the same error for the TB-X704L and TB-X704F.
Another edit: did a diff with the Pixel kernel:
HTML:
diff -ur tab48plus/drivers/net/ethernet/msm/rndis_ipa_trace.h msm/drivers/net/ethernet/msm/rndis_ipa_trace.h
--- tab48plus/drivers/net/ethernet/msm/rndis_ipa_trace.h 2017-05-02 05:06:34.000000000 +0100
+++ msm/drivers/net/ethernet/msm/rndis_ipa_trace.h 2019-04-08 13:21:43.806756700 +0100
@@ -77,5 +77,5 @@
/* This part must be outside protection */
#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/net/ethernet/msm
#include <trace/define_trace.h>
now I've gotten further, there's a lot of these errors
After fixing all the incorrect includes and adding the missing files, I have a kernel image
Edit: https://github.com/Phoenix09/android_kernel_lenovo_tb8704
 @code_exec: you should probably extract the config from your device and try building with this repo, I have no idea if any of the configs in the source are for this tablet.

Phoenix09 said:
interestingly, I get a different error:
HTML:
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC arch/arm64/mm/dma-mapping.o
In file included from ./arch/arm64/include/asm/dma-iommu.h:12:0,
from arch/arm64/mm/dma-mapping.c:33:
include/linux/dma-mapping-fast.h:46:15: warning: 'struct dma_iommu_mapping' declared inside parameter list
error, forbidden warning: dma-mapping-fast.h:46
scripts/Makefile.build:257: recipe for target 'arch/arm64/mm/dma-mapping.o' failed
make[1]: *** [arch/arm64/mm/dma-mapping.o] Error 1
Makefile:946: recipe for target 'arch/arm64/mm' failed
make: *** [arch/arm64/mm] Error 2
and using the kernel config extracted from the kernel in build 180906 for the TB-8704X (I don't have the tablet yet):
HTML:
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
CC drivers/net/ethernet/msm/rndis_ipa.o
In file included from drivers/net/ethernet/msm/rndis_ipa_trace.h:81:0,
from drivers/net/ethernet/msm/rndis_ipa.c:32:
include/trace/define_trace.h:83:43: fatal error: ./rndis_ipa_trace.h: No such file or directory
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^
compilation terminated.
scripts/Makefile.build:257: recipe for target 'drivers/net/ethernet/msm/rndis_ipa.o' failed
make[4]: *** [drivers/net/ethernet/msm/rndis_ipa.o] Error 1
scripts/Makefile.build:402: recipe for target 'drivers/net/ethernet/msm' failed
make[3]: *** [drivers/net/ethernet/msm] Error 2
scripts/Makefile.build:402: recipe for target 'drivers/net/ethernet' failed
make[2]: *** [drivers/net/ethernet] Error 2
scripts/Makefile.build:402: recipe for target 'drivers/net' failed
make[1]: *** [drivers/net] Error 2
Makefile:946: recipe for target 'drivers' failed
make: *** [drivers] Error 2
I'll play with it some more when I get mine sometime next week and update it and extract the kernel config
I haven't had any luck playing with merging the TB-X704L and TB-8704X sources, still getting the same error.
Edit: I get the same error for the TB-X704L and TB-X704F.
Another edit: did a diff with the Pixel kernel:
HTML:
diff -ur tab48plus/drivers/net/ethernet/msm/rndis_ipa_trace.h msm/drivers/net/ethernet/msm/rndis_ipa_trace.h
--- tab48plus/drivers/net/ethernet/msm/rndis_ipa_trace.h 2017-05-02 05:06:34.000000000 +0100
+++ msm/drivers/net/ethernet/msm/rndis_ipa_trace.h 2019-04-08 13:21:43.806756700 +0100
@@ -77,5 +77,5 @@
/* This part must be outside protection */
#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/net/ethernet/msm
#include <trace/define_trace.h>
now I've gotten further, there's a lot of these errors
After fixing all the incorrect includes and adding the missing files, I have a kernel image
Edit: https://github.com/Phoenix09/android_kernel_lenovo_tb8704
@code_exec: you should probably extract the config from your device and try building with this repo, I have no idea if any of the configs in the source are for this tablet.
Click to expand...
Click to collapse
That GitHub repository lacks a defconfig for the TB-8704F (WiFi-only variant), which I have. Will the TB-8704X (LTE variant) kernel work on the TB-8704F out of the box without adjustments or will adjustments be needed for the kernel to boot? Also, how do I extract the defconfig from my device?

code_exec said:
That GitHub repository lacks a defconfig for the TB-8704F (WiFi-only variant), which I have. Will the TB-8704X (LTE variant) kernel work on the TB-8704F out of the box without adjustments or will adjustments be needed for the kernel to boot? Also, how do I extract the defconfig from my device?
Click to expand...
Click to collapse
it might work, I don't know.
to extract the config:
you'll need mkboot
backup boot with TWRP, transfer boot.img to PC
extract boot.img:
Code:
./mkbootimg_tools/mkboot boot.img boot
decompress kernel:
Code:
cd boot
zcat kernel > kernel.out
extract the config:
Code:
/path/to/kernel/source/scripts/extract-ikconfig kernel.out > defconfig.txt

Phoenix09 said:
it might work, I don't know.
to extract the config:
you'll need mkboot
backup boot with TWRP, transfer boot.img to PC
extract boot.img:
Code:
./mkbootimg_tools/mkboot boot.img boot
decompress kernel:
Code:
cd boot
zcat kernel > kernel.out
extract the config:
Code:
/path/to/kernel/source/scripts/extract-ikconfig kernel.out > defconfig.txt
Click to expand...
Click to collapse
I backed up boot to a microSD card in TWRP recovery. However, there are three files in the backup folder of the microSD: one called 'boot.emmc.win', one called 'boot.emmc.win.sha2', and one called 'recovery.log'
The first file could possibly contain boot.img, but how do I extract it? The second one contains a SHA2 checksum for the first file. The third one is a more detailed log of what was happening in TWRP.
EDIT: Simply renaming boot.emmc.win to boot.img seems to have done the trick. Just extracted it, will look into it now.
EDIT 2: Managed to extract the defconfig and copied it over to the arch/arm64/configs folder and renamed it to tb8704f_defconfig. I then made defconfig and started compiling. Unfortunately same error. Something about topology.c is either broken on this kernel or my version of gcc is unable to parse something in topology.c. Even on the version off of GitHub. You said it was working for you, just curious, what Linux distro are you using? I'm happy to install it into a VM and compile the kernel from that. I'm running Ubuntu 18.04 and have tried compiling both on my host and in a systemd container, but same error.
EDIT 3: Yeah, it's an issue with my gcc compiler, because it doesn't error out at topology.c on an Ubuntu 16.04 systemd container with gcc 5 vs the Ubuntu 18.04 host and container I tried building it on with gcc 7 which did error out at topology.c. It's compiling right now in the Ubuntu 16.04 container and I do hope that it doesn't error out at another stage. It seems to be building well so far.
EDIT 4: I'm currently building it with the tb8704f_defconfig file I extracted from the tablet's boot image. Working well so far. I'm gonna build it without any modifications to the .config file and then flash it to the tablet to see if it works before making modifications with menuconfig. If this compilation goes well, I'll start making modifications with menuconfig.
EDIT 5: Kernel built, now I've got a file called 'Image' as well as Image.gz and Image-dtbs.gz Gzip archives. How do I flash these to the tablet?

code_exec said:
EDIT 2: Managed to extract the defconfig and copied it over to the arch/arm64/configs folder and renamed it to tb8704f_defconfig. I then made defconfig and started compiling. Unfortunately same error. Something about topology.c is either broken on this kernel or my version of gcc is unable to parse something in topology.c. Even on the version off of GitHub. You said it was working for you, just curious, what Linux distro are you using? I'm happy to install it into a VM and compile the kernel from that. I'm running Ubuntu 18.04 and have tried compiling both on my host and in a systemd container, but same error.
Click to expand...
Click to collapse
I'm pretty sure 3.18 won't built with GCC newer than 4.9 (at least without a lot of patches), I'm using Ubuntu 18.04 and Google's toolchain
code_exec said:
EDIT 5: Kernel built, now I've got a file called 'Image' as well as Image.gz and Image-dtbs.gz Gzip archives. How do I flash these to the tablet?
Click to expand...
Click to collapse
replace kernel in the unpacked boot image with Image-dtbs.gz, repack using:
Code:
mkboot boot/ new-boot.img
then you can flash that using the "flash image" option in TWRP

Phoenix09 said:
then you can flash that using the "flash image" option in TWRP
Click to expand...
Click to collapse
Got bootlooped when doing this, but thankfully I made a backup of my previous boot partition so I could restore in TWRP.
Unfortunately, I don't think we're getting very close to making custom ROMs for this tablet. Maybe the reason I got bootlooped was because you used files from the Pixel kernel for the missing files on your GitHub repository. I wonder if files from the Lenovo Tab 4 10 Plus kernel (which has been compiled in the past because there are custom ROMs available for this tablet) could be used instead.

code_exec said:
Got bootlooped when doing this, but thankfully I made a backup of my previous boot partition so I could restore in TWRP.
Unfortunately, I don't think we're getting very close to making custom ROMs for this tablet. Maybe the reason I got bootlooped was because you used files from the Pixel kernel for the missing files on your GitHub repository. I wonder if files from the Lenovo Tab 4 10 Plus kernel (which has been compiled in the past because there are custom ROMs available for this tablet) could be used instead.
Click to expand...
Click to collapse
the files I used from the Pixel kernel were probably generic Qualcomm stuff, I had the exact same issues with the 10 Plus kernel, I can play with it more when I get mine on Thursday.
Edit: I checked properly, they're generic Linux ones, those wouldn't affect booting (all netfilter stuff).
Edit 2: Have opened a ticket about the broken source, let's see if we get anywhere.
Edit 3: There is definitely issues with their source, repacked the stock boot image without modifying it and that boots, repacking it with my compiled kernel does not.

Hi Guys. Great to see people working on this. Will be great to eventually see a ROM for the tab 8 4. Best of luck.

Related

Make errors...Error 41

Hey there, I'm compiling the android source with a couple of mods merged in from cyanogenmod and leonnib4. I was getting a few random errors, but they went away with simple fixes...Now, I'm getting a new error, and I can't seem to wrap my head around it. It happens almost right out of the gate...every time I type make...
EDIT: New error 41. I seemed to have fixed the old error 1 by removing the previous build from out/target/product/passion, as the error pointed to the obj folder. Everything went smooth until the camera, and now I have a new error. I'm trying to merge in CyanogenMod camera source (for 720p), and I think that's the problem. Could it be something in the framework? I'm lost.
I have set up my build env on a MacBook Pro running OS X 10.5.8 with all the proper tools installed as per the AOSP site's instructions. I have run the envsetup script, and chosen the passion lunch option (yum )...
Anyway, here's the error:
Code:
81 errors
make: *** [out/target/common/obj/APPS/Camera_intermediates/classes-full-debug.jar] Error 41
The full scenario on pastebin: http://pastebin.com/8359mktC
Does anyone have any idea what's going on?
ik this is really old but what did u do to fix this? having the same error compiling cm9

dell kernel source ?

i am trying to compile kernel src from dell with android ndk. i got this error
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
cc1: error: unrecognized command line option "-mlittle-endian"
cc1: error: unrecognized command line option "-mapcs"
cc1: error: unrecognized command line option "-mno-sched-prolog"
cc1: error: unrecognized command line option "-mabi=apcs-gnu"
kernel/bounds.c:1: error: bad value (armv5t) for -march= switch
kernel/bounds.c:1: error: bad value (armv5t) for -mtune= switch
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
where can i find nvidia src from how_to_build.txt ?
thanks
mashi said:
i am trying to compile kernel src from dell with android ndk. i got this error
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
cc1: error: unrecognized command line option "-mlittle-endian"
cc1: error: unrecognized command line option "-mapcs"
cc1: error: unrecognized command line option "-mno-sched-prolog"
cc1: error: unrecognized command line option "-mabi=apcs-gnu"
kernel/bounds.c:1: error: bad value (armv5t) for -march= switch
kernel/bounds.c:1: error: bad value (armv5t) for -mtune= switch
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
where can i find nvidia src from how_to_build.txt ?
thanks
Click to expand...
Click to collapse
I told you the other day how to fix that stuff... You're not specifying the cross compiler to use.
export PATH=$PATH:/media3/android/ds7/dev/arm-2010q1/bin
export CROSS_COMPILE=arm-none-linux-gnueabi-
export ARCH=arm
Using CodeSorcery. If you're using something else, substitute, and of course update the path.
As for the nvidia source.. I never did find 2.6.32.9 from nvidia, but I did find this..
http://developer.nvidia.com/tegra/forum/build-android-source-tegra-250
From which I was able to grab it. Then I ran into this:
http://developer.nvidia.com/tegra/forum/linux-kernel-compilation-error-when-building-confignfsfsm
In the end, either source of the kernel I used, one gave me that the symbol map didn't match (using Dell source 3.36) and the other I kept getting the outer_cache symbol missing (from the nvidia source).
I suspect that it's just a matter of setting up the kernel correctly. I'm using /proc/config.gz but I googled around a bit and some folks here on XDA building a kernel on a phone were saying they had to add some extra parameters given to them by Samsung before being able to successfully build a module that would work for their phone.
Hopefully one of us figures it out... You want CIFS, I want TUN.
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/home/alan/android-ndk-r5c/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin
echo $CROSS_COMPILER
/home/alan/android-ndk-r5c/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi-
echo $ARCH
arm
I have set all those path before compile the kernel
khaytsus said:
I told you the other day how to fix that stuff... You're not specifying the cross compiler to use.
export PATH=$PATH:/media3/android/ds7/dev/arm-2010q1/bin
export CROSS_COMPILE=arm-none-linux-gnueabi-
export ARCH=arm
Using CodeSorcery. If you're using something else, substitute, and of course update the path.
As for the nvidia source.. I never did find 2.6.32.9 from nvidia, but I did find this..
http://developer.nvidia.com/tegra/forum/build-android-source-tegra-250
From which I was able to grab it. Then I ran into this:
http://developer.nvidia.com/tegra/forum/linux-kernel-compilation-error-when-building-confignfsfsm
In the end, either source of the kernel I used, one gave me that the symbol map didn't match (using Dell source 3.36) and the other I kept getting the outer_cache symbol missing (from the nvidia source).
I suspect that it's just a matter of setting up the kernel correctly. I'm using /proc/config.gz but I googled around a bit and some folks here on XDA building a kernel on a phone were saying they had to add some extra parameters given to them by Samsung before being able to successfully build a module that would work for their phone.
Hopefully one of us figures it out... You want CIFS, I want TUN.
Click to expand...
Click to collapse
I'll be following this thread as I'm trying to figure this out, too (I'm very much a Linux n00b, though, so the progress is incredibly slow). I think the kernel compilation is the main thing holding us back from getting some custom ROMs on here; once the parameters of the build environment are found, we'll probably have an easier time of it (and, good as DJ_Steve is, it would be nice to have a few more devs working this device).
Does this link help at all?
http://opensource.dell.com/releases/streak7/3.36/HOW-TO-BUILD.txt
Z4nd4r said:
I'll be following this thread as I'm trying to figure this out, too (I'm very much a Linux n00b, though, so the progress is incredibly slow). I think the kernel compilation is the main thing holding us back from getting some custom ROMs on here; once the parameters of the build environment are found, we'll probably have an easier time of it (and, good as DJ_Steve is, it would be nice to have a few more devs working this device).
Does this link help at all?
http://opensource.dell.com/releases/streak7/3.36/HOW-TO-BUILD.txt
Click to expand...
Click to collapse
Not really, at least not me.. First off finding nvidia Froyo source was a PITA and I only got it from a clone of the old repo so no tellling there.. Plus the other steps seem to mostly be nonsense, as files don't match up, etc..
Otherwise, I can readily compile the Dell code but the output won't load.. Symbol map does not match; ie: config is different. Maybe even compiler differences.. Dunno.
Im sorry for my noobness, but what would this code actually do for us? Would we then have the ability to compile our own kernels and overclock and whatnot?
ssmr2t said:
Im sorry for my noobness, but what would this code actually do for us? Would we then have the ability to compile our own kernels and overclock and whatnot?
Click to expand...
Click to collapse
Maybe, but I just want tun.ko for now. Still no luck today, switched to Android NDK but still symbol issues.
Sent from my Dell Streak 7 using Tapatalk
If u can catch it compiler version is output through dmesg during bootup I don't have me streak handy or I would check. Compiler version may very well play a roll in modules loading though I have experienced it on x86 anyway
Brandas said:
If u can catch it compiler version is output through dmesg during bootup I don't have me streak handy or I would check. Compiler version may very well play a roll in modules loading though I have experienced it on x86 anyway
Click to expand...
Click to collapse
Good idea, but it doesn't seem to have much info..
<5>[ 0.000000] Linux version 2.6.32.9 ([email protected]) (gcc version 4.4.0 (GCC) ) #8 SMP PREEMPT Mon Mar 28 14:04:54 CST 2011
Thread Resurrection in progress.
I'm going to be adding FTDI VCP support. Figured I'd post here to see what progress others have made... was a little surprised to only find 2 dev pages for this tablet.
Yeah, I've been working on a 2.6.35 kernel myself slowly, but I totally screwed it up and need to start over.
Maybe who try developing kernel should search help in other tegra2 device forums
Sent from my LG-P500 using Tapatalk
nikoltu said:
Maybe who try developing kernel should search help in other tegra2 device forums
Click to expand...
Click to collapse
Any particular forum you have in mind? I did take a look at the somewhat updated Dell Opensource page:
http://opensource.dell.com/releases/streak7/5.06/
But it is definitely aimed at HC, and I don't think it would do much for an ICS build. On the other hand, at least it gives what "appears" to be the source and binaries for the devices (though I'm a little more inclined to use what I was able to pull off the device with ADB).
FWIW...
---------- Post added at 11:52 AM ---------- Previous post was at 11:33 AM ----------
One other link that appears to be of interest:
http://developer.nvidia.com/tegra-resources
Note the releases as of 12/19 of updated Tegra kits
The info from opensource.dell.com is missing a lot of information.

[Q] Kernel compile error

Hey there all
I'm trying to compile a kernel for the GT-I9070P from the default Sammy source (opensource.samsung.com) and I've encountered an error and I hope you guys can help me with this:
Code:
drivers/staging/nmf-cm/cm/engine/dsp/src/dsp.c: In function 'cm_DSP_AcknowledgeDspIrq':
drivers/staging/nmf-cm/cm/engine/dsp/src/dsp.c:315:5: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[3]: *** [drivers/staging/nmf-cm/cm/engine/dsp/src/dsp.o] Error 1
make[2]: *** [drivers/staging/nmf-cm] Error 2
make[1]: *** [drivers/staging] Error 2
make[1]: *** Waiting for unfinished jobs....
I wonder if any of you guys have encountered these errors.....
Hi.
Dont use GCC 4.5+ to build kernel.
If you still wanna use GCC 4.5+, here is a method:
In your /drivers/staging/nmf-cm/makefile, just delete "Werror".
And build it again.
Recommend using Linaro GCC 4.4.5 or GCC 4.4.3 .
EDIT:
Although you can have a booting kernel, but the phone will reboot immediately when you dial out.
I replacd dsp.c from other source code, and it built with no errors.
The phone still will reboot when dial out.
Hmm....so that means the phone will reboot upon attempting to call someone ?
I give up writing anymore signatures.
CallMeVentus said:
Hmm....so that means the phone will reboot upon attempting to call someone ?
I give up writing anymore signatures.
Click to expand...
Click to collapse
Yep, when some calls come it will reboot, too.
It has no reboot issue with gcc 4.4
BTW,sorry, just now i replied a wrong thread.
cocafe said:
Yep, when some calls come it will reboot, too.
It has no reboot issue with gcc 4.4
BTW,sorry, just now i replied a wrong thread.
Click to expand...
Click to collapse
Nah it's fine , I believe you just saved my ass
I give up writing anymore signatures.
Thread moved to General section.

[GUIDE]Development for GalaxyTab 7.7 and Plus. How hard could it be?

Planning this for sometimes. So much work ahead. Just studying the new code cause me a lot of time. I think I have to rush it out so that someone may share my burden. Don't have much time to polish it. I'm trying to provide all commands, files and links. Please correct me if something is wrong or missing. Hoping this could be a stepping stone for those interested. If you like challenge, it'll be fun!
1. Introduction
If you have watched "Top Gear", you would have heard Jeremy Clarkson said "How hard could it be?". Why is it so hard to build a rom for our tab?
When I first play with rom building, it was quite straightforward. I recuilt my retired PC (Celeron 1.2G with 3G RAM, 40G HD) and follow the guild for building PA. Installing Ubuntu 12.04 and then the necessary packages. Everything is ready in a few hours. It was really challenging your patience to repo sync the source. After a few retries, I finally completed the download in two days! After two hours, my harddisk is full! Then I collected another retired 80G HD from a friend. Re-install everything and build again. Building requried 7 hours on my antique PC. With only a few minor errors to correct, my first rom pa2.55 was out. So how hard could it be? It was our predecessors ( @ohanar, @locerra, etc.) :good: who had already done lots of hardwork on device trees and kernel! If Samsung has really released the hardware related sources, there will not be so much troubles for us. At the time Android 4.2 launch, we have a new problem. Our tab's CSR chip doesn't support Bluedroid. See the Nexus family, everything is ready. Rom building will never be so pain in the ass as us.
1.1 What's wrong with our hardware
GT-7.7 and Plus use the exynos4 smdk4210 board with Mali-400 GPU. Quite a number of devices have similar hardware. The main problem we have would be:
1.1.1 CSR bluetooth chip.
CSR chip doesn't support bluedroid which become standard after Android 4.2. Bluez.org has provide a solution for 4.2 early this year but porting to 4.3 and 4.4 may take some time.Working on it now. Anyone has experience on bluetooth are welcome to help.. Bluez working now. See my Thread How to port Bluez to Android 4.4. Cheers!:highfive:
1.1.2 Athero wifi chip.
Samusng's wifi driver has issues on 5G support and SOD. I'm using the modified kernel driver from Samsung's 4.1.2 source. Athero provide drivers for 3.1 to 3.10 linux kernels but they have no wakelock support. I also wrote a drive base on Athero's source and add wakelock support but have no time to polish it now. Athero's chip doesn't have firmware for AP as Boardcom. Which is also the way Android platform providing wifi tethering in framework. To support wifi tethering we have to change the framework and the driver. Anyone has experience in linux HostAP are welcome to help. Wifi tethering is ok now! Tutorial will be in Post#2 soon.
1.1.3 modem chip (xm6260).
RIL stand for (radio interface library). Most of the phone manufacturer would provide their own vendor lib. The only working blob now is Samsung's ICS propietry libsec-ril.so which is obselete now. The one from stock 4.1.2 not working but no time to trace. It also don't seems to have much difference. This library handle the AT commands issuing to the (baseband to) modem chip. xm6260 has a complete set of command manual. It should not be too hard to rewrite if we can hack the ports. However it is not worth to splend too much time on this. Those has experience in AT commands are welcome to help.
RIL details: http://www.kandroid.org/online-pdk/guide/telephony.html
1.2 Where to get the source?
1.2.1 Samsung's source for our tab
The best source would be from Samsung http://opensource.samsung.com/. Sadly, the source from Samsung only cover the kernel. Our tab only have source up to 4.1.2 and kernel source 3.0.31 from Samsung.
1.2.2 Samsung's source for other devices
Luckly, we have similar architecture to some newer Samsung models. Their source is our major source now. eg. We can use the Mali driver from Note8 and/or i9300.
1.2.3 Manufacturere's web site.
The other source would be from the chip manufacturer. eg. Athero has source for linux.
1.3 What is going on at boot?
1.3.1 Power ON
a) When power button is long pressed (should be released after the logo shows otherwise it will reboot again every 6 seconds). The manufacturer's bootloader would show the vendor's logo. At that moment, bootloader would sense if there are key being pressed. Standard Android will go to boot menu when pwr + vol- is pressed. Samsung would go to download mode (something like fastboot) and accept pwr + vol+ to start recovery mode. If no other key is pressed, it would be a normal boot.
b) When USB is plug in (PC usb port or charger) at power off, the tab will be turn on silently. It is in the LPM (low power mode). According to lpm.rc (executed by Init, will be explained in 1.3.3), CPU will be set to POWERSAVING and the program charger is running. It should only handle simple tasks like Detecting the pwr button to show the charging images. If the pwr is long press when showing the charging image, it will reboot as in a).
3) Lollipop LPM: charger is link to the program /sbin/healthd. The process is similar to b) but lpm.rc is merged to init.rc.
1.3.2 Boot image
For our tab, there are two parts for a boot.img or a recovery.img. kernel binary and initramfs. As the name imply, Init-Ram-FS is the initial file system loaded into ram when the devices boot. Kernel binary provide the hardware drivers libraies which communicate with the hardware and baseband. At normal boot or recovery mode, the image (in /boot or /recovery partition) will be decompressed and loaded to memory. Initramfs will be loaded in root(/). It would consume a few hundreds MB of RAM and that's why our free ram is only 7xxM.
In LPM, it would depends on the last boot state. If it was powered off from recovery, recovery.img will be loaded and handle the LPM. If it was powered off from platform, boot.img will be loaded and handle LPM. That's why It might show different charging images if the charging images for reovery.img and boot.img are different.
Stock cook roms can unpack and modified the initramfs from the existing zImage. It is created in system/core if we build it from source. Here is a tool which can unpack/repack our boot.img or recovery.img.
1.3.3 Init
There is the Init program in every initramfs. This is the first program to run according to the sequence in the init.rc (or lpm.rc when in LPM). Partitions will be mounted and symlinked, default values and permissions are assigned, services will be started, etc. The source of Init is in system/core. The last thing Init do would be the continuous eventloop to process events.
2. Getting Start
To start building, we need the building environment. Many tutorials have alreay covered the details so I just list my suggestions. The guide from Google is a bit outdated but really helpful. http://source.android.com/source/building.html
Basic knowledge of linux is required. All commands are run in a terminal.
2.1 Hardware
A decent PC with as much ram as possible. Thanks for the donations, I can upgrade to a better i5 notebook with 4G ram and a 500G partition only for building. It would take 3+hrs. for a clean build. RAM and Harddisk speed are essential. A desktop PC with same configuration will be faster since notebook harddisk is slower. I plan to add more RAM when the price drop (seems to be a long wait )
RAM: 4G or above is recommended.
Harddisk space: 30G+ for system, 60G+ per rom, size of ccache (50G-100G), Roughly, a partition with at least 120G for one rom. Bigger is better.
A decent internet connection is essential. It will take days to sync the source if you only have bandwidth of 2M or less .
2.2 OS
64bit Ubuntu Desktop 12.04 or above. Recommend 13.04 or above. I'm using the latest 14.04.
2.3 Install the required packages
These packages are required during building and packing. (eg. gzip is required to compress the kernel binary)
type command: (have a beer or coffee. It will take a while)
Code:
[I][COLOR="Green"]For Ubuntu 12.x and 13.x:[/COLOR][/I]
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 \
libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev \
libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc \
readline-common libreadline6-dev libreadline6 bzip2 libbz2-dev libbz2-1.0 libncurses5-dev lib32readline5 \
lib32readline-gplv2-dev lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 pngcrush \
libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools schedtool libwxgtk2.8-dev python
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
[I][COLOR="Green"]For Ubuntu 14.x and 15.x:[/COLOR][/I]
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools \
build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool libxml2 libxml2-utils xsltproc lzop \
libc6-dev schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib
2.4 Insatll android-sdk
Download (for Linux 64-bit of course): http://developer.android.com/sdk/index.html
Extract the file to a directory (eg. ~/android-sdk)
Add the path to ~/.bashrc
type command:
Code:
sudo gedit ~/.bashrc
at the bottom add the path
Code:
export PATH=~/bin:~/android-sdk/tools:~/android-sdk/platform-tools:$PATH
Quit and restart terminal to commit the changes.
Verify the path and update the SDK
type command:
Code:
android
2.5 Install java
If you have installed eclipse, openJAVA is ready. Some say it is not suitable for android development.
I've tried both and I found no appearing difference.
To install SUN JAVA (Ubuntu 13.04 or above)
type command:
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer
For Lollipop: openjdk 7 is required
Code:
sudo apt-get install openjdk-7-jdk
2.6 Install repo
type command:
Code:
mkdir -p ~/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
2.7 Add usb dev rules
Which are required for adb and fastboot, eg. View attachment 51-android.zip
type command:
Code:
sudo cp 51-android.rules /etc/udev/rules.d
sudo chmod 0644 /etc/udev/rules.d/51-android.rules
2.8 Enable ccache
type command:
Code:
sudo gedit ~/.bashrc
add lines for CCACHE
Code:
export USE_CCACHE=1
export CCACHE_DIR=~/android/.ccache
Quit and launch the terminal again to commit the changes
ccache will cache the object files of gcc for next build, it would increase the speed of subsequent builds alot.
After source is sync in 2.11 and before build, we can set the size of ccache first.
type command:
Code:
~/android/rom/prebuilts/misc/linux-x86/ccache -M<size>
2.9 Init the source
Make a new working driectory for your rom
type command: (eg. ~/android/rom)
Code:
mkdir -p ~/android/rom
Each rom has its own manifest.xml listing all the required projects.
It is usually in the project android (manifest for PA). The readme of this project would provide the command to init.
eg. CM11.0: https://github.com/CyanogenMod/android/tree/cm-11.0
type command:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
It will fetch the manifest.xml and put it into a hidden directory .repo in the current directory (~/android/rom/.repo)
2.10 preparing local_manifest.xml
It is not a good pratice to change the manifest.xml directly. If the ROM has change its manifest, you would require to init again. The right way is putting everything your device needed in a seperate file .repo/local_manifests/local_manifest.xml. The device trees and kernel source for GalaxyTab 7.7 and Plus : https://github.com/danielhk?tab=repositories
eg. cm11.0 for p6800
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="danielhk/android_hardware_atheros_wlan" path="hardware/atheros/wlan" />
<project name="danielhk/android_device_samsung_p6800" path="device/samsung/p6800" />
<project name="danielhk/android_device_samsung_smdk4210-tab" path="device/samsung/smdk4210-tab" />
<project name="danielhk/android_kernel_samsung_smdk4210" path="kernel/samsung/smdk4210" />
<project name="danielhk/proprietary_vendor_samsung_smdk4210" path="vendor/samsung" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" />
</manifest>
Note: Settings will follow manifest.xml. cm-11.0's manifest has default remote="github" and revision="refs/heads/cm-11.0" so we can omit the same entries here. For other roms, see the defined names in manifest.xml and change accordingly. You can also add other devices trees here if you want to build them for the same rom.
2.11 sync and build
To fetch the source (specified in manifest.xml and local_manifest.xml) to working directory (~/android/rom)
type command:
Code:
repo sync -j32
-J specify the no. of threads to download. I have a few trials. Seems 32 works for me.
When it is done. You will find that ~/android/rom is not empty now.
You may set the ccache size now:
type command: (eg. 50G)
Code:
~/android/rom/prebuilts/misc/linux-x86/ccache -M50G
Only if you want to change size, otherwise it only requires once.
To build a rom, change to the rom directory. Usual commands: (eg. for CM roms)
Code:
cd ~/android/rom
. build/envsetup.sh
lunch cm_p6800-userdebug
mka bacon
CM need to download a prebuilt (Termianl.apk). To simplify this routines, I modified the build script from PA to cm View attachment rom-build.zip.
Copy it to the rom directory, type command:
Code:
cd ~/android/rom
./rom-build.sh p6800
After building is complete with no error, the rom will be output to ~/android/rom/out/target/product/p6800.
3. What can we do? :laugh:
3.1 Kernel
Since Samsung provide the complete kernel source, working on kernel would be comparatively speaking much easier.
When we say kernel, we mean the boot.img or zImage which already include the initramfs. This image will be flash to the /kernel (/dev/block/mmcblk0p5)
Hardware and flags are defined in defconfig inside <kernel dir>/arch/arm/config. It is the Linux standard.
3.1.1 difference between stock kernel and the kernel in custom rom
The main difference between the two kernels is the location of kernel library modules. Libray modules are mainly for network and storage drivers. By building them as modules, they can be stoped and restarted in case of critical errors.
Stock kernel put it in /lib which is part of the initramfs. We need to do extra steps to manually copy them to the initramfs after the first build and rebuild again. If you want to build the stock kernel, there is a very good tutorial.
Custom rom put the kernel library modules in /system/lib. Thus boot.img need to match those modules, otherwise they will not work properly.
For custom roms, which defconfig to be used is defined in device tree.
eg. For p6800, in the file device/samsung/p6800/BoardConfig.mk. There is the line:
Code:
TARGET_KERNEL_CONFIG := cyanogenmod_p6800_defconfig
It specify which defconfig file for the kernel
I wrote a View attachment build-k.zip scirpt to simplify the building of kernel alone. Copy it to the rom working directory (~/android/rom)
eg. For p6800, type command:
Code:
./build-k p6800
New boot.img will be output to the same directory as rom if no error.
3.1.2 Add/modify O/C, U/V, GOVERNORS, hardware drivers, etc.
As mentioned in 1.2, we can copy/modified the source from i9100 and n7000 kernels. For example, Dorimanx and Slyahkernel provide many useful code for us. The source of i9300 from Samsung may also provide some drivers update (eg. Mali)
Ref: Exynos4210 cpu menu., Mirror download
3.1.3 Default Orientation
Why the incall screen always landscape?
Many apks assume the default orientation is portrait but our tab's default orientation is landscape. It is a kernel behaviour so that recoveries (including the stock 3e recovery) are all in landscape.
To avoid this odd behaviour of apks like inCall screen, changing the default orientation in kernel is the ultimate solution.
It is already in my do list for a long time but trying to keep up with the android plaftform already occupy all my spare time...
I already have some idea how to do. Anyone interested to help on this can PM me. Already fixed in the platform
3.1.4 Update the kernel source
The existing kernel is base on Linux 3.0.x. It is outdated but I don't think Samsung would bother to update it. I had tried starting with the 3.4 source from Google but don't have enough time to carry on. I have filled some drivers already. Will take another shot later if I have time...
Anyone have experience in Linux kernel are welcome to help. No more guides are there, this would be a great challenge but fun!
3.2 device tree
Every device requires a device tree which:
a) Specify the hardware
b) define some overrided library. (eg. sensor, camera)
c) provide the extra files to be put in the initramfs. (init.<device>.rc, fstab.<device>, etc.)
If there are a few models variants, common parts would be put in a seperate common device tree (eg. smdk4210-tab for our tab). In this way, changing can be made once for all variants.
Most of the work on porting for a specific ROM would be on the device tree. Same as the kernel, we can get some update by modifying from other devices. CM's device tree for i9100, n7000 and i9300, etc. With a good device tree, we can port to any ROM.
3.3 Bluetooth support after 4.2.
In 4.2.2, I changed the source of framework, system_core, phone apk and device tree to work with bluez. It was a huge job! Hundreds of lines had been changed. Many files are replaced. It was quite clumsy but was the only way then. This way may not work for 4.3 onward.
Here are the details of both stack:
Bluedriod : http://source.android.com/devices/bluetooth.html
Bluez : http://www.kandroid.org/online-pdk/guide/bluetooth.html
3.3.1 We may modify the bluedroid to support our chip.
3.3.2 Working on the bluez support. I'm trying now.
  Bluez5 is OK now. See my thread: How to port Bluez to Android 4.4
3.4 Recoveries
With the device tree and kernel, we can build the recovery from source. CWM would be a side product of CM roms and TWRP has a tutorial.
The same View attachment build-k.zip script can be used to build recovery alone. In the rom working direcotry, to build recovery only
type command:
Code:
./build-k p6800 recovery
With no error, recovery.img will be at the same output directory as rom.
Local manifest
https://github.com/danielhk/local_manifest
All model share the same local_manifest.xml
daniel_hk, Check and commit to your tree my patches for PAC-4.2.2
Vaka2 said:
daniel_hk, Check and commit to your tree my patches for PAC-4.2.2
Click to expand...
Click to collapse
Thanks!
It nice to see someone interested in our development!
I have look into your changes briefly.
1. Some changes in media which I'll leave the user to decide. I rather keep the builds as genuie as possible.
2. Some of them are new commit of the original source which will automatically updated in a sync.
3. I forgot to upload a few minor projects to github.
One of which was android_build which will include the files like hciattach building from source. If you study the source of exteranl/bluetooth/bluez, they are there. That means it might have update later. No need to add as a blob.
Actually the best way is including them in PROJECT_PACKAGES section of the device.mk. It would have the same result without touching the original source. Less touch to the original source means fewer conflict later. I was caught up and did't have time to tidy up everything so I leave it there. Also, files from bluetooth should be put in the smdk4210-tab device tree. All model share the same source.
vendor_pac should be upload to official PAC's git. They already gave me an account but they use Google+ which I have trouble to login here. I was working on a job and I hadn't follow up. Now I'm working on 4.4 which PAC haven't release yet. So I put aside first.
You probably didn't have to waste you time if you PM me first.
Everytime I upload to github is a challenge, it always break before complete. I have to monitor it from time to time. Annoying! So I can only upload once a while when everything is ready...
To be honest, I really don't have time to keep up with the old source. The new ports already occupy all my spare times. With limited resource, I can only focus on major issues. Bluetooth after 4.3 is my first priorty. If it can be done, means we can go much further.
If you are interested, you may pick one of the thing I mentioned in this thread to start. Wifi-tethering or the vendor ril library is needed too. You may try it in 4.2.2 first. See what you are good at and interested to. PM me or post again if you have any questions and/or suggestion.
Thanks again for your effort.
daniel_hk said:
Thanks!
It nice to see someone interested in our development!
I have look into your changes briefly.
1. Some changes in media which I'll leave the user to decide. I rather keep the builds as genuie as possible.
2. Some of them are new commit of the original source which will automatically updated in a sync.
3. I forgot to upload a few minor projects to github.
One of which was android_build which will include the files like hciattach building from source. If you study the source of exteranl/bluetooth/bluez, they are there. That means it might have update later. No need to add as a blob.
Actually the best way is including them in PROJECT_PACKAGES section of the device.mk. It would have the same result without touching the original source. Less touch to the original source means fewer conflict later. I was caught up and did't have time to tidy up everything so I leave it there. Also, files from bluetooth should be put in the smdk4210-tab device tree. All model share the same source.
vendor_pac should be upload to official PAC's git. They already gave me an account but they use Google+ which I have trouble to login here. I was working on a job and I hadn't follow up. Now I'm working on 4.4 which PAC haven't release yet. So I put aside first.
You probably didn't have to waste you time if you PM me first.
Everytime I upload to github is a challenge, it always break before complete. I have to monitor it from time to time. Annoying! So I can only upload once a while when everything is ready...
To be honest, I really don't have time to keep up with the old source. The new ports already occupy all my spare times. With limited resource, I can only focus on major issues. Bluetooth after 4.3 is my first priorty. If it can be done, means we can go much further.
If you are interested, you may pick one of the thing I mentioned in this thread to start. Wifi-tethering or the vendor ril library is needed too. You may try it in 4.2.2 first. See what you are good at and interested to. PM me or post again if you have any questions and/or suggestion.
Thanks again for your effort.
Click to expand...
Click to collapse
Thanks to you Daniel for your immense effort on detailing all this! I'm far from a dev status like you and @UpInTheAir. But my support will always go to you developers. Both of you has done an impressive work for an outdated hardware and keep us happy with your Rom and Kernel. Again, thanks a lot.
Thanks, all hail daniel_hk for this!
Daniel,
I can only thank you for all the work he is having to keep our equipment (62xx, 68xx, TXX) alive and really Kitkat will give a new breath, for even in an experimental state already see how the device works smoother. A feather can not help, but I'm looking forward to seeing this in functional status.
As a suggestion, I honestly do not know the procedures, but it would be interesting to ask an official support OmniROM (ROM promising, others liked) and CM. The Galaxy SII has the same hardware, in which the use OmniROM and this magnifies the ROM. Maybe they (Team OmniROM) may offer official support or at least help in these matters!
I'm almost begging for support OmniROM, and Entropy512 (http://forum.xda-developers.com/member.php?u=591147&nocache=1&z=3487892739940434) Kindly reply me: "Someone who is working with one of Those devices and has it working needs to submit it. "
Sorry for my english
Hi Daniel,
Whe I try to repo sync, I was stopped by the error:
"fatal: Couldn't find remote ref refs/heads/cm-10.2"
"Cannot fetch danielhk/proprietary_vendor_samsung_smdk4210."
I was trying to build a cm-10.2 version.
I checked your repository and the folder was right there.
I am new to building android rom. There must be something obvious that I missed.
Thanks.
11nn93n9 said:
Hi Daniel,
Whe I try to repo sync, I was stopped by the error:
"fatal: Couldn't find remote ref refs/heads/cm-10.2"
"Cannot fetch danielhk/proprietary_vendor_samsung_smdk4210."
I was trying to build a cm-10.2 version.
I checked your repository and the folder was right there.
I am new to building android rom. There must be something obvious that I missed.
Thanks.
Click to expand...
Click to collapse
I think you get this line from my PAC manifest.
That was base on cm-10.1, default is cm-10.1. If you take a look of the project danielhk/proprietary_vendor_samsung_smdk4210 on github, you will find only one tree cm-10.1. cm-10.2 can use the same tree. I'll find time to update it later.
When you build cm-10.2, default tree is cm-10.2. The line without a revision will assume the default. That's why you can find it.
Your solution: Add the revision=cm-10.1 at the end of the project.
Code:
.... danielhk/proprietary_vendor_samsung_smdk4210" revision="cm-10.1" />
Good luck!
daniel_hk said:
I think you get this line from my PAC manifest.
That was base on cm-10.1, default is cm-10.1. If you take a look of the project danielhk/proprietary_vendor_samsung_smdk4210 on github, you will find only one tree cm-10.1. cm-10.2 can use the same tree. I'll find time to update it later.
When you build cm-10.2, default tree is cm-10.2. The line without a revision will assume the default. That's why you can find it.
Your solution: Add the revision=cm-10.1 at the end of the project.
Code:
.... danielhk/proprietary_vendor_samsung_smdk4210" revision="cm-10.1" />
Good luck!
Click to expand...
Click to collapse
Thank you for your help. Working on it. Its a big learning curve for me.
I made up to now the most progress with Ubuntu 13.04 64bit version building the cm 10.1 version.
With Ubuntu 12.04 and 13.10, I have been stopped much earlier than on 13.04.
Now I encountered the error below when running build-k p6800:
target thumb C++: libstagefright <= frameworks/av/media/libstagefright/ACodec.cpp
frameworks/av/media/libstagefright/ACodec.cpp:53:24: fatal error: sec_format.h: No such file or directory
compilation terminated.
make: *** [/home/lgeng/android/rom/out/target/product/p6800/obj/SHARED_LIBRARIES/libstagefright_intermediates/ACodec.o] Error 1
make: *** Waiting for unfinished jobs....
I downloaded the folder that contains the sec_format.h file from https://android.googlesource.com/device/samsung/crespo/. But It is not clear to me where to place the folder.
Thanks.
11nn93n9 said:
I made up to now the most progress with Ubuntu 13.04 64bit version building the cm 10.1 version.
With Ubuntu 12.04 and 13.10, I have been stopped much earlier than on 13.04.
Now I encountered the error below when running build-k p6800:
target thumb C++: libstagefright <= frameworks/av/media/libstagefright/ACodec.cpp
frameworks/av/media/libstagefright/ACodec.cpp:53:24: fatal error: sec_format.h: No such file or directory
compilation terminated.
make: *** [/home/lgeng/android/rom/out/target/product/p6800/obj/SHARED_LIBRARIES/libstagefright_intermediates/ACodec.o] Error 1
make: *** Waiting for unfinished jobs....
I downloaded the folder that contains the sec_format.h file from https://android.googlesource.com/device/samsung/crespo/. But It is not clear to me where to place the folder.
Thanks.
Click to expand...
Click to collapse
Not much I can tell. You have to provide the manifest.xml and local_manifest.xml if exist. And device tree changes if exist.
1. build-k is for kernel building only. frameworks_av seems not relevant.
2. crespo is another device. Not the right way to get missing file there.
3. With proper settings and manifest, Ubuntu 12.04 to 13.10 (which I'm using) have no apparent different for building.
If you are building cm-10.1, it is mature. No way there is missing file.
With no other info., I guest there is something wrong with your manifest or device tree. Mixing version projects, wrong flags in device tree, etc.
You might need more reading on what is device tree and manifest first.
Good luck!
Hi,
can you help me with integrating device to manifest.xml? I think there's the problem because everything runs fine until I write luch cm_p6200-userdebug, becuase it shows me that the device isn't found and in /android/rom/device, there isn't any folder called /samsung/p6200. I did everything by the guide, I only changed the local_manifest device info to p6200, because I own it. I'm using Ubuntu 14.04. Thanks for your help.
tom411 said:
Hi,
can you help me with integrating device to manifest.xml? I think there's the problem because everything runs fine until I write luch cm_p6200-userdebug, becuase it shows me that the device isn't found and in /android/rom/device, there isn't any folder called /samsung/p6200. I did everything by the guide, I only changed the local_manifest device info to p6200, because I own it. I'm using Ubuntu 14.04. Thanks for your help.
Click to expand...
Click to collapse
Not much details. next time provide detail. At least, send me your local_manifest.xml. It is definitely the source of your problem. You haven't tell which cm you built too.
I don't know what's wrong because I can't see anything in your side.
But I can tell you that device tree of p6200 didn't download. Check the typings of your local_manifest.xml. It should match the one in github.
Good luck!
TO ANYONE, YOU HAVE TO PROVIDE DETAILS. OTHERWISE, I DON'T KNOW HOW TO HELP!
I really don't have time to guess. You have to forgive me if I ignor your post.
From Nexus 7 上的 Tapatalk
Okay, sorry for it, I didn't know you need it. I want to build a Cm-11. I looked at my local_manifest and I think it's correct. Here is it
edify question for our 815's
Taken from one of your script's
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
Installing a .txt into sdcard0/data through .zip in recovery.
I used linux command to find paths for each of the memblocks - but didnt know which path, partition, I am looking for here. /system /userdata etc UHHHH
so to mount to the "sdcard0 /data"directory to install a plain .txt file would be ???
mount("ext4", "EMMC", "??????????????", "/data");
also can I call "/data" anything - like "/datadog" - since this is just a reference to a mount point and is temporary?
One other quicky
First I found this in an edify tutorial -
"/system partition is automatically mounted. this command is needed when you need to mount another partition beside /system or in any condition when recovery mode failed to mount your system partition. the system's location is /dev/stl9, cache /dev/stl10, and data /dev/stl11 (all partition type commonly rfs, will be differ if you have custom kernel or rom)."
since this is a custom rom does /system still auto mount - meaning in ref to to your code above - was it unnecessary but probably good practice or because this is a custom rom there are changes that move the location for /system. I noticed that " the system's location is /dev/stl9, cache /dev/stl10, and data /dev/stl11" was not in the memblock paths??
Start my intro to kernels tomorrow - Oh boy
Off subject - I knew Brazil - tough break with the injury though. Next wins - Argentina and Costa(CoastBaby)!! Going to bed now 6:00 AM WHAT.
Lt.col.johncross said:
Taken from one of your script's
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
Installing a .txt into sdcard0/data through .zip in recovery.
I used linux command to find paths for each of the memblocks - but didnt know which path, partition, I am looking for here. /system /userdata etc UHHHH
so to mount to the "sdcard0 /data"directory to install a plain .txt file would be ???
mount("ext4", "EMMC", "??????????????", "/data");
also can I call "/data" anything - like "/datadog" - since this is just a reference to a mount point and is temporary?
One other quicky
First I found this in an edify tutorial -
"/system partition is automatically mounted. this command is needed when you need to mount another partition beside /system or in any condition when recovery mode failed to mount your system partition. the system's location is /dev/stl9, cache /dev/stl10, and data /dev/stl11 (all partition type commonly rfs, will be differ if you have custom kernel or rom)."
since this is a custom rom does /system still auto mount - meaning in ref to to your code above - was it unnecessary but probably good practice or because this is a custom rom there are changes that move the location for /system. I noticed that " the system's location is /dev/stl9, cache /dev/stl10, and data /dev/stl11" was not in the memblock paths??
Start my intro to kernels tomorrow - Oh boy
Off subject - I knew Brazil - tough break with the injury though. Next wins - Argentina and Costa(CoastBaby)!! Going to bed now 6:00 AM WHAT.
Click to expand...
Click to collapse
I don't know what's your objective.
Some points to note:
1. command in updater-script use the function defined in updater-binary. Which are not necessarily a Linux executable command. These commands only valid in the updater-script.
2. You can only mount to an existing directory (mount point) which has not been mounted before. The mount command in Linux is a shell command which is executed by /bin/bash.
3. /system is mount by init following the sequence in .rc files. In recovery, a program is running to provide the interface for I/O. It doesn't require /system partition.
4. No matter which rom (stock or custom), the content of /dev are defined in kernel. Partitions info. is read from the PIT (partition info. table). Kernel will initialize the device at boot accordingly. They are similar to a harddisk partition.
5. our tab has emulated int. sdcard. It is part of the /data, at /data/media.
Hope these might help
earlier question simplified
My problem is with the mount command in a zip file to be used on our Carbon ROM partitions.
My goal is to make 4 different .zip files that can be installed with the recovery software. Each zip places one (the same) simple.txt file into a different folder then the previous zip did.
After I install the 4 zips I should be able to use my file manager app to view the simple.txt in each of the following folders
/sdcard0/data so the ????????? in => mount("ext4", "EMMC", "????????????", "/NAMEOFMOUNT"); would be ==>
/sdcard0/Download so the ????????? in => mount("ext4", "EMMC", "????????????", "/NAMEOFMOUNT"); would be ==>
/Root/data so the ????????? in => mount("ext4", "EMMC", "????????????", "/NAMEOFMOUNT"); would be ==>
/Root/system so the ????????? in => mount("ext4", "EMMC", "????????????", "/NAMEOFMOUNT"); would be ==>
This should give me what i need to fill in what I am missing on understanding this.
Thanks - I hope that this understandable
Off subject - Argentina taken care of biz - Costa is dead to me - Next winners Argentina and Germany
Just about there
6GB with intel I5 -1TB- is now setup as a dual boot with Windows 8.1 and Ubuntu 14.4. All the packages are installed etc.
My linux flavor is ARCH or Manjaro (arch based) - Not a big fan of unity, but since I did not want any pitfalls for support reasons I will use Ubuntu for now.
I now have a descent grasp on GIT and repo, as well as installing cyanogen on one supported device. It would appear that to install on our device any of the custom roms I would just need to provide a local manifest with the proper projects.
I am a little fuzzy on a few things but I think if you could please post two (i815's) local manifest's for two of our newer kitkat roms say Omni & Slim I should be able to figure out my answers or at least narrow down my misunderstandings to exact questions.
Thanks
All Hail GERMANY - - that final game was a real snooze fest.
daniel_hk said:
I don't know what's your objective.
Some points to note:
1. command in updater-script use the function defined in updater-binary. Which are not necessarily a Linux executable command. These commands only valid in the updater-script.
2. You can only mount to an existing directory (mount point) which has not been mounted before. The mount command in Linux is a shell command which is executed by /bin/bash.
3. /system is mount by init following the sequence in .rc files. In recovery, a program is running to provide the interface for I/O. It doesn't require /system partition.
4. No matter which rom (stock or custom), the content of /dev are defined in kernel. Partitions info. is read from the PIT (partition info. table). Kernel will initialize the device at boot accordingly. They are similar to a harddisk partition.
5. our tab has emulated int. sdcard. It is part of the /data, at /data/media.
Hope these might help
Click to expand...
Click to collapse
I'm going to see my mom for 2 days. I'll see if anything missing when return.

Having an issue building cyanogenmod 13.0

Hey guys,
I'm having an issue when building cyanogenmod 13.0. It gets to about 20 min into the build, then fails with this error:
Code:
ERROR: /home/edwin/phonelab/cm-shamu/frameworks/opt/hardware/src/org/cyanogenmod/hardware/PictureAdjustment.java:22: The import cyanogenmod.hardware.HSIC cannot be resolved
ERROR: /home/edwin/phonelab/cm-shamu/frameworks/opt/hardware/src/org/cyanogenmod/hardware/PictureAdjustment.java:46: HSIC cannot be resolved to a type
ERROR: /home/edwin/phonelab/cm-shamu/frameworks/opt/hardware/src/org/cyanogenmod/hardware/PictureAdjustment.java:57: HSIC cannot be resolved to a type
make: *** [/home/edwin/phonelab/cm-shamu/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.hardware_intermediates/with-local/classes.dex] Error 41
if anyone can point me in the right direction to get this straightened out I'd be appreciative.
saintsantos said:
/PictureAdjustment.java:22: The import cyanogenmod.hardware.HSIC cannot be resolved
ERROR: /home/edwin/phonelab/cm-shamu/frameworks/opt/hardware/src/org/cyanogenmod/hardware/PictureAdjustment.java:46: HSIC cannot be resolved to a type.
Click to expand...
Click to collapse
I am building CM-13.0 for LG G4 H811 and found the same problem. It's due to
Change 153678 - cmhw: Add PictureAdjustment stubs
which was just merged this morning. This is the sort of glaring bug that will be found and corrected quickly. Sometimes I wonder whether some folks actually build their code before merging it.
Edit to add:
14:00 EDT - I checked the change comments and the senior devs are aware of the problem and are working on it.
It was reverted about 20 minutes ago. You can either repo sync again, or cd to frameworks_opt_hardware and git revert a8ef044be1eb70c0f8a17f0c40d4c5c08bf71593
http://review.cyanogenmod.org/#/c/153678/
saintsantos said:
Hey guys,
I'm having an issue when building cyanogenmod 13.0. It gets to about 20 min into the build, then fails with this error:
Code:
ERROR: /home/edwin/phonelab/cm-shamu/frameworks/opt/hardware/src/org/cyanogenmod/hardware/PictureAdjustment.java:22: The import cyanogenmod.hardware.HSIC cannot be resolved
ERROR: /home/edwin/phonelab/cm-shamu/frameworks/opt/hardware/src/org/cyanogenmod/hardware/PictureAdjustment.java:46: HSIC cannot be resolved to a type
ERROR: /home/edwin/phonelab/cm-shamu/frameworks/opt/hardware/src/org/cyanogenmod/hardware/PictureAdjustment.java:57: HSIC cannot be resolved to a type
make: *** [/home/edwin/phonelab/cm-shamu/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.hardware_intermediates/with-local/classes.dex] Error 41
if anyone can point me in the right direction to get this straightened out I'd be appreciative.
Click to expand...
Click to collapse
Same issue here when building for jem (the Amazon Kindle Fire HD 8.9"). I'm going to run repo sync and rebuild as suggested in post #3.
Neo said:
It was reverted about 20 minutes ago. You can either repo sync again, or cd to frameworks_opt_hardware and git revert a8ef044be1eb70c0f8a17f0c40d4c5c08bf71593
http://review.cyanogenmod.org/#/c/153678/
Click to expand...
Click to collapse
Thanks. I reverted the commit in my repo anyway, but I'm just glad it was caught and handled.

Categories

Resources