yashsingh1/xdaforums huggingface dataset:
[Gen8 Android Development] CalcProgrammer1:
My config was out of date and didn't have the Android drivers configured. I've pushed some new changes including my A43 USB power fix and your A101 Unitec touchscreen fix. I've updated linux.config with one I just successfully built with. Clean and pull and try again, it should work a whole lot better now.

As for the armv7-a+sec error, it's an annoying compromise I had to make. Older compilers don't understand armv7-a+sec, newer compilers won't compile without it (has an assembler error on armv7-a). I hate how the compiler writers endlessly screw with us by flipping things around every other release. If you want to keep using your current compiler, go into arch/arm/mach-omap2/Makefile and delete the "+sec" from armv7-a+sec (it is in there twice I think). This should make older compilers happy.
[Gen8 Android Development] grim-a101:
Compiling it right now ;)

I'll see once it is done if I can boot up my internal rootfs.

For now, with a SDCard my root should be /dev/mmcblk2p2, but with this cmdline, I just get a "Cannot open root device "mmcblk2p2" or unknow-block(0,0)

EDIT:

Same issue:

Assembler messages:
Error: unknown architecture `armv7-a+sec'

Error: unrecognized option -march=armv7-a+sec
make[1]: *** [arch/arm/mach-omap2/omap44xx-smc.o] Erreur 1
make: *** [arch/arm/mach-omap2] Erreur 2

Trying to see if google knows how to deal with that

EDIT again : See your message, will do that and tell you if it's ok

EDIT : deleted the +sec, it stops complaining. Wait for the end, and try to boot my internal root :(
[Gen8 Android Development] CalcProgrammer1:
See my edit above, I forgot to mark it as an edit. It's a problem I've known about and had, dependent on what compiler you use. I've actually flipped back and forth in my repository several times, but I'm settling on leaving it compatible with newer compilers. The fix for older compilers is to remove the "+sec" part from arch/arm/mach-omap2/Makefile (it occurs twice, remove both of them).
[Gen8 Android Development] grim-a101:
With your kernel, it boots up like a charm :)

Seems smoother so far, I'll try if I can set up the wifi (I've seen that I need to disable/enable it in your 2nd post).

Thanks again!

EDIT : I've speak too quickly... once logged in, it is still awfully laggy, and can't really do anything :/ will see that tomorrow I think

EDIT Again : If I log in as "Guest", it is really much faster, I even can see my Wifi AP without desactivating wireless network first!

EDIT (Another one!) : Once again, I speak too quickly... I haven't had the time to go to the "Onboard" for poping the v-keyboard that it became laggy and unusable :/
[Gen8 Android Development] CalcProgrammer1:
Just let it be for a while, the first boot up might be doing some initialization tasks that could slow the machine down. Alternatively, pop in a USB keyboard, ctrl+alt+fX to a terminal shell, log in that way, and install the gnome-session-fallback interface, it's lighter and faster than Unity. Also, you shouldn't have to reactivate wireless anymore, I added a line in the rc.local to restart it...actually I'm not sure if that change made it into the modifications file or not.
[Gen8 Android Development] grim-a101:
Last time I tried, USB Keyboard doesn't work (but that was before the touchscreen works, so ...maybe but I doubt).

For the rc.local wireless modification, it is in the Gen8Modifications.tgz that you provide, and yes, it is in my root fs, that's surely why I can see my AP (but in your 2nd post, you wrote that even with this modification to the rc.local, it was still needed to stop and start wireless networking)
[Gen8 Android Development] CalcProgrammer1:
I added an additional line to mine, think it was

/etc/init.d/network-manager restart

after initializing the wireless. I don't have my A43 booted up now or I'd check.
[Gen8 Android Development] grim-a101:
USB Keyboard doesn't work as I thought, so I'm stuck with the onboard Keyboard (so no CTRL+ALT+F1 for me).

I have some uggly things in my syslog... seem to have hit the oom-killer!

Maybe I should set up a swap partition on mmcblk2p3?

EDIT: forgot the pastebin link to my syslog:

http://pastebin.com/SJmE3wEv

---------- Post added at 04:04 AM ---------- Previous post was at 03:33 AM ----------

I may have messed up my root fs when I shrink it to add a swap part after.

Now I can't boot up anymore, having 6 lines of "(stk) :line disc installation timed out" on the console output.

Will see that tommorow (I'm saying that to myself since at least 2h now :D)

EDIT : I give it a last shoot by running a "sudo apt-get install gcc-arm-linux-gnueabi" and trying your command line (make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j9) (mrpropering before, re-adding the 2 +sec). It compiles, but kboot just give me a frozen screen with "nice colors" as soon as I choose the entry... so.. no luck with that
[Gen8 Android Development] CalcProgrammer1:
That's what was happening to me earlier as well, it must be the newer compiler in 12.04 as the 11.04 compiler works fine with the same source. You could try using the Mentor CodeSourcery compiler (try the late 2010 or early 2011 releases) as it's based on GCC and I've compiled successfully on it before. That one is called arm-none-linux-gnueabi-gcc. It also might be module incompatibility, I think if you use certain compilers the binaries are incompatible and you would have to build your own modules as the ones in Modifications would be incompatible.
[Gen8 Android Development] grim-a101:
Definitly a compiler issue, you're right (as usual :D).

apt-get install gcc-4.5-arm-linux-gnueabi, and using "make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- CC=arm-linux-gnueabi-gcc-4.5 -j9" make the kernel boot.

But I'm still screwed with my root fs, which doesn't bring X up anymore.

Will look at the logs, maybe reinstall the root fs

EDIT : Confirmed, my root fs is totaly screwed. I'm trying to force a fsck.ext3 on it, to see if it can be saved.

EDIT: Rebuilding my rootfs, too much error on it, better start a fresh one.

EDIT: Well... rebuild my rootfs, it boots up but it is still not usable. Too laggy to be able to do anything, and it hangs after nearly 1mn :/
[Gen8 Android Development] grim-a101:
I give up on the Ubuntu rootfs that you provide (but once again, thanks for that).

I'm starting to try to build my own, with help of qemu and the UbuntuCore rootfs as a start.

I follow this if someone want to try and build is own:

http://evenchick.com/articles/networking-and-x-in-ubuntu-core/

(A link to "how to make the rootfs UbuntuCore" is provided in this link)

I'll install xdm and xfce for a start, and see if I can boot it on the a101
[Gen8 Android Development] grim-a101:
Yes I think so, and as much as I've seen, the "full sized one" is not even powered. Nothing in the syslog or the kern.log appear when I plug/unplug anything to it.

For what I see in the archos kernel, it *should* be using the same musb_hdrc module, but our don't have the mode_default parameter, or is not build with... and that's what I looking after right now.

BTW, I made a "working" xfce rootfs (no wireless no BT or anything). This was very instructive, then I thought "Why ain't I using qemu to install gnome-session-fallback to TouchPad rootfs?", and that's what I am doing :D
[Gen8 Android Development] grim-a101:
I think I have a starting point for the a101 Host port.

Something in the archos-gpl kernel that is not in our kernel:

arch/arm/mach-omap2/board-archos-a10it.c

static int archos_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio)
{
// dc_detect is pmic's gpio_0
charge_config.rev[hardware_rev].gpio_dc_detect = gpio + 0;

/* USB_ID */
if ( hardware_rev > 1 ) {
/* USB_ID also on PMIC GPIO_1 */
/* we seem to be able to modify the plat data from here */
board_usb_data.gpio_usb_id = gpio + 1;

gpio_request(board_usb_data.gpio_usb_id, "USB_ID");
gpio_direction_input(board_usb_data.gpio_usb_id);
/* check - do we need to change pullup/pulldown configuration? */
board_usb_data.usb_id_irq = gpio_to_irq(board_usb_data.gpio_usb_id);
}
return 0;
}

where we just have

static int archos_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio)
{
// dc_detect is pmic's gpio_0
charge_config.rev[hardware_rev].gpio_dc_detect = gpio + 0;
return 0;
}

Would this "USB_ID also on PMIC GPIO_1" won't be our Host port?

Obviously, copy/paste this "missing" code doesn't work, as board_usb_data.gpio_usb_id doesn't exist in our kernel. Need to investigate a little more to see how we can adapt this piece of code to our kernel.

BTW, still can't boot up my TPRootFS with gnome-session-fallback on it... Xorg complaining about not finding omapfb driver... don't know why

EDIT: A quick look over the a101it datasheets seems to invalidate previous idea. In fact, it seems that the host port is only managed by OHCI/EHCI drivers, and not the musb_hdrc one. So maybe we miss an option on that in .config

EDIT: I may have found it (I said "may" because I once again screwed up my rootfs and rebuilding it right now). Thanks (once again) to scholbert here : http://xdaforums.com/showpost.php?p=22741407&postcount=106

I found an ULPI option in kernel menuconfig that compiles just fine... so maybe...

EDIT: No luck with CONFIG_USB_ULPI :(

EDIT: I've installed usbutils, to see what lsusb can see, and here it is

root@TouchPadBuntu:/var/log# lsusb
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 227d:0a1a
root@TouchPadBuntu:/var/log#

If I understand correctly what scholbert said, we should see 3 hub, and not 2. 1 for the touchscreen (Bus 001, with devid 002 for the ts), 1 for the microUSB OTG (Bus 002) and 1 for the USB Host port (missing here).
[Gen8 Android Development] divx118:
Hmm I thought:

OTG is the same as Host, you can't use both at the same time. On the old kernel you have to switch the modes by passing a parameter to the module.

For using the host port (big port on the A101)

insmod /lib/modules/musb_hdrc.ko mode_default=2

For using the micro usb port to connect to your PC.

insmod /lib/modules/musb_hdrc.ko mode_default=1

divx118
[Gen8 Android Development] grim-a101:
That was the first thing I looked at, but this is true with the android kernel.

With the one that we use for Ubuntu, there is no such thing as mode_default parameter to the musb_hdrc :(

I'll have a closer look at the archos kernel musb_hdrc.c to see what this parameter exactly do, and see if I can hardcode the mode_default=2 in the Ubuntu one.
[Gen8 Android Development] CalcProgrammer1:
The musb_hdrc module still exists, it's just compiled in rather than an external module (and I've tried making it a module, doesn't work). There are sysfs entries for the modes that you can try writing to.
[Gen8 Android Development] grim-a101:
I know it still exists, but :

grep MODULE_PARM_DESC musb_core.c
MODULE_PARM_DESC(debug, "Debug message level. Default = 0");
MODULE_PARM_DESC(fifo_mode, "initial endpoint configuration");
MODULE_PARM_DESC(use_dma, "enable/disable use of DMA");

while in the archos kernel:

grep MODULE_PARM_DESC musb_core.c
MODULE_PARM_DESC(debug, "Debug message level. Default = 0");
MODULE_PARM_DESC(fifo_mode, "initial endpoint configuration");
MODULE_PARM_DESC(mode_default, "default usb role: 1 - host, 2 - peripheral");
MODULE_PARM_DESC(use_dma, "enable/disable use of DMA");

The Ubuntu kernel use "musb->board_mode = plat->mode;" where archos one use "musb->board_mode = mode_default;"

Try to set musb->board_mode=MUSB_HOST to see if it changes anything.

EDIT: No change, nothing new in the dmesg, even with something plug before power on

Can't find them. If they are supposed to be inside /proc/bus/usb mine is desparatly empty, as it is from the begining

EDIT : If it is in /sys/modules/musb_hdrc/parameters then no luck:

root@TouchPadBuntu:/# ls /sys/module/musb_hdrc/parameters/
debug
[Gen8 Android Development] grim-a101:
I think that EHCI (ehci-omap.c) is the key.

As scholbert wrote, the musb driver should be only used for the MicroUSB port.

OHCI for the touchscreen and EHCI/OHCI for the host port.

But I only see OHCI initialization in the dmesg, not EHCI and I really think that the problem is here.

As for the mode_default of musb_hdrc, maybe that if musb_hdrc is in peripheral mode, the EHCI can't activate host, and that's why it works on CM (EHCI is ready, but blocked by musb_hdrc).

I'll not have much time this w.e to work on this, but I'll not drop it so easely :D

EDIT: To "confim" what I thought, I add some debug line inside drivers/base/platform.c, in platform_driver_register, in drivers/usb/ohci-omap3.c and drivers/usb/ehci-omap.c in each probe function.

[ 8.748657] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 8.749450] ehci_hcd: block sizes: qh 60 qtd 96 itd 160 sitd 96
[ 8.750213] Grim: PFRegister : ehci-omap
[ 8.751129] Grim EHCI:0
[ 8.751464] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 8.752227] ohci_hcd: block sizes: ed 64 td 64
[ 8.752777] Grim: PFRegister : ohci-omap3
FORGET A \n HERE Grim OHCI OMAP3 probing
[ 8.753631] ohci-omap3 ohci-omap3.0: starting TI OHCI USB Controller
[ 8.754516] ohci-omap3 ohci-omap3.0: TLL reset done
[ 8.755126] ohci-omap3 ohci-omap3.0: OMAP3 ES version > ES2.1
[ 8.756134] ohci-omap3 ohci-omap3.0: UHH setup done, uhh_hostconfig=181c
[ 8.756958] ohci-omap3 ohci-omap3.0: OMAP3 OHCI Host Controller

As we can see, the ehci-omap is registered but never probed, while the ohci is registered AND probed.

I really think that not ehci probing done is our real issue here.

(the "[ 8.751129] Grim EHCI:0" is the retval of platform_driver_register of ehci-omap)

EDIT : found out that ehci-omap seems not to be declared/found on the bus. I can see in the loop, while the kernel test for match device/driver musb-hdrc, followed by ochi-omap3 but then... no ehci-omap which SHOULD be there...

Disabling CONFIG_USB_OHCI_HCD make ochi-omap3 disapear from that loop, but echi-omap doesn't appear for much. Declaration seems to be done in arch/arm/mach-omap2/usb-ehci.c for both ehci and ohci. Need to compare ehci base_addr in archos kernel and our.... later, got to go.

EDIT: Forget about ehci... I just check on divx118 rom, and the USB Host is attached to bus 1, managed by musb-hdrc... so back to square 1, why our won't power up the port...

BTW divx118, the option to change the language of an external keyboard is not there on your rom :D
[Gen8 Android Development] grim-a101:
Just for the record, in order to make musb_hdrc as module, you have to set:

CONFIG_USB_MUSB_HDRC=m (obviously ...) and CONFIG_USB_GADGET=m and it compiles.

If you want to add a gadget module, you get

error: implicit declaration of function ‘msleep’

Just "#include <linux/delay.h>" into the .c file that generate the error and it compiles fine

But even in module, the HOST port doesn't work :(

I don't know were to search anymore...
[Gen8 Android Development] divx118:
If you have some specific questions, just join irc://irc.freenode.net/openpma or use the webclient http://www.openaos.org/chat there are some archos and other skilled people around. They mostly don't read forum posts.

Never looked at it, I will check thanks :)

divx118
[Gen8 Android Development] CalcProgrammer1:
Thanks for the info about making it a module, I suppose the issue was the USB_GADGET, was not setting that to M when I had the errors.

Agreed with divx118 on joining #openpma, very helpful place for Archos questions.
[Gen8 Android Development] grim-a101:
Thanks for the info, I'll not be able to get there till Tuesday at least, but I'll for sure ;)
[Gen8 Android Development] grim-a101:
I found a 3.1.0 kernel for (only :() the A101:

http://gitorious.org/archos-a101-linux-omap

I get it compiled, and it boots up Ubuntu.

About mmcblk, mmcblk0 is the system drive, mmcblk1 is the "user drive" and mmcblk2 is the SD Card (so even with no SDCard, the dev id doesn't change)

It as a havon driver for the TS, but it didn't work (maybe xorg.conf issue, don't know), so I applied the hid-ids.h and hid-multitouch patch and it works.

Going to play with the musb to see if I get better result from this 3.1.0.

EDIT:

Get musb_hdrc compiled as module, but on modprobing it : FATAL, no such device.

I wonder if 1 day, I will have this Host port working

EDIT: have to modprobe omap2340 before musb_hdrc, but even with that, still no luck
[Gen8 Android Development] CalcProgrammer1:
Awesome find, I might try playing with that on A43, should only be a matter of forward-porting the A43 board file and LCD files to get basic support. The downside is the LCD uses DSI instead of DPI, but the new omapdss driver should support DSI natively if I could figure out how it works.

The newer the kernel, the better in my opinion, as long as everything works.

EDIT: That's a very clean board file! Hopefully it will be relatively easy to port, most of the GPIO's are the same between different gen8's but some aren't I think.

EDIT 2: I've started forward-porting the A43 board file to the new format. The big issue here is the LCD panel, hopefully I can get the board file itself working before I take on porting the driver itself

On the A101, does the Power LED flash with this kernel? The board file initializes the LED to "heartbeat" mode which should cause it to blink, indicating that the system is functional. This would be highly useful with the LCD unavailable.
[Gen8 Android Development] grim-a101:
As I reply to you on irc, no, the led doesn't blink, it just stay "on".

I've tried lots of things to get this USB host port working, but still no luck.

I've tried forcing the plat->mode to 1 (and the musb->board_mode to 1), forcing the extvbus to 1 also, adding lot's of debug to see where the initialisation goes (and doesn't) and I still have no idea why it still doesn't work.

I have no vbus, no power is transmited to the USB port whatever I change.

I tried to plug a powered usb hub, just to be sure that it is not only a vbus issue, but even with the external power, no syslog reaction when I plug anything to it.

I have to say, i'm a bit lost and don't know where to search anymore :(
[Gen8 Android Development] CalcProgrammer1:
Could you recompile the 3.0 kernel with CONFIG_LED_TRIGGERS enabled? I think it was disabled in the default config. Also CONFIG_LED_TRIGGER_HEARTBEAT (or something like that, might be CONFIG_TRIGGER_HEARTBEAT) enabled. Then see if the power LED blinks. I'd really like to have this running on the A43 and the power LED blinking is probably an important step as I want to make sure it's booting before I try messing with the LCD.
[Gen8 Android Development] grim-a101:
Already tried, with no changes. I'll try to make it blink, and let you know.

For the LCD, if I have well looked, there is only the 101 LCD (BOE something) that is available within this firmware. I don't know what is the 43 LCD but if I remember well, it is not the same.

EDIT: Ok, I've enabled all the LEDS_TRIGGER

CONFIG_LEDS_TRIGGER_TIMER=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_BACKLIGHT=y
CONFIG_LEDS_TRIGGER_GPIO=y
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y

and now, it's heartbeating.
[Gen8 Android Development] CalcProgrammer1:
The A43 LCD is an LG FWVGA 4.3" display, the driver is lg_fwvga_43 or something like that. I figured I'd have to port the driver myself, which is going to be tricky as it's a MIPI DSI video mode display. Support for this display type was hacked in to 2.6.29 by Archos, though with 3.0 it should be supported officially, though the API is quite different and the driver will need modification.
[Gen8 Android Development] Mavasilisk:
Hope to see it running for 70IT. Rly cant wait for it on my tablet.

EDIT: I can help you with 70IT tests
[Gen8 Android Development] marxx:
Hi there

I have been playing around with my "new" Archos 43 whole day now and I finaly managed to get the SD kernel booting the TouchBuntu from SD card. This is a very, very slow process and not what I hoped to find :-(

I tried to put the rootfs on the internal storage under /mnt/storage. This did not work to boot. Neither with the "landscape" kernel, nor with the 90 degree kernel. With or without inserted SD card. Always kernel panic, the he can't find his rootfs.

Is there a little howtro around, where and how to put the rootfs on the internal storage?

I'm using firmware 2.4.83 and can boot rooted.

Thanx for any help.

Greetinx

marxx
[Gen8 Android Development] CalcProgrammer1:
You need to make a separate partition for Ubuntu. Putting the .tar.gz on /mnt/storage doesn't do anything. Boot the stock OS on your A43, plug it into Linux PC, and shrink your A43 storage partition by 4-8GB, then make the freed space into an ext3 partition for Ubuntu. Un-tar the rootfs tar.gz file into this partition. Then it might work (if it doesn't work, it's because the partition number is incorrect, the only solution at the moment is to recompile the kernel and change the partition number in the .config file). I want to say it's /dev/mmcblk2p2? If you have an sdcard inserted then that becomes /dev/mmcblk0 and internal system mmcblk1 and internal storage mmcblk2. If you do not have the SD card inserted, internal system is mmcblk0 and internal storage mmcblk1.
[Gen8 Android Development] marxx:
Thanx a lot!

This was the hint I needed. I was a bit blind after a day staring at the small screen :-)

What I did is, that I hooked up the Android system over USB to a linux machine. Then I ran fdisk on the linux machine on /dev/sdb (in my case the A43 USB disk, might be different for readers, this deletes all data on the internal storage!). Here I deleted all partitions and set up 3 primary partations. First FAT32 (8GB), second linux swap (250 MB) and third ext3 (rest). With mkfs.ext3 on sdb3 and mkfs.vfat on sdb1 I created the filesystems. After that I mounted sdb3 on the linux machine and extracted the rootfs there.

Brilliant it boots your kernel with kboot from the internal storage. Finally I can play around with this great work of yours. First step setting up the swap :-)

Thanx

marxx
[Gen8 Android Development] marxx:
I had a bit time to play with Ubuntu on my Archos 43 now.

Here is what I did till now.

First I set up my swap partition. My /etc/fstab looks now like this:

proc /proc proc defaults 0 0
/dev/mmcblk1p4 /media/data ext3 defaults 0 0
/dev/mmcblk1p2 /media/system ext3 defaults 0 0
/dev/mmcblk2p2 swap swap defaults 0 0

Don't really know if it works though (the system is still slow) ...

Second I set up auto login, because I had no keyboard. I created a folder called /etc/lightdm. Booted Ubuntu and shutted Ubuntu down again. After that I had a file called /etc/lightdm/lightdm.conf. I edited it like this:

[SeatDefaults]
autologin-user=ubuntu
autologin-user-timeout=0
greeter-session=unity-greeter
user-session=ubuntu

Now I had auto login :-) Next I wanted to have landscape screen orientation. Therefor I took the landscape kernel from post #1 and set up a file called /etc/X11/xorg.conf.d/99-calibration.conf

Section "InputClass"
Identifier "calibration"
MatchProduct "ADS784x Touchscreen"
Option "Calibration" "519 3867 648 4333"
Option "InvertY" "True"
Option "SwapAxes" "True"
EndSection

With this I have a usable (not perfect) landscape touchscreen.

Last step was the touchscreen keyboard. For that I went to System Settings -> Universal Access -> Typing and turned the "Typing Assistent" on and checked the "Turn on accessability feature". Finally things got usable ...

The touchscreen needs still some fine tuning and I'm a bit disappointed about the overall performance, but it's still work in progress :-)

Greetinx

marxx
[Gen8 Android Development] grim-a101:
For what I've tested on the A101, you'd better not use Unity, but instead install gnome-session-fallback. It's really smoother than Unity.

For the On-Screen Keyboard, there is one already install, Onboard.

Grim

PS : not done any progress on A101 USB host, and not having much time now to keep finding why :/