[Q] Compiling A Kernel Module - Android Q&A, Help & Troubleshooting

I'm having an issue insmoding a kernel I built for my rooted galaxy s2. My end game is to get USB-ethernet working by building the asix module but I cant even get a ko from the default build to insmod. (I also cant load the kernel I compiled, i tried with odin... but I feel like this is a separate issue)
I compiled a kernel based on what I downloaded from samsungs website "GT-I9100_OpenSource_Update3.zip" and followed the instructions included (basically run make with defconfig) I chose scsi_wait_scan.ko as a test because it was built with the default config and currently wasn't loaded on my phone.
Here's some info that's pertinent. Any help would be appreciated. I'm running Ubuntu 11.
# lsmod
lsmod
dhd 242604 0 - Live 0xbf02e000
j4fs 65002 1 - Live 0xbf018000 (P)
Si4709_driver 17347 0 - Live 0xbf00d000
bthid 3384 0 - Live 0xbf007000
vibrator 6724 2 - Live 0xbf000000
# insmod scsi_wait_scan.ko
insmod scsi_wait_scan.ko
insmod: init_module 'scsi_wait_scan.ko' failed (Exec format error)
# dmesg
...
<4>[19668.986907] scsi_wait_scan: disagrees about version of symbol module_layout
# modinfo scsi_wait_scan.ko
modinfo scsi_wait_scan.ko
modinfo: can't open '/2.6.35.7-I9100XWKI4-CL575468/': No such file or directory
# pwd
/mnt/sdcard
# ls -l
...
-rwxrwxr-x system sdcard_rw 32484 2012-01-12 10:21 scsi_wait_scan.ko
$ file scsi_wait_scan.ko
scsi_wait_scan.ko: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped

USB Host support
Has any body had luck with usb host working for devices other then sdcards on the S2? I got the kernel compiled and removed the whitelist but it looks like the USB host support is not fully implimented? Does the S2 support usb asynchronous mode? I'm not a usb expert but the kernel fails hard (lots of messges to dmesg and then the phone reboots) when I try it with an asix usb device.

Related

tun module

for those of you who needing vpnc running, here's attached the tun.ko fresh built.
gled said:
for those of you who needing vpnc running, here's attached the tun.ko fresh built.
Click to expand...
Click to collapse
ty, but I need help to set it up. :/
First of all, my phone is rooted. (x10 mini pro)
- got latest Version of busybox.
- tun.ko is on my SD card
- installed OpenVpnGui
- installed OpenVpnInstaller
- executed insmod tun.ko
- started OpenVpnInstaller
- tryed to install to /system/bin/
but I cant install the binaries.
the log file says for example:
STDERR cp: cp not found
STDERR: Unable to chmod /system/bin/openvpn no such file or directory
Hope someone can help me
Same prob like Daxmyst here.
Anyone who can help us ??
"cp not found" indicates you don't installed busybox.
by memory it's something like busybox --install /system/xbin
Code:
# busybox cp /sdcard/tun.ko /system/lib/modules/
busybox cp /sdcard/tun.ko /system/lib/modules/
# cd /system/lib/modules
cd /system/lib/modules
# busybox insmod tun.ko
busybox insmod tun.ko
# dmesg|tail
dmesg|tail
<6>[67658.043432] bq24180: Set safety timer to 4305 minutes
<6>[67668.099598] bq24180: Set safety timer to 0 minutes
<6>[67838.603295] bq24180: Set safety timer to 2686 minutes
<6>[67848.643480] bq24180: Set safety timer to 0 minutes
<6>[67979.253107] bq24180: Set safety timer to 2686 minutes
<6>[67989.293892] bq24180: Set safety timer to 0 minutes
<6>[68139.993915] bq24180: Set safety timer to 2686 minutes
<6>[68150.043948] bq24180: Set safety timer to 0 minutes
<6>[68233.031543] tun: Universal TUN/TAP device driver, 1.6
<6>[68233.031568] tun: (C) 1999-2004 Max Krasnyansky <[email protected]>
#
here is how I just loaded it.
xperia x10 mini pro
Hi Guys!
I am trying to get working openvpn cliet on my xperiy x10 mini pro. I have android 2.1(UK version) and.
I downloded the tun.ko(I found it on this portal) and copied it to the below mentioned modules folder, then I tried insmod and got the following:
Code:
$ su
su
# insmod /system/lib/modules/tun.ko
insmod /system/lib/modules/tun.ko
insmod: init_module '/system/lib/modules/tun.ko' failed (Exec format error)
Does it mean I have wrong tun.ko version?
kovgergo said:
Hi Guys!
I am trying to get working openvpn cliet on my xperiy x10 mini pro. I have android 2.1(UK version) and.
I downloded the tun.ko(I found it on this portal) and copied it to the below mentioned modules folder, then I tried insmod and got the following:
Code:
$ su
su
# insmod /system/lib/modules/tun.ko
insmod /system/lib/modules/tun.ko
insmod: init_module '/system/lib/modules/tun.ko' failed (Exec format error)
Does it mean I have wrong tun.ko version?
Click to expand...
Click to collapse
The posted tun module is for Android 1.6. It won't work on 2.1.
Also, this is for vpnc, not for openvpn (probably this is covered natively? - haven't tried though).
Sorry I got the tun.ko from: droidforums.net
unfortunatelly I cannot post the link. the title: 'Got OpenVPN Running on 2.1!!! (How-To)'
It should work on 2.1. Or not?
kovgergo said:
Sorry I got the tun.ko from: droidforums.net
unfortunatelly I cannot post the link. the title: 'Got OpenVPN Running on 2.1!!! (How-To)'
It should work on 2.1. Or not?
Click to expand...
Click to collapse
I bet it won't.
Since it won't be built with the mini's .config file.
Try it out thought, at post the results!
attached tun.ko for X10 Mini Pro?
I have X10 mini pro.
Code:
D:\x10\ftool>adb shell
$ su
su
# insmod /system/lib/modules/tun.ko
insmod /system/lib/modules/tun.ko
insmod: init_module '/system/lib/modules/tun.ko' failed (Exec format error)
#
Then I did dmesg:
Code:
.
.
.
<3>[ 5883.527575] tun: version magic '2.6.29-rel preempt mod_unload ARMv7 ' should be '2.6.29 preempt mod_unload ARMv6 '
So, I ssume the attached tun.ko is compiled for X10 and not for X10 mini pro which has ARMv7 proc instead of ARMv6.
tun.ko should be built for Mini Pro.
Can anybody help where I can find the source of tun.ko and all the necessary source which I need for the compiling?
Any suggestion where to find desp. how to compile?
I guess that waiting for SE to release the kernel source for 2.1 is what we have to wait for now.
Thx!
And how can I be informed when it is relased?
Thx!
How can I be informed when it is relased?
My guess is that it will get published here:
http://developer.sonyericsson.com/w...ield=release_date&sortOrder=false&toggle=true
as donut kernels did earlier this year.
I think they just uploaded it!
ppirate said:
I think they just uploaded it!
Click to expand...
Click to collapse
No .config file though
tun.ko for X10 mini with android 2.1
could you please post the ".config" you are using to build the "tun.ko" on the mini?
Thanks for you work
i would be interested in that .config too!
As stated here, the config is supposedly available:
http://forum.xda-developers.com/wiki/index.php?title=Xperia_X10_Mini_Compiling
Has anyone tried memberfive's tun.ko with success on 2.1 ?
It does'nt seem to work for me...(phone reboots).

Working Kernel (2.1) Modules for Mini / MiniPro / X8

Here are some kernel modules for common operations that can't be done using the vanilla SE 2.1 kernel. Those modules should work on X10mini/X10minipro/X8
Requirements: working busybox, adb
Firstly, you need to remount RW your /system partition to be able to put the modules in place:
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system
tun.ko, used for vpnc networks
Installation (kernel part):
Code:
adb push tun.ko /sdcard/
adb shell
su
busybox mv /sdcard/tun.ko /system/lib/modules/
busybox chmod 644 /system/lib/modules/tun.ko
Installation (gui part):
Get the latest apk of get-a-robot from here
Code:
adb install VPN_Connections_v099.apk
launch the app and add the network according to the config parameters that you have. This app also handles insmoding the tun.ko kernel module when needed.
cifs.ko, used for mounting windows/samba shares
Installation (kernel part):
Code:
adb push cifs.ko /sdcard/
adb shell
su
busybox mv /sdcard/cifs.ko /system/lib/modules/
busybox chmod 644 /system/lib/modules/cifs.ko
Usage:
Code:
insmod /system/lib/modules/cifs.ko
busybox mount -t cifs //<serverip>/<sharename> <local mount point> -o username=<name>,password=<password>
e.g. for guest authentication to share named 'samba' at server with ip 192.168.0.3:
busybox mkdir /sdcard/samba
busybox mount -t cifs //192.168.0.3/samba /sdcard/samba -o username=guest
nfs.ko, used for mounting NFS shares
Installation (kernel part):
Code:
adb push sunrpc.ko /sdcard/
adb push lockd.ko /sdcard/
adb push nfs.ko /sdcard/
adb shell
su
busybox mv /sdcard/sunrpc.ko /system/lib/modules/
busybox mv /sdcard/lockd.ko /system/lib/modules/
busybox mv /sdcard/nfs.ko /system/lib/modules/
busybox chmod 644 /system/lib/modules/sunrpc.ko
busybox chmod 644 /system/lib/modules/lockd.ko
busybox chmod 644 /system/lib/modules/nfs.ko
Usage:
Code:
insmod /system/lib/modules/sunrpc.ko
insmod /system/lib/modules/lockd.ko
insmod /system/lib/modules/nfs.ko
busybox mount -t nfs <serverip>:/<share> <local mount point> -o nolock
e.g.
busybox mkdir /sdcard/nfs
busybox mount -t nfs 192.168.0.3:/home/data /sdcard/nfs -o nolock
Utf8 support
This can be used with cifs or nfs when mounted partitions contain characters in utf8 and thus appear as junk
Installation (kernel part):
Code:
adb push nls_utf8.ko /sdcard/
adb shell
su
busybox mv /sdcard/nls_utf8.ko /system/lib/modules/
busybox chmod 644 /system/lib/modules/nls_utf8.ko
Usage:
Code:
insmod /system/lib/modules/nls_utf8.ko
Filesystems
I have not used these modules since I have not partitioned my sdcard for these types of filesystems. I guess they can be useful in a multi-partition scheme or with app2sd and something else other than ext2
ext3.ko (needs jbd.ko to be insmoded first)
ext4.ko (needs jbd2.ko to be insmoded first)
jfs.ko
reiserfs.ko
xfs.ko (needs exportfs.ko to be insmoded first)
ntfs.ko (read-only support)
App2sd for froyo
These modules are only useful if you have an custom froyo ROM in order to get the app2sd functionality working
dm-mod.ko (needs jbd.ko to be insmoded first)
dm-crypt.ko (needs jbd2.ko to be insmoded first)
twofish_common.ko
twofish.ko
Installation (kernel part):
Code:
adb push dm-mod.ko /sdcard/
adb push dm-crypt.ko /sdcard/
adb push twofish_common.ko /sdcard/
adb push twofish.ko /sdcard/
adb shell
su
busybox mv /sdcard/dm-mod.ko /system/lib/modules/
busybox mv /sdcard/dm-crypt.ko /system/lib/modules/
busybox mv /sdcard/twofish_common.ko /system/lib/modules/
busybox mv /sdcard/twofish.ko /system/lib/modules/
busybox chmod 644 /system/lib/modules/*
Disclaimer:
I can't be held responsible if any of those modules brick your device. Use them at your own risk!​
Changelog:
- 22/3/11 2.1.A.0.435 kernel image for x10mini
- 20/3/11 Updated tun.ko and kernel .config using 2.1.1.A.0.6
- 11/2/11 Added modules for froyo's app2sd
- 20/1/11 Added .config file
- 17/12/10 Initial posting
- 22/12/10 Added missing filesystems deps to filesystems.zip
Feel free to post any module requests you may have.
Can u explain me ths much further..what it is..?how the change when we get this in e10i
Sent from my E10i
you can find very helpful information on wikipedia:
(unfortuneately i cannot post external urls by now yet)
so, put in wikipedia this:
tun.ko - you can create VPN connection with this module
VPN
OpenVPN
cifs.ko - you can mount your samba/windows share on your device (if u dont know what it means.. you can basically have a folder on your phone, which represents the shared folder from your windows computer ..e.g. movies, music..etc
Server Message Block
Samba
Mount
nfs.ko - that is the same actually, but with this module u mount linux network file system, which also is capable of permissions management etc
NFS
Great! Nice Addition!
Just a point though:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
Click to expand...
Click to collapse
Shouldn't this be:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system
Click to expand...
Click to collapse
any module to overclok?
any module (or modification) to overclock cpu over 600 mhz?
DaRk_dOg said:
Great! Nice Addition!
Just a point though:
Shouldn't this be:
Click to expand...
Click to collapse
That's correct. Fixed.
Even though it works with mtdblock2 also
DrBios said:
any module (or modification) to overclock cpu over 600 mhz?
Click to expand...
Click to collapse
Is there some particular module in the vanilla kernel that can provide this?
I've seen it on other phones but with custom kernel modules / modifications
where can i read about all the possible modules?
What about psfreedom.ko (used to jailbreak the PS3)
It is possible to import?
Lef.teris said:
What about psfreedom.ko (used to jailbreak the PS3)
It is possible to import?
Click to expand...
Click to collapse
yeah psfreedom.ko would be so great on mini
any one can help me to run debian on my device???
theres a program called "Linux Installer", but its seem to need some kernel modules that the U20 dosnt have:
Code:
The Linux is installed separetly of android, the application doesn't delete any android files.
For that the application need some preriquieres :
- Rooted phone with id 0.
- Ext2, Ext3 or Ext4 support.
- If you install into loop, LOOP is needed into kernel.
- It is recommanded to reboot your phone before lunch this app to freed your memory.
(more info here http://android.galoula.com/en/LinuxInstall/)
the high priority is the LOOP thing!
any help? regards!
you need a kernel supporting loop, no addon will enable this,
you need a KERNEL that supports loop ( same as for NETFILTER needed for proper WiFi tethering )
see this thread
morning_wood said:
you need a kernel supporting loop, no addon will enable this,
you need a KERNEL that supports loop ( same as for NETFILTER needed for proper WiFi tethering )
see this thread
Click to expand...
Click to collapse
The default kernel DOES have loopback support. E.g:
cd /sdcard/
dd if=/dev/urandom of=1.img bs=1024 count=20000
mkfs.ext2 -F 1.img
mkdir /sdcard/loop
mount -o loop 1.img /sdcard/loop
This will create a loop device (1.img) formatted with ext2 and mount it under /sdcard/loop
Netfilter though is not build in, hence there can be no iptables module for this kernel for Wifi tethering
Hi nobodyAtall,
How to implement method for app2sd with ext4 with these new modules?
daemon-rj said:
Hi nobodyAtall,
How to implement method for app2sd with ext4 with these new modules?
Click to expand...
Click to collapse
This shouldn't be too hard.
- Place the required module in /system/lib/modules/
- Format your 'app' partition of the sd card in ext4 or any other FS
- Have /system/bin/sh modified so that the respective module is insmoded at boot, e.g:
Code:
#!/system/bin/sh_bak
busybox sh <<eof
if [ -f /sqlite_stmt_journals/app2sd ] ;
then
sleep 0
else
[B]insmod /system/lib/modules/jbd2.ko[/B]
[B]insmod /system/lib/modules/ext4.ko[/B]
busybox sh /system/etc/mount_sd.sh >> /sqlite_stmt_journals/app2sd.log
fi
eof
/system/bin/sh_bak "[email protected]"
- Have /system/etc/mount_sd.sh updated so that the correct FS type is used when mounting:
e.g.
Code:
mount -t ext4 /dev/block//vold/179:2 /system/sd
And it should work. As already said, I have not tried this, hence can't guarantee for it!
nobodyAtall said:
This shouldn't be too hard.
- Place the required module in /system/lib/modules/
- Format your 'app' partition of the sd card in ext4 or any other FS
- Have /system/bin/sh modified so that the respective module is insmoded at boot, e.g:
Code:
#!/system/bin/sh_bak
busybox sh <<eof
if [ -f /sqlite_stmt_journals/app2sd ] ;
then
sleep 0
else
[B]insmod /system/lib/modules/ext4.ko[/B]
busybox sh /system/etc/mount_sd.sh >> /sqlite_stmt_journals/app2sd.log
fi
eof
/system/bin/sh_bak "[email protected]"
- Have /system/etc/mount_sd.sh updated so that the correct FS type is used when mounting:
e.g.
Code:
mount -t ext4 /dev/block//vold/179:2 /system/sd
And it should work. As already said, I have not tried this, hence can't guarantee for it!
Click to expand...
Click to collapse
I had some problems with it:
# insmod /system/lib/modules/ext3.ko
insmod /system/lib/modules/ext3.ko
insmod: init_module '/system/lib/modules/ext3.ko' failed (No such file or direct
ory)
Click to expand...
Click to collapse
What could have gonne wrong?
DaRk_dOg,
Could you post the output from:
Code:
ls -la /system/lib/modules/ext3.ko
and
Code:
dmesg
after insmoding the module?
nobodyAtall said:
DaRk_dOg,
Could you post the output from:
Code:
ls -la /system/lib/modules/ext3.ko
and
Code:
dmesg
after insmoding the module?
Click to expand...
Click to collapse
Ok still can't insmod:
# ls -la /system/lib/modules/ext3.ko
ls -la /system/lib/modules/ext3.ko
-la: No such file or directory
/system/lib/modules/ext3.ko
Click to expand...
Click to collapse
And dsmeg output:
<4>[ 303.281915] select 2041 (re.rootexplorer), adj 15, size 5010, to kill
<4>[ 303.281975] send sigkill to 2041 (re.rootexplorer), adj 15, size 5010
<3>[ 303.296963] init: untracked pid 2053 exited
<4>[ 318.617897] ext3: Unknown symbol journal_force_commit
<4>[ 318.620697] ext3: Unknown symbol journal_dirty_data
<4>[ 318.621781] ext3: Unknown symbol journal_force_commit_nested
<4>[ 318.624642] ext3: Unknown symbol journal_init_dev
<4>[ 318.625722] ext3: Unknown symbol journal_dirty_metadata
<4>[ 318.626801] ext3: Unknown symbol journal_forget
<4>[ 318.628947] ext3: Unknown symbol journal_wipe
<4>[ 318.630355] ext3: Unknown symbol journal_blocks_per_page
<4>[ 318.636724] ext3: Unknown symbol journal_errno
<4>[ 318.639097] ext3: Unknown symbol journal_extend
<4>[ 318.643832] ext3: Unknown symbol journal_invalidatepage
<4>[ 318.649460] ext3: Unknown symbol journal_create
<4>[ 318.651390] ext3: Unknown symbol journal_unlock_updates
<4>[ 318.653257] ext3: Unknown symbol journal_revoke
<4>[ 318.655039] ext3: Unknown symbol journal_lock_updates
<4>[ 318.656995] ext3: Unknown symbol journal_start_commit
<4>[ 318.661068] ext3: Unknown symbol journal_flush
<4>[ 318.662145] ext3: Unknown symbol journal_load
<4>[ 318.664970] ext3: Unknown symbol journal_try_to_free_buffers
<4>[ 318.667287] ext3: Unknown symbol journal_update_format
<4>[ 318.668987] ext3: Unknown symbol journal_get_write_access
<4>[ 318.670397] ext3: Unknown symbol journal_get_undo_access
<4>[ 318.671827] ext3: Unknown symbol journal_get_create_access
<4>[ 318.673858] ext3: Unknown symbol journal_destroy
<4>[ 318.675905] ext3: Unknown symbol journal_clear_err
<4>[ 318.679265] ext3: Unknown symbol journal_stop
<4>[ 318.684682] ext3: Unknown symbol journal_init_inode
<4>[ 318.685760] ext3: Unknown symbol journal_start
<4>[ 318.687413] ext3: Unknown symbol log_wait_commit
<4>[ 318.692583] ext3: Unknown symbol journal_release_buffer
<4>[ 318.694160] ext3: Unknown symbol journal_check_available_features
<4>[ 318.695243] ext3: Unknown symbol journal_abort
<4>[ 318.696633] ext3: Unknown symbol journal_restart
<3>[ 516.699960] init: untracked pid 2271 exited
Click to expand...
Click to collapse
Thanks DaRk_dOg.
Apparently the jbd.ko module is also needed for journaling to work for ext3.
jbd2.ko is needed for ext4.
Added those to the initial post, please re-download the updated filesystems.zip

[HOWTO] Install GNU/Linux on the Huawei S7 && Development thread (Kernel & GB)

[HOWTO] Install GNU/Linux on the Huawei S7 && Development thread (Kernel & GB)
Installing GNU/Linux on the Huawei IDEOS S7
( Using Debian or Ubuntu )
THIS GUIDE IS A WORK IN PROGRESS!
USE AT OWN RISK!​
Requirements:
Gnu/Linux experience! THIS IS NOT INTENDED FOR THE FAINTHEARTED!
Debian or Ubuntu.
The Google Android SDK Or at least adb and Fastboot
Busybox and a terminal emulator for Android.
A rooted device. See http://forum.xda-developers.com/showthread.php?p=14321729#post14321729 For how to root the Huawei S7 Android (2.2.2)
UPDATE:
New Image available.
Compatible and tested on :
-Huawei S7
-Huawei X5 / U8800(not quite done yet),
-RK2818 based devices,
-Samsung Galaxy s2.
Add "setprop ctl.stop bootanim" to the chroot command in "startnix-s7/other/rk.sh" on targets newer then gingerbread.
The image is using the MSM/QSD X11 driver for video,
ext3-4 modules for chroot on Android 2.2.2 stock image
xinput calibrator for screen calibration
Recompiled udev making that compatible.
And also a new sane kernel. which can be fastbooted with this image where ext3-4 are included and compiled-in. This kernel is necessary for enabling acceleration on the MSM/QSD X11 driver, using DRM. Swap and alsa(hopefully) are also enabled, ++, currently for _testing_only_!
Read post #11 for information - Merry Christmas and a Happy new year to you all!!
Setting up an image.
dd if=/dev/zero of=arm-linux.img bs=1024 count=2097152 to create a 2gb image.
mkfs.ext2,3 or 4 arm-linux.img , see post 10 for ext3 and 4 modules. as well as jbd and jbd2 which need to be insmodded.
Setting up a partition.
Plug it into your pc running Debian or Ubuntu, have usb storage selected on the device.
Back up everything on the 8GB Fat32 partition. I did this with a simple tar -cf android-back.tar /media/8gigandroidmountpoint. Verify that .android_secure is properly packed, but i also strongly suggest using titanium backup to backup application data and settings first then backup with a .tar. That cant fail.
Create a mountpoint and locate the special device of the S7.
Once you are absolutely sure you backed your partition, proceed with partitioning. Also be warned that ext2 is very prone to dataloss if not properly unmounted before rebooting, And by default, the s7 only supports ext2. So be sure and remember to have unmount any ext2 partition properly when done in Gnu/Linux, run sync as root before exiting, And have e2fsck handy. i have had to edit /etc/mtab back in due to corruption a dozen times when i was using ext2!
Code:
cfdisk -z /dev/sdx
I recommend at least 2Gb's. You can always increase the size of the partition later using tools such as gparted , but be aware, gparted might wreak havoc on your fat32 partition!
Now, create the first partition. It is very important that you make the first partition a Fat32 partition or the pad might go mad and operating systems with Multiple $clerosis wont see the partition! Choose "Type" and enter "0B" (FAT32). Create the second partition using the remaining space.
Select "Write" then Exit.
Now, do mkfs.vfat /dev/sdx1 and mkfs.ext2,3 or 4 /dev/sdx2.
Installing.
Once this is done we make ourselves a temporary directory, lets say mkdir /media/deb and loop mount the image or the partition there.
Instruct debootstrap to get the base packages for squeeze (Debian 6.0),
Squeeze is based on kernel 2.6.32 and is therefore safest to base our installation on, as Android 2.2 is designed with 2.6.32 in mind. The s7 is a armv7 so we could also use armhf, the drawbacks are its not quite done yet, and there is currently no video driver for our device available from me or the debian repo tested for armhf.
Code:
apt-get install debootstrap
# Adjust .nl. for your closest Debian mirror. Saves time and energy.
debootstrap --verbose --arch armel --foreign squeeze /media/deb [URL]ftp://ftp.nl.debian.org/debian[/URL]
Now using adb from the Google Android SDK and a usb cable, enter a shell and do the following.
(NOTE: I'm using /sdcard2 , which is the mountpoint to any external sdcard as the mountpoint, the reason for this is lazyness, creating a new folder on the s7's filesystem requires you run psneuter, remount the fs, then create your directory, see my rooting thread for that, you must change this if you are using an sdcard)
Code:
adb kill-server
adb start-server
adb shell
su
# For loopback image
mknod /dev/block/loop255 b 7 255
busybox losetup arm-linux.img /dev/block/loop255
mount -o rw -t ext2,3 or 4 /dev/block/loop255 /sdcard2
# For partition
mount -o rw -t ext2,3 or 4 /dev/block/vold/179:2 /sdcard2
export bin=/sdcard2/bin
export PATH=$bin:/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:$PATH
export TERM=linux
export HOME=/root
cp -r /etc/firwmare/* /sdcard2/lib/firmware/
cp -r /etc/wifi/* /sdcard2/lib/firmware/
cp /sbin/adbd /sdcard2/sbin
cp -r /dev /sdcard2/
chroot /sdcard2 /debootstrap/debootstrap --second-stage
# Adjust .nl. for your closest Debian mirror.
echo 'deb [URL]ftp://ftp.nl.debian.org/debian[/URL] squeeze main' > /sdcard2/etc/apt/sources.list
Tell it what nameserver to use, probably your routers IP address.
In this case we'll just use Googles DNS that should work in any case.
Code:
echo 'nameserver 8.8.8.8' > /sdcard2/etc/resolv.conf
echo 'nameserver 8.8.4.4' >> /sdcard2/etc/resolv.conf
Lets drop by our new home and make it nice and comfy.
Code:
chroot /sdcard2 /bin/bash
Once in, we need to do a quick few mounts, a fast few mknodes and a little bit of linking to make things fully functional.
Code:
mount -t devpts devpts /dev/pts
mount -t proc proc /proc
mount -t sysfs sysfs /sys
ln -s /proc/self/fd/0 /dev/stdin
ln -s /proc/self/fd/2 /dev/stderr
ln -s /proc/self/fd/1 /dev/stdout
mknod /dev/block/loop255 b 7 255 # Shouldn't really be needed as we just copied /dev
ln -s /dev/ptmx /dev/pts/ptmx
#mknod /dev/pts/ptmx c 5 2
# ln -s /dev/input/event0 /dev/event0
ln -s /dev/graphics/fb1 /dev/fb1
ln -s /dev/graphics/fb0 /dev/fb0
Creating the /etc/mtab file
The /etc/mtab file should look something like this.
Code:
/dev/block/vold/179:2 / ext2 rw,noatime 0 0
# or - You should have figured to adjust for ext 2 3 or 4 now?
/dev/block/loop255 / ext2 rw,noatime 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw 0 0
The FS should always be mounted with the noatime option! This reduces load considerably and conserves sdcard!
mount -o rw,noatime -t ext2 /dev/block/vold/179:2 /sdcard2 for instance
/etc/fstab should look like this: (remember to adjust / )
Code:
/dev/block/loop255 / ext3 defaults,noatime 1 1
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
Setup a password for the root account.
For some reason i had to run dhclient to get online at first, even though ifconfig shows me as connected. Also be aware that when Android falls asleep it puts the wlan0 device to sleep, dropping the connection. Pinging something with -i 90 is a temporary workaround for this.
Setting up OpenSSH
Code:
apt-get update
apt-get install openssh
(OPTIONAL) To configure your locale settings to use a language other than English, install the locales support package and configure it.
Currently the use of UTF-8 locales are recommended.
Code:
apt-get install locales
dpkg-reconfigure locales
(OPTIONAL! ) The "tasksel install standard" command installs all packages marked as "standard" packages for the selected distribution. Running just tasksel will promote you with several choices. tasksel --initial will promote you with installing the base system.
For things like the touchscreen to work properly we need to populate /dev.
Code:
# NOT NEEDED ANYMORE , USING DIFFERENT APPROACH! - leaving for reference
#mknod /dev/kgsl-3d0 c 244 0
#mkdir /dev/input
#mknod /dev/input/input0 c 13 64
#mknod /dev/input/input1 c 13 65
#mknod /dev/input/input3 c 13 67
#mknod /dev/input/input4 c 13 68
#mknod /dev/i2c-0 c 89 0
#mknod /dev/i2c-1 c 89 1
Poking around i figured out the touchscreen and stuff.
input0 = Hid Ofn
input1 = Touchscreen
input2 = Sensor
input3 = Keypad
input4 = Handset
After the installation there will be a lot of downloaded packages in /var/cache/apt/archives/. You can free up some diskspace by running:
apt-get clean
I then created a small script to drop into GNU/Linux a bit easier, note the path of the modules.
Code:
su &
if test -e /mnt/sdcard/arm-linux/linux/bin/bash # or /sdcard2/bin/ if your using a partition
then
echo "Already mounted."
else
busybox insmod /mnt/sdcard/arm-linux/s7/jbd.ko
busybox insmod /mnt/sdcard/arm-linux/s7/ext3.ko
busybox insmod /mnt/sdcard/arm-linux/s7/jbd2.ko
busybox insmod /mnt/sdcard/arm-linux/s7/ext4.ko
# For loopback image
mknod /dev/block/loop255 b 7 255
busybox losetup arm-linux.img /dev/block/loop255
mount -o rw,noatime -t ext2,3 or 4 /dev/block/loop255 /sdcard2
# For partition
mount -o rw,noatime -t ext2,3 or 4 /dev/block/vold/179:2 /sdcard2
fi
export bin=/sdcard2/bin/ # or /mnt/sdcard/arm-linux/linux if your using an image
export PATH=$bin:/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:$PATH
export TERM=linux
export HOME=/root
export SHELL=/bin/bash
# You can also do
#'setprop ctl.stop zygote & setprop ctl.stop media && chroot /sdcard2/ /bin/bash && setprop ctl.start zygote & setprop ctl.start media'
# This will kill the Android wm, start chroot, and once you quit return you to
# android, but that doens work in an android terminal, only via adb.
chroot /sdcard2 /bin/bash
This needs to be expanded with another script since you still need some mounts (sysfs devpts and proc), i just dropped them in the .bashrc file in /root for now.
Code:
if test -e /sys/class/graphics/fb0/uevent
then
echo "All sys mounts already mounted."
else
mount -a
#service hal start
hald --daemon=yes
service ssh start
fi
cd
For Xorg
I've compiled the MSM/QSD X11 drivers, which should provide "limited 3d acceleration, provided they works, here is the status of that so far:
http://threader.zapto.org/s7/dev/msm-drv/xf86-video-msm-6fd8528-gcc46-2-rgb-fix-accel-6.tar , Colour working, needs NoAccel on production kernel. With accel enabled on the production kernel, there are no errors shown when starting X as there were. But Lxde first appears, tjen the menu, taskbar, background, and the rest vanish in a puff of smoke, leaving only the pointer and which can be moved about corruption regions of the screen. This is because certain features were left out of the production kernel. Using the kernel provided in post #11, acceleration works!
You can always check http://threader.zapto.org/s7/dev/msm-drv/ and try out some of the others I've compiled and see if there are any speed issues, sources are also available.
Now to enter the X server, the first thing you really want to do is have your ssh server running and connect to it. You can start your xserver and have all resources devoted to it by having passed "setprop ctl.stop media & setprop ctl.stop zygote" to android in the ADB. Starting zygote again is merely a 'setprop ctl.start zygote & setprop ctl.start zygote'.
The HTC Dream is fairly similar to our device, similar as in its a QSD8x50 device, we should be able to borrow some of their work, this is probably optimized and should be fast, http://build.shr-project.org/shr-unstable/images/htcdream/ its good for reference anyway.
Some problems i ran into. # Outdated but leaving for reference.
When trying to ssh in, after a reboot, i got a rather nasty error.
PTY allocation request failed on channel 0
if present remove /dev/ptmx and do mknod /dev/ptmx c 5 2 then redo these mounts or make sure they are properly mounted.
mount -t devpts devpts /dev/pts
mount -t proc proc /proc
mount -t sysfs sysfs /sys
TIPS:
Install localepurge! This will save a lot of space!
Install a vncserver and try setting up an X session your happy with, i would recommend the use of lxde and openbox to minimize the memory footprint and to conserve space and ram as the s7's kernel is compiled without swap enabled (o,0).
Configure xorg.conf in /etc/X11/xorg.conf with the config i posted in #3 http://forum.xda-developers.com/showpost.php?p=14594464&postcount=3
Be sure to properly unmount the ext partition before you reboot your device! Especially ext2 partitions are prone to dataloss!!!!! Use "sync" as root atleast before exiting!
install matchbox-keyboard ( an onscreen keyboard )
Starting X11 was an oddball first few attempts! As the fbdev driver isn't really compatible with the qsd8250 gpu, it blanks out the screen and doesnt know how to revert it. With android still running, I experimented with startx -- :1 and stuff the xorg.conf but ended up using just startx and found that repeatedly pressing the power button (quite frantically) (once the screen blanked out), low and behold, the x session miraculously appeared! This was before i had even "thunk" about compiling the qsd msm driver and before the xf86-video-msm driver in wheezy Debian.
Congratulations, you should now have a fully working Debian install on your Huawei S7!
-------------------------------------------------------------------------------
Clean booting into the Debian partition!
Configure /etc/fstab: # Outdated , needs updating, see arm-linux.img
Code:
# /etc/fstab: static file system information.
#
# file system mount point type options dump pass
/dev/block/mmcblk0p2 / ext2 defaults 1 1
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /media/sdcard vfat defaults 0 0
Add "/sbin/adbd &" to /etc/rc.local and make a symlink so adbd can find sh or bash. (NB, was unsuccessful in my attempts at this for unknown reasons, did not fight it to long.)
# mkdir -p /system/bin/
# ln -s /bin/bash /system/bin/sh
apt-get install wpasupplicant network-manager-gnome wireless-tools
mv /etc/init.d/udev /etc/init.d/dis for now, this is a showstopper.
Get fastboot http://developer.htc.com/adp.html
Grab the zImage
(s7 10x -- Self compiled kernel,with ext3-4,drm,alsa(hopefully,powermanagement etc. _TESTING_ONLY_ copy lib to / , System.map to /boot/ and add dhd.ko to /etc/modules run depmod somehow ) http://threader.zapto.org/s7/kernel/2.6.32.9-ideos-fs-snd-drm-sane-5.tar.bz2
(s7 101 -- stock rom image ) http://threader.zapto.org/s7/rom/extracted/output-brazil/kern/zImage
(s7 other then 101 -- stock rom image ) http://threader.zapto.org/s7/rom/extracted/output/zImage
Configure the network:
To configure the network we need to copy a module from android dhd.ko from /lib/modules/ to /lib/modules/2.6.32.9-ideos/kernel/ and create an entry in /lib/modules/2.6.32.9-ideos/modules.dep kernel/dhd.ko: then run depmod -a from within Debian and add dhd to /etc/modules
Boot Debian:
Put the device into fastboot mode
$ adb reboot bootloader
The '-c' flag specifies arguments to pass to the kernel for boot.
This is probably the bare minimum.
Format is "fastboot -c 'kernelcmdline' boot zImage"
fastboot -c 'root=/dev/mmcblk0p2 rw rootfs=ext2 init=/sbin/init rootwait noinitrd' boot zImage
Please help feed my Linux addiction! Go to http://threader.zapto.org and click Donate!
TODO:
Clean boot from the Debian partition using fastboot.- DONE
Compile the codeaurora.org MSM/QSD X11 drv - DONE
Compile a sane kernel, with all the features you'd expect from a Linux kernel - DONE
Create a boot image with the new kernel compatible with the S7 101-105 possibly 201(slim) capable of booting Android and Linux, either from an early boot menu or using chroot. (WIP)
Hack up an existing rom, or compile 2.3.7 and make a complete solution. (TBA)
Stop playing Angry Birds, Dragon, FLY! XConstruct, Finger physics and Skies Of Glory when i should be doing this! - NEARLY ALMOST MOSTLY COMPLETELY DONE(ish) ;Þ
References & useful stuff! This would never have been possible in this short of a time if it weren't for these excellent posts. (Woaw, i sounded so optimistic in june 2011. The initial work was quick, over half a year later though im still not done! "Just gotta fix that last little ting before... Hey! i discover another little thing ...!
http://www.saurik.com/id/10
http://www.debian.org/releases/stable/i386/apds03.html
http://www.irregular-expression.com/?p=30
forum.xda-developers.com/archive/index.php/t-830077.html
http://forum.xda-developers.com/archive/index.php/t-830077.html
For development
git clone git://codeaurora.org/kernel/msm.git android-msm-2.6.32
https://www.codeaurora.org/gitweb/quic/xwin/
https://www.codeaurora.org/gitweb/quic/xwin/?p=xf86-video-msm.git;a=shortlog;h=refs/heads/chromium
http://gitorious.org/htc-msm-2-6-32...d65936b8bbc8708f352719/include/drm/kgsl_drm.h
https://github.com/tmzt/androix-xserver
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
/etc/X11/xorg.conf
Code:
Section "Device"
Identifier "msm"
# For MSM/QSD X11
Driver "msm"
Option "fb" "/dev/fb0"
# For fbdev
# Driver "fbdev"
# Option "ShadowFB" "on"
# Option "Rotate" "CW"
# for MSM/QSD X11
Option "NoAccel" "true"
# Option "SWBlit" "true"
EndSection
Section "Screen"
Identifier "Framebuffer"
# Device "fbdev"
Device "msm"
Monitor "Monitor"
# DefaultFbBpp 24
SubSection "Display"
# Depth 24
Modes "800x480"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Builtin Default Layout"
Screen "Framebuffer"
# InputDevice "Trackball" "CorePointer" # Reserved for buttons .
InputDevice "Touchscreen" "CorePointer"
InputDevice "Keyboard" "CoreKeyboard"
EndSection
Section "InputDevice"
Identifier "Touchscreen"
Driver "evdev"
Option "Device" "/dev/input/input1"
# Option "ScreenNumber" "0"
Option "ReportingMode" "Raw"
Option "ReportingMode" "Scaled"
Option "ButtonNumber" "1"
Option "SendCoreEvents"
EndSection
Section "InputDevice"
Identifier "Keyboard"
Driver "kbd"
# Option "XkbLayout" "en_US"
EndSection
This is Debian running cleanly from without the chroot environment
After doing some debugging from within chroot and Android, without the /etc/xorg.conf doing a startx -- :1 and repeatedly pressing the power button (quite frantically) (once the screen blanked out) the x session miraculously appeared! But i couldn't use it since it didn't know of a pointer device.
I managed today to configure the touchsreen correctly, i can now use xfce and x11 from within chroot in android ,but ironically enough im unable to get it up (phun intended) in a clean boot at all, here im using matchbox-keyboard
zImage
Hello,
the links about zImage
Grab the zImage link(s7 101) link (s7 other then 101 dont know why this is 2 megs! and the other 1.4)
are broken.
Can you share zImage again?
Best regards and thanx for great work
Hi!
I've extract kernel using guide: HOWTO: Unpack, Edit, and Re-Pack Boot Images on android-dls.com/wiki/.
but at the end, i've have problems in dhd module. Can't modprobe without error at linux boot.
Now trying to run ubuntu 11.04. Installing "ubuntu-desktop" packages in chroot
santiagax99 said:
Hi!
I've extract kernel using guide: HOWTO: Unpack, Edit, and Re-Pack Boot Images on android-dls.com/wiki/.
but at the end, i've have problems in dhd module. Can't modprobe without error at linux boot.
Now trying to run ubuntu 11.04. Installing "ubuntu-desktop" packages in chroot
Click to expand...
Click to collapse
Hey, good stuff, use whatever kernel from whatever rom absolutely works on your droid.
It's also dawned on me there most probably might be an issue with the port of the x11 driver, thankfully i still have everything.
http://threader.zapto.org/ - im guessing everything i used is there, if i find more i'll put it up, if its down try again later. I also added a donate button to help feed my Linux addiction =)
The dhd.ko is here - http://threader.zapto.org/s7/rom/extracted/output/sys/lib/modules/dhd.ko
Also Ubuntu is a memory hungry beast, i would recommend Debian 6.0x/squeeze lxde+xfce.
Hi, how it's going with TODO:
Stop playing angrybirds, xconstruct and skies of glory when i should be doing this!
?
=)
installing Ubuntu fails because of my lazy =(
now i get some free time and trying to get working debian queeze on my S7.
I'll report back after finish.
---------- Post added at 03:22 PM ---------- Previous post was at 03:20 PM ----------
Also i think it's good idea to share complete image of partition with linux. Installing all packages on S7 takes much time =)
Hey,
Quite time consuming yes, and fiddly.
I was planning on sharing an image, but i had planned on having it a bit more complete and polished first. That just didn't happen however. But today i cleaned up http://threader.zapto.org and added an image of the partition. And got a fresh breath of motivation.
The image is 2.1 GB. If you write it to a partition, it needs to be equal to or greater then the image you write or you risk trashing the next partition or just failing to complete the write, i guess.
However, you can use a loop device Use the last available loop device, mknod /dev/block/loop255 b 7 255 to avoid conflict, and to mount the image using losetup /dev/block/loop255 s7-linux.img && mount -o noatime -t ext2 /dev/block/loop255 /sdcard2 . Do sync as root before rebooting.
http://threader.zapto.org/s7
http://shell.consolegfx.net/s7-linux.img.bz2 # Outdated - see post #11 or http://threader.zapto.org/arm-linux.tar.bz2
md5sum s7-linux.img
275b2fe0bbe0172910933e583835164c s7-linux.img
-rw-r--r-- 1 root root 2169503744 Nov 19 17:49 s7-linux.img
Password for root is root .
Now, i wont be working too much more on the fastboot approach, carrying around a pc to boot linux on the tablet just isnt practical at all. And i really need to have usb host confirmed and working. I have made progress on starting X11 cleanly. My current method of "setprop ctl.stop media & setprop ctl.stop zygote && chroot /mnt/sdcard/linux/ /bin/bash && setprop ctl.start media & setprop ctl.start zygote" works great from adb, but will fail in an android terminal emulator instantly restarting zygote as it quits the terminal app.
I also compiled some kernel modules and put up, mainly ext3 & 4, fuse, msdos, ntfs, but eventually some other goodies. Check http://threader.zapto.org/s7/modules/. None of these are included currently, and wont be until i upload a future version. That will be ext3, which hopefully wont be too far off, and i can already tell you it will include some substantial changes. It should also be infinently more usable, even for those that havent spent some 10+ years on linux. It would definitively be cool if i could releasing something with Digital video usb dongle support, wouldn't it?
Cheers!
-Mike
Btw. here's the next image running on the s7, as you can see there were some problems with the x11 driver, but i managed to fix that a bit so this is now working, but still Option "NoAccel". I can also report that even firefox 3.5 is running surprisingly smoothly. Over the next few days i will be working on the x11 driver and then internal gsm modem and bluetooth.
Driver working with Red and Blue switched:
Tada! Fixed driver!
Thanks where thanks are due must be given to Visor and Hydro for helping with hosting "o'huge ass image file" and such! Thanks!
KERNEL 'UPDATE!: :
--------------------------
I managed to find time to fix and compile the kernel! The new kernel boasts plenty of improvements over the stock kernel, most noticeably ext3-4 built in, drm, alsa, swap, some experimental features enabled like a new scheduler for the usb, and switch to the no-op scheduler, also a feature that could let us change kernels "mid flight", hopefully, with kexec. Added some fpu related optimizations. I was unable to get it booting with a newer compiler for now though, so its still soft-float. This kernel is half the size, or even less as debug symbols are disabled. The old kernel crawled to 7mb's , this is 3.3.
http://threader.zapto.org/s7/kernel/2.6.32.9-ideos-fs-snd-drm-sane-5.tar.bz2
Usage:
Take the tools folder from the tar.bz2 and copy it somewhere, preferably your home directory (as google sdk binaries are picky little pricks) extract the above archive and put zimage into the tools directory:
adb reboot fastboot
Kernel with modules, http://threader.zapto.org/s7/kernel/2.6.32.9-ideos-fs-snd-drm-sane-5.tar.bz2
Ramdisk extracted from stock bootrom: http://threader.zapto.org/s7/kernel/boot.img-ramdisk.gz
Extract 2.6.32.9-ideos-fs-snd-drm-sane-5.tar.bz2 somewhere on your machine, zImage is inside there.
Dont extract boot.img-ramdisk.gz
For booting Android:
Code:
fastboot -c 'console=ttyMSM2,115200n8 androidboot.hardware=qsd8k_s7' boot /path/to/2.6.32.9-ideos-fs-snd-drm-sane-5/zImage /path/to/boot.img-ramdisk.gz
For booting into linux (mmcblk0p2 is the device node for the second partition created on the 8gb internal sdcard, use mmcblk1p1 or 1p2 for external sdcard):
Code:
fastboot -c 'root=/dev/mmcblk0p2 rw rootfs=ext3 init=/sbin/init rootwait noinitrd' boot zImage
Thanks where thanks are due must be given to -ZEROsignal-. Visor and Hydro, for helping with hosting "o'huge ass image file" and such! Thanks!
Aosp 2.3.7 available for modders and powerusers!
Code:
experimental/aosp2.3/s7/README
Experimetnal build of gingerbread for the s7
Notes:
The build is 2G split, (vmsplit 2g), so given that a given library is compatible
these can be exchanged from 2.2 .
Its still software rendering via pixelflinger.
OpenGL works.
Notes on Wifi and Bluetooth, bcm4329 chipset.
An updated kernel driver, is included in /system/modules (bcm4329.ko).
I have however not come as far as to implement it properly, as i am currently fo
cused on the graphics bit.
Notes on graphics, gralloc-qsd8k has been fixed. Which meant updating the kernel
pmem driver a bit to accomodate this change.
renderscript (libRS and librs_ something ) crashes. Probably due to pixelflinger
Im sure a rom modder could have this rom running smoothly using the huawei 2.2 l
ibraries and such, and dhd.ko. Also delete /system/app/Provision.apk as this prevents booting!
Notes on boot.img:
The ramdisk content might be wrong! I might have copieid the wrong boot.img befo
re i left! This will get fixed.
And so it has, boot.img-dead is the old dead one, boot.img is the working one.
Directory structure named after build date
Cheers
-mike aka threader
Also arm-linux0.7 is shaping up, this is still an early version where i change a lot in preparation for a more general solution to publish on the google.code page.
Were now using freedreno x11 driver, which works well in chroot but doesnt work if you boot linux normally, the old msm-x11 driver works for this purpose.
I improved rendering alot, but still pixelflinger....it also appears that i introduced some rendering artefacts, these are however minimal.
http://code.google.com/p/lrfa/downloads/detail?name=system.img.bz2&can=2&q=
boot.img still on http://threader.zapto.org/experimental .
.
Hi! how's it going? what's new? long time no updates. Is there any success in running Linux? I would like to move to Linux as the primary operating system.
Hey.
Not much, still occasionally working to port the Codeaura Adreno GPU driver to the huawei kernel, which is a **** because of the version screweup which is the huawei kernel. Other then that there has been no news on the Android Gingerbread front since i last published http://threader.zapto.org/experimental/aosp2.3/s7/021212/ , which fixed audio and found a bug in the MDP which resulted in less glitching when fixed.
New kernel up on http://threader.zapto.org/experimental/s7/kernels/
Incomplete change list off the top of my head:
Patched from 2.6.32.9 to 2.6.32.60
Asturals msm kgsl with the following changes
- fixed kgsl_drm_init(null) which caused a kernel panic in older kgsl.
- patched exploit in kgsl
gcc 4.7 compatible - updated assembly.
clock code taken from 2.6.38.
AVS from 2.6.38
DRM from 2.6.38
Added memblock. Genalloc. Genlock.
Redone board file. (use board-qsd8x50-s7.c-full for full functionality)
msm-fb updated. Lcdc. Etc.
Retouched msm_battery-s7
and probably lots more.
Known bugs:
TBA ( TO BE ANSWERED )
Source : http://threader.zapto.org/experimental/s7/kernels/source/kernel-ideos-experimental-2.6.32.60.tar.bz2
Binary: http://threader.zapto.org/experimen...l-ideos-experimental-2.6.32.60/zimage-2gsplit
Happy hacking!
Hi threader, great work, will try and tell you how it goes.
One question have you tryied to move to 2.6.38 ?
cant we patch the 2.6.38 kernel with files we may need from 2.6.32 ?
hal_2000
Hey Hal.
Likewise
Still fixing some minor bugs, re-worked the board-qsd8x50-s7 file again to make dhd happy, and found a hw def that makes anything we compile think its a 8250. Tell me, is it the 103 or 20x that uses the 8250? I think that code should be moved to the board file.
I've been trying to move to 2.6.38, but i cant get it booting for some reason, i've actually got two 2.6.38 kernels i've been working on, neither give as much as a bleep. The one up in s7/experimental/ has everything it needs to boot, i think. I backported the board-qsd8x50.c file to the 2.6.32 kernel trying to rule that out, and thats whats in use there.. But its pretty hard to debug when i have no frame of reference (console output or anything).
Cheers
-Mike
hal_2000 said:
Hi threader, great work, will try and tell you how it goes.
One question have you tryied to move to 2.6.38 ?
cant we patch the 2.6.38 kernel with files we may need from 2.6.32 ?
hal_2000
Click to expand...
Click to collapse
Hi, i pick up the zimage file and make a boot.img file, it boot up the rom fusion but touch screen did not work and menu and home key also did not work.
Then used your kernel sources to try to compile a kernel for cm9 and it did not work, it hang at boot, i have a s7 model 105.
If you need more tests let me know.
as far i know que s7-10x uses a qsd8k board type and a cpu qualcomm snapdragon qsd8250 at 998Mhz, the 20x uses a diferent cpu. That why it uses diferent kernels, and i think there is more diference in hardware.
hal_2000

TUN, NTFS, CIFS, usbserial, fuse kernel modules (and more) for 2.6.39.4, attached

Hi there,
I've attached the tun and ntfs kernel modules, let me know if you're unable to download/use them
tun.ko
md5sum: 08956c574f72929f3c831e834ff9860d *tun.ko
ntfs.ko
md5sum: 5bbfa6ce8ddd66f7dda885a333fdf027 *ntfs.ko
to use them move them to a persistent folder like /data/local/lib
you may have to chmod them and then from a root shell run:
insmod /data/local/lib/tun.ko
or whatever module you want to install.
To ensure this runs at boot you'll likely have to add a script to init.d, I assume.
This is for the Sony ICS build of kernel 2.6.39.4
Let me know if people would like additional modules and I can build and upload them.
I hope this helps.
A
I don't have enough posts under my belt to list this in the dev forum, could somebody put a link there to this thread in case people are still looking for these modules?
Thanks,
A
Could you please write step by step installation tutorial for dummies like me?
Sent from my Sony Tablet S using xda app-developers app
installing kernel modules, init.d
Sure thing! Here's how to install the modules and make them work persistently.
I'm going to have to assume you have root and a terminal emulator (and utilities like busybox).
To simply install the kernel modules, you'll have to download that tarball I posted, unpack it, ensure you have the right permissions on the files, and run the install command from a root prompt (we'll assume you've downloaded the tarball to /sdcard/download, though if you've used /sdcard2/download or some other directory use that instead):
mkdir /data/local/kmods
cd /data/local/kmods
chmod 775 /data/local/kmods
cp /sdcard/download/tun_and_ntfs_modules_2.6.39.4.tar /data/local/kmods/
tar -xvf tun_and_ntfs_modules_2.6.39.4.tar
(if you're not yet in a root prompt at this point type: su)
chmod 775 ntfs.ko
chmod 775 tun.ko
insmod ntfs.ko
insmod tun.ko
to check to see if the module loaded properly, at the prompt type:
lsmod | grep tun
lsmod | grep ntfs
and check to see if anything is printed, with "Live" on the line.
And that should be that, but at this point you'll have to load it manually every time you want to use it.
A better way is to create a script that will run at startup every time you boot by placing it in /system/etc/init.d. To do this, first ensure that you've followed the above steps and placed the modules in /data/local/kmods (you can use any name you want for the kmods folder, as long as you're consistent. Using the /data/local/ directory ensures the modules persist after reboot); also, you'll need to use condi's all-in-one tool to enable the init.d support --- it's option 4 -> 4 (using version 4.1).
ok, so using vi or a text editor create the following file, we'll call it "kmodboot" (it doesn't need a file extension!)
so the file should contain the following lines:
#!/system/bin/sh
insmod /data/local/kmods/ntfs.ko
insmod /data/local/kmods/tun.ko
You can run this script at this point to ensure that it works (insmod will throw an error if the module is already loaded):
chmod 775 kmodboot
./kmodboot
Next you're going to need to remount /system as writeable, you can use ghost commander or ES File Explorer. (To do this manually, at a root prompt type:
mount -o remount,rw -t ext4 /dev/block/mmcblk0p2 /system
But be careful! You've just made your system directory writable! type
mount -o remount,ro -t ext4 /dev/block/mmcblk0p2 /system
to remount it back to read only, when you're done!
mv kmodboot /etc/init.d
cd /etc/init.d
chmod 775 kmodboot
That's it! reboot and see if it the modules have loaded, using lsmod.
I hope this helps, remeber to be careful when you have your /system directory writeable! I can't help you if you mess up.
Take care,
A
kulen said:
Could you please write step by step installation tutorial for dummies like me?
Click to expand...
Click to collapse
thank you for quick and detailed response
I tried what you said to do but this is what I got.
[email protected]:/ $ export PATH=/data/local/bin:$PATH
[email protected]:/ $ mkdir /data/local/kmods//
mkdir failed for /data/local/kmods//, Permission denied
255|[email protected]:/ $ su
[email protected]:/ # mkdir /data/local/kmods
[email protected]:/ # cd /data/local/kmods
[email protected]:/data/local/kmods # mv /sdcard/xda_download/tun_and_ntfs_modules_2.6.39.4.tar /data/local/kmods
failed on '/sdcard/xda_download/tun_and_ntfs_modules_2.6.39.4.tar' - Cross-device link
255|[email protected]:/data/local/kmods #
So, what am I doing wrong?
in this other part, which I don't intend to do for now because it seems complicated to me, system needs to be writable just to copy script to init.d?
in this post are two other modules for other kernel:
http://forum.xda-developers.com/showthread.php?t=1557868
it would be great if you could make them for this kernel also.
Thank you
Hi there,
I'll look into posting those other modules when I get a chance (so the serial and cifs modules, any others?)
As for that cross-link error, try doing a copy (cp) instead of a move (mv) and ensuring thr permissions of the kmods directory are correct. I've edited the tutorial above to reflect this.
As for the init.d stuff, I think that's the way to go: in order to copy the script to the startup directory you need to make the whole system mount writeable.
Let me know if this helps.
A
I just continued last session and this is what I got now:
[email protected]:/ $ export PATH=/data/local/bin:$PATH [email protected]:/ $ mkdir /data/local/kmods//mkdir failed for /data/local/kmods//, Permission denied 255|[email protected]:/ $ su [email protected]:/ # mkdir /data/local/kmods [email protected]:/ # cd /data/local/kmods [email protected]:/data/local/kmods # mv /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods failed on '/sdcard/xda_download/tun_and_ntfs_modules_2.6.39.4.tar' - Cross-device link 255|[email protected]:/data/local/kmods # mv /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods failed on '/sdcard/xda_download/tun_and_ntfs_modules_2.6.39.4.tar' - Cross-device link 255|[email protected]:/data/local/kmods # chmod 775 /data/local/kmods [email protected]:/data/local/kmods # cp /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods [email protected]:/data/local/kmods # tar -xvf tun_and_ntfs_modules_2.6.39.4.tar ntfs.ko tun.ko [email protected]:/data/local/kmods # chmod 775 ntfs.ko [email protected]:/data/local/kmods # chmod 775 tun.ko [email protected]:/data/local/kmods # lsmod ntfs.ko ath6kl_sdio 190837 0 - Live 0xbf081000 cfg80211 155484 1 ath6kl_sdio, Live 0xbf04c000 compat 4748 1 ath6kl_sdio, Live 0xbf044000 quick_tp 9806 0 - Live 0xbf03f000 (P) cyttsp_i2c 1347 0 - Live 0xbf039000 cyttsp_core 4862 1 cyttsp_i2c, Live 0xbf032000 hid_sony 1573 0 - Live 0xbf02c000 stuid 159606 0 [permanent], Live 0xbf000000 (P) [email protected]:/data/local/kmods # lsmod tun.ko ath6kl_sdio 190837 0 - Live 0xbf081000 cfg80211 155484 1 ath6kl_sdio, Live 0xbf04c000 compat 4748 1 ath6kl_sdio, Live 0xbf044000 quick_tp 9806 0 - Live 0xbf03f000 (P) cyttsp_i2c 1347 0 - Live 0xbf039000 cyttsp_core 4862 1 cyttsp_i2c, Live 0xbf032000 hid_sony 1573 0 - Live 0xbf02c000 stuid 159606 0 [permanent], Live 0xbf000000 (P) [email protected]:/data/local/kmods # lsmod | grep tun 1|[email protected]:/data/local/kmods # lsmod | grep ntfs 1|[email protected]:/data/local/kmods #
When I connect my hard drive with 2 ntfs and 1 fat32 partitions only fat32 is recognized.
What did I do wrong this time?
Well I would like to make my usb 3g modem to work with this tablet and usb to serial is needed for that as I understood.
Cifs I don't need for now but I plan to buy network hard drive so it's good to be prepared and maybe there are some others that want it but stay silent.
So if it's not a problem for you it would be nice if you post it here also. If it's a problem it's ok.
If this is messy I can post it again from computer but not sooner than tomorow
Sent from my Sony Tablet S using xda app-developers app
Hi,
it looks like you're trying to install the modules using the list function (lsmod) instead of the install function: insmod.
It's hard to tell as there are no line breaks, but try
insmod tun.ko
insmod ntfs.ko
i'm going to attach the cifs and usbserial modules to my first post, so look out for an edit coming soon.
let me know if this resolves anything.
a
Sent from my Sony Tablet S using xda app-developers app
It seems it is installed now but I still can see only fat32 partition
[email protected]:/ $ export PATH=/data/local/bin:$PATH [email protected]:/ $ mkdir /data/local/kmods//mkdir failed for /data/local/kmods//, Permission denied 255|[email protected]:/ $ su [email protected]:/ # mkdir /data/local/kmods [email protected]:/ # cd /data/local/kmods [email protected]:/data/local/kmods # mv /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods failed on '/sdcard/xda_download/tun_and_ntfs_modules_2.6.39.4.tar' - Cross-device link 255|[email protected]:/data/local/kmods # mv /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods failed on '/sdcard/xda_download/tun_and_ntfs_modules_2.6.39.4.tar' - Cross-device link 255|[email protected]:/data/local/kmods # chmod 775 /data/local/kmods [email protected]:/data/local/kmods # cp /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods [email protected]:/data/local/kmods # tar -xvf tun_and_ntfs_modules_2.6.39.4.tar ntfs.ko tun.ko [email protected]:/data/local/kmods # chmod 775 ntfs.ko [email protected]:/data/local/kmods # chmod 775 tun.ko [email protected]:/data/local/kmods # lsmod ntfs.ko ath6kl_sdio 190837 0 - Live 0xbf081000 cfg80211 155484 1 ath6kl_sdio, Live 0xbf04c000 compat 4748 1 ath6kl_sdio, Live 0xbf044000 quick_tp 9806 0 - Live 0xbf03f000 (P) cyttsp_i2c 1347 0 - Live 0xbf039000 cyttsp_core 4862 1 cyttsp_i2c, Live 0xbf032000 hid_sony 1573 0 - Live 0xbf02c000 stuid 159606 0 [permanent], Live 0xbf000000 (P) [email protected]:/data/local/kmods # lsmod tun.ko ath6kl_sdio 190837 0 - Live 0xbf081000 cfg80211 155484 1 ath6kl_sdio, Live 0xbf04c000 compat 4748 1 ath6kl_sdio, Live 0xbf044000 quick_tp 9806 0 - Live 0xbf03f000 (P) cyttsp_i2c 1347 0 - Live 0xbf039000 cyttsp_core 4862 1 cyttsp_i2c, Live 0xbf032000 hid_sony 1573 0 - Live 0xbf02c000 stuid 159606 0 [permanent], Live 0xbf000000 (P) [email protected]:/data/local/kmods # lsmod | grep tun 1|[email protected]:/data/local/kmods # lsmod | grep ntfs 1|[email protected]:/data/local/kmods # insmod ntfs.ko [email protected]:/data/local/kmods # insmod tun.ko [email protected]:/data/local/kmods # lsmod | grep tun tun 12984 0 - Live 0xbf0e4000 [email protected]:/data/local/kmods # lsmod | grep ntfs ntfs 196520 0 - Live 0xbf0b2000 [email protected]:/data/local/kmods #
P.S. I use ES file explorer to check this and fat32 shows as usbdisk1. Usbdisk2 - 8 are empty
Sent from my Sony Tablet S using xda app-developers app
Hey kulen,
I'm glad to hear the module is loaded. I haven't tried to access an ntfs drive yet, I'll be able to test that in a couple weeks.
However, have you ensured that the drive is even mounted? I'm not sure ES file explorer can mount a device. So you'll need to mount it before accessing it.
you can check the current mounts with the command
mount
Additionally, you might be able to use fuse: forum.xda-developers.com/showthread.php?t=1724078
I've just compiled the fuse.ko module, but it should be included in the standard sony kernel. I'll post that too.
take care,
a
kulen said:
It seems it is installed now but I still can see only fat32 partition
[email protected]:/ $ export PATH=/data/local/bin:$PATH [email protected]:/ $ mkdir /data/local/kmods//mkdir failed for /data/local/kmods//, Permission denied 255|[email protected]:/ $ su [email protected]:/ # mkdir /data/local/kmods [email protected]:/ # cd /data/local/kmods [email protected]:/data/local/kmods # mv /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods failed on '/sdcard/xda_download/tun_and_ntfs_modules_2.6.39.4.tar' - Cross-device link 255|[email protected]:/data/local/kmods # mv /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods failed on '/sdcard/xda_download/tun_and_ntfs_modules_2.6.39.4.tar' - Cross-device link 255|[email protected]:/data/local/kmods # chmod 775 /data/local/kmods [email protected]:/data/local/kmods # cp /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods [email protected]:/data/local/kmods # tar -xvf tun_and_ntfs_modules_2.6.39.4.tar ntfs.ko tun.ko [email protected]:/data/local/kmods # chmod 775 ntfs.ko [email protected]:/data/local/kmods # chmod 775 tun.ko [email protected]:/data/local/kmods # lsmod ntfs.ko ath6kl_sdio 190837 0 - Live 0xbf081000 cfg80211 155484 1 ath6kl_sdio, Live 0xbf04c000 compat 4748 1 ath6kl_sdio, Live 0xbf044000 quick_tp 9806 0 - Live 0xbf03f000 (P) cyttsp_i2c 1347 0 - Live 0xbf039000 cyttsp_core 4862 1 cyttsp_i2c, Live 0xbf032000 hid_sony 1573 0 - Live 0xbf02c000 stuid 159606 0 [permanent], Live 0xbf000000 (P) [email protected]:/data/local/kmods # lsmod tun.ko ath6kl_sdio 190837 0 - Live 0xbf081000 cfg80211 155484 1 ath6kl_sdio, Live 0xbf04c000 compat 4748 1 ath6kl_sdio, Live 0xbf044000 quick_tp 9806 0 - Live 0xbf03f000 (P) cyttsp_i2c 1347 0 - Live 0xbf039000 cyttsp_core 4862 1 cyttsp_i2c, Live 0xbf032000 hid_sony 1573 0 - Live 0xbf02c000 stuid 159606 0 [permanent], Live 0xbf000000 (P) [email protected]:/data/local/kmods # lsmod | grep tun 1|[email protected]:/data/local/kmods # lsmod | grep ntfs 1|[email protected]:/data/local/kmods # insmod ntfs.ko [email protected]:/data/local/kmods # insmod tun.ko [email protected]:/data/local/kmods # lsmod | grep tun tun 12984 0 - Live 0xbf0e4000 [email protected]:/data/local/kmods # lsmod | grep ntfs ntfs 196520 0 - Live 0xbf0b2000 [email protected]:/data/local/kmods #
P.S. I use ES file explorer to check this and fat32 shows as usbdisk1. Usbdisk2 - 8 are empty
Sent from my Sony Tablet S using xda app-developers app
Click to expand...
Click to collapse
Sent from my Sony Tablet S using xda app-developers app
Kulen,
I've uploaded the fuse.ko, cifs.ko, and usbserial.ko modules to the first post.
Sent from my Sony Tablet S using xda app-developers app
I just tried USB OTG helper that I found in post you linked. And it did work but mounted all partitions under sdcard/usb***
strange thing is that when I reboot tablet and ntfs module is not mounted this also works?!
Thanks for all of this stuff
Sent from my Sony Tablet S using xda app-developers app
Glad to hear it's working. I think the reason this works without the ntfs module is that the fuse.ko module is compiled into the kernel by default and it takes care of this for you.
kulen said:
I just tried USB OTG helper that I found in post you linked. And it did work but mounted all partitions under sdcard/usb***
strange thing is that when I reboot tablet and ntfs module is not mounted this also works?!
Thanks for all of this stuff
Sent from my Sony Tablet S using xda app-developers app
Click to expand...
Click to collapse
I might be going a little off topic here.
It seems I need some more modules to make my usb modem work.
I found an app PPPWidget which should make my modem work with tablet, but I can't make it work.
This is what app creator said to somebody with same problem as mine, but other tablet:
"Make sure you have "usbserial.ko", "option.ko" and "usb_wwan.ko". The "option" module is depending on the others, at least in more recent kernel versions."
so I guess I need option.ko and usb_wwan.ko
could you provide those too?
I would be very thankful.
i don't know much about this so I don't know if you already have sources or you need me to try to find them?
thank you
Hi Kulen,
I've updated the first post to include those other modules (option.ko and usb_wwan.ko). Hopefully this will work, but let me know if there are other dependencies. Can you post a link to the thread you were referring to (where they mention those kernel modules) in case others want to know what you can do with them. Are you going to tether your tablet to a 3G device over USB? I'd like to give that a shot myself as I feel like tethering over wifi is doubly inefficient.
take care,
a
p.s. actually compiling the modules is pretty simple once the toolchain is in place. All the kernel sources are available from samsung. I'm actually compiling the modules by running make/gcc on my tablet within a debian chroot.
kulen said:
I might be going a little off topic here.
It seems I need some more modules to make my usb modem work.
I found an app PPPWidget which should make my modem work with tablet, but I can't make it work.
This is what app creator said to somebody with same problem as mine, but other tablet:
"Make sure you have "usbserial.ko", "option.ko" and "usb_wwan.ko". The "option" module is depending on the others, at least in more recent kernel versions."
so I guess I need option.ko and usb_wwan.ko
could you provide those too?
I would be very thankful.
i don't know much about this so I don't know if you already have sources or you need me to try to find them?
thank you
Click to expand...
Click to collapse
this is working!!!
here are the links:
this is software in general - http://www.draisberghof.de/usb_modeswitch/
this is android version - it includes all necessary things except kernel modules - http://www.draisberghof.de/android/pppwidget.html
this is problem I had - http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=6&t=1019
and this is my 3g modem - not important but for you to know with which modem this works for sure - http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?t=368
If posting this links is against some rules somebody please warn me or mods please delete this.
all you need is download pppwidget from market instal usbserial.ko, usb_wwan.ko and option.ko.
and of course you need to know your operator apn, username and password.
hope this can help somebody else also.
I'm "getting wings" now. I would like to make my usb dvb-t tuner work if possible
and about this modules building, it may be easy to somebody who is into linux and programming, but it still sounds as science fiction to me
hey, I've added more dvb tuner modules. Sorry about the .tar.bz2.zip file extension. XDA has a higher limit on .zip files and this file was > 8MB.
Can anyone compile ASIX AX88772B .ko module for tablet s on 2.6.39.4 ? I want to run USB-Ethernet adapter
ASIX AX88772B
Original thread (compile for Asus tf101) http://forum.xda-developers.com/showthread.php?t=1224660
Driver source attached (latest 4.4.0)
I have Sony Tablet S
kernel 2.6.39.4 unrooted
Android 4.0.3 (release5)
current module tun.ko not suitable!
Code:
insmod: init_module '/data/local/kmods/tun.ko' failed (Exec format error)
Need new modules.
Big thanks.
I'm away cureently but will look into the axis stuff when I can (2+ weeks).
As for the insmod issue, you mention you have an unrooted device? You need root to load kernel modules.
Sent from my T-Mobile G2 using xda app-developers app

Getting NFS,CIFS work on Siah kernel

I want use NFS shares from PC on android. Currently have SG2 Android 4.1.3 on Omega v24 rom running on SiyahKernel S2-v6.0beta5
I did load all requered modules by insmod:
Code:
# lsmod
nfs 135780 0 - Live 0xbf18b000
lockd 61571 1 nfs, Live 0xbf176000
sunrpc 161956 3 nfs,lockd, Live 0xbf119000
cifs 244467 0 - Live 0xbf0ab000
dhd 401246 0 - Live 0xbf01d000
j4fs 68987 1 - Live 0xbf00b000 (P)
Si4709_driver 25062 0 - Live 0xbf000000
But can't still mount any shares:
Code:
busybox mount -t nfs -o proto=tcp,port=2049 192.168.1.222:/home/dem/test /mnt/nfs
mount: mounting 192.168.1.222:/home/dem/test on /mnt/ntfs failed: Invalid argument
tried combination of options and without options - no work.
Version of busybox - BusyBox v1.18.5 (2011-07-20 21:05:55 CDT) multi-call binary.
Also tried Mount Manager from Google Play, when it trying to connect getting "Connection Refused Error" and /var/log/syslog on PC reporting connection tries:
Code:
Aug 1 17:28:21 dem-UX32VD rpc.mountd[22468]: authenticated mount request from 192.168.1.155:825 for /home/dem/test (/home/dem/test)

Categories

Resources