[ANNOUNCE] Tiny Core Linux 3.4 for XO-1.5

2011-01-05 Thread James Cameron
Announcing a build of Tiny Core Linux for XO-1.5 based on the kernel
from OLPC OS 10.1.3 build os361.

I've found this useful for testing and diagnosis without touching the
internal storage.  I've added a few scripts for backing up and
restoring.

Features:

- based on Tiny Core Linux 3.4 microcore variant, configured for a
  single root shell in text mode,

- uses the OLPC kernel, for hardware support,

- includes the wireless firmware shipped with OLPC builds, and binary
  redistribution of wireless tools from the same builds,

- includes xo-backup, xo-repart, and xo-restore scripts, (these may be
  destructive, look at them first),


Downloads:

http://dev.laptop.org/~quozl/tinycore/

164049655ce326f59ea01aa6334da4a5  microcore-3.4-xo-1.5-2011-01-06.tar

Instructions:

a.  unpack the tar file, on a FAT or ext2 formatted USB drive,
 
cd /media/FRED
tar xf microcore-3.4-xo-1.5-2011-01-06.tar

b.  boot the laptop from the drive.


References:

1.  Tiny Core Linux
http://www.tinycorelinux.com/

2.  mktinycorexo script
http://dev.laptop.org/~quozl/mktinycorexo/

3.  mktinycorexo script git repository
git clone http://dev.laptop.org/~quozl/mktinycorexo/.git

-- 
James Cameron
http://quozl.linux.org.au/


signature.asc
Description: Digital signature
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Dextrose] Problems compiling bluetooth module

2011-01-05 Thread Chris Ball
Hi,

   > The version of gcc might take part in computing the magic number.
   > 
   > The idea is to prevent users from causing hard to diagnose bugs
   > by inadvertently loading modules that aren't 100% ABI compatible
   > with the running kernel.

It might, but it doesn't -- see include/linux/vermagic.h's VERMAGIC_STRING.

- Chris.
-- 
Chris Ball   
One Laptop Per Child
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Dextrose] Problems compiling bluetooth module

2011-01-05 Thread Bernie Innocenti
On Wed, 2011-01-05 at 14:43 -0600, Mikus Grinbergs wrote:
> Each kernel has something I might call a "magic handle".  [I do not know
> how that value is constructed - but I suspect that vermagic is only
> *part* of that value.]
> 
> When a module needs to be dynamically loaded into the kernel, the (my
> name) "magic handle" for the include libraries with which that module
> was compiled must match the "magic handle" of the running kernel.  If
> they don't - the result is the "Invalid module format" message.
> 
> Some months ago I tried my best to compile a driver and add it to the
> os852 build - but no matter how careful I was - I could NOT satisfy that
> "magic handle" comparison when it came time to load that driver.  [I
> ended up recompiling the whole kernel (now having the missing driver
> specified as part of the configuration for this kernel's compile).]

The version of gcc might take part in computing the magic number.

The idea is to prevent users from causing hard to diagnose bugs by
inadvertently loading modules that aren't 100% ABI compatible with the
running kernel.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Problems compiling bluetooth module

2011-01-05 Thread Mikus Grinbergs
Each kernel has something I might call a "magic handle".  [I do not know
how that value is constructed - but I suspect that vermagic is only
*part* of that value.]

When a module needs to be dynamically loaded into the kernel, the (my
name) "magic handle" for the include libraries with which that module
was compiled must match the "magic handle" of the running kernel.  If
they don't - the result is the "Invalid module format" message.

Some months ago I tried my best to compile a driver and add it to the
os852 build - but no matter how careful I was - I could NOT satisfy that
"magic handle" comparison when it came time to load that driver.  [I
ended up recompiling the whole kernel (now having the missing driver
specified as part of the configuration for this kernel's compile).]

mikus

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Dextrose] Problems compiling bluetooth module

2011-01-05 Thread Bernie Innocenti
On Wed, 2011-01-05 at 17:20 -0200, Emiliano Pastorino wrote:
> Anything suspicious in the output of dmesg/
>  
> kernel: [ 4892.710548] bluetooth: no symbol version for module_layout


Hmm... can you verify that the stuff in .config of the kernel sources
actually matches the stuff in /boot/config-2.6.31* of your XO?

> > vermagic:   2.6.31.6 preempt mod_unload modversions
> GEODE 4KSTACKS
> >
> 
> Do these things match your running kernel?
> 
> 
>  I'm running 2.6.31_xo1-20100701.1605.1.olpc.a8f1b26, that's all I
> know

What does "uname -a" print?

You might be running a newer or older kernel, or a kernel configured
differently.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Dextrose] Problems compiling bluetooth module

2011-01-05 Thread Emiliano Pastorino
>
> Anything suspicious in the output of dmesg/
>

kernel: [ 4892.710548] bluetooth: no symbol version for module_layout

> vermagic:   2.6.31.6 preempt mod_unload modversions GEODE 4KSTACKS
> >
> Do these things match your running kernel?
>

 I'm running 2.6.31_xo1-20100701.1605.1.olpc.a8f1b26, that's all I know


> --
>   // Bernie Innocenti - http://codewiz.org/
>  \X/  Sugar Labs   - http://sugarlabs.org/
>
>


-- 
Ing. Emiliano Pastorino
Plan Ceibal
Av. Italia 6201 CP: 11500, Montevideo, Uruguay
Tel: (598) 2 601 5773 int.: 2232
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Dextrose] Problems compiling bluetooth module

2011-01-05 Thread Bernie Innocenti
On Wed, 2011-01-05 at 16:12 -0200, Emiliano Pastorino wrote:

> Then, when i execute "insmod net/bluetooth/bluetooth.ko", I get:
> insmod: error inserting 'net/bluetooth/bluetooth.ko': -1 Invalid
> module format

Anything suspicious in the output of dmesg/


> vermagic:   2.6.31.6 preempt mod_unload modversions GEODE 4KSTACKS
> 
Do these things match your running kernel?

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Problems compiling bluetooth module

2011-01-05 Thread Emiliano Pastorino
I've forgot to mention that I get this warning when compiling the modules:

WARNING: Symbol version dump
/home/root/rpmbuild/SOURCES/linux-2.6.31/Module.symvers
   is missing; modules will have no dependencies and modversions.

On Wed, Jan 5, 2011 at 4:12 PM, Emiliano Pastorino <
epastor...@plan.ceibal.edu.uy> wrote:

> Hi, it's me again with new problems.
>
> I'm trying to compile the bluetooth modules again, but now I've new issues.
> When I try to insmod any module, I get the same error:
>
> insmod: error inserting 'net/bluetooth/bluetooth.ko': -1 Invalid module
> format
>
> I'm working on an XO-1 with a Dextrose based build, using kernel 2.6.31.
> uname -r shows this:
>
> 2.6.31_xo1-20100701.1605.1.olpc.a8f1b26
>
> and rpm -qa | grep kernel this:
>
> kernel-firmware-2.6.31_xo1-20100701.1605.1.olpc.a8f1b26.i586
> kernel-devel-2.6.31_xo1-20100701.1605.1.olpc.a8f1b26.i586
> kernel-2.6.31_xo1-20100701.1605.1.olpc.a8f1b26.i586
> kernel-headers-2.6.31_xo1-20100701.1605.1.olpc.a8f1b26.i586
>
> I've downloaded kernel-2.6.31_xo1-20100701.1605.1.olpc.a8f1b26.src.rpm
> from http://dev.laptop.org/~kernels/olpc-2.6.31-xo1/ and installed it.
>
> The steps I followed were the same as with the 2.6.25 kernel, with little
> modifications since now there's a configuration for XO-1.5 also:
>
> make ARCH=i386 INSTALL_MOD_STRIP=1* xo_1_defconfig*
>
> make ARCH=i386 INSTALL_MOD_STRIP=1 menuconfig
> there, I activated bluetooth
> make ARCH=i386 INSTALL_MOD_STRIP=1 M=net/bluetooth
>
> Then, when i execute "insmod net/bluetooth/bluetooth.ko", I get:
> insmod: error inserting 'net/bluetooth/bluetooth.ko': -1 Invalid module
> format
>
> modinfo net/bluetooth/bluetooth.ko shows:
>
> filename:   net/bluetooth/bluetooth.ko
> alias:  net-pf-31
> license:GPL
> version:2.15
> description:Bluetooth Core ver 2.15
> author: Marcel Holtmann 
> srcversion: 934DDFF641FDE73DF4A50F3
> depends:
> vermagic:   2.6.31.6 preempt mod_unload modversions GEODE 4KSTACKS
>
> so bluetooth.ko can't be just garbage.
>
> I'm getting the same behaviour with all the other modules from
> net/bluetooth
> and drivers/bluetooth.
>
> Any clues?
>
> Thanks
>
> On Fri, Aug 28, 2009 at 5:01 PM, Emiliano Pastorino <
> epastor...@plan.ceibal.edu.uy> wrote:
>
>> OK, it worked.
>> This is what I did:
>>
>> make ARCH=i386 INSTALL_MOD_STRIP=1 olpc_defconfig
>> make ARCH=i386 INSTALL_MOD_STRIP=1 menuconfig
>> there, I activated bluetooth
>> make ARCH=i386 INSTALL_MOD_STRIP=1 modules
>> make ARCH=i386 INSTALL_MOD_STRIP=1 modules_install
>>
>> modules compiled and ?worked?
>>
>> well, it seems I need /usr/sbin/bluetoothd provided by bluez,
>> but there's no bluez package avaiable, so I'll try to compile
>> the source code and see what happens...
>>
>> I'll tell you whether I succeeded or not
>>
>> thanks!
>>
>>
>> On Fri, Aug 28, 2009 at 12:25 PM, Paul Fox  wrote:
>>
>>> emiliano wrote:
>>>  > Hi everyone!
>>>
>>> hi emiliano --
>>>
>>>  >
>>>  > I have a USB Bluetooth adapter and I need to make it work on an XO.
>>>  > Don't want to recompile the whole kernel but to compile only the
>>> kernel
>>>  > module.
>>>
>>> it's probably easier to compile the whole thing, and then just use
>>> the resulting module.
>>>
>>>  >
>>>  > I've never done this, so maybe I'm missing something...
>>>  > The module I'm trying to compile is "btusb" (I hope this is the one I
>>> need).
>>>  > I'm using kernel 2.6.25-20090223.1.olpc.69098d87d56945c, so I got
>>>  > the corresponding src.rpm from
>>> http://dev.laptop.org/~dilinger/testing/.
>>>  > I've also installed kernel-devel, kernel-headers, gcc, glibc,
>>> glibc-devel,
>>>  > glibc-headers and make in my XO (maybe I forgot others).
>>>  >
>>>  > I moved to /usr/src/redhat/SOURCES/linux-2.6.25/drivers/bluetooth
>>>  > and edited Makefile so it looks like this:
>>>
>>> don't do that.  at the top level directory, run "make menuconfig".
>>> navigate to Network->Bluetooth and Network->Bluetooth->Bluetooth Drivers.
>>> enable what you need.  when in doubt, turn it on -- you don't
>>> have to put the module on your XO, but if you need it, you'd
>>> rather not build again.
>>>
>>> after saving your new config, type "make".
>>>
>>> paul
>>>
>>>  >
>>>  > obj-m := btusb.o
>>>  >
>>>  > KDIR := /lib/modules/$(shell uname -r)/build
>>>  > PWD := $(shell pwd)
>>>  >
>>>  > default:
>>>  > $(MAKE) -C $(KDIR) M=$(PWD) modules
>>>  >
>>>  > Then I ran make but I get 5 warnings about functions which aren't
>>>  > defined: hci_recv_fragment, hci_register_dev, hci_alloc_dev,
>>>  > hci_free_dev and hci_unregister_dev. Those functions are defined
>>>  > in /usr/src/kernels/2.6.25/include/net/bluetooth/hci_core.h
>>>  >
>>>  > I've successfully compiled the module in my desktop PC, but it
>>>  > won't compile in my XO. Actually, it does compile, but when I
>>>
>>> it's likely that module relationships between the kernel versions
>>> you're bu

Re: Problems compiling bluetooth module

2011-01-05 Thread Emiliano Pastorino
Hi, it's me again with new problems.

I'm trying to compile the bluetooth modules again, but now I've new issues.
When I try to insmod any module, I get the same error:

insmod: error inserting 'net/bluetooth/bluetooth.ko': -1 Invalid module
format

I'm working on an XO-1 with a Dextrose based build, using kernel 2.6.31.
uname -r shows this:

2.6.31_xo1-20100701.1605.1.olpc.a8f1b26

and rpm -qa | grep kernel this:

kernel-firmware-2.6.31_xo1-20100701.1605.1.olpc.a8f1b26.i586
kernel-devel-2.6.31_xo1-20100701.1605.1.olpc.a8f1b26.i586
kernel-2.6.31_xo1-20100701.1605.1.olpc.a8f1b26.i586
kernel-headers-2.6.31_xo1-20100701.1605.1.olpc.a8f1b26.i586

I've downloaded kernel-2.6.31_xo1-20100701.1605.1.olpc.a8f1b26.src.rpm
from http://dev.laptop.org/~kernels/olpc-2.6.31-xo1/ and installed it.

The steps I followed were the same as with the 2.6.25 kernel, with little
modifications since now there's a configuration for XO-1.5 also:

make ARCH=i386 INSTALL_MOD_STRIP=1* xo_1_defconfig*
make ARCH=i386 INSTALL_MOD_STRIP=1 menuconfig
there, I activated bluetooth
make ARCH=i386 INSTALL_MOD_STRIP=1 M=net/bluetooth

Then, when i execute "insmod net/bluetooth/bluetooth.ko", I get:
insmod: error inserting 'net/bluetooth/bluetooth.ko': -1 Invalid module
format

modinfo net/bluetooth/bluetooth.ko shows:

filename:   net/bluetooth/bluetooth.ko
alias:  net-pf-31
license:GPL
version:2.15
description:Bluetooth Core ver 2.15
author: Marcel Holtmann 
srcversion: 934DDFF641FDE73DF4A50F3
depends:
vermagic:   2.6.31.6 preempt mod_unload modversions GEODE 4KSTACKS

so bluetooth.ko can't be just garbage.

I'm getting the same behaviour with all the other modules from net/bluetooth
and drivers/bluetooth.

Any clues?

Thanks

On Fri, Aug 28, 2009 at 5:01 PM, Emiliano Pastorino <
epastor...@plan.ceibal.edu.uy> wrote:

> OK, it worked.
> This is what I did:
>
> make ARCH=i386 INSTALL_MOD_STRIP=1 olpc_defconfig
> make ARCH=i386 INSTALL_MOD_STRIP=1 menuconfig
> there, I activated bluetooth
> make ARCH=i386 INSTALL_MOD_STRIP=1 modules
> make ARCH=i386 INSTALL_MOD_STRIP=1 modules_install
>
> modules compiled and ?worked?
>
> well, it seems I need /usr/sbin/bluetoothd provided by bluez,
> but there's no bluez package avaiable, so I'll try to compile
> the source code and see what happens...
>
> I'll tell you whether I succeeded or not
>
> thanks!
>
>
> On Fri, Aug 28, 2009 at 12:25 PM, Paul Fox  wrote:
>
>> emiliano wrote:
>>  > Hi everyone!
>>
>> hi emiliano --
>>
>>  >
>>  > I have a USB Bluetooth adapter and I need to make it work on an XO.
>>  > Don't want to recompile the whole kernel but to compile only the kernel
>>  > module.
>>
>> it's probably easier to compile the whole thing, and then just use
>> the resulting module.
>>
>>  >
>>  > I've never done this, so maybe I'm missing something...
>>  > The module I'm trying to compile is "btusb" (I hope this is the one I
>> need).
>>  > I'm using kernel 2.6.25-20090223.1.olpc.69098d87d56945c, so I got
>>  > the corresponding src.rpm from
>> http://dev.laptop.org/~dilinger/testing/.
>>  > I've also installed kernel-devel, kernel-headers, gcc, glibc,
>> glibc-devel,
>>  > glibc-headers and make in my XO (maybe I forgot others).
>>  >
>>  > I moved to /usr/src/redhat/SOURCES/linux-2.6.25/drivers/bluetooth
>>  > and edited Makefile so it looks like this:
>>
>> don't do that.  at the top level directory, run "make menuconfig".
>> navigate to Network->Bluetooth and Network->Bluetooth->Bluetooth Drivers.
>> enable what you need.  when in doubt, turn it on -- you don't
>> have to put the module on your XO, but if you need it, you'd
>> rather not build again.
>>
>> after saving your new config, type "make".
>>
>> paul
>>
>>  >
>>  > obj-m := btusb.o
>>  >
>>  > KDIR := /lib/modules/$(shell uname -r)/build
>>  > PWD := $(shell pwd)
>>  >
>>  > default:
>>  > $(MAKE) -C $(KDIR) M=$(PWD) modules
>>  >
>>  > Then I ran make but I get 5 warnings about functions which aren't
>>  > defined: hci_recv_fragment, hci_register_dev, hci_alloc_dev,
>>  > hci_free_dev and hci_unregister_dev. Those functions are defined
>>  > in /usr/src/kernels/2.6.25/include/net/bluetooth/hci_core.h
>>  >
>>  > I've successfully compiled the module in my desktop PC, but it
>>  > won't compile in my XO. Actually, it does compile, but when I
>>
>> it's likely that module relationships between the kernel versions
>> you're building for your desktop, and for your XO.
>>
>> paul
>>
>>  > run "insmod btusb.ko" it gives an error about the above symbols
>>  > being undefined.
>>  >
>>  > Any tips? Am I missing something like defining a path?
>>  >
>>  > Thanks!
>>  > Emiliano
>>  > part 2 text/plain 129
>>  > ___
>>  > Devel mailing list
>>  > Devel@lists.laptop.org
>>  > http://lists.laptop.org/listinfo/devel
>>
>> =-
>>  paul fox, p...@laptop.org
>>