[Q] Making android kernel compatible with ubuntu? - Gen8, Gen9, Gen10 Q&A, Help & Troubleshooting

Hello.
I noticed that kernels for ubuntu seem a bit old. I was thinking that maybe someone could modify cm10(or 3.0.21) kernel to support ubuntu/teach me how to add ubuntu support to android kernel. I did a bit googling, but results were filled with those loop ubuntus, not native.
I am also thankful if someone can point me to right direction.
(Trevd, i am counting on you )
Sent from my GT-I9100 using xda app-developers app

julle131 said:
Hello.
I noticed that kernels for ubuntu seem a bit old. I was thinking that maybe someone could modify cm10(or 3.0.21) kernel to support ubuntu/teach me how to add ubuntu support to android kernel. I did a bit googling, but results were filled with those loop ubuntus, not native.
I am also thankful if someone can point me to right direction.
(Trevd, i am counting on you )
Sent from my GT-I9100 using xda app-developers app
Click to expand...
Click to collapse
Well as seeing as you ask so nicely, I'm far from an expert however especially in the ways of ubuntu kernels, A1Pha got the original ubuntu image going but ubuntu have done an official arm release now so that changes things ( probably ) I can only point you in the direction of more, hopefully better resources.
The Blaze Tablet seems to have have been the Development Platform for the G9 so you'll probably get some purchase from following that route.
Here's some links for you.
http://omappedia.org/wiki/Source_Trees
http://omappedia.org/wiki/OMAP_Ubuntu_Main
My days on the G9 could well be numbered, I foolishly overwrote the bootlloader in one of my more Laissez-faire moments. meh! That's what I get for having a caliver approach to consumer electronics.

trevd said:
Well as seeing as you ask so nicely, I'm far from an expert however especially in the ways of ubuntu kernels, A1Pha got the original ubuntu image going but ubuntu have done an official arm release now so that changes things ( probably ) I can only point you in the direction of more, hopefully better resources.
The Blaze Tablet seems to have have been the Development Platform for the G9 so you'll probably get some purchase from following that route.
Here's some links for you.
http://omappedia.org/wiki/Source_Trees
http://omappedia.org/wiki/OMAP_Ubuntu_Main
My days on the G9 could well be numbered, I foolishly overwrote the bootlloader in one of my more Laissez-faire moments. meh! That's what I get for having a caliver approach to consumer electronics.
Click to expand...
Click to collapse
Thanks for answering. I'm out of thanks for today, so i press that button when i have more.
Now to business.
After doing some research, and asking few questions on #ubuntu-arm, this seems a bit hard project because there are no sources. There is no source for CM10 kernel(Or i can't read the github) nor Ubuntu kernel, so i can't just apply tweaks of them both to archos 3.0.8+ kernel. A way to unpack the zimage from ubuntu kernel and cm10 kernel would help, but atleast the script i tried couldn't unpack the zimage of ubuntu. Lets see what i figure out next.

julle131 said:
After doing some research, and asking few questions on #ubuntu-arm, this seems a bit hard project because there are no sources. There is no source for CM10 kernel(Or i can't read the github) nor Ubuntu kernel, so i can't just apply tweaks of them both to archos 3.0.8+ kernel. A way to unpack the zimage from ubuntu kernel and cm10 kernel would help, but atleast the script i tried couldn't unpack the zimage of ubuntu. Lets see what i figure out next.
Click to expand...
Click to collapse
Not sure what you mean by the CM10 Kernel, I don't think CM have any different settings from what is required by JellyBean itself. Plus the Kernel we originally used for the Archos CM10 is an ICS kernel with IPV6 Mangling adding, we got away with that because the Init.rc used to boot the Rom is a mashed up ICS Version. After thinking about it let me add the bit of knowledge I think I do know.
The kernels on arm platforms, to paraphrase Linus Tovalds was a complete mess, something which Linaro are working hard to fix, and are unique to the SOC vendor.
You need to get the Archos specific sources which are located on GItorious @ git://gitorious.org/archos/archos-gpl-gen9-kernel-ics.git, clone the 3.0.21 branch, in the directory there's a file called linux.config.g9 ( or something similar ). that's the config file. I just copy that to .config, change the settings I need to (if any) compile. That should setup an archos kernel which should run android
Code:
git clone git://gitorious.org/archos/archos-gpl-gen9-kernel-ics.git -b linux-icc-3.0.21
cp linux.config.g9 .config
make menuconfig
make -j8
Like I say I was thinking about it and the main difference between a standard kernel and android kernels is the binder, the switch class support and the log driver ( this is things I've noticed when building an android x86 Kernel )
When doing menuconfig the Android Driver settings are found in devices/staging/android, I suppose a place to start is to turn them off then switch on SYSV IPC ( i think that's in genral kernel settings ), from what I understand this is the sysv binder and should create a node at /dev/binder, standard kernel switch class support is set in Device Drivers ( Switch Class Support ).
I'm not sure about logging , It basically breaks down like this. The Android Kernel has a specific logging driver this creates device node at /dev/log/main /dev/log/system etc , Ubunutu ( on x86 at least ) has a single log device node which is created at /dev/log, I don't know weather this is something created by the kernel or something created in userspace by syslogd or something similar. I also don't know whether the Android Logs are compatible with ubuntu, or the android binder for that matter. I'll try and boot my x86 ubuntu with my Android Kernel later on , I suspect It won't work but speculation is one thing, knowing for sure is better
With regards to unpacking the zImage, I'll say this , Not all zImages are created equal , I notice you are using a samsung mobile ( galaxy s, if I'm not mistaken ) , so you're probably using the samsung zImage as a frame of reference... How I understand it Samsung pack the initramfs into the zImage, similar, but not same to the way android AOSP pack a boot.img. Samsung however do this in kernel itself, this is why Samsung zImage a) can be unpacked and b) require different tools than the standard tools used for unpacking boot images which work on just about every other device ( expect Archos of course ) . So you generally don't unpack zImage because It's just a binary blob that contains all the kernel functions, this is in the assembly language of whatever architecture you built your kernel for.
Given all that info you should now be able to build a working archos android kernel ( I assume you using linux etc and your not stupid ) , You now need the Ubuntu side of things..... Have you asked in the Archos G9 Ubuntu Development thread, they may be able to shed light on the changes to the config you need to make or alternativaly you could download the Ubuntu for Arm OMAP Image from https://wiki.ubuntu.com/ARM/OMAP , unpack/mount it and see if there is the kernel .config file, It is normally packaged somehow with the distro for example x86 lubuntu has .configs in /lib/modules/3.5.0-19-generic/build/.config, the arm distro may have something similar. Then it's a case of see what configuration options are different, You can't just copy the config whole sale however because there are Archos Specific board settings in the Archos Kernel. Failing that the kernel sources will be somewhere as it is a legal requirement under the GPL and Cannonical are compliant, at least I've not read anywhere to the contrary.
This is just really how I understand it at the minute, Some of it could be inaccurate or just plain BS but hopefully should give you something to run with, there is a bit of a barrier to entry on the whole subject kernels/android kernels as the information is in little pieces all over the internet, when I was first getting to grips with it, it did feel like a bit a of treasure hunt for knowledge. Also knowing the Keywords to search for in the first place can be difficult It sounds quite an interesting challenge, shame about my brick!!
If you want to understand more about the kernel generally ( and lets face it, who doesn't ) then Linux Kernel in a nutshell ( http://www.kroah.com/lkn/ ) is a free e-book written by one of the kernel maintainers a should be a useful reference.
JUST IN CASE: Don't forget prefixing a filename with a fullstop (.) makes that file hidden and won't display in normal file listings, using ls -a to display all file in a directory

The CM10 kernel i was refering to is the CM10 in dev section. I thought there were other "hacks" than just a IPv6 addon, and that's why i counsidered it as a totally diferent kernel.
I think i need to download the kernel source as soons as i get to my laptop then. I have some experience on it, because i have made a few builds of B2G, but that was mainly just: download source, choose the device and build.
For the differences, that is what i consider as the hardest part. Merging them and then getting the kernel to build might take some time. Luckily I have plenty of time.
For the zImage, I was trying to unpack the ubuntu zImage one, because I'm working on archos device . Unpacking Galaxy S2 kernel wouldn't make any sense. atleast to me . I was trying to use a general unpacker, but it didn't work, just as you wrote.
For the OS & Knowledge, i am using linux indeed. Backbox, which is based on ubuntu 11.04 to be precise. I didn't even think about unpacking the IMG file... Maybe i am stupid . I think i am able to mount it to folder, so it is easy to explore.
I think I know the basics, and folders starting with . is part of them
Lets see what happens the next time i pick my laptop, boot it and start fooling around :good:.
Edit: Well, after the menuconfig, i can't fand anything related to ipv6 mangling. There was a file on the root of cloned folder called linux.config, but it was the default config for kernel, not archos specific.

julle131 said:
The CM10 kernel i was refering to is the CM10 in dev section. I thought there were other "hacks" than just a IPv6 addon, and that's why i counsidered it as a totally diferent kernel.
I think i need to download the kernel source as soons as i get to my laptop then. I have some experience on it, because i have made a few builds of B2G, but that was mainly just: download source, choose the device and build.
For the differences, that is what i consider as the hardest part. Merging them and then getting the kernel to build might take some time. Luckily I have plenty of time.
For the zImage, I was trying to unpack the ubuntu zImage one, because I'm working on archos device . Unpacking Galaxy S2 kernel wouldn't make any sense. atleast to me . I was trying to use a general unpacker, but it didn't work, just as you wrote.
For the OS & Knowledge, i am using linux indeed. Backbox, which is based on ubuntu 11.04 to be precise. I didn't even think about unpacking the IMG file... Maybe i am stupid . I think i am able to mount it to folder, so it is easy to explore.
I think I know the basics, and folders starting with . is part of them
Lets see what happens the next time i pick my laptop, boot it and start fooling around :good:.
Click to expand...
Click to collapse
The 3.0.31 Kernel started by Quallenauge in the dev section is an Highly Expirimental effort. this was started before Archos released the 3.0.21 Kernel with their 4.0.2x roms which covered what was trying to be achieved by this development, It's best left alone unless you really want to get you're hands dirty with device bring up code, There's a version on my github which I think boots the G9A101's as well as the 80's......... anyway
You shouldn't have to do any merging of code, more a case of selecting the right options in the config, Thinking back, I've have booted Ubuntu using mainline kernel sources from kernel.org that I built myself so that kinda of suggests there's nothing special about ubuntu's kernels per se' .
Your main problem won't be with building , more booting, It should compile fine but I wouldn't be surprised to be looking at a blank screen then your problem is monitoring the output....There's an option in the archos config to get early debug output over USB, I think there's some modification you need to make to the USB Cable, Quallenauge knows about that, he did it , I was ghetto and used adb for my debugging. which can be probably made to work when booting ubuntu but I'd go the correct route , I just have my wierd ways of doing things.
Another thing that spring to mind with android "specialisms". Android runs /init in the root directory ubuntu normally likes /sbin/init. This is something that is specified again in the kernel config using the kernel cmdline option , just something to be aware of... If anything else springs to mind I'll let you know.
So I suppose as you say, Just fool around and see what happens. :good:
I think I know the basics, and folders starting with . is part of them
Click to expand...
Click to collapse
Just Checking LOL.

trevd said:
The 3.0.31 Kernel started by Quallenauge in the dev section is an Highly Expirimental effort. this was started before Archos released the 3.0.21 Kernel with their 4.0.2x roms which covered what was trying to be achieved by this development, It's best left alone unless you really want to get you're hands dirty with device bring up code, There's a version on my github which I think boots the G9A101's as well as the 80's......... anyway
You shouldn't have to do any merging of code, more a case of selecting the right options in the config, Thinking back, I've have booted Ubuntu using mainline kernel sources from kernel.org that I built myself so that kinda of suggests there's nothing special about ubuntu's kernels per se' .
Your main problem won't be with building , more booting, It should compile fine but I wouldn't be surprised to be looking at a blank screen then your problem is monitoring the output....There's an option in the archos config to get early debug output over USB, I think there's some modification you need to make to the USB Cable, Quallenauge knows about that, he did it , I was ghetto and used adb for my debugging. which can be probably made to work when booting ubuntu but I'd go the correct route , I just have my wierd ways of doing things.
Another thing that spring to mind with android "specialisms". Android runs /init in the root directory ubuntu normally likes /sbin/init. This is something that is specified again in the kernel config using the kernel cmdline option , just something to be aware of... If anything else springs to mind I'll let you know.
So I suppose as you say, Just fool around and see what happens. :good:
Just Checking LOL.
Click to expand...
Click to collapse
At the moment i'm trying to find the archos config file. there is a defcon file, which looks like a config file in arch/arm/configs called android_archos_defcon. It sounds correct. Next thing for me to do is to find the right place to put it. I guess the root of the project is correct, and rename it to .config and linux.config. After building I need to test it. [email protected] or 4.0.26 root will suffice, right? I also need to figure out if there is a way to force adb on through kernel. And the IPv6 Mangling is nowhere to be found

julle131 said:
At the moment i'm trying to find the archos config file. there is a defcon file, which looks like a config file in arch/arm/configs called android_archos_defcon. It sounds correct. Next thing for me to do is to find the right place to put it. I guess the root of the project is correct, and rename it to .config and linux.config. After building I need to test it. [email protected] or 4.0.26 root will suffice, right? I also need to figure out if there is a way to force adb on through kernel. And the IPv6 Mangling is nowhere to be found
Click to expand...
Click to collapse
The config file " linux.config.g9" should be in the root kernel directory, if it's not there then your on the wrong branch and you need to checkout the 3.0.21 branch explicitly using
Code:
git checkout linux-ics-3.0.21
If your using ICS builds to check with, which I probably recommend then don't worry about IPV6 managling , I don't think It's named that exactly but something like that!, For reference , I've just had a check the option is "Networking support/Networking options/Network packet filtering framework (Netfilter)/IPv6: Netfilter Configuration /Packet Managling"
You have to look pretty deep on some of these settings
As a test. Boot with a normal kernel configure your android debug options , then swap the kernels out , that should give you adb while booting, when I've tried to force adb on an uncofigured rom it got a bit confused with itself
If your struggling a bit with git, http://gitimmersion.com/ has a great tutorial you can step through in about 10 minutes to get the basics and get it configured a bit better
---------- Post added at 09:31 PM ---------- Previous post was at 09:20 PM ----------
EDIT: Make sure you building for arm as well
Code:
$ export ARCH=arm
$ export SUBARCH=arm
$ export CROSS_COMPILE=arm-eabi-
Reference: http://source.android.com/source/building-kernels.html

Huuuh i'm late... most had been pointed out already.
Just to add this...
As you might know Android is put on top of a Linux base system more or less.
In most cases a kernel built for Android will suit most linux distributions as well.
Trevd already highlighted the main aspects.
The other way round is more evil... unmodified linux kernel (or a kernel set up to run well with Ubuntu) will refuse to boot up an Android system.
Some addon's on the default config may be nice though, depends on how the whole rootfs stuff is arranged in the end and if your system heavily depends on udev and stuff.
Keep track of the startup scripts at /etc/init.d.
It's good to have an extensive look at the /etc directory of your distribution image... to much to point at here.
The kernel may handle to boot into a lot of different scenarios.
On the Archos tablets initramfs plays an important role.
You may even tweak this jumpboard and locate your final rootfs on an USB stick if you like.
It's all about handling mounts, chroot and similar during start up.
There are limits on the Archos with stock loader though, because you might need to influence the kernel command line at a certain point.
I'm aware that this is not very specific but there are so many ways to set things up.
Just follow the useful links trevd gave already... these are good starting points :fingers-crossed:
...and just to add this:
I don't speak of fine tune the system in the end. This is another story and sometimes very hard stuff, where you may need to reverse engineer some proprietary libs or executables.
Best regards,
scholbert

Well, I have now built my first kernel... And it was 3.0.8+... I think I downloaded wrong source . I have ipv6 mangling enabled on it, so I should try it with CM10 now. I think I should search the 3.0.21 source, and download it.
Edit: Well, my 3.0.8+ Kernel image can boot CM10, AOKP and 4.0.7 roms... Now i have to figure out why i downloaded 3.0.8+ kernel and not 3.0.21 kernel. Maybe i had wrong branch.
Edit:Yep, wrong branch. I did realize when i downloaded the srce that it informed that the branch does not exists. i had icc instead of ics
Do you have any tips where i can find info about kernel modifications, like adding governors? I tried adding few, but all i got was bunch of errors. I propably forgot something.
Sent from my GT-I9100 using xda app-developers app

mer
Still working on this? I have been using Mer kernels with Ubuntu and they seem to be working fine.
Archos Gen9 Mer Adaptation Kernel --> http://gitorious.org/archos-gen9-mer-adaptation-kernel/
Archos Gen9 Mer Adaptation Kernel ICS --> https://gitorious.org/archos-gen9-mer-adaptation-kernel/archos-gen9-mer-adaptation-kernel-ics
I am using the 3.08 kernel from a Plasma Active distribution. --> http://share.basyskom.com/plasma-active/archos_gen9.html
Just mount the data partion in linux and convert it to ext4, write the linux image to it. Then cp the files from mer /boot /lib/modules to new rom, modules file in etc to load your modules, modify fstab, cp mtev.so to /usr/lib/xorg/modules/input, change or add a few other files.
/etc
modules
Code:
cypress_tma340
tr16c0_i2c
hso
compat
cfg80211
mac80211
wl12xx
wl12xx_sdio
cpt_i2c_tsp
pixcir_i2c_tsp
hci_uart
fstab
Code:
/swap none swap sw 0 0
/dev/mmcblk0p2 /media/system ext4 ro,noauto,users,uid=1000,gid=0,noatime 0 0
/dev/mmcblk0p4 /media/data ext4 ro,noauto,users,uid=1000,gid=0,noatime 0 0
none /proc proc rw,relatime,noexec,nosuid,nodev 0 0
none /sys sysfs rw,relatime,noexec,nosuid,nodev 0 0
none /dev devtmpfs rw,mode=0755 0 0
none /dev/pts devpts rw,relatime,gid=5,mode=0620,ptmxmode=0666 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
binfmt_misc /proc/sys/fs/binfmt_misc rw,noexec,nosuid,nodev 0 0
none /sys/fs/fuse/connections fusectl rw 0 0
none /sys/kernel/debug debugfs rw 0 0
none /dev/shm tmpfs nodev,nosuid,noexec 0 0
none /dev/bus/usb usbdevfs defaults 0 0
none /sys/kernel/security securityfs (rw) 0 0
/etc/udev/rules.d
70-persistent-net.rules
Code:
# net device ()
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:28:90:64:31", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
# USB device 0x9710:0x7830 (usb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:3b:04:02:6c", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
70-touchscreen.rules
Code:
KERNEL=="event*", SUBSYSTEM=="input", SUBSYSTEMS=="input", ATTRS{name}=="cypress-tma340", SYMLINK="input/touchscreen"
/usr/share/X11/xorg.conf.d
Add to the end of 10-evdev.conf, cypress-tma340 is the touchscreen on my G9.
Code:
Section "InputClass"
Identifier "Archos Touchscreen"
MatchProduct "cypress-tma340"
Option "Ignore" "off"
Option "CorePointer" "on"
Driver "mtev""
EndSection
openSUSE --> http://en.opensuse.org/openSUSE:eek:penSUSE_on_your_ARM_board
Ubuntu --> https://wiki.ubuntu.com/ARM/OMAP
Kubuntu 12.10 --> http://cdimage.ubuntu.com/kubuntu/releases/12.10/release/kubuntu-12.10-desktop-armhf+omap4.img

Please i am using Backbox Linux Distribution (Dual booted ) wit my windows 7....... now i wish to use a dail up connection on my modem !! PLEASE HOW DO I GO ABOUT IT ...
Sent from my L3 using XDA Free mobile app

Related

[DEV TUT] Building Kernels and Android Sources

Dear Community,
Please read the following before starting on reading on.After lots of requests I decided its time to provide every oncoming developer with a short guide on how to start developing for our beloved Mimmi (most stuff applies also for Robyn or other Android devices).
I'd also like to get a few words passed on what actually in most cases developing is, so let's start with the basics:
There is different ways of developing there is people like Cyanogen Mod which provide you with a bunch of changes to the original Android source code which enables new features, adds hardware support or make things easier for specific device developers. However these people at Cyanogen are often not fully recognized so please make sure to thank these people as well. Besides that there are ports of similiar devices which will not be explained in this tutorial but also these developers usually put a lot of effort into their roms however since the source is already compiled changes are usually of a cosmetic nature. In this tutorial however you will find the basics on how to compile kernel or android from source in order to build your own changes into your own rom, which btw would have never been possible without the developers porting xrecovery or cwm to our devices so please give these people a big thumbs up as well after reading on.
What do I need/Environment set up
Most people have issues on setting up a the heart of your Developer Carreer, the Environment. What I strongly advise is to have at least a bit knowledge of the main usuage of Linux Distributions and also programming languages. Without these you will most likely fail at one stage or another to make a successful build.
So lets evaluate what you need :
Linux Distro (i.e. any Ubuntu should do well)
a VM or native Linux
quite a bit of Linux skills and programing skills
Time and a high tolerance of frustration
Sufficent RAM (at least 4 GB, more is advised otherwise use native Linux)
If you know how to install a native Linux Distribution you can probably skip this part, I will explain how to use a VM to fill the basic needs and keep your development area seperated from you most likely otherwise needed productive platform.
The following Steps are just keywords, if you want to develop you will need to inform yourself how to achieve all this yourself, there's lots of tutorials out there.
Step 1: Download a VM and a Linux Distro
Step 2: Install VM Software (i.e. VirtualBox or VMWare Server)
Step 3: Install the Linux Distro in VM (you'll need at least 6 GB Swap and 50 GB or More HD space to have enough room for experiments/seperate syncs/etc...)
Step 4: Figure out if you installed 32 Bit or 64 Bit (you'll need this later)
Step 5: Boot your new VM based Linux Distro
Step 6: Set up a Share Mount between your host and your VM
Step 7: download the Android Source/Cyanogen Source of your desire (i.e. : repo http://**** -b gingerbread) into a folder for you desire (the folder should represent your ROM's/Kernel name)
Building a Kernel
Building a Kernel is one of the easier parts considering the full source code is available for download. Sony Erricson Open Source Dev Website is providing fully funtional Kernel sources usually in the tar.gz format. Download the source code and extract it, or if you use a git based repository clone or checkout the project into a folder of your desire.
The next step, is not mandatory but advised to sync the entire Android repo/CyanogenRepo as the repo also provides the Cross Compiler toolchain which is needed to compile for your device.
Once everything is finished downloading you should check the following path in the Android repo : platform/linux-x86(orx64)/prebuilt/toolchain/arm-eabi-4.4.3/bin/ this is the cross compiler we will use to build the kernel itself, its vital to have the compiler present, the version number maybe different though.
Lets start with the building process itself:
Code:
cd kernelfolder
cp arch/arm/configs/semc_mimmi_defconfig .config (the command maybe change to copy another default config file, it creates a file in the root of the kernel folder called ".config"
ARCH=arm make menuconfig (this will bring up the kernel configuration menu for arm devices)
In the Menu Config you can change/add features to the Kernel once you are done safe the kernel config. Now your Kernel is ready to be compiled:
Code:
ARCH=arm CROSS_COMPILE=/pathtoandroid_source/platform/linux-x86(x64)/prebuilt/toolchain/arm-eabi-4.4.3/bin/arm-eabi- make -j4
This will start a compile with 4 Jobs using the Architecture ARM and the Cross Compiler arm-eabi from the Android Source Repo. Once finished you'll find your Image in your kernel folder under arch/arm/boot/Image. Now you'll need to build your own ramdisk this is covered here at xda as well azuzu has also build a tool available to download.
Follow the instructions to create the kernel.sin which now can be flashed with Flashtool. Changes to Kernel source will now be available to your compiled Kernel. How to change the Kernel source is beyond this tutorial but programmers in C will have fun there.
Building Android from Source
Now lets get started with the more advanced part and the most frustrating part in the beginning. The easiest way to build for the mimmi would be to sync the Cyanogen Gingerbread source code. Which can be checked out using the repo binary (see tutorials on googles website also which packages for which architecture (x86 or x64) are addionally needed also the correct java version is important)
Now lets cut to the chase.
Code:
repo sync -u http://github.com/CyanogenMod/... -b gingerbread (or froyo or another branch you would like to check out)
once your repo is synced (you could also add "-j8" to enhance the speed of the repo command, it will take quite a while) you are almost ready to start. If you synced an AOSP source you will have the get your device and hardware libraries ready first. This means you will have to port i.e. the device project and hardware project (mimmi and msm7227-common folders from CM and also hardware folder from CM) to the AOSP source. It makes sense to port these to your AOSP source since they are the most complete so far. For Camera libraries you can sync from doixanhs repo the libcamera-5mp.
Now lets get a short overview over the Android source, it contains of various folders:
frameworks
device
vendor
hardware
platform
external
These are the most interesting, frameworks folder holds a bunch of android libraries and files which provide the functionality however often you will need to change a few things here and there since the mimmi is unique in its hardware. Everything you change will need to be approved with the following command:
Code:
make update-api
This will add all the functions, variables or anything else to the current-api.xml and ensure its available at build time.
The device folder holds device specific files, build-configs and so on. Lets look at some of the important files:
Code:
device/semc/mimmi/overlay/frameworks/base/res/res/values/config.xml/power.xml
The two xmls hold configurations of the build process which are device specific either LightSensorWarmupTime and so on the full list is in the root folder of frameworks/base/res/res/values/config.xml <-- any part you feel you need to change copy the lines from there and change in you device specific config.xml.
Now to another file:
Code:
device/semc/msm7227-common/BoardConfig.mk
This files olds the device sepecific configurations for the ARM, WLAN, etc.
Look at all the files in mimmi and msm7227-common and figure out what they do, google of course will guide you on that.
Also take a look in the:
Code:
vendor/cyanogen/products/
folder and find the mimmi config and get familiar with this as well. Nobody will be able to help unless you face specific issues. Developing is learning by doing and a lot of self teaching and the will to understand all of this yourself. We can't teach but you can learn. Specific questions however are usually proudly answered by most devs if they have already figured it out.
Lets start building now, first you'll need to get your lunch command to know which devices have makefiles (I always do it to be sure)
Code:
source build/envsetup.sh
This will now add all the known devices to your lunchcombo (the devices are usually definied in the vendorsetup.sh pointing to the makefiles)
Code:
lunch
Will get you the list of available devices and will wait for user input to select the device you want to build, choose the mimmi.
Code:
make -j4
This will start the building process with 4 jobs.
Now its time to get a coffee. Usually you will have a bunch of different issues on this part but the CM source is pretty good and you might be lucky there.
Now lets look at typicial errors:
Code:
symbol not found : means a variable in used in the code has not been defined, before its use this one is a tricky one
try to locate the source file and find the line the compiler is complaining about. Now check in the framework usually in
res/res/values or layout look for the type of the erros (String or array) and look in the corresponding xml if the variable
is present. Now look in vendor/cyanogen/overlay if your variable is also declared there and so on.
Code:
function not found/function of incompatible types : also a tricky one, you might sync a repo and made local changes to
a file and suddenly your functions another file calls are not present or have changed, find the differences between them and
think about how it has changed, maybe add the function again or maybe another function does the job now. you will need
to locate the changes compare them and you should be fine again
Code:
No Rule to make target: this one is usually due to a missing/incomplete Makefile you might need to add manually or
if you don't need it anyway the easiest would be to delete the not building folder
Once your source has finished compiling you will find you system image in:
Code:
out/products/mimmi/system/
As of now unfortunately its still missing a few files here and there. Compare ROMs and Compare what might needs to be added. However I advise not switch libraries around its best to use your own libraries. However sometimes you will face issues when doing this so start with the files created there and just add the recovery and ramdisk to your rom. Now observe via adb if everything is running. This will take time and add one missing lib after another one and reboot, after each (like grallocs or librils or fm libs and so). This is basically a debugging part of the job.
You will now add one by one more functionality, but keep in mind to use logcat to see what goes wrong, maybe some stuff can be changed in the source rather then randomly adding stuff.
also this one just in case.
Hey there c: As always, you come surprising everyone with your stuff haha Good job on this one, I think it is always good to have some tutorials from the people who build specifically for our Mimmi's
Before reading this, I wanted to get started on developing and I went to Android's official developers site, I did some steps, now I have the complete source of Android here (I use Ubuntu 10.04, the LTS version... Dunno if telling you that it is LTS ver. really matters, but just in case) andthe whole environment ready to build. Now, reading at this, I realize I don't have 4Gb of RAM on this "old" (2007..) notebook. Anyways, the thing is: I followed the steps listed here, but when I wrote this command-
Code:
$ make -j4
-the terminal started to execute files, or something... I'll add a screenshot at the end about this. It has been 3 days since that, and the terminal is still doing the same. I know developing requires a lot of patience, but... 3 days? Is this normal?? I have looked through the Internet for problems with this command, but no one seems to have talked about it.
Thanks for your time, work and effort for the community, we really appreciate it c: Bye!
Link to the Screenshot:
http://i259.photobucket.com/albums/hh313/link_4ever/Screenshot.png
The 'make -j4' uses 4 threads to compile everything, if your notebook does not have at least an hyperthreading-technology enabled CPU, well, that's to expect when building an entire OS, plus you don't have sufficient RAM, I do have 2GB and a DualCore CPU and it takes at least 1 hour to compile an average desktop kernel with that same command. I have not tried to compile android, but I think that it will take at least 4 hours to compile everything. Just my thought.
RozenTensai said:
The 'make -j4' uses 4 threads to compile everything, if your notebook does not have at least an hyperthreading-technology enabled CPU, well, that's to expect when building an entire OS, plus you don't have sufficient RAM, I do have 2GB and a DualCore CPU and it takes at least 1 hour to compile an average desktop kernel with that same command. I have not tried to compile android, but I think that it will take at least 4 hours to compile everything. Just my thought.
Click to expand...
Click to collapse
Thank you for your answer! Just ten minutes ago, the 'make' command finished ! And about my notebook, it is just like yours: 2Gb RAM and Dual-Core CPU, I'm not sure but I think it runs at 2,8 GHz. And also, like I said earlier, I know developing takes time. I know how slow processes can be, in fact, there were commands previously that took 1 hour or more to finish their tasks. 1 hour, 4 hours, it's ok but... 3 days? Isn't it a bit too much xd?? Now I'm afraid to turn off the computer because I don't want to compile that thing again hahaha
the "-j" option depends on the number of (virtual) cores you have.
get the number:
Code:
grep processor /proc/cpuinfo | wc -l
if you have native linux and like to work on the machine I recommend do lower the number at least -1 otherwise get a coffee and keep hands off the build process
b
make -j4, lol. Many people do not have. 4 cores on the processor
paul-xxx said:
make -j4, lol. Many people do not have. 4 cores on the processor
Click to expand...
Click to collapse
This parameter refers to threads instead of hardware cores
Sp4rrow said:
This parameter refers to threads instead of hardware cores
Click to expand...
Click to collapse
ok. probably a mistake. but still. I always use 2. it brought to me the best results
I use j6
And also j refers to jobs everybody may change to what they want. For kernel i build with j12.
If you know better like it seems you always do write it down.
Sent from my U20i using xda premium
I can't find any 2.1.1.A.0.6 Sources. Link to the sources you use slade?
http://developer.sonyericsson.com/cws/devworld/search-downloads/opensource?cc=gb&lc=en
should be:
x10_x10mini_X10minipro_x8_eclair_2.1.A.0.435.tar.gz
Stock Kernel with only CWM5 installed...
Slade i want some help from you. how can i embed CWM5 in the stock kernel without any other changes to it??
i want a stock kernel with nothing changed in it only CWM5 installed in it. how this can be done???
i forgot to say the most important thing!: Thank you very much for your work and effort Slade
I just came to the configuration menu of the kernel. i see there are options predefined for the mimmi, but how can i optimize it more, there are soooo many options, and to tell the truth i don't have a clue what they do

[Q] Ntfs-3g, rw, fstab and mount options and daemons

This is extremeley far away from howto implementing ntfs read write support in rooted archos gen9 devices.
Everybodey is welcomed to bring on ideas and modifications.
my linux know how is not too much.
Somebody interested to help implement ntfs-3g rw for rooted archos gen9?
First - is it possible?
a) It could be possible with ntfs-3g from tuxera, on their website they say its for android, too.
b) When kernel side ntfs (the read only one) is set - can one use ntfs-3g with fuse instead or does it conflict?
Dont know if ntfs in kernel is set as yes or module. Can somebody confirm something?
Second - Which files are to be transported in which directory and which are to be modificated?
What mechanism (auto)mounts blockdevices (also sticks, flash cards, etc ...)
Is it archos specific or something related to android?
Does somebody know which daemon does this job especially on g9 and what config files it has?
Is it /etc/fstab (only) ?
Downloaded the source code from ntfs-3g and have to look.
attached ntfs-3g latest stable release as source from Tuxeras Website.
had a look in running kernel modules with
adb shell lsmod
Fuse is loaded as kernel module and active.
Therefore, i assume, one could push an arm version of ntfs-3g and ntfsprogs in the directorys in a dirty way and edit some fstab entrys or other config files?
Apropos arm version. Is there somebody who was able to (cross)compile ntfs-3g for arm and attach neccessary files?
NTFS read fine on my kingston 16 GB flash.
Write on flash dont work. How fix dont know, but i'll try to search info =)
Yes, ntfs CAN be read, but we need Write-Support.
On linux no problem, and Android IS Linux. On Arm instead of x86 or a64
Everey x86-linux has Write Support.
Thanks.
gegabit said:
NTFS read fine on my kingston 16 GB flash.
Write on flash dont work. How fix dont know, but i'll try to search info =)
Click to expand...
Click to collapse
However, thank you for your report
Found It
Hi svennimann
I was going to take up this challenge and have a go at compiling it, however this post In the galaxy S2 forum has it covered.
You don't need the worry about the fuse.ko as the archos kernel already has it and It wouldn't have the right magic anyway.
I'll probably have a poke around with integrating it more into the kernel, get it to use ntfs-3g by default.
I'll post an update, if I find anything interesting out.
Wow!
Hadnt found it but who searches on galaxy thread for archos things?
And That should be on general android thread.
We are lucky now.
Okay.
Now it is possible that there are issues with mount points, scripts, and so on, and perhaps one had to change ntfs-3g permissions to 755.
for the case that something doesnt work, i think this could be do the trick if neccesary.
http://forum.xda-developers.com/showpost.php?p=15490573&postcount=49
Apropos what do you mean with right magic of the fuse module?
Yes maybe. I only did a quick root shell test to make sure it mounted and wrote. I'll play around more with it later when I get in.
With regards to magic:
.ko files are compiled against a specific version of the kernel. They contain a vermagicapp string which is checked against the installed kernel when insmod is run. If they don't match the Kernel module won't install.
That's how I understand it.
Sent from my HTC Sensation XE with Beats Audio using xda premium

[Q] Help with analyzing Samsung Gravity Smart T589 (no /proc/mtd)

There's been a few ROMs based on the stock kernel--one of them is mine--but nothing more in-depth. I'm setting out to change that, but I could use some help from more experienced folks.
What I've found so far:
- It uses the MSM7227_Surf Qualcomm System-on-chip (verified by disassembling a broken phone)
- which also has the Adreno200 GPU (built into MSM7227_Surf)
- It has 512MB flash partitioned very similarly to the Samsung Gio, with most partitions being at least the same if not sightly larger (with the exception of /system and /data being split differently such that /system is bigger than on the Gio and /data is smaller)
- Unlike the Ace/Gio, it uses a Broadcomm wifi chipset instead of the atheros at6000
What I'm stuck on at the moment is the partition map. How do I get the precise partition sizes when /proc/mtd doesn't exist?
I was able to figure it out. Since the partitions are nearly identical to the Samsung Galaxy Ace, I took a look at that phone's BoardConfig.mk and figured out the formula:
1) Get the partition list from 'cat /proc/partitions'
2) Multiply the reported # of blocks by 1024 to get the size in bytes
3) Convert the result from #2 to hexadecimal
Results:
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x00A00000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00A00000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x0DD00000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x09800000
BOARD_FLASH_BLOCK_SIZE := 4096
EDIT: I just found where this phone puts the equivalent of /proc/mtd. It's in /proc/LinuStoreIII/bmlinfo:
Code:
FSR VERSION: FSR_1.2.1p1_b139_RTM
minor position size units id
1: 0x00000000-0x00180000 0x00180000 6 1
2: 0x00180000-0x00200000 0x00080000 2 2
3: 0x00200000-0x002c0000 0x000c0000 3 3
4: 0x002c0000-0x01bc0000 0x01900000 100 4
5: 0x01bc0000-0x024c0000 0x00900000 36 23
6: 0x024c0000-0x029c0000 0x00500000 20 25
7: 0x029c0000-0x02bc0000 0x00200000 8 5
8: 0x02bc0000-0x035c0000 0x00a00000 40 6
9: 0x035c0000-0x03fc0000 0x00a00000 40 7
10: 0x03fc0000-0x04080000 0x000c0000 3 8
11: 0x04080000-0x05980000 0x01900000 100 9
12: 0x05980000-0x13e00000 0x0e480000 914 21
13: 0x13e00000-0x1dc00000 0x09e00000 632 22
14: 0x1dc00000-0x1f500000 0x01900000 100 24
I just signed up a few minutes ago with this account to say thanks for doing this, from another guy who has just gotten this phone! (Well the Canadian version, same thing basically called the "Samsung Galaxy Q"/SGH-T589R) Not sure if I can do much, the closest thing I do compared to this is using Linux. I'll be rooting for you.
My initial goal was to get a Gingerbread kernel that a) supports the Galaxy Ace (the Gravity SMART's more popular cousin) and b) actually compiles, but I didn't have much luck. The kernel I wanted to use was built against some long-deprecated kernel source that I couldn't dig up--and applying the diff against the Samsung stock source tree failed to compile.
So, I've gotten a copy of the source to the ICS kernel developed by Maclaw & others [still too newb to post links] for the Samsung Gio and Samsung Ace.
Next step: finding the stuff unique to the Gravity SMART.
Fun fact: The Gravity SMART was originally code named the Gravity Touch 2, and this is reflected in the source code where the model's config flag is named CONFIG_MACH_GT2 (as opposed to CONFIG_MACH_COOPER for the Ace).
My initial suspicions are proving to be pretty spot-on. Quite a few of the changes involve simply adding "|| defined(CONFIG_MACH_GT2)" into an existing chain that typically includes the CONFIG_MACH_COOPER or CONFIG_MACH_GIO. However, there are a number of notable exceptions. Thanks to the power of a recursive grep, I've got a list of files and I'm slowly but surely getting the changes ported over.
I have a ways to go before I get a compiling kernel, but there's still one big hurdle to jump after I get all the changes brought in: Wifi.
The stock kernel uses a kernel module, dhd.ko, which appears to be a Broadcom driver. However, I suspect it may be customized/proprietary because the kernel config flag (CONFIG_BROADCOM_WIFI) isn't used anywhere in the source tree. Both the ICS and FroYo kernel sources have code for -other- broadcom drivers, but there may be compatibility issues. I also found a Broadcom driver on googlesource which I suspect was Samsung's starting point for the aforementioned kernel module, but it doesn't come with any instructions for compiling it so I'm not quite sure what to do with it. I'll probably start by just trying to use the kernel's built-in driver and poach the firmware file from the googlesource package, and see what happens.
OK, so a status update--
Using the list of files containing the CONFIG_MACH_GT2 tag as a guide, I went through and modified/ported the code as best seemed to make sense from the Samsung code into the ICS kernel.
Then began the fun of trying to compile the kernel.
The configuration routine wanted to eat my own CONFIG_MACH_GT2 flag, so I had to do a little more hacking to figure out how to modify the kernel configuration files to recognize it as a valid configuration option. For the benefit of others, I'll post the results of my research:
1) Edit arch/arm/tools/mach-types to add the machine type
2) Edit arch/arm/mach-msm/Kconfig to add the configuration option
3) run 'make distclean' to make sure that all the generated stuff gets regenerated properly.
Now it's recognizing the CONFIG_MACH_GT2 option, but one of the modules is failing to build. But, I'm too tired to tackle it right now so it will wait until another day.
It compiles!
... which of course doesn't mean it actually works.. I haven't had a chance to test it yet. Fortunately I have the ODIN files to restore ifwhen something goes horribly wrong.
gblues said:
It compiles!
... which of course doesn't mean it actually works.. I haven't had a chance to test it yet. Fortunately I have the ODIN files to restore ifwhen something goes horribly wrong.
Click to expand...
Click to collapse
Hoorah! Here's hoping it works!
Well, no dice. Stuck at "SAMSUNG" which, admittedly, is better than previous attempts at flashing a custom boot/recovery image (just got a blank screen on those attempts..)
In the process, though, I learned a few important things:
1) To flash any custom firmware, you need Odin 4.40 USA. Newer versions do not work.
2) How you make the .tar.md5 file matters! The files have to be added to the archive in the right order. I determined the order by extracting the stock firmware I acquired from samfirmware.com (using 'tar xvf') and then made sure that I added them in the same order when I created my version. If the files aren't in the correct order, Odin will crash when attempting to flash the phone.
Thank you!
I have been waiting for so long for someone to start something with this phone. I will help in any way I can, if you would like. I am a bit of a newb, but I have done a few things with a Dell streak 7 and an Optimus One, as well as interop unlocking my LG Quantum (a windows phone, but w/e )
I'm another step closer!
After the spectacular failure of my first attempts, I decided to try a smaller step--unpacking the stock boot image, making a useless change (putting "Hello, World!" at the top of /init.rc), packing it back up, and flashing it. When this also failed, I thought perhaps I was working against a locked bootloader.
After finding absolutely no information about the presence of a locked bootloader, and with similar phones not needing any special unlocking, I went a little more basic: what if I unpacked and repacked the boot.img without any changes? I did this, and I was surprised to find that the repacked file didn't match the original at all.
I did a little more research and playing around with mkbootimg, and successfully disassembled and re-assembled the original boot.img file (verified by comparing md5 checksums). I used the same settings to retry my "Hello World" test--and lo and behold, it WORKS!
Nicely done, I knew you could do it!
Awesome job! I can't wait to see how this works out!
Well, unfortunately, it hasn't. While I've been able to modify the contents of the ramdisk cpio, my kernels aren't booting. Or if they are, they're failing before anything useful happens.
Anyway, the trick to creating the boot.img and recovery.img:
The images are in the standard Android format, as documented here. In fact, the unpack-bootimg.pl from that page works brilliantly. However, to re-pack the image, it's best to use mkbootimg directly.
Let's say you've got your gzipped kernel named 'kernel.gz' and the gzipped cpio archive of your ramdisk named 'ramdisk.cpio.gz', and let's say you want your resulting image file to be named 'yourboot.img'. Then you'd use the following command:
Code:
mkbootimg --kernel kernel.gz --ramdisk ramdisk.cpio.gz --base 0x13600000 --pagesize 4096 -o yourboot.img
From further research, it appears that in order to boot a newer kernel than what shipped with it, the boot loaders need to be modified to accommodate it. The reason is that the access to the internal memory partitions is handled by a proprietary Samsung kernel module, which only exists for the kernel the phone shipped with. Even if I had the source for the Samsung module, the boot loader needs to support the newer version of the Samsung module.
So, what I'm going to try next is hacking the kernel to force it to report the same version as the phone expects, and see how spectacularly it fails well it works.
Well, fudging the kernel version in my 2.6.35.7 build didn't work, although just doing a straight compile of Samsung's kernel sources _did_ give me a booting kernel.
Well, the result of my extensive research is thus: there's no hope of getting Gingerbread on this phone without Samsung creating an official release. Here's why, from what I've gathered:
The bootloader does not appear to be locked; however, it does provide some key services that Samsung's proprietary kernel modules use to provide access to the flash partitions on the phone, kind of like the BIOS in your PC. The bootloader expects a specific kernel version (more specifically--and I apologize if the terminology is wrong--a specific kernel ABI). Simply faking the kernel version is not enough--it has to have exactly the same driver interface and kernel entrypoints as it expects. So even though I tried compiling the 2.6.35 kernel with a fake version number, the ABI is still wrong so the phone doesn't boot.
Hacking the boot loader is waaay outside of my skillset, although I did successfully dump it from my wife's busted phone. Judging from the results of my research, it's not something anyone's actually attempted. And given that screwing up the bootloader will hard-brick the phone, I'm not in a mood to experiment.
So basically, since Samsung is the only one with the code for the bootloader and the RFS drivers, it's up to them to create a GB release. Once they actually do so, then possibilities open up quite a bit.
Well you gave it your best shot so thank you! Maybe someone on here will come up with a way to get a non-Froyo version. Hell or even maybe if we're nice enough we'll get upcoming Jumping Jellybean available for this phone.
Thanks so much even for trying. I wish I could try and do something, but I would have no hope.
My sister's likely getting a Galaxy Q tomorrow, so I'll be following dev work on this device a bit.
Skip the RFS format. It's a pain in the neck to work with, and pretty much every benchmark out there shows it's not as fast as ext4 anyway.
Edit: Got another idea: try using the GB RFS kernel modules from the Gio/Ace/Fit/Mini...
If you want to try converting to ext4, make sure you have RFS format dumps of the /data and /cache partitions you can dd back into place in order to restore to stock.
Consider contacting Phiexz (who's sort of left XDA, but should be reachable at his own forum), Delanoister, Maclaw and the rest of the GalaxyICS team. Hyriand too. What they've done for the Gio is nothing short of outstanding.
Good luck,
Darkshado
gblues said:
my kernels aren't booting. Or if they are, they're failing before anything useful happens.
Click to expand...
Click to collapse
No ddms/logcat output, nothing?

[Q] Compile & load kernel module for DVB-T USB dongle

I'm attempting to compile and load kernel modules to make my Nova-T Stick USB DVB-T dongle work with my TF201 Asus TFP. Any one have a step-by-step guide for doing this?
I first attempted to go down the cross-compile on ubuntu host machine, then I went to chrooted ubuntu on the target, now back to ubuntu host. I have managed to build a number of .ko's, and insmod'ed some of them on the TFP. When doing a lsmod, I get:
dib7000m 12318 0 - Live 0xbf1cc000
dib7000p 23027 0 - Live 0xbf1b9000
dvb_ttusb_budget 12571 0 - Live 0xbf11a000
dibx000_common 4990 2 dib7000m,dib7000p, Live 0xbf113000
dib0070 6585 0 - Live 0xbf0fc000
dvb_pll 7922 0 - Live 0xbf0cc000
dvb_core 77241 2 dib7000p,dvb_ttusb_budget, Live 0xbf0b7000
bcm4329 207334 0 - Live 0xbf082000
Click to expand...
Click to collapse
But when I plug in USB dongle, I don't get any dvb-usb messages in dmesg. Only the standard usb ones.
To compile them, I took the kernel from Asus website, built using prebuilt ARM cross-compiler from AOSP (make menuconfig, and then make modules).
Any ideas anyone?
More info
Also,
cat /proc/devices
Click to expand...
Click to collapse
gives me amoung other things: 212 DVB, which looks good to me. Just no dvb-usb messages in dmesg still.
Anyone have the ko's for all DVB tuners, and the correct order to insmod them? This will be useful for many people surely...
And yet more info
After inserting the USB Tuner into an Ubuntu laptop, I can see using lsmod that some modules used are dvb_usb_dib0700, and dvb_usb.
However when I build the Asus Kernel after changing the .config, I cannot for the life of me get these 2 missing ko's built. Any one know of the options required in make menuconfig to get this working?
solution
OK, I didn't realise that Remote Control stuff needs to be enabled (to get rc-core) in make menuconfig before stuff relating the USB DVB shows up. Now I've got my kernel modules.
Modprobe in chroot ubuntu doesn't seem to work, so I insmod a whole load of them in a certain order and finally the USB stick is recoginised as DVB-T.
Now for some reason I get ActivityManager: Segmentation Fault on my Prime when installing APKs from my host machine. Life is never easy...
More detail?
Hi
Thanks for posting this as I am interested in doing the same thing. Can you outline your process in a bit more detail so I could followsuit. Or maybe share the modules you created?
Thanks
robb001 said:
Hi
Thanks for posting this as I am interested in doing the same thing. Can you outline your process in a bit more detail so I could followsuit. Or maybe share the modules you created?
Thanks
Click to expand...
Click to collapse
I think I managed to build the kernel modules and insmod them in the end. If you plug tuner into a host machine and do an lsmod before and after, you will find the dependency order for all the kernel modules you need. You need to generate all of these .ko files and insmod all of them in exactly the correct order. Search through make menuconfig to find all the required modules components including any related remote control ones, general DVB and USB ones too. It is possible to do it this way using insmod.... however....
I also did it a different way in the end to get some other benefits. Build Cyanogenmod 10 from source, and modify the kernel (as before), and just boot this custom ROM with all the required ko's already in place - seems to be an easier path with more help available on forums etc...
After this you need to make sure that after you plug in the DVB adapter, you change the permissions of the dvb nodes to 777 (or similar) before you can use them from an app.
Good luck! It is all possible!
Thanks for your very prompt reply. I am fairly familiar with linux and command line but not heavily in to compiling modules and kernels.
barkside said:
You need to generate all of these .ko files and insmod all of them in exactly the correct order.
Click to expand...
Click to collapse
To do this don't I need to have the kernel sources, headers and some tools like "make" available and carry all of this out on the actual target hardware with the appropriate kernel version? I.e. not on a host machine?
barkside said:
I also did it a different way in the end to get some other benefits. Build Cyanogenmod 10 from source, and modify the kernel (as before), and just boot this custom ROM with all the required ko's already in place - seems to be an easier path with more help available on forums etc...
Click to expand...
Click to collapse
This sounds like a good way to go but first have to do the above generating of module files?
I think perhaps I need to do some more research on this subject.
robb001 said:
I.e. not on a host machine?
Click to expand...
Click to collapse
No you need to do it all on a host linux machine. Do do it with insmoding, you need to download the kernel from Asus for your corresponding target kernel version. This includes everything you need. Then you need to just enable the building of the new DVB stuff by modifying the kernel config (use make menuconfig), then build the kernel - this gives you a lot of stuff including the ko files.
robb001 said:
This sounds like a good way to go but first have to do the above generating of module files?
I think perhaps I need to do some more research on this subject.
Click to expand...
Click to collapse
More research is a good idea. It is not simple. But cyanogenmod has lots of help available - read its wiki on building from source etc. So to clarify - you either 1) build kernel modules when building the kernel and insmod them onto the target, or 2) build the entire CM10 source and flash this new custom ROM (which will be complete with the DVB stuff once you enable them in CM10 kernel config). Go with 2) and see how you get on.

TP-LINK WN722N (ath9k driver) install on Ubuntu touch 15.04 (Nexus 10- Manta)

I've been through all the relevant threads on AskUbuntu and they are either outdated, conflicting and/or dont work.
My Nexus10 sees the atheros AR9271 device on Bus 001 USB but does not create an additional WLAN for it.(wlan0 is the normal integrated wifi) I assume I need the ath9k or ath9k_htc driver? I installed backports 4.4.2-1 and unzipped it. If I try to do a 'make' or 'make clean' I get:'your kernel headers are incomplete/not installed'. I've already got the latest version of build-essential. If I try to install 'firmware-atheros', it cannot find the package. I've been through several other things to no avail.
I've read the driver is installed with 15.x+ anyway, true? and if so how to install it? If someone could do a step-by-step wifi driver install for a U-touch or at least Ubuntu 15.x I'd be very very grateful.
I do not want to bridge the 722n, I want to use it instead of the integrated card. Not even there yet, but just in case it matters.
Thanks!
roninisc said:
I've been through all the relevant threads on AskUbuntu and they are either outdated, conflicting and/or dont work.
My Nexus10 sees the atheros AR9271 device on Bus 001 USB but does not create an additional WLAN for it.(wlan0 is the normal integrated wifi) I assume I need the ath9k or ath9k_htc driver? I installed backports 4.4.2-1 and unzipped it. If I try to do a 'make' or 'make clean' I get:'your kernel headers are incomplete/not installed'. I've already got the latest version of build-essential. If I try to install 'firmware-atheros', it cannot find the package. I've been through several other things to no avail.
I've read the driver is installed with 15.x+ anyway, true? and if so how to install it? If someone could do a step-by-step wifi driver install for a U-touch or at least Ubuntu 15.x I'd be very very grateful.
I do not want to bridge the 722n, I want to use it instead of the integrated card. Not even there yet, but just in case it matters.
Thanks!
Click to expand...
Click to collapse
anyone anyone, Beuller...
Hey, saw this was unanswered and figured I could help. First off, you will not be able to compile or install headers in the Ubuntu Touch system, as /lib/modules/<kernel version> is a bind-mount into the read-only LXC system image, one way to work around this issue on device is to mount the LXC container's system image read-write somewhere, move out the lib/modules directory to someplace else, umount, reboot and then link your moved lib/modules back into /lib/modules. You will need to do this compilation outside of your Nexus 10 in a cross-compilation environment or in an armhf chroot (imho, a chroot running the ARM build of Ubuntu works very well for this).
Once you have that, you can install the kernel package for your device (which I believe are labeled linux-headers-manta and linux-image-manta respectively) and build the driver you seek. However the kernel already comes with backports 4.4.2 in it's tree, so you may be able to apt-get source linux-image-manta and build the driver and/or the kernel itself if you wish. (I believe building the kernel builds the firmware needed for the drivers as well, but I have no way of knowing as I haven't actually rebuilt any drivers with firmware yet in my foray into linux-image-flo's source.)
One piece of advice: Make sure to join together the config.*.ubuntu files under the debian.flo and debian.master folders to get the working .config for your device. The defconfig from arch/arm/configs doesn't have all the needed options for uTouch and won't boot it.
Your 'thanks meter' improved, and big thanks for answering, but this is beyond my level. Was hoping I could run an external wifi stick on a tablet with some flavor of linux, but looks like a no go for mortal users.
roninisc said:
Your 'thanks meter' improved, and big thanks for answering, but this is beyond my level. Was hoping I could run an external wifi stick on a tablet with some flavor of linux, but looks like a no go for mortal users.
Click to expand...
Click to collapse
Sadly at this time, it definitely seems to be. The normal linux way of building drivers doesn't work on here because the modules directory (/lib/modules/3.4.0-5-flo) is read-only, also due to this kernel headers cannot be installed, this can be worked around, but it is definitely not something that the casual user can do easily. I hope this will change so I could start compiling modules and NOT need to rebuild the entire kernel for it.
Glad I could be of help and I love answering questions, I am currently using Ubuntu Touch as my main OS on my Nexus 7 as I'm trying to make it into my own portable workstation. So I'm constantly digging into the system and learning what I can, and I love to share.

Categories

Resources