[Q] Haipad M701 and fingerprint reader - General Questions and Answers

Hi ,
I have a Haipad M701 with me,
It is having this config:
4G Memory
Telechips 89xx board
Android 2.1-update1
MID-1.1
Kernel 2.6.29
I am trying to make a external USB fingerprint reader work with it.
The fingerprint device driver source was obtained from the vendor.
To enable the device i need to cross compile the fingerprint drivers.
But before i cud do that, i upgraded the firmware to Android 2.3(gingerbread) which is available in haipad.net(*w/o taking a backup*)(that is kernel 2.6.35).
Now, i am not able to cross-compile driver cos i took the kernel source (for 2.6.29) which telechips publicly opened to public.
So, Right now, i need the old Eclair(2.1,2.6.29) firmware, can anyone provide me that?
If not, is there any other way to achieve the cross-compilation?

In the meantime, i downloaded kernel source from android.com and branched to 2.6.35 which is the kernel version on device.
I compile the kernel and then cross compiled the fingerprint driver.
It compiled w/o any issues.
But when do a 'insmod', i get error:
Code:
mod_usbdpfp: version magic '2.6.35.7+ mod_unload modversions ARMv5 ' should be '2.6.35.7-tcc mod_unload ARMv6 '
What could be the issue here?

You have two problems:
First on the tablet, copy the file /proc/config.gz out on your build pc.
Extract and copy file to .config in the 2.3.35.7 source.
Now you are ready to configure the kernel sources that you compile the vendor driver against.
do make menuconfig;
Fix problems:
1: wrong name of kernel.
Insert "-tcc" in general setup --> Local version.
You seem to have a "+" now. I do not know how you got that. If it is not in the kernel config, look in the Makefile in the root folder. The version is in the top. Make sure the 4th version line just says ".7" - no more.
2. Wrong system type.
You are compiling the modules for an Armv5 instead of Armv6. Go to Arm system type and choose Samsun S3C64XX. That is an Armv6.
The selector might look really strange. If that is the case, scroll to the bottom and scroll back up (now names appear one at a time), until you see the ()amsung S3C64XX.
Configure Makefile for crosscompile.
Now do a make dep; make modules.
Now you can compile the vendor driver against this source and get the correct module. Use modinfo modulename.ko; to see that the name and type corresponds to "'2.6.35.7-tcc mod_unload ARMv6".
I have just done this (for an usb net driver), and the resulting driver crashes the tablet So even if you can get a module build and loaded, it might not work because the system architecture (S3C64XX) is not really correct. In that case we really need the telechips 2.6.35.7 sources to build correct module.
But try it out, and good luck!

Thanks for the suggestion, xdamala.
I will try it out today itself and let you know

@xdamala,
I had to do 'make s3c6400_defconfig'
But, Now i get this error.
Code:
mod_usbdpfp: version magic '2.6.35.7-tcc-g67bb0cf-dirty mod_unload
ARMv6 ' should be '2.6.35.7-tcc mod_unload ARMv6 '
I dont know how the 'g67bb0cf-dirty' gets added.
Each time i edit 'include/config/kernel.release' which contained that text, it automatically is updated on running 'make'.
Any idea??

I am not 100% on how the version string is constructed. But I think it is created from the top 4 lines in Makefile and the string you set in configuration.
I should not be necessary to do that s3c6400_defconfig. It is probaly what changes the string. I might have told you the wrong order of things in my other answer. It is important to set up Makefile first.
Do the steps (in order):
Start with clean 2.6.35.7 kernel code
edit Makefile in kernel root folder
Check version number in top
edit cross compile section to:
ARCH ?= arm
CROSS_COMPILE ?= ../../arm-eabi-4.4.3/bin/arm-eabi-
#or whatever fits your compiler. Note that this android tree gcc 4.4.3 is the one running M701 kernel is compiled with, so I prefer to use the same.
extract tablets /proc/config.gz to .config in root of kernel source (to remove unnecessary modules)
make menuconfig;
set -tcc in local version
choose S3C64XX system type
Exit (Save)
make dep ; make clean ; make modules; #Note you do not actually build the kernel, only modules.
In the Makefile from your driver there probably is a section something like this:
KDIR = /lib/modules/$(CURRENT)/build
edit to point to the folder of your kernel source.
make;
transfer fingerprintdriver.ko to tablet
Cross fingers, throw salt over your shoulder, pray, etc. etc.
insmod fingerprintdriver.ko;

@Xdamala
Code:
mod_usbdpfp: version magic '2.6.35.7-tcc+ mod_unload ARMv6 ' should be '2.6.35.7-tcc mod_unload ARMv6 '
Still the plus seems to be issue.
I checked in the main Makefile there is no '+'.
But in include/generated/utsrelease.h, there is
Code:
#define UTS_RELEASE "2.6.35.7-tcc+"

Well I use a kernel from kernel.org, not from the android tree.
Might be the reason for the "+".
I do not think that it makes any difference in this case.
Try with the kernel.org one. If it works it works, if not we might try to look at that "+"
By the way if all fails you can reinstall 2.1 on the tablet and build against the 2.6.29 kernel released by telechips. It should work.
The downside: 2.1 sucks, and usb in general sucks a lot on M701 2.1.
See my posts here:
http://www.androidtablets.net/forum/groups/11-haipad-m701-m701-r-d129-just-ordered-g10-haipad-m701.html.
In that case go to telechips kernel source:
make tcc8900_defconfig
make menuconfig. Exit + save.
make modules.
Then compile your driver against these sources.
Your driver should then work (this time we use the correct system type), but usb is quite bad on 2.1. So if I was you I would try a lot to make 2.3 work first.
Links:
Telechips kernel. Use Internet explorer to download (FF not working):
https://www.telechips.com/technical_support/kor/opensource/opensource_list.asp
Latest 2.1 firmware from Haipad:
http://u.115.com/file/c4rgup4f

xdamala said:
Latest 2.1 firmware from Haipad:
http://u.115.com/file/c4rgup4f
Click to expand...
Click to collapse
Thanks xdamala, thats what i needed, will check it out and let you know of the result tomm.

I will warn you that 2.1 comes with its own problems when it comes to usb.
Attach the device directly. Do not use a hub.

xdamala,
Method 1: Compile kernel source of 2.6.35.7 from kernel.org - Success
insmod driver.ko installed w/o any errors.
But, it seems i would need a power source for the fingerprint reader.
i dont think currently the Haipad support that mode.
Method 2: Flash(downgrade) m701 to 2.1 and try with the public kernel source which telechips have released - Failure
The FWDN program gives CRC check error while loading tcc8900_mtd.img.
Maybe bcos of corrupt download or the Haipad i have is a 4G memory one.
Which u think wud be?
Even if i accomplish providing power to the fingerprint device, i would need the C++ sample provided by the fingerprint vendor to be cross-compiled.
Otherwise, how can i test if the device works?
How to do that??

Hi
I did not see your post because it now came as page 2.
The tablet should provide some level of power to the reader. If you use the white converter cable that came with the tablet, it should tell the tablet to provide power (USB On The Go, see Wikipedia). It works with memory sticks and even hard drives. But I do not know if it is enough for that reader.
With 2.3 firmware you could use a power hub to give power to reader (still use white converter cable between tablet and hub). Do not use hubs on 2.1.
To check if tablet recognizes reader do this:
adb shell:
#dmesg -c
#insmod driver.ko
#dmesg
--Insert reader in usb
#dmesg
The output of dmesg should tell you how the kernel reacts when driver is loaded and reader inserted.
You can cross compile c++ code using same compiler as for the kernel. But you will have to compile program/libs statically, since android does not have the C++ libraries.
You can probably achieve this by putting a static keyword in a Makefile.
Also you need to direct the gcc to point at the cross compiler.
An other approach is to install Debian on the tablet inside an file image. I have done this. It is very nice. It gives you a complete (non graphical) Linux system. Compiler, libs and all. Also lsusb and other useful tools.
It is much easier to make Linux programs work like that.
But this Debian will run inside chroot, and cannot see the android system.
I used this tutorial:
http://www.saurik.com/id/10
However I used a bit different approach for starting up Debian system (using Debian own rc scripts).
If you can make the Debian Image, I will be happy to provide you with my scripts to manage it.
I do not know why you cannot install 2.1. It was the one you got fro my URL?
I just see now that Haipad has released a brand new 2.3 this night.
Do not attempt to load it. Last one did not work unless you had the very new tablet. I will try this new one tonight.
What is this project with the fingerprint reader? Tell me more.

Thanks xdamala,
Ya if it is possible, i would surely like to have a Debian on the pad.
I am just exploring things on it, so that we can have a external device work on the pads.
Let me check this url and will let you know
http://www.saurik.com/id/10
Click to expand...
Click to collapse
Ya, if you can help through the process, i will gladly accept it
Also, i didnt get any cable with my pad.
That was the first of issues. Had to buy it separately.
I had done the dmesg check as you told, but it didnt give any noticeable output.
The 2.1 firmware link that you gave, throwed a CRC error. what to do?

if you get a crc error on firmware it is probably because its the wrong firmware.
There are several different versions of this tablet so it can be a bit tricky.
This firmware is for a M701-R 4GB HY
There is 2 GB and 4GB versions. You have a 4 GB right.
There is HY and non HY versions (type of nand memory).
There a re with and without remote control. That is not so important.
I think any mix of the above is possible.
How to figure out if you have a HY version:
Insert usb to pc and enable usb storage.
If nan memory is shown as 3,08 GB (I think) it is an HY.
If it shows less (2,7 GB Ithink) it is a non-HY.
Determine your version and we can see if we can find a FirmWare for it.
Anyway I think you should keep your 2.3 for now. It just is better for USB.
What is the filename of the rar file with 2.3 rom you installed, and where did you get it from? (this might help me identify your tablet).
About usb cable. I now understand why you have no power on reader. If you read the wikipedia article about USB OTG (wikipedia) you will understand that the tablet is in slave mode and will not provide power and probably not talk to devices.
Also see here: http://www.maxim-ic.com/app-notes/index.mvp/id/1822
Can you get a memory stick to work?
You need something like this:
http://www.amazon.co.uk/Host-Cable-ARCHOS-Internet-Tablet/dp/B004TJC1IM/ref=sr_1_3?ie=UTF8.
It will short the correct pins in the mini usb plug, telling the tablet to be master and provide power.
It is possible to fix a cable yourself but I will not recommend it:
http://www.youtube.com/watch?v=COkLEJGo6vo&feature=youtu.be
I am a bit surprised that loading the driver produces no output in dmesg.
But if the tablet is not in host mode, it is not surprising that no output comes from inserting the reader. The tablet is not responding to it since it is in slave mode (like connection two usb sticks. Nothing happens).
I can not help you through the Debian. I used the tutorial I already linked.
If you do the same and add my scripts you should be able to make it work.
Alternatively you can get my Debian Image, but it is 1 GB file, and I need to clean out personal stuff and passwords.

Hi xdamala,
Ya, it seems to be a non-HY, cause i have around 1.4G space in nand
The file i downloaded was M701_2.3.rar, which i downloaded from haipad.net
I did buy the cable like u showed in amazon.com link, using that only am connecting the reader to pad.
And No, a memory stick also is not getting detected on that cable.
Attached that cable image.

Hi xdamala,
I have started creating the debian image, can you tell how you use the rc scripts?
Also, were you able to find the 2.1 image for M701 non-HY?
PS: I got the clockword mod recovery image from here http://androtab.info/telechips/firmwares
I used the one marked "Haipad M701 GB ROM 4K"
It worked for me.

Hi
Several things:
1: I think you have an 2GB version (non HY), not a 4G version.
2. It seems like the cable you bought is not correct. It has to be a HOST adapter/cable. Since nothing works with it I think what you have is just a male min-usb to female usb. It is not enough.
3. About Debian image. Which version of Debian are you using?

By the way I found out how to get rid of the "+" when using the Android kernel source. Move the folder .git to git. This will break git usage (unless you move it back). But it removes the "+" in version string.
Using Android kernel source might be better than stock kernel source.

Hi again,
1. Its a 2GB?? Oh but when i followed this link (translated it english)
Code:
http://www.inzipad.com/thread-334-1-1.html
My result was 4096, so i thought its a 4G one.
2. Oh. Then i will try to buy then one u have recommended.
3. I have dropped the step of building a Debian, cause i have a android application running and the input from the usb reader has to be sent to that application. So, I have to make it work natively on Android.

xdamala said:
You have two problems:
First on the tablet, copy the file /proc/config.gz out on your build pc.
Extract and copy file to .config in the 2.3.35.7 source.
Now you are ready to configure the kernel sources that you compile the vendor driver against.
do make menuconfig;
Fix problems:
1: wrong name of kernel.
Insert "-tcc" in general setup --> Local version.
You seem to have a "+" now. I do not know how you got that. If it is not in the kernel config, look in the Makefile in the root folder. The version is in the top. Make sure the 4th version line just says ".7" - no more.
2. Wrong system type.
You are compiling the modules for an Armv5 instead of Armv6. Go to Arm system type and choose Samsun S3C64XX. That is an Armv6.
The selector might look really strange. If that is the case, scroll to the bottom and scroll back up (now names appear one at a time), until you see the ()amsung S3C64XX.
Configure Makefile for crosscompile.
Now do a make dep; make modules.
Now you can compile the vendor driver against this source and get the correct module. Use modinfo modulename.ko; to see that the name and type corresponds to "'2.6.35.7-tcc mod_unload ARMv6".
I have just done this (for an usb net driver), and the resulting driver crashes the tablet So even if you can get a module build and loaded, it might not work because the system architecture (S3C64XX) is not really correct. In that case we really need the telechips 2.6.35.7 sources to build correct module.
But try it out, and good luck!
Click to expand...
Click to collapse
Thsi really works thanks for that

Related

[Q&A] Ubuntu on the Transformer (eMMC install)

This thread is for help and support related to ubuntu on the eeepad transformer, all questions not related to development should be asked here, please be friendly and do not flame each other or I will request the thread be closed.
Download links are in the third post.
There is a wiki entry here that has a bit more detailed explanation. Please note though that as it is a wiki information
quoted in there may or may not be entirely accurite.
you will need to download an nvflashable rom, like prime.
Please read the README before attempting this. The readme is below as well as in the kit, YOU WILL LOSE DATA.
Download links are in the second post.
OLiFE for the ASUS transformer
------------------------------------------------------------------
(c) 2011 Steven Barker <[email protected]>
This package should have only been linked to from xda-developers
or rootzwiki if you got the links to this package from anywhere
but those sites please send an email to the above email
address with the subject: "unauthorised posts"
DISCLAIMER
------------------------------------------------------------------
Steven Barker (lilstevie) nor anybody will take any responsibility
for any damage, data loss, fire, death of a loved one, or loss of
data resulting from using this mod for your device. Using this mod
may void your warranty.
NVFLASH
------------------------------------------------------------------
nvflash is the intellectual property of nvidia, and remains the
property of nvidia. Any questions or queries regarding the usage
and licence of nvflash should be directed to nvidia.
abootimg
------------------------------------------------------------------
abootimg is by Gilles Grandou <[email protected]> and is
unmodified. The source is available from online at
http://gitorious.org/ac100/abootimg
usage
------------------------------------------------------------------
Usage has changed since the release of the last kit, please read
these instructions carefully, as the install method is a little
more complex, (but easier once you use it).
If you downloaded OLiFE.tar.gz you will need to inject the android
rom and ubuntu image. You can use any nvflashable rom with this.
I recommend that you use prime as that is the configuration that
I have tested myself, and the ROM that I support for use with this
device. You can download the ubuntu image from
http://lilstevie.geek.nz/ports/ubuntu.img.gz.
If you downloaded OLiFE-Prime-Edition.tar.gz you will not need to
download the ubuntu image or an nvflash rom as they are seeded into
the image.
Install instructions:
1) Download the specific flavour of OLiFE that you want to use, and
extract it with "tar xvf <filename>".
2) If needed inject android rom and ubuntu image.
3) From the directory that OLiFE was extracted in run the main script
with the command ./OLiFE.sh.
4) Read the text that comes up and answer the question it asks.
5) Follow the menu to the option you want (below is a breakdown of
what each menu item is) and follow the instructions prompted. (also below
is instructions on how to get into the modes requested).
Menu items:
1) Backup Menu:
1) Full Backup (stock)
- Full backup (stock) takes a full backup of a stock
android system. This gives you an option to also back
up your user data(this will take a while).
2) Full Backup (ubuntu)
- Full backup (ubuntu) takes a full backup of a system
that dualboots android and ubuntu, this backs up your
system, and the ubuntu image. This gives you an option
to also back up your user data(this will take a while).
3) User data only
- This backs up the user data partition on your device.
(This option takes a while)
4) Android ROM
- This option backs up the android system only. This
option generates all the files (minus bootloader, and BCT)
required to flash a rom via nvflash.
5) Ubuntu Install
- This option backs up the ubuntu install on your device.
2) Flash Device:
1) Dualboot:
- This option will install ubuntu to your device in a
dualbooting configuration with android. During the
installation process it asks you which OS you would like
to boot by default.
2) uboot (linux only):
- This option will install ubuntu with u-boot and the
ChromeOS kernel that supports acceleration. This option
is currently unavailable, but should be available soon.
3) asus boot (linux only):
- This option will install ubuntu with the asus bootloader
with this configuration you will use all the eMMC for ubuntu
and there will be no android system installed on your device.
4) stock:
- This option will partition the device in a stock way and
install the android system that is in ./images. Use this
option if you no longer want ubuntu on your device.
3) Update Device:
1) Android Kernel:
- This option will update the android kernel on your device
with the boot.img from ./images/. This allows you to install
your own kernel on the device for android rather than the one
that comes with your chosen rom.
2) Ubuntu/Linux Kernel:
- This will update the ubuntu kernel on your device to the version
included in this flashkit. This option is for updating just the
kernel with nvflash rather than using the blob method. This method
is also good for if you flash a bad ubuntu kernel to the device.
3) Android ROM:
- This option will update the android rom on the device with the
one from ./images/. This is good for if the ROM you use is updated
or you would like to change ROMs and there is an nvflash image for it.
This option does not destroy your data.
4) Ubuntu Rootfs:
- This will update your ubuntu image on the device. This is destructive
to data stored in the ubuntu image.
5) Advanced (Unsupported):
- Any option in this menu is not supported and should be considered
unstable. There may be bugs in these options and they are not maintained
at this point in time.
1) Flash ChromeOS Kernel (Primary Boot):
- This option will flash the ChromeOS kernel to the primary boot
partition. This option may not currently work in it's current
configuration.
2) Flash ChromeOS Kernel (Secondary Boot):
- This option will flash the ChromeOS kernel to the secondary boot
partition. This option may not currently work in it's current
configuration.
3) Update Uboot Partition:
- This option will update the u-boot boot partition that u-boot
reads the kernel and boot script from. This option does work if
you have installed u-boot by compiling it from source and installed
it yourself.
4) Flash ClockworkRecoveryMod:
- This option allows you to temperarily flash CWR to the device so
you can update the installed rom. It backs up the current kernel in
the recovery kernel position and then flashes CWR. When you have finished
using CWR you then push any key and put the device back in APX mode and
it will restore the kernel that was in that position. (This only works if
android is your primary boot option at this time).
4) Inject Firmware:
1) Bluetooth firmware (default install):
- This option will inject the Bluetooth firmware from the
android ROM located at ./images/ in to the ubuntu of your
currently running system.
2) Bluetooth firmware (CrOS Kernel):
- This option will inject the Bluetooth firmware from the
android ROM located at ./images/ in to the ubuntu of your
currently running system and flashes the proper u-boot kernel
if you no longer need adb support.
5) Onscreen Keyboard:
- This runs OnBoard so that you can run through oem-config properly
you only need to use this option if you do not have a keyboard dock
and on the first boot.
1) Standard Kernel:
- This will invoke oem-config on the standard kernel installed
on the device.
2) ChromeOS Kernel:
- This will invoke oem-config on the u-boot kernel that is
installed on the device and flashes the proper u-boot kernel
if you no longer need adb support.
Device Modes:
APX Mode:
-This mode is used by nvflash to write files to the eMMC device.
To boot in this mode you press Power and Vol-Up.
Recovery Mode:
- This mode is where CWR or Asus recovery normally lives, but is
replaced by the secondary OS in the dualboot configuration.
To boot in this mode you press Power and Vol-Down, then Vol-Up when prompted.
Normal Boot:
-This mode is where android normally lives.
To boot in this mode you press the Power button until the screen turns on.
Changelog
------------------------------------------------------------------
1.2a - Release name: Odyssey
* New name for kit: OLiFE
* New menu system
* Updated README
* Better handling of platform detection
* Bluetooth support in ubuntu.img
* Preliminary support for ChromeOS kernel
* Preliminary support for uboot
* Fixed touchpad
* Fixed network manager
* Updated to ubuntu oneiric
* More options for flashing and updating
* OTB Wireless support (No more injecting)
* Smaller ubuntu.img for faster upload to device
* Auto resizing of rootfs on first boot
* Larger partition size (6GB) for ubuntu
* Refactored to more easily between devices
* Maybe something else I have missed
1.1 - Release name: Daedalus
* Firmware injector for BT and wifi firmwares
1.0 and silent updates - Release name: Prometheus
* Support for x86_64 linux distributions
* Updated README for release on xda-developers
* Fixes to install scripts
* Initial Release
Downloads:
RootFS md5sum(1a9fa8a698e4a96245a3c08511841eb4)
OLiFE md5sum(c30263fd8271a23bb211fd9fdd69fa45)
OLiFE Prime Edition md5sum(767779ccfa200e5e00b2f1e33a3d73a9)
Sources:
http://gitweb.lilstevie.geek.nz
To clone the repos "git clone git://lilstevie.geek.nz/$(name of repo).git"
lilstevie said:
This is running natively and from the eMMC so no µSD card required,
The video is a class2 µSD card and speeds are not an example of speeds from this kit.
Click to expand...
Click to collapse
Thanks for your hard work, but I'm a bit confused by those 2 statements, contradicting each other :/
Also, if I understood properly, there is no CWM after selecting dual boot
Finally, is this a final release, or for testing purpose only ?
If final, a step by step guide would be very welcome
Edit : Just saw there is the tag [DEV] so forget about my last question (guide)
Wow, amazing work here. Haven't been able to do much to my Transformer as of late (due to uni starting up again, and been seeing how the TF goes as a substitute for my usual netbook), but absolutely can't wait to try this out when I got some time.
And yeah, I'm a tad confused here as well. I'm assuming that you mean the video was of Ubuntu running of your microSD drive using Jhinta's scripts but now this allows us to run it off the internal drive... am I right?
And how is the speed difference so far, running off internal vs class 2 microSD?
EDIT: Also, I'm assuming the same things that didn't work on Jhinta's aren't working on this (network-manager gui, touchpad etc)? Or have you changed things up a bit? And the tegra ppa you talk about; that contain the proprietary 3D drivers you were talking about having a lack of in the video?
Nice to see the post in XDA Good work !
bud77 said:
Thanks for your hard work, but I'm a bit confused by those 2 statements, contradicting each other :/
Also, if I understood properly, there is no CWM after selecting dual boot
Click to expand...
Click to collapse
The video was taken before I was stable enough to even think about using internal memory, where as this kit is not using the µSD
and yeah you lose recovery after selecting dual boot, not much we can do about that for the time being.
poltak11 said:
Wow, amazing work here. Haven't been able to do much to my Transformer as of late (due to uni starting up again, and been seeing how the TF goes as a substitute for my usual netbook), but absolutely can't wait to try this out when I got some time.
And yeah, I'm a tad confused here as well. I'm assuming that you mean the video was of Ubuntu running of your microSD drive using Jhinta's scripts but now this allows us to run it off the internal drive... am I right?
And how is the speed difference so far, running off internal vs class 2 microSD?
EDIT: Also, I'm assuming the same things that didn't work on Jhinta's aren't working on this (network-manager gui, touchpad etc)? Or have you changed things up a bit? And the tegra ppa you talk about; that contain the proprietary 3D drivers you were talking about having a lack of in the video?
Click to expand...
Click to collapse
I started back at uni this week myself, and have been using my transformer as a netbook replacement with ubuntu. The video is using my stuff but before I had it running on the internal memory.
speed diference is massive between the class2 and internal. It was so great of a difference that I forget that it is arm now that it is on internal
the PPA will have things such as kernel updates, bluetooth enabler and all that. as for what is working in the release, things are pretty similar to Jhintas release, touchpad does not work correctly network manager gui doesn't work, I have something to enable bluetooth, that works nicely, but it isn't in the fs or up on the ppa yet. 3D drivers are a work in progress, still no EGL and the likes with the L4T releases, so it is really just acceleration for normal use, I have been working on them but as of yet no dice.
So using the PPA, in theory we won't have to flash the device again (at least for the ubuntu part), it will be able to auto-update itself ?
ErGo_404 said:
So using the PPA, in theory we won't have to flash the device again (at least for the ubuntu part), it will be able to auto-update itself ?
Click to expand...
Click to collapse
yes, that is the plan anyway
lilstevie said:
the PPA will have things such as kernel updates, bluetooth enabler and all that. as for what is working in the release, things are pretty similar to Jhintas release, touchpad does not work correctly network manager gui doesn't work, I have something to enable bluetooth, that works nicely, but it isn't in the fs or up on the ppa yet. 3D drivers are a work in progress, still no EGL and the likes with the L4T releases, so it is really just acceleration for normal use, I have been working on them but as of yet no dice.
Click to expand...
Click to collapse
Ah lovely idea with the PPA. When new 3.2 based Prime gets released, I'll try to get a few hours to myself to get this all working together.
Just a few quick questions first:
How do your scripts change the eMMC layout? Does eMMC work the same as a standard HDD/SSD partitioned with a GPT? As in, have you made separate partitions for Android and Ubuntu, or is it somehow shared?
And also related, how much room will it take up on the eMMC (as I've only got a 16GB TF)?
And finally, since you've been using yours at uni running Ubuntu, have you got any idea of the battery life running Ubuntu? I'm assuming it'd be pretty similar to stock, but yeah the battery indicator wasn't working last time I was playing around with Ubuntu from the microSD. Also, does the second keyboard battery work?
poltak11 said:
Ah lovely idea with the PPA. When new 3.2 based Prime gets released, I'll try to get a few hours to myself to get this all working together.
Just a few quick questions first:
How do your scripts change the eMMC layout? Does eMMC work the same as a standard HDD/SSD partitioned with a GPT? As in, have you made separate partitions for Android and Ubuntu, or is it somehow shared?
And also related, how much room will it take up on the eMMC (as I've only got a 16GB TF)?
And finally, since you've been using yours at uni running Ubuntu, have you got any idea of the battery life running Ubuntu? I'm assuming it'd be pretty similar to stock, but yeah the battery indicator wasn't working last time I was playing around with Ubuntu from the microSD. Also, does the second keyboard battery work?
Click to expand...
Click to collapse
The second battery does work, unless you get one of those dodged ones that just randomly stops charging which happened to me, with the dock connected and the battery in it refusing to charge my battery lasted 6 hours.
the layout is different to standard, UDA(User DAta partition) is 4.2GB smaller than what it was, so you have 9.99gb for android and 4.2 for ubuntu, the kernel and recovery kernels are moved up to the end of the flash as well so that they are accessible through /dev
Just finished installing it. Yea, from internal memory it's working much faster. ~20 second boot time!(I didn't have timer with me, so I counted in the head) That's like my laptop with SSD + 10 second bios booting. With a dock it feels like a true netbook. I think I'll even dare to test c/c++ IDE on this thing. Good job!
Used online timer. It's 21 seconds.
Hmm how do I start wifi? eth0 is not even showing in the list of devices.
aligatro2010 said:
Just finished installing it. Yea, from internal memory it's working much faster. ~20 second boot time!(I didn't have timer with me, so I counted in the head) That's like my laptop with SSD + 10 second bios booting. With a dock it feels like a true netbook. I think I'll even dare to test c/c++ IDE on this thing.
Used online timer. It's 21 seconds.
Hmm how do I start wifi? eth0 is not even showing in the list of devices.
Click to expand...
Click to collapse
Sorry forgot to mention in the first post, firmwares are not included in this release due to potential licensing issues, you can push the wifi firmware via adb to /lib/firmware and also the nvram, they are located in /system/vendor/fw_bcm4329.bin and /system/etc/nvram.txt on your android system, the module will autoload on boot once you have the firmware in place, and the interface will be named wlan0
lilstevie said:
Sorry forgot to mention in the first post, firmwares are not included in this release due to potential licensing issues, you can push the wifi firmware via adb to /lib/firmware and also the nvram, they are located in /system/vendor/fw_bcm4329.bin and /system/etc/nvram.txt on your android system, the module will autoload on boot once you have the firmware in place, and the interface will be named wlan0
Click to expand...
Click to collapse
nvram.txt to /etc right? I copied them straight from android partition, but it still doesn't load. Could it be because of the bcm4329_sta.bin or nvram should be placed in /lib/firmware ?
It works now.
So basically we will be able to dual boot Windows 7 and Android?
liorry said:
So basically we will be able to dual boot Windows 7 and Android?
Click to expand...
Click to collapse
No, Windows 7 doesn't have arm version. Windows 8 maybe in future, long future ....
aligatro2010 said:
nvram.txt to /etc right? I copied them straight from android partition, but it still doesn't load. Could it be because of the bcm4329_sta.bin or nvram should be placed in /lib/firmware ?
It works now.
Click to expand...
Click to collapse
the wifi firmware should be called fw_bcm4329.bin and nvram.txt should be in /lib/firmware, I probably should have been a little clearer, but I posted that just before going to bed, and was a little tired
lilstevie said:
the wifi firmware should be called fw_bcm4329.bin and nvram.txt should be in /lib/firmware, I probably should have been a little clearer, but I posted that just before going to bed, and was a little tired
Click to expand...
Click to collapse
"bcm4329_sta.bin" was already there before I even copied 2 modules and it was also loaded as module when I did modprobe. (not 100% sure about the second)That's why I thought it was conflicting with android's modules.
Wow, great work! Can't wait to try it.
Sent from my Transformer TF101 using XDA Premium App
I've probably missed something obvious.. But I get this.
file not found: linux.img
failed executing command 2147483647 NvError 0x4
command failure: create failed
rm: cannot remove `linux.img': No such file or directory
Click to expand...
Click to collapse
After like 5 minutes of NvFlash installing stuff.

[Q] GT-I9000M kernel compiling

I've got this side project going where I've decided to try to modify the stock kernel for my GT-I9000M.
I'm a Gentoo linux user and have cross-compiled kernels for embedded systems with or without initramfs and modules successfully many times. Rather than just grab and flash the latest mod from the net I want to understand exactly how to create my own.
I already have access via a chroot to a working Gentoo install, however that runs in a sandbox inside android userland, which can be irritating to say the least. I'm already able to create binaries for armv7a on the phone itself, which is a time and power-consuming novelty.
I setup a development environment on my main computer and made sure I could create working binaries for the armv7a.
I backed up all the bml partitions on my phone.
Next, I made sure I could access Download Mode and experimented with Heimdall until I was satisfied I was able to recover from any bad kernel flashes.
I altered the first boot logo in param.lfs with dd, but that's a whole other story.
Next, I downloaded Samsung's source for Froyo and followed the instructions to create a zImage.
aries_eur_defconfig selects the FM radio module and the Samsung TV out driver which are broken. No problem, I figured I could check that out later so I disabled those options for now. it compiles! great! But it didn't boot. I turned to the internet for ways to solve the problem.
There was a lot of conflicting information. I ended up trying a lot of different approaches, modules, firmware, version info, kernel command lines, fbcon... well I messed around.
Some time later, I find myself happily booting with my own kernel. The bootloader displayed my custom logo in param.lfs, but fbcon didn't work and I got a stock samsung gt-i9000 logo before android booted up! The phone worked, wifi worked, bluetooth worked, it was awesome (for 2.6.32.9 that is )!
So, great! Except I got overconfident and cocky. I made a slew of changes trying to get fbcon to work and to top off the evening I overwrote my working zImage with a broken kernel (without a backup of my working custom zImage or .config). I still have backups otherwise of course and haven't lost the functionality of my phone in any way, but now I'm just irritated.
Anybody else working on compiling from source on the GT-I9000M?
I pressed ahead and tried to recreate the conditions that got me a working kernel and as of yet I've been unsuccessful Luckily I've got a kmsg from the kernel when it booted. I can see the kernel command line on the custom kernel that booted was simply "console=ttySAC2,115200" although I do recall trying different values for init= ... The default init in the sources is /linuxrc which doesn't exist in initramfs.
There are also settings for the kernel command line and version information in arch/arm/mach-s5pv210/include/mach/param.h
Is there a known good method to compile from Samsung's sources?
I unpacked a known good zImage, played with it's initramfs, repacked it and it boots just fine.
I've tried again with a fresh copy of the gt-i9000 froyo-samsung branch:
- unpack initramfs from a known good 2.6.32.9 kernel
- make clean
- make aries_eur_defconfig
- make menuconfig, add initramfs, remove Samsung TV driver and FM radio module
- make
the resulting vmlinux is: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped (I know, it's zImage not vmlinux but I'm just doing sanity checks)
I have a custom logo in param.lfs which always displays on boot. A second logo is compiled into the kernel, and I do see a change in the logo when my kernel boots (it shows GT-I9000 instead of GT-I9000M after the first logo). This leads me to believe that the kernel is booting... but the phone powers off after booting.
I've tried the recommended changes to default.prop to use adb to obtain the kmsg of the new kernel. This has not worked however, which could mean that the kernel doesn't get as far as initramfs.
the kernel command line from the kmsg I have from the one time that a custom kernel of mine booted is simply: "console=ttySAC2,115200 loglevel=4" . There's no mention of init, which I think should be init=/init although aries_eur_defconfig seems to think that init=/linuxrc is appropriate (linuxrc doesn't exist?) Regardless, it doesn't seem to matter what I specify for init.
Which leaves proprietary Samsung kernel modules. If they can't load, this could explain everything I'm experiencing. It isn't clear what specific version the proprietary modules are expecting.
Maybe this will help somebody else. I've got it working now.
Attached is my working config.

Point me in the right direction

Hello,
Recently I purchased the Tronsmart MK908II and am hoping to make it work with a touch screen located here http://www.cvtouch.com/. Now the company has stated that it will work with Android version 4.2.2 and Kernel version 3.0.36+. They have provided an android driver(a patch file), but they say "your SW engineer need to add it into the kernel".
So my question is, how difficult will it be to patch the kernel, and if not too hard, what are the tools/software I would need to make this happen?
They did originally recommend the Podoor 518 android box, but I only saw one on Amazon and wasn't sure about buying something that seems a bit older. Any guidance or help would be appreciated, thanks!!
Also the most I've done is follow directions to root/unlock some cell phones and install custom roms. I somewhat understand what is going on there, but have little to no idea about the magic behind that.
I've also attached the patch file? and the driver folder
The instructions with the patch file are as follows:
Support CVTouch Multitouch Simple User Manual
Modify your kernel source code refer to drivers\hid files.
1 kernel3.0+\drivers\hid\hid-ids.h
Define CVTouch VID/PID macro in about line 209.
2 Kernel3.0+\drivers\hid\hid-core.c
Add CVTouch VID/PID to struct hid_have_special_driver in about line 1378 to 1538.
3 Kernel3.0+\drivers\hid\hid-multitouch.c
Modify the CVTouch VID/PID at array mt_devices[] in about line 624 to 2054.
4 Confirm if the drive have added the hid-multitouch module in kernel config file.
Run make menuconfig in command terminal to select HID Multitouch panels.
Device Drivers --->
HID Devices --->
Special HID Drivers --->
HID Multitouch panels
Bump! Any help at all? or point me to where I could start learning to do this?

[NON-ANDROID]Native Linux thread for A8/A8+ (Arch Linux ARM, postmarketOS, ect.)

This thread is for native Linux development on Galaxy A8/A8+. This means no Halium here. It's also aimed at people who know how to compile their stuff, ect., so don't complain to me about no fancy zip installer.
I have made some fixes in our DECON framebuffer driver, ect that makes TTY, and Xorg, and anything that uses the framebuffer work! (Based on @prashantp01's Quantum Quack kernel because that's what I had at the time and it's a good kernel).
I have tested this using Arch Linux ARM (ALARM), and it boots just fine!
A postmarketOS tree for the regular A8 is in the way of being merged, and I need someone to try the A8+ version.
Please provide a photo of the phone running PostmarketOS with weston on A8+!
Prebuilt zip for A8+ and A8 with postmarketOS weston (not really useful, but good for screenshot) here:
A8: https://drive.google.com/file/d/1cVamhYGmBrDVrzzcIVyCmhLHJIQ3u3Xq/view?usp=sharing
A8+: https://drive.google.com/file/d/1xe9rFu4TRzxmM9yV4lINOHOHsEQ2TD0O/view?usp=sharing
This may also be useful for other 7885 and 7885 based (7884 variants, 7904) devices as well!
What currently works on Arch (and probably on any other native linux distro):
Booting (Arch Linux sometimes hangs on "Triggering uevents" for a few minutes, sometimes boots instantly)
Screen (inc. brightness and turning on/off (due to a hacky workaround in kernel, the screen may show a corrupted screen for a split second when turning on)
Framebuffer console (TTY)
Xorg (unaccelerated)
Touchscreen
Hardware buttons
Battery indicator (detects some other stuff as batteries/charging ports too ATM)
USB OTG (Mouse, keyboard, ect)
(After adding some configs)USB SSH, and web access from PC using USB
Basically anything using Xorg (LightDM, Xfce, GNOME, KDE Plasma, Firefox, Chromium, GIMP, VLC, ect ect ect)
Anything that can use framebuffer (weston's framebuffer backend)
NOTE: This is a guide assumes you know how to do some stuff. For some help you can also reference this
Rough instructions for Arch Linux (Using prebuilt boot.img):
Partition your SD card (using PC or something) so that your second partition will contain your rootfs (the boot.imgs provided use the 2nd SD card partition as root! Change in defconfig if you are building your kernel.)
Install the generic version of ARMv8 Arch Linux ARM to the second partition of your SD card.
Install additional packages by chrooting from Android, or using USB networking
(For dual-boot) back up boot.img
Install the correct boot.img.
To boot back into Android, restore your boot.img
Prebuilt Arch Linux boot.imgs
Source code
VDavid003 said:
This thread is for native Linux development on Galaxy A8/A8+. This means no Halium here. It's also aimed at people who know how to compile their stuff, ect., so don't complain to me about no fancy zip installer.
I have made some fixes in our DECON framebuffer driver, ect that makes TTY, and Xorg, and anything that uses the framebuffer work! (Based on @prashantp01's Quantum Quack kernel because that's what I had at the time and it's a good kernel).
I have tested this using Arch Linux ARM (ALARM), and it boots just fine! A postmarketOS port will follow soon!
This may also be useful for other 7885 and 7885 based (7884 variants, 7904) devices as well!
What currently works on Arch (and probably on any other native linux distro):
Booting (Arch Linux sometimes hangs on "Triggering uevents" for a few minutes, sometimes boots instantly)
Screen (inc. brightness and turning on/off (due to a hacky workaround in kernel, the screen may show a corrupted screen for a split second when turning on)
Framebuffer console (TTY)
Xorg (unaccelerated)
Touchscreen
Hardware buttons
Battery indicator (detects some other stuff as batteries/charging ports too ATM)
USB OTG (Mouse, keyboard, ect)
(After adding some configs)USB SSH, and web access from PC using USB
Basically anything using Xorg (LightDM, Xfce, GNOME, KDE Plasma, Firefox, Chromium, GIMP, VLC, ect ect ect)
Anything that can use framebuffer (weston's framebuffer backend)
NOTE: This is a guide assumes you know how to do some stuff. For some help you can also reference this
Rough instructions for Arch Linux (Using prebuilt boot.img):
Partition your SD card (using PC or something) so that your second partition will contain your rootfs (the boot.imgs provided use the 2nd SD card partition as root! Change in defconfig if you are building your kernel.)
Install the generic version of ARMv8 Arch Linux ARM to the second partition of your SD card.
Install additional packages by chrooting from Android, or using USB networking
(For dual-boot) back up boot.img
Install the correct boot.img.
To boot back into Android, restore your boot.img
Prebuilt Arch Linux boot.imgs
Source code
Click to expand...
Click to collapse
Thanks david
VDavid003 said:
This thread is for native Linux development on Galaxy A8/A8+. This means no Halium here. It's also aimed at people who know how to compile their stuff, ect., so don't complain to me about no fancy zip installer.
I have made some fixes in our DECON framebuffer driver, ect that makes TTY, and Xorg, and anything that uses the framebuffer work! (Based on @prashantp01's Quantum Quack kernel because that's what I had at the time and it's a good kernel).
I have tested this using Arch Linux ARM (ALARM), and it boots just fine! A postmarketOS port will follow soon!
This may also be useful for other 7885 and 7885 based (7884 variants, 7904) devices as well!
What currently works on Arch (and probably on any other native linux distro):
Booting (Arch Linux sometimes hangs on "Triggering uevents" for a few minutes, sometimes boots instantly)
Screen (inc. brightness and turning on/off (due to a hacky workaround in kernel, the screen may show a corrupted screen for a split second when turning on)
Framebuffer console (TTY)
Xorg (unaccelerated)
Touchscreen
Hardware buttons
Battery indicator (detects some other stuff as batteries/charging ports too ATM)
USB OTG (Mouse, keyboard, ect)
(After adding some configs)USB SSH, and web access from PC using USB
Basically anything using Xorg (LightDM, Xfce, GNOME, KDE Plasma, Firefox, Chromium, GIMP, VLC, ect ect ect)
Anything that can use framebuffer (weston's framebuffer backend)
NOTE: This is a guide assumes you know how to do some stuff. For some help you can also reference this
Rough instructions for Arch Linux (Using prebuilt boot.img):
Partition your SD card (using PC or something) so that your second partition will contain your rootfs (the boot.imgs provided use the 2nd SD card partition as root! Change in defconfig if you are building your kernel.)
Install the generic version of ARMv8 Arch Linux ARM to the second partition of your SD card.
Install additional packages by chrooting from Android, or using USB networking
(For dual-boot) back up boot.img
Install the correct boot.img.
To boot back into Android, restore your boot.img
Prebuilt Arch Linux boot.imgs
Source code
Click to expand...
Click to collapse
So one can boot Armbian on A8+ as we do with Android box? Where is dtb for this?
p5uresh said:
So one can boot Armbian on A8+ as we do with Android box? Where is dtb for this?
Click to expand...
Click to collapse
Yes you could probably boot it. The dtb is inside the boot.img
Try installing it to an sd card, chrooting into it from android, generating an initramfs, then replacing the initramfs in the boot.img with the one you generated. (Maybe it could even work without that, wiht arch's initramfs?)
VDavid003 said:
Yes you could probably boot it. The dtb is inside the boot.img
Try installing it to an sd card, chrooting into it from android, generating an initramfs, then replacing the initramfs in the boot.img with the one you generated. (Maybe it could even work without that, wiht arch's initramfs?)
Click to expand...
Click to collapse
OK
Thanks.
postmarketOS tree on the way! Please someone send photo of A8+ running it! Info in first post!
this is absolutely amazing, thank you for the work
im very happy with gentoo linux on my phone haha
saraphiem said:
this is absolutely amazing, thank you for the work
im very happy with gentoo linux on my phone haha
Click to expand...
Click to collapse
You got gentoo to boot? How did the drivers and compatability work out? I am asking this quite seriously as I do want to port it to my own device in the future.
Please update download links
Fandroid Tech said:
You got gentoo to boot? How did the drivers and compatability work out? I am asking this quite seriously as I do want to port it to my own device in the future.
Click to expand...
Click to collapse
well, it boots, tty works as expected with a phsyical keyboard lmao
the power button interestingly triggers a reboot, openrc & sysvinit goes through the "proper" shutdown process
i wasn't able to get much more than that working, unfortunately :c
saraphiem said:
well, it boots, tty works as expected with a phsyical keyboard lmao
the power button interestingly triggers a reboot, openrc & sysvinit goes through the "proper" shutdown process
i wasn't able to get much more than that working, unfortunately :c
Click to expand...
Click to collapse
I tried running it in a chroot, running gentoo on an 10 year old armhf cpu was hell in itself. The bigger problem was trying to update an old system. The closest anybody has gotten to gentoo mobile is sharkbait os, but that was just a chroot I think.
Fandroid Tech said:
I tried running it in a chroot, running gentoo on an 10 year old armhf cpu was hell in itself. The bigger problem was trying to update an old system. The closest anybody has gotten to gentoo mobile is sharkbait os, but that was just a chroot I think.
Click to expand...
Click to collapse
haha sure does take a while to compile things

Matching a kernel's config for compatible kernel modules

I have:
Downloaded the exact kernel version running on my device from an AOSP mirror (4.9.170) (https://github.com/aosp-mirror/kernel_common.git)
Downloaded the exact compiler used to compile the kernel from my device:
Ran `cat /proc/version`, which returns "Linaro GCC 5.3-2016.05", which I downloaded from https://releases.linaro.org/components/toolchain/binaries/5.3-2016.05/aarch64-linux-gnu/
Took the kernel configuration from `/proc/config.gz`, copied it to the kernel source directory `kernel_common` as `.config`
Ran `make ARCH=arm64 CROSS_COMPILE=xxx oldconfig`
What I'm seeing:
First, the downloaded kernel source for 4.9.170 seems to think that my `config` is incomplete, since it will prompt me to answer ~15 extra configuration questions.
Second, this old Linaro compiled doesn't appear to support `-fstack-protector-strong` despite it being explicitly enabled in the `/proc/config.gz` file. So I end up disabling it with `./scripts/config --disable CONFIG_CC_STACKPROTECTOR_STRONG`
Finally, after successfully compiling, I take `net/ipv4/tcp_westwood.ko`, just as a test module, and try to load it on my Android device, and it fails:
`insmod: failed to load tcp_westwood_5.ko: Exec format error`
And in dmesg output: `tcp_westwood: disagrees about version of symbol module_layout`
My questions:
Can I assume that the `/proc/config.gz` file is not the actual file used to compile the running kernel, considering it doesn't completely configure the 4.9.170 kernel?
Am I on the right path to getting a kernel module that my kernel will load?
Background information:
I'm hoping this isn't very relevant, but just to head off some questions
This is a T95 Android TV device running what appears to be, to this newbie's eyes, a very Frankenstein'd Android 10 install (See https://www.cnx-software.com/2020/0...-comes-with-mali-g31-gpu-supports-android-10/)
I can't find any official - or unofficial - source for this device, which is why I'm going to all the trouble above.
I really appreciate any help, thank you!

Categories

Resources