[Q] Urukdroid 1.5: How do I build a custom kernel? ALT: What should be my rootdevice? - Gen8, Gen9, Gen10 Q&A, Help & Troubleshooting

I want to use a usb ethernet card (ASIX AX88xxx), so I need to build my own kernel. I also want sshd and root access, so I would like to use Urukdroid.
How do I do this? Alternatively: What could I use instead of Urukdroid?
I tried chulri's [HOWTO] Build custom kernel, libraries and applications on your own and it compiles fine. I also compiled it with builtin support for my USB ethernet card. (There are some warnings with both stock and my kernel config but chulri mentions in the thread that some of this is to be expected.)
I used the new zImage as the zImage for the UrukDroid 1.5 installer. It installs fine, but when it tries to boot Urukdroid, the Urukdroid bootimage shows but after "Switching to rootfs" the tablet restarts (stock Archos bootscreen shows) and boots the standard archos system. This happens with both the stock kernel config and my kernel config.
Is this my fault, because I have the wrong rootdevice in my kernel? (I installed it on internal storage, not on a sd card.) I'm a bit rusty when it comes to linux kernel builds. Where do I enter the rootdevice and which is the right rootdevice for Urukdroid on internal storage?
Then I tried chulri's build environment but replaced the linux kernel sources with the kernel soruce from Urukdroid 1.5. The result was the same: When Urukdroid switches the rootfs , the screen turns blank, the standard Archos boot image shows and the standard android system gets loaded.
I would be very grateful, if somebody could point me in the right direction. (I would be even more grateful for a zImage, but that is a bit much to ask and I rather would like to know my way around kernel builds...)
[EDIT] OK, the question about the root device is probably silly, since it has been AGES since this was compiled into the kernel. The Main Question still remains: How can I use my USB ethernet card?
Marcus

Building a kernel with stock SDE + chulri works, but still no ethernet
Since I was unable to get a custom kernel for Urukdroid working, I reflashed the tablet with stock firmware and SDE.
I basically followed Chulri's Root easily your gen8 device
Then I built a custom kernel with compiled-in ethernet support and compiled-in usb device support for my ethernet card. Again just like Chulri says.
I used the resulting zImage together with chulri's initramfs.cpio.gz from the +rw kernel.
Thanks for the great HOWTOs, Chulri!
When I now boot the developer edition and connect to it via adb (How I miss urukdroid already ) this is the dmesg output for the usb ethernet card:
Code:
usb 2-1: new high speed USB device using musb_hdrc and address 2
usb 2-1: default language 0x0409
usb 2-1: New USB device found, idVendor=0b95, idProduct=1780
usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1: Product: AX88178
usb 2-1: Manufacturer: ASIX Elec. Corp.
usb 2-1: SerialNumber: 000003
usb 2-1: uevent
usb 2-1: usb_probe_device
usb 2-1: configuration #1 chosen from 1 choice
usb 2-1: adding 2-1:1.0 (config #1, interface 0)
usb 2-1:1.0: uevent
asix 2-1:1.0: usb_probe_interface
asix 2-1:1.0: usb_probe_interface - got id
eth0 (asix): not using net_device_ops yet
eth0: register 'asix' at usb-musb_hdrc-1, ASIX AX88178 USB 2.0 Ethernet, 00:11:6b:73:75:ac
/root/archos/archos-gpl-gen8/linux/drivers/usb/core/inode.c: creating file '002'
hub 2-0:1.0: state 7 ports 1 chg 0000 evt 0002
hub 2-0:1.0: port 1, status 0100, change 0001, 12 Mb/s
usb 2-1: USB disconnect, address 2
usb 2-1: unregistering device
usb 2-1: usb_disable_device nuking all URBs
usb 2-1: unregistering interface 2-1:1.0
eth0: unregister 'asix' usb-musb_hdrc-1, ASIX AX88178 USB 2.0 Ethernet
usb 2-1:1.0: uevent
usb 2-1: uevent
So ethernet is still not working, but at least I got a lot further.
Does anybody have any ideas on how to go on from here?
Am I missing any userland components?
Any help would be greately appreciated.
I keep on trying to get it to work on my own and will post any progress.
Marcus

Hi!
Same problems here form me with an FTDI chip.
The musb_hdrc thing is a bit tricky, here are some of my experiences.
You can alter the kernel config when building a custom kernel, but the msub_hdrc is built by default as a module, which is bundeled with the stock firmware, so if you for example want to change something this will mess up the whole stack.
The modules built are under lib/modules and i couldn't see them neither in rootfs nor in initramfs so they probably arrive on the device when you install the stock firmware (the step before you flash the custom initram and zImage in chulri's tutorial)
For example my problem is that I have an FTDI chip <-> CA-157 micro-A plug which is plugged in into a70IT's micro plug. But it only works if I plug the micro A without the attached FTDI chip and as a second step attach the FTDI chip
There is probably something connected to the state changes because first the musb needs to go to a_idle and the to a_host to pick the FTDI
This is the reasong why I started to investigate the state machine of musb but I faced a big problem, namely if I remove musb_hdrc.ko from lib/modules and compile my modified version in the kernel then nothing happens after host attached dmesg message. The funny thing is that the only modification is a verbose log level nothing serious. If the musb_hdrc.ko stays in lib/modules and I compile the kernel with my musb_hdrc for sure the module already loaded message comes up -> this is totally normal as we don't want to load it twice.
I think there are some let's call it archos specific things and not "dirty hacks" which prevents me to modifiy some drivers in the way I want it...
I tried to post some questions to the platform thread but I'm still too green for it
I gave an FTDI related thread where my problem is detailed...
It would be very useful for me if a senior could explain how the full custom firmware is built up. What stays from the stock part and what is overwritten, yes I know that th initramfs and zImage is overwritten but I'm interested could we for example build a full .aos like firmware file where the lib/modules and all othe content is defined by the platform developer...
I know the most of the post is off topic but I'm really interested to in customization of platform like this but still have to learn a lot...
br, sodjas

THings that should be easy, never turn out to be easy on embedded devices.
Thanks for your insights on the topic, sodjas.
This nicely explains why I got stuck.
Somehow the things that should be easy, are never easy on embedded devices.
I will keep trying when I have some free time again....

Hi,
inresting thread indeed...
Though i did not take a deeper look into the archos kernel structures, maybe the solution is much simpler... maybe it's more complex
When compiling a custom kernel/modules both must match in the end.
In other words all modules should be replaced with the ones of your new kernel.
Stock firmware uses squashfs so it's little tricky to remove or insert modules to the right place...
The best thing to start with custom kernel development would be Urukdroid which uses "real" rootfs on ext4. By using the SDCARD install method there's a comfortable way to modify the rootfs (replace modules etc.).
At least if you got a linux machine at hand.
Urukdroid uses links to point to the real modules here.
EDIT: Here are the Urukdroid 1.5.1 kernel sources
Not sure if there are kernel modules in initial ramdisk already... had to take a look.
Maybe you already knew this, maybe not... anyway could be helpful
Best regards,
scholbert

True enough, the userland alone makes urukdroid a much better environment for experimentation...
But I only managed to compile a kernel according to chulri's HOWTO which works with the stock development environment.
I tried booting urukdroid with such a kernel but failed. The device did show the urukdroid boot screen and progress bar but then restarted and loaded the stock archos android environment.
Maybe I'm not doing my forum searches/gooogle searches right. I will try again. But how do I set up a cross compilation environment for urukdroid kernels?
Are the urukdroid developers using the build environment and kernel sources according to chulri and I just didn't chose the right mix of modules to compile?
I tried using chulri's build environment and replaced the linux kernel sources with the urukdroid kernel sources, but did not manage to compile a bootable kernel.
This doesn't get easier since archos modified the kernel sources and urukdroid probably has some special modifications, too.
There must be some information missing that I wasn't able to find yet. (Or maybe I am just stupid . Hey, I would welcome a nice insulting rant about now that tells me what a sucky noob I am and includes some nice links about how I can pull myself out of this swamp by my own bootstrings .)
EDIT: I just saw your edit, scholbert. Thanks for the helpful link. Could you help with setting up a cross compilation environment? Even just a few links and pointers would be welcome.
Are you saying that I should invest in an sdcard and manipulate the rootfs directly, instead of using the kernel update function of the tablet's developer boot menu? Or does the rootfs only help me including self compiled modules? Couldn't I just integrate the devices directly into the kernel, avoiding any rootfs manipulation?

Hi,
yeah i think Urukdroid uses the same/similar environment.
In fact you'll have to, if you use propietary kernel modules from stock firmware (e.g. hdmi modules).
mmkhd said:
Could you help with setting up a cross compilation environment? Even just a few links and pointers would be welcome.
Click to expand...
Click to collapse
So you said you followed chulris way... you'll have to built a toolchain from the archos sources first.
How did you compile your kernel then?
Anyway here's another interesting post...
http://forum.xda-developers.com/showthread.php?t=978564&styleid=15
EDIT: The cross toolchain in fact is build from scratch using the buildroot system and the modified sources from archos.
Check this for more information about buildroot toolchain generation.
I wonder if someone already built a standalone cross toolchain ready to use on different linux systems. Might be a quite useful thing
mmkhd said:
Are you saying that I should invest in an sdcard and manipulate the rootfs directly, instead of using the kernel update function of the tablet's developer boot menu? Or does the rootfs only help me including self compiled modules?
Click to expand...
Click to collapse
You should always use the update function for kernel and initial ramdisk.
So using a sdcard system will just help you to modify the rootfs very easily (e.g. integrating the modules).
mmkhd said:
Couldn't I just integrate the devices directly into the kernel, avoiding any rootfs manipulation?
Click to expand...
Click to collapse
Honestly i'm not sure if this will work properly for any peripheral... AFAIK some drivers are required to be loaded as a module.
Anyway, i guess i will also do some kernel work the next months... if i find useful information i'll keep you informed
EDIT: Ah, i nearly forgotten... there are no modules in inital ramdisk.
Everything is located in /lib/modules (as sodjas already pointed out).
Cheers,
scholbert

Hi mmkhd,
i don't know if you made some progress with this issue.
Anyway, i build an Archos specific standalone toolchain in the meantime.
Attached are the modules for Asix based USB2LAN adaptors.
Works very well with UrukDroid 1.5.1 on my A101.
Though you'll have to load the modules and setup the network manually at the moment.
At the shell:
su
insmod mii.ko
insmod usbnet.ko
insmod asix.ko
ifconfig eth0 xxx.xxx.xxx.xxx
You'll have to set the gateway and nameserver as well to use your browser.
I'm working on an automated solution...
Regards,
scholbert

Related

[Q] urukdroid with hauppauge wintv aero dvb-t

hi.
i wish to get my dvbt dongle working in urukdruid, i own a hauppauge wintv aero.
the driver i loaded is smsusb which should be fine, because under opensuse 11.4 it works great witch this module, and like in opensuse i copied the right firmware from hauppauges side into
/lib/firmware.
dmesg recognized the stick, but by loading the firmware causes an error in dmesg:
...
usb 2-1: firmware: requesting sms1xxx... .fw
init: untracked pid 1565 exited
smscore_set_device_mode: firmware download success: sms1xxx....fw
the end is that there are no devices like /dev/dvb0* or else and no tuner available
lsmod | grep dvb
does only give me
dvb_core
dvb_usb
while lsmod sais that
smsusb
smsmdtv
are loadet. someone any ideas?
another problem is that urukdroid sometimes freezes by pluggin in the dvbt dongle!
thnk you for reading!
If your device is not supported by the linux kernel, it probably won't work. Check the list here: http://linuxtv.org/wiki/index.php/DVB-T_USB_Devices
Also, you can't really use the same drivers on an Android device from a Desktop/Laptop/Netbook due to differences in hardware. At least, that's my limited knowledge. Good luck!
sure...
but the drivers i use are build by sauron for urukdroid dvbt usage, and they are similar named like the drivers for opensuse so i guess they are te same only build for urukdroid kernel.
i think i use the right modules and the problem depends on the firmware implemetation, what i read is that its possible to use a firmware that didnt come with urukdroid.
i think it should work im using linux now for years, the problem is not the wrong module or firmware, both should work in urukdroid, the problem seems for me to be anywhere else.
maybe usb or kernel itself im not sure.
any more ideas to solve that?
sauron where are you?
btw not all devices that work are listet on the page! it doesent depent on the modell it depends on firmware and build in chip...
my modell isnt listet i know but with the firmware at /lib/firmware it works out of the box, driver is in kernel.

Adding a GPS USB Driver to Eken t01 ?

Good morning,
I've just got a Eken T01 Tablet (£80) bit of a bargain to be honest Anyway.....
I would like to add a usb gps driver to it. Now from what I understand I need a few things.
1. USB Host
2. USB Linux Drivers
3. Root
I have all three and the driver is a PL-2303 USB to Serial Driver. From what I can gather I need to put these c. files into a specific folder on my tablet and then edit a couple of files to load these drivers on startup ?
Am I going down the right root ? or completely off the mark ?
Any help would be great, I've tried to do alot of reading but not getting far really because most tablets either have built in gps or they dont normally have a host usb port.
If I'm just pointed in the right direction it will be a great help.
many thanks,
Steve
[update]
I've just found this on Prolific's site...
Linux Kernel 2.4.31 and above already includes built-in drivers for PL-2303H, PL-2303XA/HXA and PL-2303HXD.
NOTE: Google Android OS is also based on Linux kernel so it also supports PL2303.
does that mean it already has a driver installed and I'm just missing something ? How would I check ?
Thanks,
I think you'll need to install a kernel module. These are hard to compile since EKEN refuses to release their kernel source code. EKEN's response to my request:
"I’m afraid that we are not able to provide you the information you have requested. The information is regarded as strictly confidential."
I was able to compile an FTDI kerenel module for the EKEN T01 using the .config and php program provided on a post on slatedroid. Can't post a link, so google: "slatedroid Generic USB-Serial GPS HAL driver novo"
But it still doesn't recognize my FTDI device. I think there are some deeper problems with the USB host support on the device. Doesn't even recognize a simple HID device. I'm hoping if I update to the latest firmware it'll work.
robcb85 said:
I think you'll need to install a kernel module. These are hard to compile since EKEN refuses to release their kernel source code. EKEN's response to my request:
"I’m afraid that we are not able to provide you the information you have requested. The information is regarded as strictly confidential."
I was able to compile an FTDI kerenel module for the EKEN T01 using the .config and php program provided on a post on slatedroid. Can't post a link, so google: "slatedroid Generic USB-Serial GPS HAL driver novo"
But it still doesn't recognize my FTDI device. I think there are some deeper problems with the USB host support on the device. Doesn't even recognize a simple HID device. I'm hoping if I update to the latest firmware it'll work.
Click to expand...
Click to collapse
Thanks for the info fella... I've still been doing alot of googling and reading trying to get a little further.
I've attached a couple of .mo files.. I've tried to insmod them and they seem to go in fine.. but that's as far as I've got. :-(
I've installed a google pack so have gps locations tick box and navigator but it's not picking up anything.
When I do dmesg plugging / unplugging the usb gps it's just changing some port.. not loading the drivers as I would expect.
Any help would be greatly appreciated.
thanks
Steve
This is what I get on dmesg, not matter what I plug in:
Code:
<7>[ 245.190000] ehci_irq: port change detect
<7>[ 245.200000] ehci_irq: port change detect
<7>[ 245.380000] ehci_irq: port change detect
<7>[ 245.550000] ehci_irq: port change detect
<7>[ 245.550000] ohci_irq: connect status change
<7>[ 245.610000] The port change to OHCI now!
I assume you're using the USB Host port. Perhaps try an OTG cable connected to the USB Mini port. I don't have an OTG cable else I would.
The zip is corrupted after I download it. By .mo do you mean .ko?
robcb85 said:
This is what I get on dmesg, not matter what I plug in:
Code:
<7>[ 245.190000] ehci_irq: port change detect
<7>[ 245.200000] ehci_irq: port change detect
<7>[ 245.380000] ehci_irq: port change detect
<7>[ 245.550000] ehci_irq: port change detect
<7>[ 245.550000] ohci_irq: connect status change
<7>[ 245.610000] The port change to OHCI now!
I assume you're using the USB Host port. Perhaps try an OTG cable connected to the USB Mini port. I don't have an OTG cable else I would.
The zip is corrupted after I download it. By .mo do you mean .ko?
Click to expand...
Click to collapse
I've just purchased a normal usb to mini usb convertor lead so will give it ago when it arrives and let you know

[Q] Usb Ethernet Adapter (Driver Compile Requested For Money)

Greetings....
(This post is regarding my Nook Touch, however; as I believe the development setup is the same as a Nook Tablet, I am posting here also)
I am hoping to get my Asix Usb to Ethernet adapter working with my nook STG. I believe the only remaining requirement is to compile the drivers for it (which are android 2.x compatible according to the driver manufacturer website).
I am rooted and have 'usb host mode' successfully working.
When my adapter is plugged in, it displays as a 'connected device' in my Usb Host information app and shows the details; make/model etc - so its connected successfully.
It works plugnplay with my other droid devices, however in these devices there is an Asix driver folder in /sys/bus/usb/drivers and there is not in my Nook, thus I believe i simply need to compile the drivers which will create the Asix driver folder.
There are no errors displayed in Terminal Emulator after a typing "dmesg" once connected.
If you have the correct setup and can compile the drivers for me (and potentially other Nook users), i will exchange them for => 10GPB or 10 of your currency, via your desired means.
I was trying myself on an ubuntu vm in windows but have had to stop due to eye troubles; hence trying to use a Nook eink as my sole computer.
INFO:
Device: Nook STG firmware 1.21 - kernel source file link = images.barnesandnoble.com/PResources/download/Nook/source-code/nook2_1-2.tgz
Adapter Driver: Asix AX88772 - driver source file link = www.asix.com.tw/FrootAttach/driver/AX88772C_772B_772A_760_772_178_LINUX_Driver_v4.11.0_Source.tar.bz2
Adapter Info: BobjGear Adapter made for Android Tablets = www.amazon.co.uk/BobjGear-Ethernet-Exceptions-Description-Ultrabooks/dp/B007RTACDM
Other info: An XDA thread compiling the same drivers - http://forum.xda-developers.com/showthread.php?p=37548841
I don't know how to apply the drivers so I need to learn how to do so, I have ADB set up and have Noogie, CWM and NookManager .img also.
My Nook Touch thread - ]http://forum.xda-developers.com/showthread.php?t=2570149
Any other info needed i will provide
Sam

Mediatek mt6753 OTG support

Hi all,
I try to get USB-OTG support for my mt6753 phone running. Lots of websites show that the device should offer OTG support and you find several phones with this chipset having this option. I have a DOOGEE T3 that should have that, too.
But nothing happens when connecting different USB storages to the phone. Neither the device internal LEDs flashes nor kmsg / dmesg shows something USB related (phone is rooted).
I already ran several USB OTG checkers from google app store that added android usb host permissions in /etc/permissions in several xml files.
I also added the usb.host setting in build.prop and disabled the charger only option.
I also added a seperate USB power supply for definitively providing enough power for the USB storage. When using this additional cable the USB storage blinks twice but nothing happens on the phone.
There are a lot of items in /sys on the phone (e.g. usb20_host) that should point me to the capabilities for OTG.
I don't see a real "hardware" usb host controller in lsusb (like an uchi or ehci controller I know from Intel based systems) - only the "Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub"
How to proceed? If you need more information to determine the next steps, just let me know.
Best regards,
RX1901
Changing the cmode property to 2 (host mode only) causes some kernel debugging lines that state at the end "switch_int_to_host is done" but the "is_host" stays 0.
Am I on the right track?
After further checkings, it looks as if the usb20_otg_if is not compiled into the kernel. How can I add this? As a quick test a .ko file would be sufficient.
RX1901 said:
After further checkings, it looks as if the usb20_otg_if is not compiled into the kernel. How can I add this? As a quick test a .ko file would be sufficient.
Click to expand...
Click to collapse
Find a kernel source for your chip. However, I'm concerned about your phone not powering up the guest device. I think it should do that regardless of the driver. Is your OTG cable good? Proper cable should have OTG pin pulled to the ground on the phone's side and floating on the device's side.

Is there a way to check if certain driver is in the kernel?

I have compiled a kernel from Floppy kernel source, to make it contain an ATH9K driver for TP-Link usb wifi card TL-WN722N, but when I plug it in on OTG usb and execute command in Termux to list available devices, it's not there, and the wifi network card's LED is not on. I'm not sure if it's the kernel driver is not working or it's app's level issue, Is there a way to check if the driver is successfully installed? Thanks!
The device is a Xiaomi MI 5, running official miui dev ver of Android 8, kernel is compiled from Floppy Kernel for miui Oreo
The app I'm trying to run is airmon-ng via Termux, device is rooted by Magisk, and bootlock is unlocked.
kdlsw said:
I have compiled a kernel from Floppy kernel source, to make it contain an ATH9K driver for TP-Link usb wifi card TL-WN722N, but when I plug it in on OTG usb and execute command in Termux to list available devices, it's not there, and the wifi network card's LED is not on. I'm not sure if it's the kernel driver is not working or it's app's level issue, Is there a way to check if the driver is successfully installed? Thanks!
The device is a Xiaomi MI 5, running official miui dev ver of Android 8, kernel is compiled from Floppy Kernel for miui Oreo
The app I'm trying to run is airmon-ng via Termux, device is rooted by Magisk, and bootlock is unlocked.
Click to expand...
Click to collapse
IMHO to get to know all the drivers, you need to go through the /sys directory.
jwoegerbauer said:
IMHO to get to know all the drivers, you need to go through the /sys directory.
Click to expand...
Click to collapse
Thanks, that really helped, I checked /sys/module, and the driver (ath9k_htc) is there, then I checked lsmod, there is only one item:
Code:
gemini:/sys/module # lsmod
Module Size Used by
wlan 5801121 0
I think this is the one I added to the kernel, but is it a bit weird that there is no other loaded module?
And the usb wifi card is still not working, even I can see the device is showing in lsusb -t, the driver is not loading to the device.
I'm really out of ideas, can anyone please give some suggestions? Thanks!
@kdlsw
Loaded and hence currently running modules ( drivers ) are to be found in file /proc/modules
jwoegerbauer said:
@kdlsw
Loaded and hence currently running modules ( drivers ) are to be found in file /proc/modules
Click to expand...
Click to collapse
Here is what I see in there:
Code:
wlan 5801121 0 - Live 0x00000000000000 (O)
So it's definitely there, loaded. But the wifi card is still not working, I really don't have too much idea of how to proceed from this point.
The function I have selected from make menuconfig when compile kernel was called ATH9K and ATH9K_HTC, here it's wlan, is there something wrong? I checked the same wifi card plug into a desktop Debian, there is no module named wlan, the driver showed in lsusb is ath9k_htc.
And the offset of this being all zero seems not normal?
And it's the only one as not in tree external module, maybe external modules don't work? Should I try to compile it as in the tree?
Can you please point me some direction? What should I try from this point? Thanks
I finally got it working, what I did is to bind the driver to the usb device, and download a firmware for the device and put it in firmware' corresponding directory, I noticed it because there was an error message of loading firmware failed in dmesg when usb device is plugged. THANKS!!

Categories

Resources