Related
I'm having a problem compiling a kernel for a
Sprint CDMA 7" GT.
I use unpack-initramfs to grab the rootfs from
the original EF17 kernel.
I put that dir location in CONFIG_INITRAMFS_SOURCE=""
in the p1_defconfig file in Kernel/arch/arm/configs
In the kernel directory I issue the commands:
make clean
make p1_defconfig
make
The kernel compiles fine, but there's a 3Mb
difference between the original EF17 kernel
and the one I compile.
If I extract the rootfs from my kernel it's
the exact same as the one extracted from the
original. Have I missed a step? I've done this in the past for my Epic 4G.
i have similar issues that i've been battling with..the kernel coming out smaller isn't 100% indicative of a bad compile...i bet your kernel will boot but 3g (and possibly sound and more) don't work
i emailed samsung open source explaining what i did to compile and this was their response.
my query:
I downloaded the source code for the SPH-P100. I followed the directions in the README_kernel.txt to compile. As well as setting up the unmodified initramfs from the stock kernel. I can boot the kernel on the device however the resulting zImage size is 4.2MB compared to the 5.7MB zImage pulled from the device. I've not made any extra changes to the config or anything else other than what is needed to compile. Despite the size difference using the unmodified p1_defconfig (except setting the initramfs path), the problem that I have is the 3G radio will not start. I get a circle with the slash in the status bar and any dialer codes that pertain to the radio just force close. dmesg and logcats do not turn up any useful information or errors. Flashing the stock kernel back to the device alleviates the issue. So my questions are as follows: Is the source code complete? If so what could I be missing that would cause the radio to not start? Thank you in advance for any input on the issue.
Click to expand...
Click to collapse
and their response:
[SAMSUNG OSRC COMMENTS DELIVERY NOTIFICATION]
Dear customer,
Thank you for your continuous interest on our product.
We received your request on OSRC.
We reviewed your inquiry but unfortunately we couldnt publish the source code for some modules, because it is loadable kernel module and contains samsung proprietary code.
We published open source codes that are covered licenses which have obligation of publishing source code. (ex. GPL, LGPL, MPL...etc)
But we do not guarantee that open source code is excutable in target device. We are sorry for not giving you an correct anwser upto your satisfaction.
We are sorry for not giving you an correct anwser upto your satisfaction.
Thank you!
Sincerely yours
Click to expand...
Click to collapse
so for now until we can figure out what is missing we are out of luck as they are no help
when i have time i'll gladly work with you, oldmacnut, and any one else that can contribute into making a working base kernel from source
Thanks. This truly sucks and will impact my future choice of product purchases.
hy all
this is an project starter for android 3.4 kernel development for all msm7x30 mogami devices
sources are hosted on
https://github.com/freexperia/android_kernel_semc_msm7x30
br
J
Project Status
- we got initial branch after diffing lost of branches
M7630AABBQMLZA203029A
https://www.codeaurora.org/gitweb/q...it;h=4b2b84c6a0b6d29864e982a7aecc223acfd2eaa1
forked to our git and with mogami patches aplied
https://github.com/freexperia/android_kernel_semc_msm7x30/tree/M7630AABBQMLZA203029A
latest CAF tag for 7630 not usefull for now
https://www.codeaurora.org/xwiki/bin/QAEP/release
"November 16, 2012 M7630AABBQMLZA40701070 - msm7630 - M7630AABBQMLZA40701070.xml - 04.01.02" android 4.1
ETA
depending on problems and developers that will join
from 6 months to NEVER
This is a bold task. Perhaps you could look at the developments of irii-soft (and some others), they have replaced some crap Sony-specific code with generic wrappers. Main obstacle if I remember is memory maps now, there was an issue with partition maps but ATAG can be easily over-ridden via kernel command-line.
Getting it to boot should be trivial, sound and video will be difficult, and RIL may be never working due to lack of sources. Regardless, all the best. When I have more time I plan to help irii with his work on a "generic" 2.x kernel newer than what we have (because 3.x seems outrageous at this point).
Is there a wiki, a forum or something like that lists all the non-standard things that have already been found ? (some base of work to do)
Boudin said:
Is there a wiki, a forum or something like that lists all the non-standard things that have already been found ? (some base of work to do)
Click to expand...
Click to collapse
Easy to do yourself - download official SEMC kernel source and diff it with the same version of the linux baseline kernel. So to port to newer kernel you can isolate or "extract" the specific code that has been added and changed, and merge or "inject" that into a newer kernel. Easier said than done though, there are massive changes even in linux kernel revisions (0.0.x.0) - let alone alone new majors and minors (x.x.0.0).
There wouldn't be a wiki or anything of this research, because documenting it all would take an unrealistic amount of labor. Considering there are only a small handful of developers capable of it, there's no point. Besides, that's what GitHub and commit logs are for.
To FXP team,
I don't know if you know or not or even got this far in the development stage but I just wanted to point out a couple of things which may or may not help you...
So with the 3.4 kernel brings newer WiFi drivers which will give a better connection signal on wpa2 security but you might find that devices won't be able to connect to open security networks and WiFi hotspot will probably be broken. I'm posting this as on my gnex using custom kernel (FrancoFransico) he incorporated the 3.4 WiFi drivers a few times and broken hotspot and not being able to use open security WiFi networks were repeatedly reported problems.
I think it may be something hardware specific which allows these features to work on the 3.4 WiFi drivers specific to the nexus 4? You may have more luck trying the 3.0.xx WiFi drivers and getting those to work fully.
Best of luck to you guys!
Sent from my Galaxy Nexus
I'm pretty sure wifi is way down on the priority list, not to be rude but really - who cares about that now. Priority list would be like this:
(1) Get it to boot
(2) Fix primary/critical hardware-specific code for msm7k and qcom platform (display, audio)
(3) Fix RIL
(4) Fix secondary hardware (sensors, bluetooth, wifi)
One step at a time. Getting wifi will probably be trivial because bcm sources are part of the mainline kernel.
With that said, I'm unsubscribing from this thread now. There is massive work to be done and I can see this thread is just going to be filled with posts that have nothing to do with actual development.
All non-dev related posts, and especially "Thank You" posts, will be deleted without further notice. If I have to delete 5 pages of useless posts again, this thread will be locked.
Thank you!
We have tried for a long time already (as you may already know).
https://github.com/adridu59/semc-msm-3.4/commits/master
https://github.com/adridu59/semc-msm-2.6.35
https://github.com/adridu59/android-msm-2.6.35
https://github.com/ExPeacer/CAF_android-msm-3.0/commits/master
https://github.com/ExPeacer/CAF_android-msm-2.6.32
Have fun with it anyways.
adridu59 said:
We have tried for a long time already (as you may already know).
https://github.com/adridu59/semc-msm-3.4/commits/master
https://github.com/adridu59/semc-msm-2.6.35
https://github.com/adridu59/android-msm-2.6.35
https://github.com/ExPeacer/CAF_android-msm-3.0/commits/master
https://github.com/ExPeacer/CAF_android-msm-2.6.32
Have fun with it anyways.
Click to expand...
Click to collapse
Whats the progress so far on this? Bootable already?
CosmicDan said:
Easy to do yourself - download official SEMC kernel source and diff it with the same version of the linux baseline kernel. So to port to newer kernel you can isolate or "extract" the specific code that has been added and changed, and merge or "inject" that into a newer kernel. Easier said than done though, there are massive changes even in linux kernel revisions (0.0.x.0) - let alone alone new majors and minors (x.x.0.0).
There wouldn't be a wiki or anything of this research, because documenting it all would take an unrealistic amount of labor. Considering there are only a small handful of developers capable of it, there's no point. Besides, that's what GitHub and commit logs are for.
Click to expand...
Click to collapse
I was asked by some user of this forum to give some kernel porting guidelines in this thread, so let me introduce myself first. I'm the developer of 3.0.x kernel for Samsung Galaxy Spica (also several other projects for Spica and Galaxy Apollo/Galaxy 3) and currently also Linux kernel developer at Samsung Poland R&D Center. Porting the kernel for Spica was a difficult task, because of poor quality of original kernel code, which required rewriting from scratch most of it, but it was very educational.
It's not easy to give advice, but I'd say that taking all the differences from clean kernel and applying all of that on top of newer version is what should be avoided. Of course those differences should be collected to see what was changed by the manufacturer, but this should be only used for further analysis, not as a ready code.
Another thing, rather than using the mainline Linux kernel to compare your phone sources with, it should be better to use Android kernel from Google's kernel/common tree (see https://www.codeaurora.org/gitweb/quic/la/?p=kernel/common.git;a=summary for older version archive) bumped to the same minor version using minor patches (found on kernel.org) or, possibly even better way, by pulling appropriate version tag from kernel.org git on top of proper branch of Android kernel tree. This will elminate Google's changes (that would be already available in your new base - android-3.4 branch of kernel/common) from the diff.
For getting the diff, I would personally also use Git. If you create a branch in your working tree which contains Android kernel in the version corresponding to your device kernel (using the way I described in previous paragraph), then copying your device kernel sources onto your working tree (remember to make distclean both trees to remove any compiled/generated files) will allow you to see the differences using git status and git diff. (See http://gitimmersion.com/ if you want to learn more about Git.)
Now it's important to split the changes into logically separate parts, for example core changes in arch/arm/mach-whatever_suitable_for_your_device, adding of particular drivers in drivers/, sound/ and include/, modifications to core kernel code in any other directories. It's essential to check whether all the changes are really required or not and why, because minimalizing the set of changes required to be replayed on top of your new base kernel sources will simplify your work.
After collecting all the changes, it's the time to apply them on top of your new kernel sources. All the changes should be applied one by one, checking how much the component that is being touched has changed since your old kernel and adjusting the changes properly. After applying each change, it should be verified that the kernel at least compiles, although it would be even better if you could get the kernel without any (or almost any) modification to boot to some state, e.g. showing something on the console (any chance to get access to serial console on your device?), and then check if it still boots after applying each next change.
Some links that might be useful:
- Linux cross reference, for comfortable reading of kernel code - http://lxr.linux.no/+trees
- Linux Device Drivers, a book about kernel programming - http://lwn.net/Kernel/LDD3/
- Git Immersion, a great Git tutorial - http://gitimmersion.com/
- Android kernel/common repository with full archive - https://www.codeaurora.org/gitweb/quic/la/?p=kernel/common.git;a=summary
- Linux stable repository, with all version tags - http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
Hopefully what I wrote will be helpful in your project. Good luck and best regards.
Hey tom3q,
thanks a lot for leaving some useful statements here!
tom3q said:
Another thing, rather than using the mainline Linux kernel to compare your phone sources with, it should be better to use Android kernel from Google's kernel/common tree (see https://www.codeaurora.org/gitweb/quic/la/?p=kernel/common.git;a=summary for older version archive) bumped to the same minor version using minor patches (found on kernel.org) or, possibly even better way, by pulling appropriate version tag from kernel.org git on top of proper branch of Android kernel tree.
Click to expand...
Click to collapse
I digged for some base kernel for a while.
Found a chromium msm kernel 2.6.32.9 at codeaurora (i know this is not Android).
Anyway, the diff against stock was ~30MB... quite too much.
Like i assumed many basic things are missing as well, so too much to start from.
I guess, i'll step through the other projects... might try 2.6.32-rc8 from the msm tree... just for fun of course :angel:
tom3q said:
After applying each change, it should be verified that the kernel at least compiles, although it would be even better if you could get the kernel without any (or almost any) modification to boot to some state, e.g. showing something on the console (any chance to get access to serial console on your device?), and then check if it still boots after applying each next change.
Click to expand...
Click to collapse
Nice point... i like these hardware hacks and asked about testpoints for UART3 on the Pro mainboard a few days ago.
It's mentioned and so far i got it, initialized in stock kernel as well. Unfortunately no-one seems to know anything about these testpoints.
Anyway i don't want to spam this thread, so thanks for your attention
Regards,
scholbert
hy
scuse my ignorance
but
HOW do you compile an kernel ?
and maybe someone can explain what is the difference between bring-up and port
scholbert said:
Hey tom3q,
thanks a lot for leaving some useful statements here!
I digged for some base kernel for a while.
Found a chromium msm kernel 2.6.32.9 at codeaurora (i know this is not Android).
Anyway, the diff against stock was ~30MB... quite too much.
Like i assumed many basic things are missing as well, so too much to start from.
I guess, i'll step through the other projects... might try 2.6.32-rc8 from the msm tree... just for fun of course :angel:
Nice point... i like these hardware hacks and asked about testpoints for UART3 on the Pro mainboard a few days ago.
It's mentioned and so far i got it, initialized in stock kernel as well. Unfortunately no-one seems to know anything about these testpoints.
Anyway i don't want to spam this thread, so thanks for your attention
Regards,
scholbert
Click to expand...
Click to collapse
FXP said:
hy
scuse my ignorance
but
HOW do you compile an kernel ?
and maybe someone can explain what is the difference between bring-up and port
Click to expand...
Click to collapse
I would say that porting is moving and correcting sources from 2.6.32 kernel in our case into 3.x. And bring up is writing particular drivers from scratch?
Sent from my Nexus 7
voyteckst said:
I would say that porting is moving and correcting sources from 2.6.32 kernel in our case into 3.x. And bring up is writing particular drivers from scratch?
Sent from my Nexus 7
Click to expand...
Click to collapse
ok
nice explanation
look on first page
diff is 5mb on proper tag
pushed on github
nice to see so many developers trying to help
FXP said:
diff is 5mb on proper tag
pushed on github
Click to expand...
Click to collapse
Sorry to throw my 3 cents again, but seeing the repository on github, I'd recommend you to use some time to go through Git Immersion. Even if it takes some time, it will simplify your further work, as Git used properly can really make many things easier.
Otherwise, the diff itself looks mostly fine as a starting point, although some of the differences can be probably eliminated.
tom3q said:
Sorry to throw my 3 cents again, but seeing the repository on github, I'd recommend you to use some time to go through Git Immersion. Even if it takes some time, it will simplify your further work, as Git used properly can really make many things easier.
Otherwise, the diff itself looks mostly fine as a starting point, although some of the differences can be probably eliminated.
Click to expand...
Click to collapse
sony added too many changes to be usefull
since there are several api changes on 32->3.x diff is no good
we have to start from clean board-7x30 and populate devices porting drivers 1 by 1
we have to try an device bringup based on sony changes
/wiki/Motorola_Moto_G5s(motorola-montana)
The kernel used is from motorola's repository, since working usb networking is a must have, I'm not so sure if I can rely on lineageos kernel(I'm not sure if it is a matter of a kernel or of the vendor/device tree I decided to play it safe) , so I decided to start from scratch.
Right now on the roadmap:
1. Clean up the messy commits and start from a new branch.
2. Get merged into postmarketos official repository. (I can do so right now, but I rather go back and re-do the commits, remove the unnecessary changes).
3. Fix DPI settings, default ones are optimized for Desktop.
4. Find out the right pixelformat to use with osk-sdl those will translate into charging/battery-sdl and Filesystem Encryption.
5. Get wifi, gps ,accelerometer, bluetooth audio working. (Wifi and accelerometer doesn't work for 100%, )
test gps/get it working, get accelerometer working ,fix DPI.
6. Lastly mainlining kernel, which is required to get the WIP postmarketos modem driver and 3D Acceleration working.
Optional:
1. Porting MultiROM and patching a kernel to support kexec-hardboot patch on our device.
Once I will get my internet back I will work on @up things and provide:
1. Instructions on getting this linux distribution compiled.
2. Fastboot bootable kernel and sdcard image. I would prefer for you to boot a kernel and using sdcard over a flashable zip image for now, disappointment guaranteed.
WIFI networking most likely doesn't work since I haven't created device/firmware-montorola-montana package with wifi firmware.
If you want to contribute hit me up, I have a very slow connection and possibly have it for couple of days, so I might not be able to do any work for some time.
I don't have enough posts to make a DEVDB nor a development thread, so take it as [Q&A] thread that will hopefully get me to the minimal number of posts I require.
I also can't post outside links apparently the repositories I here present are relative to postmarketos wiki, github, gitlab or codeaurora git.
Repositories:
Kernel:
/kubast2/kernel-msm
Wlan kernel module and firmware:
/MotorolaMobilityLLC/vendor-qcom-opensource-wlan-prima
/quic/la/platform/vendor/qcom-opensource/wlan/prima/tree/
For configs I use a twrp image of stock oreo, I will need to use some config files from that backup image in place of the wlan driver provided configs.
Device and proprietary repositories by the montana development team will be useful for reference of existing blobs and configuration files, while other device ports from postmarketos repository will be useful for reference on when they need to be placed within the rootfs of postmarketos:
/montanadevelopment
/postmarketOS/pmaports
Stock kernel is 32-bit, which is why USB tethering works on LOS14.1, which is 32-bit. Take a look at their trees:
github.com/kayesk
USB tethering fixed in ARM64.
JarlPenguin said:
USB tethering fixed in ARM64.
Click to expand...
Click to collapse
Alright thanks, I don't have notifications for xda-developers, I will build on the basis of your kernel and push the change.
I see your kernel is already on a mainlining effort front.
kubast2-farelka said:
Alright thanks, I don't have notifications for xda-developers, I will build on the basis of your kernel and push the change.
I see your kernel is already on a mainlining effort front.
Click to expand...
Click to collapse
Actually it was fixed in init scripts. Are you still working on this project?
Code:
#include <std_disclaimer.h>
/*
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this kernel
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/
Warnings: this kernel has been tested on the TB-X605F (SDA450) only. It will not work for the:
TB-X605F (M10) released with the SDA429 chipset
TB-X605L (M10 LTE). This kernel is currently for the wifi variant only.
TB-X505F/L (M10 HD) or any of the other M10 variants that use the SDA429 chipset.
TB-X605FC (M10 FHD). See the opensource released by Lenovo. Note that the X605FC kernel is 4.9.112.
Introduction
On 4 June 2020, Lenovo released the kernel source for the TB-X605F/L.
Prior to that, this kernel was developed by porting the kernel source for the the P10 (TB-X705F) released by Lenovo in January 2019.
Current version is: 3.18.120 merged with CAFCAF LA.UM.5.5.r1-05300-8x96.0.
The update zip will load some modules. So backup the "System Image", "Vendor Image" and boot partitions with TWRP before loading this kernel.
For kernel developers
Lenovo have released the opensource for the TB-X705F (Smart Tab 10 wifi) dated 31 January 2019 at s000018_20180913_row. This kernel is based on that kernel source (3.18.71). The default config (YM_X605F_defconfig) is almost identical to the kernel config of the M10. Some of the main differences with the P10 source are:
removed the MM8013 chipset config. The P10 uses the MM8013 for battery stats etc. There is no MM8013 on the M10.
upgraded drivers for the primary autofocus camera.
set CONFIG_MODULE_SIG_FORCE to "n" - so kernel will load stock modules from any version. Thanks to @yener90 for the suggestion.
While Lenovo releases the (compiled) stock M10 kernel at 3.18.120, the P10 kernel opensource is 3.18.71. Great job Lenovo!
The source will build signed system modules, if you want them. If you want the wifi driver it's pronto_wlan.ko, compile with CONFIG_PRONTO_WLAN=m.
Features
This kernel compiles and runs. It seems to be stable.
Working:
- wifi
- bluetooth
- power charging (USB and dock)
- camera
- FM radio
- touchscreen (including DT2W)
- audio
- OTG
Known bugs
you tell me
Installation
I assume you have unlocked bootloader, TWRP and Magisk. If not, follow these instructions.
The update zip is packaged using AnyKernel3 by @osm0sis .
if you are still on stock ROM & kernel, backup "System Image", "Vendor Image" and boot partitions in TWRP. You only have to do this once, not everytime you load a new version of this kernel.
download update_X605F_kernel.zip and copy it to your sdcard/OTG
boot to TWRP and use "update" to update the zip file
check that the update was successful, then reboot
confirm the kernel is loaded. It should start with "3.18.120-X605F-YM":
Code:
X605F:/ $ uname -r
3.18.120-X605F-YM-xxx
To return to stock kernel, just restore the stock boot, system and vendor backups you made in TWRP. If that doesn't work, then you'll have to reload system ROM using LMSA.
Changelog
Code:
11/03/2020 - 3.18.120-X605F-YM-g02f9b3e-00023-gcef72f9
- fixed camera - it's now recognised and autofocus works
- cleared out some dead code that's not needed for M10 (hangover from P10 source)
05/03/2020 - 3.18.120-X605F-YM-g02f9b3e-00018-g818259c3
- rebased kernel to 3.18.120
- merge CAF LA.UM.5.5.r1-05300-8x96.0
- added DT2W
- fixed "adb reboot". The rebase fixed it.
- added a defconfig for LineageOS
- included signed modules in zip file (including wlan)
20/01/2020 - 3.18.71-X605F-kernel-g0a9bdb1
- disabled signed module enforcement
- removed system and vendor modules from update zip
17/01/2020 - initial commit
Download
current release: update_X605F_kernel.zip
XDA:DevDB Information
M10 kernel, Kernel for the Lenovo Thinkpad Tablet
Contributors
Yahoo Mike
Source Code: https://github.com/Yahoo-Mike/android_kernel_lenovo_X605F
branch: msm-3.18.120 is source for this release (default branch)
branch: official-3.18.120 is official source released by Lenovo on 4 June 2020.
branch: msm-3.18.71 is the initial port from P10 kernel source
Kernel Special Features:
Version Information
Status: Testing
Created 2020-01-16
Last Updated 2020-06-05
Yahoo Mike said:
Lenovo releases the stock M10 kernel at 3.18.120. However, the P10 kernel source is 3.18.71. This means that system modules and the wifi driver need to be re-compiled, signed and distributed with this kernel. This means that the /system and /vendor partitions need to be touched, not just the boot image.
Click to expand...
Click to collapse
Just disable the modules, the kernel wont build it anymore. It's also not urgently required.
yener90 said:
Just disable the modules, the kernel wont build it anymore. It's also not urgently required.
Click to expand...
Click to collapse
Thanks for the neat suggestion.
I disabled signed module enforcement (CONFIG_MODULE_SIG_FORCE) so we can use stock modules. That means no need to update system or vendor partitions.
I left in *_SIG_ALL in the defconfig, so you can compile and sign modules if you really want to. But I haven't included any modules in the new update zip. If you've used the old version of the update zip, then restore stock boot, system and vendor images before using this new update zip.
I've released a new version. Main changes are:
rebased kernel to 3.18.120
merge CAF LA.UM.5.5.r1-05300-8x96.0
added DT2W
fixed "adb reboot". The rebase fixed it.
added a defconfig for LineageOS
included signed modules in zip file (including wlan)
I've updated the OP.
I've added a new (default) branch called msm-3.18.120 in the github repo: Yahoo-Mike/android_kernel_lenovo_x605f.
The camera auto-focus is still not working. I haven't looked at it. Lenovo have not released the source code. It looks like the P10 uses different cameras. The main camera is a hynix hi556 variant called: hi556_m10. I'll have a look at this soon. One of the ASUS Zenfone Max Pro (M1) variants uses the hi556. That might have a usable driver. There's also a new video driver for the hi556 (CONFIG_VIDEO_HI556) released by intel for the linux kernel.
If anyone wants me to rebase to 3.18.140, just ask.
Latest version fixes camera issues. Camera (Hynix hi556) is now recognised and autofocus works.
I copied the Hynix (eeprom OTP) code from the Lenovo Tab4 kernel source. The code in the P10 kernel source never worked - probably because the P10 was never released with Hynix hi556. The P10 uses OmniVision ov8856 (8MP) and GalaxyCore gc5025 (5MP). Whereas the M10 uses Hynix hi556 (5MP) and Superpix sp2519 (2MP).
This kernel is stable. I can't find anything wrong with it. I've tested it using stock ROM with no issues. So I guess it's safe to load up with the stock ROM (Android Pie)...at your own risk. Just be sure to backup the system & vendor images, plus the boot image in TWRP. You'll need these when an OTA comes along, anyway. The updater-script in the OTA will refuse to apply, because it won't recognise this kernel.
So until someone finds some issues with this kernel, I guess it's time to polish up some LineageOS code...
Two exciting announcements:
prima drivers added to staging
I've added prima drivers to the kernel github repository. It's used by the lineageos_X605F_defconfig to build the wlan.ko module (CONFIG_WLAN_PRONTO).
Lenovo released official kernel source yesterday
The official kernel source for the X605F and X605L has just appeared on Lenovo's support site.
I'll have a closer look over the next few weeks, but here's some preliminary observations:
it is released at msm 3.18.120. This is the stock kernel version. (Lenovo released 3.18.71 for the P10.)
there is only one download for both X605F and X605L. This might be good news.
the autofocus camera drivers for the Hynix appear to be included. I'll take a closer look.
kernel compiles without any changes. I haven't loaded it yet to test it.
edit: I've added the official source to the Yahoo-Mike/android_kernel_lenovo_X605F repo in the official-3.18.120 branch.
The opensource drop for the X605F from last week includes code for the kernel at msm-3.18.120. Surprisingly, it includes a defconfig for the P10. This confirms that the M10 (X605F/L) and P10 (X705F/L) are very similar.
I'm going to test Lenovo's kernel source on my TB-X605F this weekend. Is there anybody with a TB-X705F/L and the skills to build and test this code on their P10 ? PM me and we can coordinate.
The only differences I can see are:
Code:
m10_msmcortex_defconfig | p10_msmcortex_defconfig | Kconfig definition
----------------------- | ----------------------- | ------------------
| CONFIG_BATTERY_BQ27x00=y | drivers/power
CONFIG_CAMERA_TAB5_M10=y | | drivers/media/platform/msm/camera_v2
| CONFIG_CAMERA_TAB5_P10=y | drivers/media/platform/msm/camera_v2
| CONFIG_FOUR_PA=y | sound/soc/codecs & sound/soc/msm
| CONFIG_SENSORS_HALL=y | drivers/input
CONFIG_TP_MP_DIFF=y | | arch/arm64
The TP_MP_DIFF setting is used to load different firmware for the touchscreen drivers: one set for the M10s; another for the P10s.
Deleted
happyponcho42 said:
Great find! I've successfully built the kernel and was also pleasantly surprised I could use the browsable menuconfig (like the setup for my Linux Desktop) after using the P10 defconfig i.e.
Code:
make -j24 ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- O=out p10_msmcortex_defconfig && make -j24 ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- O=out menuconfig
I've disabled requiring signing of loadable kernel modules, as well as generated some modules for USB-to-Serial chipsets I use (pl2303.ko, ftdi, etc.) for projects.
Now to test the Image.gz-dtb: I have not had much luck unpacking boot-TB-X705F_S210120_191029_ROW.img and repacking with my tools. I just end up on a blank screen on the P10.
Do you have a recommended set of tools that have worked with your M10?
Click to expand...
Click to collapse
Glad to hear it compiled for P10.
I use AnyKernel3 to inject the kernel for me. It can also load kernel modules, if you build any.
I use these properties in the AK3 mod script. Modify it to suit your purposes:
Code:
# begin properties
properties() { '
kernel.string=X605F kernel built by Yahoo Mike @ xda-developers
do.devicecheck=1
do.modules=1
do.cleanup=1
do.cleanuponabort=0
device.name1=X605F
supported.versions=9
supported.patchlevels=- 2020-06
'; } # end properties
Then in my script I copy the kernel to AK3 root directory and modules to ./modules/system/lib/modules directory (or vendor equivalent) & zip it all up.
Code:
# zip it all up, ready for installing in TWRP
# this zip will replace kernel, plus any modules you included (if any)
# don't forget to TWRP-backup boot, system and vendor images
# also good idea to copy /system/lib/modules/* and /vendor/lib/modules/pronto/*
cd ~/tools/AK3
zip -r9 update_X605F_kernel.zip * -x .git README.md *placeholder
adb push update_X605F_kernel.zip /external_sd/
Optionally, you can also create a "version" file with something like this (before zipping):
Code:
MY_KERNEL_IMG="$(pwd)/out/arch/arm64/boot/Image.gz-dtb"
MY_KERNEL_VERSION="$(make kernelversion)"
cd ~/tools/AK3
# create a "version" file
MY_ZIP_DATE=$(date +'%Y-%m-%d %H:%M:%S')
MY_BUILD_DATE=$(stat ${MY_KERNEL_IMG} --format=%y | cut -c1-19)
echo "**************************************************" > $MY_ANYKERNEL_DIR/version
echo "unofficial kernel for Lenovo Smart Tab M10 (TB-X605F)" >> $MY_ANYKERNEL_DIR/version
echo " version: $MY_KERNEL_VERSION" >> $MY_ANYKERNEL_DIR/version
echo "compiled: $MY_BUILD_DATE" >> $MY_ANYKERNEL_DIR/version
echo " zipped: $MY_ZIP_DATE" >> $MY_ANYKERNEL_DIR/version
echo "**************************************************" >> $MY_ANYKERNEL_DIR/version
The Lenovo opensource seems to be working on the TB-X605F. The modules are also building and installing ok.
There is something odd about the device tree, so make sure you use Image, not Image-dtb.gz. When I used the dtb kernel, I kept getting the dreaded "Qualcomm HS-USB Diagnostics 900E" mode.
I'll add a "lineage-17.1" branch to the github repo. It includes an M10_lineageos_defconfig for building the kernel and modules, and wlan.ko source from CAF for Android 10:
Code:
June 01, 2020 LA.UM.8.6.2.r1-07600-89xx.0 msm8953_64 LA.UM.8.6.2.r1-07600-89xx.0.xml 10.00.00
Yahoo Mike said:
There is something odd about the device tree, so make sure you use Image, not Image-dtb.gz. When I used the dtb kernel, I kept getting the dreaded "Qualcomm HS-USB Diagnostics 900E" mode.
Click to expand...
Click to collapse
I can get the dtb kernel to work by replacing the arch/arm/boot/dts/qcom/ directory from Lenovo's opensource with the same directory from the "msm-3.18.120" branch of the repo. It boots fine with the stock ROM and LOS.
The "msm-3.18.120" branch is based on the original P10 opensource from January 2019.
So yes, there is definitely something screwy about the dt blobs from the June 2020 codedrop.
Not sure if this would be a valid kernel or not - On the back it says model is TB-X605F. I
In settings it says hardware is TB-X606F and so is the software.
It's the m10 gen 2 tablet. I believe Mediatek chipset.
dustofdeath said:
Not sure if this would be a valid kernel or not - On the back it says model is TB-X605F. I
In settings it says hardware is TB-X606F and so is the software.
It's the m10 gen 2 tablet..
Click to expand...
Click to collapse
If you have the gen 2, then this is the wrong kernel.
Lenovo has published the TBX606F/X kernel.
dustofdeath said:
I believe Mediatek chipset.
Click to expand...
Click to collapse
The CPU-Z app from the playstore will tell you which SOC you have.
I added pstore/ramoops support on branch msm-3.18.120. I have no idea why Lenovo never configured pstore/ramoops in the first place.
The ramoops device will dump console-ramoops, dmesg-ramoops-0, pmsg-ramoops-0 into /sys/fs/pstore/.
I'll add pstore support to TWRP for the TB-X605F in the next update. I'll use this branch (msm-3.18.120) to build the kernel.
I'm hoping pstore will tell me why GSI images fail to boot when installed over stock Pie.
Hello and thanks to all of you to invest so much time and effort. I'm not the best in this android world so forgive me if I ask something stupid Recently I got a Lenove Tab M10 TB-X605L and well I rooted it (with magisk) to use Linux on it. As I said I don't use android so much and I just got this product as present so when I saw this post I thought If I can put a new Kernel why not compile it with NetHunter Kernel and give it a try. After some effort (I'm not sure if it will work) I made the kernel. My problem is:
1st I rooted my Tablet with Magisk (as the same way you mentioned in another post) after the rooting I download twrp from google play. Till here all is good. Now:
TWRP is working when I boot it. But asks for a Password. I tried some swipe data, cache etc. but still I see that PASSWORD field. I can't pass it. (And when I pass it without Password I can't see the kernel neither yours nor mine)
I don't care what happens to my Tablet as I said I'm not a android user. I would even would try a crazy Idea even if its end with a dead tablet but I would really wanna check if the compiled NetHunter kernel works.
saizzou38 said:
...TWRP is working when I boot it. But asks for a Password. I tried some swipe data, cache etc. but still I see that PASSWORD field. I can't pass it...
Click to expand...
Click to collapse
TWRP will ask for a password if you have a password, PIN or pattern set on your tablet, and/or your data partition is encrypted.
If you have a password or PIN set on your tablet, try entering that. If you had a pattern, try this.
You can unencrypt the data partition by reformatting it and then installing Disable_Dm-Verity_ForceEncrypt.zip (created by Zackptg5). Just be aware that this wipes all your data and breaks OTA updates. (Magisk also needs to be uninstalled before OTAs work.)
saizzou38 said:
...And when I pass it without Password I can't see the kernel neither yours nor mine...
Click to expand...
Click to collapse
Remember: android recovery (twrp) uses the kernel in the recovery partition, not the boot partition.
So, where are you injecting your kernel?
If you are injecting your kernel into TWRP's recovery image, which kernel do you see when you issue this command?
Code:
adb shell uname -r
If you are injecting your kernel into the system ROM's boot.img, then you won't see your kernel in TWRP. You'll see the kernel with which twrp was compiled.
BTW...interesting project. Good luck. Let us know if you get it working.
Hi there,
I just compiled your kernel source you've uploaded on the Github (official branch) with m10_msmcortex_defconfig. Then, I flashed it to my device with anykernel 3, also included all modules, but the wifi does not work(It cannot be turned on). Before I flash it, my device was running well at the stock firmware, so I wonder what's wrong with my compilation.
After that, I also tried to compile the lineage branch, with lineageos_tbx605_defconfig. I flashed it to my device running well on AOSP 10(project treble), but the problem was same as the official source.
Could you please tell me that what's wrong with my compilation or how to compile it to work well? Thanks a lot .
Jun ASAKA
2021/02/03 (CST)
浅香ジュン said:
Hi there,
I just compiled your kernel source you've uploaded on the Github (official branch) with m10_msmcortex_defconfig. Then, I flashed it to my device with anykernel 3, also included all modules, but the wifi does not work(It cannot be turned on). Before I flash it, my device was running well at the stock firmware, so I wonder what's wrong with my compilation.
After that, I also tried to compile the lineage branch, with lineageos_tbx605_defconfig. I flashed it to my device running well on AOSP 10(project treble), but the problem was same as the official source.
Could you please tell me that what's wrong with my compilation or how to compile it to work well? Thanks a lot .
Jun ASAKA
2021/02/03 (CST)
Click to expand...
Click to collapse
It sounds like the wlan_pronto.ko module is not loading. That's why wifi is not working.
It might be easier to build the msm-3.18.120 branch with YM_x605f_deconfig. That should work.
It does not force module signature checks (CONFIG_MODULE_SIG_FORCE=n). So the stock wlan module (/vendor/lib/modules/pronto/wlan_pronto.ko) should load ok.
If that fails, check the kernel log (dmesg) for errors loading the wlan module. Let me know what the errors are.
official source
The stock wifi module won't work with the kernel from the official branch because CONFIG_MODULE_SIG_FORCE=y. You'll have to download the wlan source from CAF and build it with the same signature. That's a lot of work.
I also had some DT and dm-verity issues with the official source.
lineage-17.1
The lineage-17.1 branch includes the CAF wlan module (in drivers/staging/prima) for Android 10.0. I'm not sure why it's not working for you. Check the kernel log for wlan load errors.
The included CAF wlan module (and your GSI system) are Android 10. Your vendor is Android 9.0 or 8.1. Maybe there's a compatibility issue ? I'm guessing. I haven't tried that kernel with a GSI ROM.
Yahoo Mike said:
It sounds like the wlan_pronto.ko module is not loading. That's why wifi is not working.
It might be easier to build the msm-3.18.120 branch with YM_x605f_deconfig. That should work.
It does not force module signature checks (CONFIG_MODULE_SIG_FORCE=n). So the stock wlan module (/vendor/lib/modules/pronto/wlan_pronto.ko) should load ok.
If that fails, check the kernel log (dmesg) for errors loading the wlan module. Let me know what the errors are.
official source
The stock wifi module won't work with the kernel from the official branch because CONFIG_MODULE_SIG_FORCE=y. You'll have to download the wlan source from CAF and build it with the same signature. That's a lot of work.
I also had some DT and dm-verity issues with the official source.
lineage-17.1
The lineage-17.1 branch includes the CAF wlan module (in drivers/staging/prima) for Android 10.0. I'm not sure why it's not working for you. Check the kernel log for wlan load errors.
The included CAF wlan module (and your GSI system) are Android 10. Your vendor is Android 9.0 or 8.1. Maybe there's a compatibility issue ? I'm guessing. I haven't tried that kernel with a GSI ROM.
Click to expand...
Click to collapse
It's working! thanks a lot!
If not, anyone can make a bount?
matheus_sc said:
If not, anyone can make a bount?
Click to expand...
Click to collapse
Surely they are already working on it. But it just takes some time. At the moment everything is working optimally despite fastboot. Even root is possible.
pittrich said:
Surely they are already working on it. But it just takes some time. At the moment everything is working optimally despite fastboot. Even root is possible.
Click to expand...
Click to collapse
I know i use xiaomi eu already. Only update is pain to ass
wait for it
Rumour has it some chinese dev is working on it
Any news?
matheus_sc said:
Any news?
Click to expand...
Click to collapse
Still no sign.... Orangefox also quiet...
The guy who made lots of xiaomi TWRP recoveries stopped developing.
... are kernel (or device/vendor) repos released for it?
This would help.
Do we have TWRP and/or released kernel sources from other Qualcom 888 based devices out there?
raupe said:
... are kernel (or device/vendor) repos released for it?
This would help.
Do we have TWRP and/or released kernel sources from other Qualcom 888 based devices out there?
Click to expand...
Click to collapse
This?
Xiaomi Mi 11 kernel source code is out, the device is codenamed "venus" - Gizmochina
Yesterday, Xiaomi announced Mi 11 as the world’s first smartphone powered by Qualcomm Snapdragon 888. The handset already went for pre-order soon after the launch and is set to go on sale for the first time on January 1. Ahead of its sale, the company has even released this device’s kernel...
www.gizmochina.com
I read on Xiaomi.eu somewhere that there are issues with how the partitions are made and TWRP is very difficult to make for this. They said it's gonna take either a very long time before a recovery is made, or maybe not even at all.
Danacy said:
I read on Xiaomi.eu somewhere that there are issues with how the partitions are made and TWRP is very difficult to make for this. They said it's gonna take either a very long time before a recovery is made, or maybe not even at all.
Click to expand...
Click to collapse
Yeah they changed everything over to GKI 1.0 and no one seems to be supporting it, although they found somewhere on a Chinese site a recovery that works (TWRP) if you boot it (don't flash it) and unencrypts the data. It's in the XDA forums now.
[TWRP] [venus] TWRP Recovery for Mi 11
REMOVED! Use this instead : https://forum.xda-developers.com/t/recovery-11-official-teamwin-recovery-project.4374109/
forum.xda-developers.com
mslezak said:
[TWRP] [venus] TWRP Recovery for Mi 11
REMOVED! Use this instead : https://forum.xda-developers.com/t/recovery-11-official-teamwin-recovery-project.4374109/
forum.xda-developers.com
Click to expand...
Click to collapse
*justintime* said:
Still no sign.... Orangefox also quiet...
The guy who made lots of xiaomi TWRP recoveries stopped developing.
Click to expand...
Click to collapse
Yeah Mauronofrio is out, too much work for no return. He was pretty much the last standing open-source TWRP dev out there for tons of devices. The ones from China never get source released... Which would mean that someone would have to pickup the TWRP project and re-engineer it to fit the new GKI 1.0 then 2.0 platforms that run off that ACK. That's a lot of work. I'm talking about keeping the TWRP project open-source. It would very nice if Google stepped in since they are experts on the new format, but no such luck.
mslezak said:
Yeah they changed everything over to GKI 1.0 and no one seems to be supporting it, although they found somewhere on a Chinese site a recovery that works (TWRP) if you boot it (don't flash it) and unencrypts the data. It's in the XDA forums now.
Click to expand...
Click to collapse
Interesting, that would explain also the lack of custom ROMs? But I read that the source code is released, even before the device was launched. Isn't there GKI-support to be found in there?
Danacy said:
Interesting, that would explain also the lack of custom ROMs? But I read that the source code is released, even before the device was launched. Isn't there GKI-support to be found in there?
Click to expand...
Click to collapse
Yes they released source there are just no instructions anywhere on how to build the kernel #1 and the GKI modules #2 and combine into a build.
The new Xiaomi.eu weekly includes TWRP for Venus (Mi11) as well as Star (Mi 11 Lite 5G, Mi 11 Pro, Mi 11 Ultra, MIX FOLD) (it's a bootable TWRP, but persists after installation). Seems last week's has added Alioth (Mi 10S, Redmi K40). So I would expect a TWRP for Haydn to show up soon in the weekly Xiaomi.eu releases. Seems they forgot the haydn doesn't have TWRP yet so you can't actually install it! Tried the updater app no go, it can't boot to recovery because they don't have one yet, even though on Xiaomi.eu they say it's available, can't find it anywhere.
BTW the only TWRPs I can actually find are for Venus and Star.
haydn TWRP is not working: https://androidfilehost.com/?fid=14943124697586336730 remember: fastboot boot twrp-3.5.1-haydn.img ... although I tried everything, this TWRP just doesn't work - you boot right into the system after the fastboot boot step. Tried everything I can think of, always boots to system. Guess it's still a waiting game...
mslezak said:
Yes they released source there are just no instructions anywhere on how to build the kernel #1 and the GKI modules #2 and combine into a build.
Click to expand...
Click to collapse
Just one more question since this has been bothering me; what would be needed from Xiaomi? Instructions on how to build the kernel? Have they ever done this before about something like this? Like, is it a reasonable thing to ask them to release instructions? I know some people working there, I could forward the request.
Well I've run this by many many devs.
The issue with the GKI 1.0 and ACK is that you must download the entire AOSP build environment and make sure it works with the separate ACK (Android Common Kernel) and then properly loads the GKI modules from a separate build step. Together they make 1 kernel. This ACK per Linux Version and across vendors should be AOSP and identical. Therefore, a single build should work across all Linux 5.4 based kernels.
But... most devs are just skipping AOSP and inlining the GKI modules so they can have 1 build step. Not exactly what Google intended, but way less storage, and you can use Clang or GCC or whatever you want.
I think what OEMs are posting is merely the entire combined source code, no 2 step build process. Only a single file for the QGKI config portion. Which won't build your GKI modules as it comes. A build script for this (Q)GKI portion would be extremely beneficial.
If any OEM walks through the build steps 1) how to create only the QGKI modules and 2) how to assemble them into 1 kernel with the ACK, that would be great for devs. It just hasn't happened. So we get hacked kernels for the 888 running Linux 5.4.
The Generic Kernel Image (GKI) project | Android Open Source Project
source.android.com
mslezak said:
Well I've run this by many many devs.
The issue with the GKI 1.0 and ACK is that you must download the entire AOSP build environment and make sure it works with the separate ACK (Android Common Kernel) and then properly loads the GKI modules from a separate build step. Together they make 1 kernel. This ACK per Linux Version and across vendors should be AOSP and identical. Therefore, a single build should work across all Linux 5.4 based kernels.
But... most devs are just skipping AOSP and inlining the GKI modules so they can have 1 build step. Not exactly what Google intended, but way less storage, and you can use Clang or GCC or whatever you want.
I think what OEMs are posting is merely the entire combined source code, no 2 step build process. Only a single file for the QGKI config portion. Which won't build your GKI modules as it comes. A build script for this (Q)GKI portion would be extremely beneficial.
If any OEM walks through the build steps 1) how to create only the QGKI modules and 2) how to assemble them into 1 kernel with the ACK, that would be great for devs. It just hasn't happened. So we get hacked kernels for the 888 running Linux 5.4.
The Generic Kernel Image (GKI) project | Android Open Source Project
source.android.com
Click to expand...
Click to collapse
OK, I see. Thank you for your reply. I am going to see how far I can get this. Tnx again!