Community
cancel
Showing results for 
Search instead for 
Did you mean: 
TUtt
New Contributor I
3,021 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
Carlos_M_Intel
Employee
223 Views

Hi Tor_on_Tour

If you want to add the header I suggest you to use the source for the kernel 3.8.7 http://lxr.free-electrons.com/source/drivers/net/usb/cdc_ether.c?v=3.8 Linux/drivers/net/usb/cdc_ether.c - Linux Cross Reference - Free Electrons

Take a look at the http://download.intel.com/support/processors/quark/sb/quark_swdevmanlx_330235_002.pdf Software Developer's Manual for Linux (Section 7.4). You will see in there all the requirements for make the HE910 work, you will also find a little example of how to send an AT command with the card. Take a look at it and let me know if it helps.

Regards,

Charlie

TUtt
New Contributor I
223 Views

Hi CMata,

I wasn't precise enough in my original post. Gonna try to be clearer now.

I've already got PPP to work, the thing i wanna do now is get the ethernet driver working with my card.

The http://lxr.free-electrons.com/source/drivers/net/usb/cdc_ether.c?v=3.8 3.8.7 file you suggest doesn't include the telit-code i want.

 

Looking into it i see that after kernel release 3.12 it does (http://lxr.free-electrons.com/source/drivers/net/usb/cdc_ether.c?v=3.12# L697 3.12 file).

Telits vendor id = 1bc7

cdc_ether.c 3.12

---------------------------------------------------------------------------------------------------------------------------------------------- 

697 /* Telit modules */

698 USB_VENDOR_AND_INTERFACE_INFO(0x1bc7, USB_CLASS_COMM,

699 USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),

700 .driver_info = (kernel_ulong_t) &wwan_info,

701 }, {

702 USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ETHERNET,

703 USB_CDC_PROTO_NONE),

704 .driver_info = (unsigned long) &cdc_info,

705 }, {

706 USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM,

707 USB_CDC_PROTO_NONE),

708 .driver_info = (unsigned long)&wwan_info,

------------------------------------------------------------------------------------------------------------------------------------------------

I realise it's more then just this cdc_ether.c 3.12 file that I need but i figured it could be a good place to start.

So the question remains:

Anyone have any guides/clues on how to include my driver files before i compile in Yocto?

Thank You Charlie and everyone else for the help

/ Tor

 

 

AT9
Honored Contributor II
223 Views

Hello Tor,

Looking at https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CB4QFjAAahUKEwiY... this document (first Google hit for "telit he910 linux driver") I see that you actually should be good with a cdc-acm driver and not the cdc-ether one as HE910 is treated as a serial USB device (mPCIe slot has USB in it as well and many cards like cellular modems use only the USB part).

cdc-acm driver is available in my repo and if you're using anuClibc-based image, you should be able to install it easily. If you use a DevKit image, check their repo (opkg update && opkg list |grep cdc). If they don't have it, it should be fairly easy to compile it (though it will take you some time for setting up a build environment) - there's an article on building the DevKit image, just search the forum.

DPose
New Contributor II
223 Views

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.

AT9
Honored Contributor II
223 Views

We're a bit off-topic for the thread here but I know Brendan (well, virtually) and I trust his knowledge in the DevKit area, that's why I recommend the article (and yes, I meant that one).

Is the inability to connect from Eclipse over GDB protocol the only glitch you've faced after following those instructions? What's that thread you're referring to, I'd be interested in knowing more as I'm thinking about either moving my Galileo repo to DevKit image or adding it alongside the one for uClibc-based images and I was planning to run the build rather soon.

arfoll, Brendan, do you think the article is still good enough for building the DevKit image past 1.5 release, or is there any better way you could recommend?

DPose
New Contributor II
223 Views

Oh no, I absolutely trust Brendan too I'm just sayin'. Brendan's blog post was very easy to follow and the image appears to work fine, but if I can't debug my app (in C/C++) it's a problem for me. Again I could be totally wrong but I tried it multiple times on both Debian (Wheezy) and Ubuntu (12.04 AND 14,.04) as hosts with the same results. The Wheezy and Ubuntu images were running in VM's while the (K)Ubuntu 14.04 was host OS on different hardware. All behaved as detailed in the post referenced above.

We want to release our product based on the IOTDK image. I've been holding off trying to make a custom layer work until somebody answered the post. Apparently Pablo got sidetracked. We would like to update a couple things like connman, turn on the fast_cgi module in lighttpd, add our own cgi executable, stop the ttyS1 getty after boot, start syslog etc., all in our own custom layer. Just waiting to get a good IOTDK build process that we can start with. That is why I was lurking in the OP's thread hoping for clues. Would it be more appropriate to take this discussion back to my thread?

AT9
Honored Contributor II
223 Views

I see, well, yeah, if this is the only thing then for objectivity's sake I wouldn't call it "broken" Yes, let's continue in your thread, I'm curious if that's indeed something broken in the build process or just an unrelated bug. I'll setup a build environment for that and post back when I have something meaningful - that may take me a week or so due to other stuff, I have to admit right away.

DPose
New Contributor II
223 Views

Kool. I would appreciate someone at least verifying whether or not I'm in the weeds. Thanks so much for any help you can provide.

Dallas

TUtt
New Contributor I
223 Views

Hi, Alex and everyone else..thank you so much for your reply!

I really think i need the cdc-ether driver though.

As said, If i use a newer kernel (ubuntu 15, which has the cdc-ether file) i can make the modem appear as the following

[] usb 1-1: Product: 6 CDC-ACM + 1 CDC-ECM

 

[] usb 1-1: Manufacturer: Telit

 

[] usb 1-1: SerialNumber: 357164042207970

 

[] cdc_acm 1-1:1.0: ttyACM0: USB ACM device

 

[] cdc_acm 1-1:1.2: ttyACM1: USB ACM device

 

[] cdc_acm 1-1:1.4: ttyACM2: USB ACM device

 

[] cdc_acm 1-1:1.6: ttyACM3: USB ACM device

 

[] cdc_acm 1-1:1.8: ttyACM4: USB ACM device

 

[] cdc_acm 1-1:1.10: ttyACM5: USB ACM device

 

[] cdc_ether 1-1:1.12 wwan0: register 'cdc_ether' at usb-0000:00:14.0-1, Mobile Broadband Network Device, 00:00:11:12:13:14

 

[] usbcore: registered new interface driver cdc_ether

 

[] cdc_ether 1-1:1.12 wwx000011121314: renamed from wwan0

 

root@ubuntu75:~# dmesg

....

 

[] usbcore: registered new interface driver cdc_ether[] cdc_acm 1-1:1.0: ttyACM0: USB ACM device[] cdc_acm 1-1:1.2: ttyACM1: USB ACM device[] cdc_acm 1-1:1.4: ttyACM2: USB ACM device[] cdc_acm 1-1:1.6: ttyACM3: USB ACM device[] cdc_acm 1-1:1.8: ttyACM4: USB ACM device[] cdc_acm 1-1:1.10: ttyACM5: USB ACM device

....

root@ubuntu75:~# lsusb -t

/: Bus 03.Port 1: Dev 1, class="root_hub", Driver=ehci-pci/8p, 480M

|__ Port 1: Dev 2, If 0, class="Hub", Driver=hub/8p, 480M

/: Bus 02.Port 1: Dev 1, class="root_hub", Driver=xhci_hcd/4p, 5000M

/: Bus 01.Port 1: Dev 1, class="root_hub", Driver=xhci_hcd/9p, 480M

|__ Port 1: Dev 4, If 0, class="Communications", Driver=cdc_acm, 480M

|__ Port 1: Dev 4, If 1, class="CDC" Data, Driver=cdc_acm, 480M

|__ Port 1: Dev 4, If 2, class="Communications", Driver=cdc_acm, 480M

|__ Port 1: Dev 4, If 3, class="CDC" Data, Driver=cdc_acm, 480M

|__ Port 1: Dev 4, If 4, class="Communications", Driver=cdc_acm, 480M

|__ Port 1: Dev 4, If 5, class="CDC" Data, Driver=cdc_acm, 480M

|__ Port 1: Dev 4, If 6, class="Communications", Driver=cdc_acm, 480M

|__ Port 1: Dev 4, If 7, class="CDC" Data, Driver=cdc_acm, 480M

|__ Port 1: Dev 4, If 8, class="Communications", Driver=cdc_acm, 480M

|__ Port 1: Dev 4, If 9, class="CDC" Data, Driver=cdc_acm, 480M

|__ Port 1: Dev 4, If 10, class="Communications", Driver=cdc_acm, 480M

 

|__ Port 1: Dev 4, If 11, class="CDC" Data, Driver=cdc_acm, 480M

|__ Port 1: Dev 4, If 12, class="Communications", Driver=cdc_ether, 480M

 

|__ Port 1: Dev 4, If 13, class="CDC" Data, Driver=cdc_ether, 480M

that is compared to this, on a Galileo with the cdc-acm driver:

root@clanton:/#

 

[ .] cdc_acm 2-2:1.0: This device cannot do calls on its own. It is not a modem.

[ .] cdc_acm 2-2:1.0: ttyACM0: USB ACM device

[ .] cdc_acm 2-2:1.2: This device cannot do calls on its own. It is not a modem.

[ .] cdc_acm 2-2:1.2: ttyACM1: USB ACM device

[ .] cdc_acm 2-2:1.4: This device cannot do calls on its own. It is not a modem.

[ .] cdc_acm 2-2:1.4: ttyACM2: USB ACM device

[ .] cdc_acm 2-2:1.6: This device cannot do calls on its own. It is not a modem.

[ .] cdc_acm 2-2:1.6: ttyACM3: USB ACM device

[ .] cdc_acm 2-2:1.8: This device cannot do calls on its own. It is not a modem.

[ .] cdc_acm 2-2:1.8: ttyACM4: USB ACM device

[ .] cdc_acm 2-2:1.10: This device cannot do calls on its own. It is not a modem.

[ .] cdc_acm 2-2:1.10: ttyACM5: USB ACM device

[ .] cdc_acm 2-2:1.12: This device cannot do calls on its own. It is not a modem.

[ .] cdc_acm 2-2:1.12: ttyACM6: USB ACM device

[ .] usbcore: registered new interface driver cdc_acm

[ .] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

That's what makes me think that the file is reliant.

 

You seem to have pretty good knowledge about the process AlexT_Intel, any ideas?

So the question still remains:

Anyone have any guides/clues on how to include my cdc_ether driver file before i compile in Yocto?

thank you

/ Tor

AT9
Honored Contributor II
223 Views

Okay, dmesg from Ubuntu indeed suggests you need cdc-ether in addition to cdc-acm. Actually this one is included into Galileo's 3.8 kernel, but AFAICS it doesn't have a section for Telit modems, it appears only in the 3.12 (EDIT: and now I see you actually mentioned this in your later post ). So you'd need to backport this piece. Unfortunately right now I'm a bit short on time to provide you with very detailed step-by-step instructions, but let me give you some steps and if that's not going to be helpful enough I'll try to carve out some time this weekend to make it more detailed.

1) Generate the diff/patch file for cdc_ether.c between 3.8 and 3.12 kernels. Your link points to the version from 3.16, but unless you're absolutely sure you need namely that one I'd recommend you to stick to 3.12 first just because there were less changes between 3.8 and 3.12 than between 3.8 and 3.16, so the chance of incompatibility is lower.

2) Provided you have setup a build environment for 1.0.4-based image, put the generated file (with .diff or .patch extension) into the meta-clanton_v1.0.4-1dt/meta-clanton-bsp/recipes-kernel/linux/files directory where meta-clanton_v1.0.4-1dt is my top-level dir of the build environment.

3) Add a line below to the meta-clanton_v1.0.4-1dt/meta-clanton-bsp/recipes-kernel/linux/linux-yocto-clanton_3.8.bb, at the very end of the file (you'll see a bunch of similar lines there). Assuming the diff file is called my-cdc-ether.diff:

SRC_URI += "file://my-cdc-ether.diff"

4) You need to enable a kernel option for building cdc-ether module. Either (1) do "bitbake -c menuconfig virtual/kernel" then find the USB_NET_CDCETHER option and enable it as a module (m) or (2) prepare a .cfg file with this option similar to this one: https://github.com/alext-mkrs/meta-alext-galileo/blob/master/recipes-addfeatures/enable_ftdi_sio/fil... meta-alext-galileo/ftdi_sio.cfg at master · alext-mkrs/meta-alext-galileo · GitHub, then add it to the files directory and SRC_URI just like the driver patch above. For ad-hoc build the direct config with menuconfig is faster and this is what I'm decribing in my blog post BTW.

5) Rebuild the kernel with "bitbake -f virtual/kernel"

6) Rebuild the image with "bitbake image-full-galileo". It should have the new kernel & module built in. Or use the approach shown in the blog.

TUtt
New Contributor I
223 Views

Hi AlexT_Intel, thank you so much for your fast reply's!

I tried your mini-guide, couldn't get it to work though, gonna try more tomorrow.

You say that the cdc-ether is included in the Galileo 3.8 kernel, are you sure? I can´t find it

 

Don´t really know what to use to generate the .patch file. Copying the code from http://lxr.free-electrons.com/source/drivers/net/usb/cdc_ether.c?v=3.8 3.8.7 file and (http://lxr.free-electrons.com/source/drivers/net/usb/cdc_ether.c?v=3.12# L697 3.12 file) and generating a .patch file with those gave me an error while trying to compile. Didn't have much hope on that one.

 

In the kernel config menu, I found something called "CDC Ethernet support (smart devices such as cable modems)"

gonna try to put an M on it and compile it over the night and see if it's working with that.

Anyway, thank you so much for your help Alex, true hero, an step-by-step instruction would be extremely appreciated!

/ Tor

AT9
Honored Contributor II
223 Views

You are welcome Okay, I'll try to prepare something more detailed later.

Yes, cdc-ether is already there, just without Telit devices support - that option you've found (CDC Ethernet support <...>) is exactly the one enabling it.

TUtt
New Contributor I
223 Views

How's it going Alex? Any chance you made that guide?

AT9
Honored Contributor II
223 Views

This weekend turned out to be much more action-packed that I expected, so I had no time to delve into this, unfortunately. But it's still one of the two highest-ranked items on my ToDo list

TUtt
New Contributor I
223 Views

That's awesome Alex,

Latest update:

I'm taking a lazy sidepath meanwhile,

I'm trying to compile a kernel I found at https://github.com/todorez/galileo-linux-stable this site, i think it should include some of the features beyond 3.8.7 that I https://github.com/todorez/galileo-linux-stable/blob/6fc1276a7c82968768e910de087104c6b7c39e87/driver... L746 need. The cross compiling is tricky though.

Gonna see what error/solution I end up with and post it here

TUtt
New Contributor I
223 Views

Okey, I have some problem with the compilation due to a file called i586-poky-linux-gcc that doesn't want to be found...

I'm following his https://github.com/todorez/galileo-linux-stable/blob/master/README.md guide

 

when i try to "make" i get an error message saying that "i586-poky-linux-gcc" cant be found at the PATH i created for it.

Even when i look into the folder manually something is really spooky

I tried to make the path folder shorter by renaming the folder names, therefor the stupid names

root@ubuntu75:/home/g/iotdk/dev/sysroots/x86/usr/bin/i586-poky-linux# ls -la

total 25276

drwxr-sr-x 2 7858 11689 4096 Jun 25 15:54 .

drwxr-sr-x 3 7858 11689 4096 Jun 25 15:54 ..

-rwxr-xr-x 1 7858 11689 897880 Jun 25 15:54 i586-poky-linux-addr2line

-rwxr-xr-x 1 7858 11689 927448 Jun 25 15:54 i586-poky-linux-ar

-rwxr-xr-x 1 7858 11689 1574552 Jun 25 15:54 i586-poky-linux-as

-rwxr-xr-x 1 7858 11689 896848 Jun 25 15:54 i586-poky-linux-c++filt

-rwxr-xr-x 1 7858 11689 989063 Jun 25 15:54 i586-poky-linux-cpp

-rwxr-xr-x 1 7858 11689 32928 Jun 25 15:54 i586-poky-linux-elfedit

-rwxr-xr-x 1 7858 11689 990901 Jun 25 15:54 i586-poky-linux-g++

-rwxr-xr-x 1 7858 11689 987995 Jun 25 15:54 i586-poky-linux-gcc <-----------------here he is, I can see him<span __jive_emoticon_name="silly" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="/7.0.3.0/images/emoticons/silly.png">

-rwxr-xr-x 1 7858 11689 37739 Jun 25 15:54 i586-poky-linux-gcc-ar

-rwxr-xr-x 1 7858 11689 37739 Jun 25 15:54 i586-poky-linux-gcc-nm

-rwxr-xr-x 1 7858 11689 37743 Jun 25 15:54 i586-poky-linux-gcc-ranlib

-rwxr-xr-x 1 7858 11689 596582 Jun 25 15:54 i586-poky-linux-gcov

-rwxr-xr-x 1 7858 11689 5266376 Jun 25 15:54 i586-poky-linux-gdb

-rwxr-xr-x 1 7858 11689 968208 Jun 25 15:54 i586-poky-linux-gprof

-rwxr-xr-x 1 7858 11689 1689240 Jun 25 15:54 i586-poky-linux-ld

-rwxr-xr-x 1 7858 11689 1689240 Jun 25 15:54 i586-poky-linux-ld.bfd

-rwxr-xr-x 1 7858 11689 909072 Jun 25 15:54 i586-poky-linux-nm

-rwxr-xr-x 1 7858 11689 1079696 Jun 25 15:54 i586-poky-linux-objcopy

-rwxr-xr-x 1 7858 11689 1965520 Jun 25 15:54 i586-poky-linux-objdump

-rwxr-xr-x 1 7858 11689 927448 Jun 25 15:54 i586-poky-linux-ranlib

-rwxr-xr-x 1 7858 11689 435392 Jun 25 15:54 i586-poky-linux-readelf

-rwxr-xr-x 1 7858 11689 901328 Jun 25 15:54 i586-poky-linux-size

-rwxr-xr-x 1 7858 11689 901328 Jun 25 15:54 i586-poky-linux-strings

-rwxr-xr-x 1 7858 11689 1079760 Jun 25 15:54 i586-poky-linux-strip

(But when i look manually)

root@ubuntu75:/home/g/iotdk/dev/sysroots/x86/usr/bin/i586-poky-linux# ./i586-poky-linux-gcc

-bash: ./i586-poky-linux-gcc: No such file or directory

Anyone has any ideas whats wrong?

AT9
Honored Contributor II
77 Views

You are using a prebuilt toolchain and you're running this on a 32-bit Linux, aren't you? if yes, then the reason is 32-bit vs 64-bit mismatch. That error message in such circumstances means that Linux dynamic loader is not able to load that binary and returns an error to the shell, which presents it to you in such a strange way. Same would happen if you e.g. try to run binary compiled for Galileo on a PC.

AT9
Honored Contributor II
77 Views

And getting back to backporting - looks like the differences are bigger than it seems at the first glance. I've just tried to create a patch for cdc_ether.c for 3.8->3.12, but there are changes in usbnet.c, which are quite significant and in turn tied to other changes, so it seems like it would take quite some time (if at all viable).

So looks like the repo you've found is actually a better way to go.

ssjoh
Novice
77 Views

Hi,

There seems to be some static directory names that the "i586-poky-linux-gcc" is looking for the library, which it won't find. When running readelf command I can see following;

root@ubuntu75:# readelf -a /home/g/iotdk/dev/sysroots/x86/usr/bin/i586-poky-linux/i586-poky-linux-gcc |grep Requesting

[Requesting program interpreter: /opt/iot-devkit/1.7.2/sysroots/x86_64-pokysdk-linux/lib/ld-linux-x86-64.so.2]

root@ubuntu75:#

And this directory is not mention in the instructions (as I can see) that should exists.

By creating the directory "/opt/iot-devkit/1.7.2/sysroots/x86_64-pokysdk-linux/lib" and then copying all the library files from "/home/g/iotdk/dev/sysroots/x86/lib/" seems to fix the issue that you were experiencing with the "i586-poky-linux-gcc".

$ cp /home/g/iotdk/dev/sysroots/x86/lib/* /opt/iot-devkit/1.7.2/sysroots/x86_64-pokysdk-linux/lib/

But then I noted that it was looking for "libz.so.1", and even if I had this library in my PATH it were not selecting it.

By running strace on the command,

$ strace /home/g/iotdk/dev/sysroots/x86/usr/bin/i586-poky-linux/../../libexec/i586-poky-linux/gcc/i586-poky-linux/4.9.1/as

I could see that it was looking for the files from the same lib directory (/opt/iot-devkit/1.7.2/sysroots/x86_64-pokysdk-linux/lib/) as the previous file, and the file existed in "..iotdk/dev/sysroots/x86/usr/lib/", so I did copy all the lib files to the directory were it expected to find them.

$ cp /home/g/iotdk/dev/sysroots/x86/usr/lib/* /opt/iot-devkit/1.7.2/sysroots/x86_64-pokysdk-linux/lib/

These tricks seem to have made the make command to be executed OK, then if the process is ok I don't really know....

Update (8-AUG-2015):

The "devkit-launcher" should be executed before the make command, it will fix the PATH, and then the issue above is solved.

However, if you are using headless machine with Ubuntu Server, you will get an error "cannot not open display" etc, and then the PATH is not set. Then it needs to be set manually.

Example, environment variable PATH is printed before and after, and as can be seen, it is not changed.

root@ubuntu:/opt/build/iotdk-ide-linux# ./devkit-launcher

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

Relocating SDK

Setting variables

/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/

root@ubuntu:/opt/build/iotdk-ide-linux#

root@ubuntu:/opt/build/iotdk-ide-linux# gdk_mir_display_open

Failed to connect to Mir: Failed to connect to server socket: No such file or directory

Unable to init server: Could not connect: Connection refused

Eclipse: Cannot open display:

Eclipse:

An error has occurred. See the log file

/opt/build/iotdk-ide-linux/eclipse-linux/configuration/1439047806716.log.

root@ubuntu:/opt/build/iotdk-ide-linux# printenv PATH

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

root@ubuntu:/opt/build/iotdk-ide-linux#

So in this case it can be solved with using the PATH printed out by devkit-launcher and then set it manually.

root@ubuntu:/opt/build/iotdk-ide-linux# 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/"

root@ubuntu:/opt/build/iotdk-ide-linux#

-Sebastian

AT9
Honored Contributor II
77 Views

Right, devkit-launcher sets the necessary paths. And as long as it's a part of the Eclipse-based DevKit SDK, it needs display, but generally speaking you can just look into the script itself and execute only the necessary piece, which is this one, near the end of the script:

else

echo ${DEVKIT_HOME}

echo "Relocating SDK"

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

echo "Setting variables"

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

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

Reply