Community
cancel
Showing results for 
Search instead for 
Did you mean: 
TUtt
New Contributor I
3,013 Views

Reconfiguring Linux kernel and adding drivers into Galileo's Linux image

Hi everyone,

Im trying to get a mini PCIe http://www.telit.com/products/product-service-selector/product-service-selector/show/product/he910-m... Telit HE 910 modem to work with my Galileo gen2.

I've tried to connect the modem to the back of the Galileo (mini PCIe) without any satisfying result.

My plan now is to add the http://lxr.free-electrons.com/source/drivers/net/usb/cdc_ether.c?v=3.16 cdc_ether.c driver to the kernel configuration using Yoctos BSP.

I've checked and seen that the driver gets the modem to work on other systems.

The driver can be found in later versions of the Linux kernel, but all the Galileo images available uses the Linux 3.8.7 kernel where the http://lxr.free-electrons.com/source/drivers/net/usb/cdc_ether.c?v=3.16 cdc_ether.c isn't included.

I've chosen to try to add the driver into the Linux image by following AlexT_Intel guide http://alextgalileo.altervista.org/blog/reconfiguring-linux-kernel-adding-drivers-galileos-linux-ima... Reconfiguring Linux kernel and adding drivers into Galileo's Linux image

 

and http://download.intel.com/support/processors/quark/sb/quark_bspbuildguide_329687_001.pdf Intels own guide

Question: Adding the driver

I think I've managed to compile everything once (with bitbake etc) without adding the driver.

The guides are a bit overwhelming (for a newbie like me) and i can't figure out how to include my driver before i compile etc.

Does anyone have any good guides or the energies to give me directions?

Specs:

Host computer - Ubuntu 12.04

Modem - He910 Telit mini Pcie

Board - Galileo gen2

Sorry if i got anything wrong, I'm quite new on the subject but thank you so much in advance for the help

/ Tor

Tags (1)
25 Replies
ssjoh
Novice
39 Views

Ok, Thanks. Then I can avoid the JAVA install as well... (which is always nice)

I made a simple script that includes that part and print PATH before and after.

# !/bin/bash

printenv PATH

export DEVKIT_HOME=`dirname $0`

echo ${DEVKIT_HOME}

echo "Relocating SDK"

${DEVKIT_HOME}/sdk-relocator/relocate_sdk.sh

echo "Setting variables"

export PATH=${DEVKIT_HOME}/devkit-x86/sysroots/x86_64-pokysdk-linux/usr/bin/i586-poky-linux/:$PATH

export POKY_HOME=${DEVKIT_HOME}/devkit-x86/sysroots/i586-poky-linux

echo $PATH

printenv PATH

When I run the script:

# ./test.sh

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

/opt/build/iotdk-ide-linux/.

Relocating SDK

Setting variables

/opt/build/iotdk-ide-linux/./devkit-x86/sysroots/x86_64-pokysdk-linux/usr/bin/i586-poky-linux/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

/opt/build/iotdk-ide-linux/./devkit-x86/sysroots/x86_64-pokysdk-linux/usr/bin/i586-poky-linux/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

#

But since the script will run in own process/shell the configuration it will set, won't reflect globally, only for that instance. So when it starts eclipse at the end of the original script it will enjoy the PATH changes, but these won't exists when the script exists, as can be seen below when I printout the PATH after the script has been executed.

# printenv PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

# echo $PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

#

I guess I should run it with "source test.sh", but it seems to give me new set of issues example the 'dirname' command.

So I modify the script to give me the commands, then I can copy/paste them manually.

# ./test.sh

Relocating SDK

PATH command:

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/build/iotdk-ide-linux/devkit-x86/sysroots/x86_64-pokysdk-linux/usr/bin/i586-poky-linux/

export POKY_HOME=/opt/build/iotdk-ide-linux/devkit-x86/sysroots/i586-poky-linux

#

I guess desktop linux would make the whole process easier...

Regards,

Sebastian

AT9
Honored Contributor II
39 Views

Well, you don't really need desktop here and you actually have all teh pieces at hand You need to source the script to see the changes in your shell, that you've already found and to avoid issues with dirname you can just hardcode the path to your devkit unpack location - it's unlikely going to change.

Brendan_L_Intel
Employee
185 Views

xthunderheartx unfortunately I don't really understand why you're having this issue. Those steps are exactly how we build the binary images we distribute on our autobuilder (we use the yocto autobuilder to build images). Are you having the same issue with the binary images or just the ones you're building?

DPose
New Contributor II
185 Views

Just the ones I build. The stock binary image works fine. And believe me I tried to follow your instructions to the letter. I though maybe their was some strange interaction with something I might have upgraded or installed or whatever so I even went back and tried with pristine host images. Same result. I kept the binaries I built laying around BTW if you are interested.

If you've actually built an image where you could properly debug with eclipse, by hand, using your instructions, then I'm at fault obviously. It's just that I really am a meticulous fellow and I don't get what I might be doing wrong. I thought *maybe* you might not have tested something as obscure (relatively) as debugging from eclipse on an image you would been expecting to work. I've certainly release things that way in the past.

Really just looking for someone to tell me if I'm in the weeds or not at this point. I think Alex (or is it Kurt?) is going to give it a try when he gets a chance.

Let me try it again and see if anything is different though I don't expect so. Are there any logs or other information that might be helpful? I know you guys are busy so if you can just give me some direction I'll try to figure it out myself or at least help do some of the drudgery.

Thanx for all your help!

DPose
New Contributor II
185 Views

Simple enough to understand:

AlexT_Intel you mentioned

AlexT_Intel wrote:

 

... there's an article on building the DevKit image, just search the forum.

If you are referring to Brendan's blog post here: https://software.intel.com/en-us/blogs/2015/03/04/creating-a-yocto-image-for-the-intel-galileo-board... https://software.intel.com/en-us/blogs/2015/03/04/creating-a-yocto-image-for-the-intel-galileo-board... I wouldn't suggest that. It's broken as I've pointed out recently in dedicated thread. The image will boot and mostly work but the user cannot debug from eclipse over gdb. For some reason the process which scp's the image over breaks ugly and never executes the pre-run commands (chmod +777 /tmp/$file) or starts gdbserver or anything else. Just hangs. I've verified this on multiple host Operating Systems, multiple host hardware platforms. It sure would be nice if someone would fix it or at least confirm that I'm wrong. Recommending it's use without verification though is a bad thing in my opinion.

I could be totally wrong but I don't think so.

Alex suggested you use a method for building a kernel image I believe to be, at least in part, broken. I pointed that out and the conversation proceeded from there. But you're right, it is largely off-topic, which Alex noted, I agreed to and suggested a move. However since Brendan responded here I followed up here because I need his help on a number of issues. He's a busy man and I'm gonna answer him the instant he speaks as if it's from God's mouth to my ear, because I'm not blinkin' LEDs here. Real revenue is at stake. I'm not gonna miss a chance to get help from Intel at the expense of a little noise in "your" thread.

And no disrespect to you, but as this a public forum, this thread belongs at least to the Community and at best to Intel, not any individual user. The convention you protest is simply common forum etiquette. As a result I apologize for offending you and respectfully request that further dialog continue here: .

Reply