Has anyone been able to compile the kernel?

FloRider

Senior Member
Dec 2, 2012
358
111
I followed these directions:
Development: A2109 Kernel development discussion - Lenovo Community

When I finally got everything set up correctly, tho, I got a compilation error:
arch/arm/mach-tegra/tegra3_speedo.c: In function 'tegra_init_speedo_data':
arch/arm/mach-tegra/tegra3_speedo.c:451:1: error: expected expression before '.' token
make[1]: *** [arch/arm/mach-tegra/tegra3_speedo.o] Error 1

I haven't looked at the file, but this source was supposed to compile, and I have to assume the above poster got it to work...
 

FloRider

Senior Member
Dec 2, 2012
358
111

FloRider

Senior Member
Dec 2, 2012
358
111
It's frustrating. It seems like I'm the one who always has problems. What sort of kernel mods are you considering?
 

Ravak

Member
Dec 5, 2012
37
8
I'd love to have USB Mass Storage... So far I've got the device "Connected as an Installer" by running in terminal:
echo 0 > /sys/devices/virtual/android_usb/android0/enable
echo "mass_storage,adb" > /sys/class/android_usb/android0/functions
echo 1 > /sys/devices/virtual/android_usb/android0/enable

Unfortunately with USB mass storage disabled in default kernel, my Linux box cannot enumerate the device:
[79861.838916] usb 1-6.4: new high-speed USB device number 11 using ehci_hcd
[79861.860702] usb 1-6.4: no configurations
[79861.860707] usb 1-6.4: can't read configurations, error -22
[79861.862671] hub 1-6:1.0: unable to enumerate USB device on port 4


Trying to build the kernel with:
CONFIG_USB_MASS_STORAGE=y
doesn't work, as it reverts back to "not set".

I'm totally new at this, it's my first time playing with Android kernel/OS - any idea what values CONFIG_USB_MASS_STORAGE accepts?
 

FloRider

Senior Member
Dec 2, 2012
358
111
I'd love to have USB Mass Storage... So far I've got the device "Connected as an Installer" by running in terminal:


Unfortunately with USB mass storage disabled in default kernel, my Linux box cannot enumerate the device:



Trying to build the kernel with:

doesn't work, as it reverts back to "not set".

I'm totally new at this, it's my first time playing with Android kernel/OS - any idea what values CONFIG_USB_MASS_STORAGE accepts?

You mean "mass storage" as in a hard drive?
 

Ravak

Member
Dec 5, 2012
37
8
Yes. I don't like MTP/PTP modes ;)

And as the update, this prevents me from adding USB mass storage:
.config:2518:warning: override: USB_G_ANDROID changes choice state
 
Last edited:

FloRider

Senior Member
Dec 2, 2012
358
111
CONFIG_USB_MASS_STORAGE may have a dependency "above" it. Usually it will tell you during the config. I'll take a look at the config files now.

Edit: Ok, that was a waste of time. I looked at a fresh extract, and I think I need to build the configs first. Have you tried make tegra3_android_defconfig menuconfig?
 
Last edited:

Ravak

Member
Dec 5, 2012
37
8
CONFIG_USB_MASS_STORAGE may have a dependency "above" it. Usually it will tell you during the config. I'll take a look at the config files now.

Found the block, it's in drivers/usb/gadget/Kconfig:
config USB_MASS_STORAGE tristate "Mass Storage Gadget"
depends on BLOCK
help
The Mass Storage Gadget acts as a USB Mass Storage disk drive.
As its storage repository it can use a regular file or a block
device (in much the same way as the "loop" device driver),
specified as a module parameter or sysfs option.


This driver is an updated replacement for the deprecated
File-backed Storage Gadget (g_file_storage).


Say "y" to link the driver statically, or "m" to build
a dynamically linked module called "g_mass_storage".


Will play with it later then. Any progress with your build environment? Maybe it's Codesource at fault - did you install ia32-libs?
 
Last edited:

Ravak

Member
Dec 5, 2012
37
8
I just pulled the whole pack:
Code:
apt-get install ia32-libs

Without it, the CodeSourcery wouldn't even install on 64bit distribution.

Another idea, after you changed to Codesource (I saw you initially using something different on the other forum) did you "make clean" it?
 

FloRider

Senior Member
Dec 2, 2012
358
111
I just pulled the whole pack:
Code:
apt-get install ia32-libs

Without it, the CodeSourcery wouldn't even install on 64bit distribution.

Another idea, after you changed to Codesource (I saw you initially using something different on the other forum) did you "make clean" it?

Hmm... well, it installed. And I don't think I need to do a make clean since I wiped the dir and did a fresh source extract.
 

Ravak

Member
Dec 5, 2012
37
8
What's inside you tegra3_speedo.c file?
Code:
arch/arm/mach-tegra/tegra3_speedo.c:451:1: error: expected expression before '.' token

In my case there's no . anywhere that line:
Code:
450:        }
451:        core_process_id = iv -1;
452:
453:        if (core_process_id == -1) {
 
Last edited:

FloRider

Senior Member
Dec 2, 2012
358
111
LOL! "..,,,,. core_process_id = iv -1;"!
WTH? Well, now I know what to do. I don't get it. I am using a tar of the source. Somehow it got fouled up.
 
Top