Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
1,202 Views

How to upgrade GCC complier from 4.9.1 to 4.9.4 using bitbake?

Hi,

i need to update the gcc on my edison to a newer version to complete the "https://azure.microsoft.com/en-us/develop/iot/get-started/ Connect Your Device | Azure IoT Hub | Microsoft Azure". has anybody done this before ? where can i find the GCCVERSION variable ? it seems to be located in the build/conf/local.conf but i cant find it there...

Thanks in advance

0 Kudos
8 Replies
Highlighted
Community Manager
105 Views

Hi Gerrik84k,

 

 

If I'm understanding you correctly you want to upgrade GCC using bitbake, I investigated and this is the information that I found: https://communities.intel.com/thread/88140 https://communities.intel.com/thread/88140, maybe it can help you. But I personally recommend you to install GCC 4.9.4 from source in your Edison.

 

 

If you want to install GCC from source try to follow this guide: https://gcc.gnu.org/wiki/InstallingGCC, you can do it with the version that you want, so in your case the version is 4.9.4 ( https://ftp.gnu.org/gnu/gcc/gcc-4.9.4/).

 

 

I hope this information helps you, let us know if you need anything else.

 

 

Regards,

 

-Leonardo
0 Kudos
Highlighted
New Contributor I
105 Views

Thank you for your answear,

i built the gcc-4.9.4 on my host computer (Ubuntu 14.04 64Bit) and checked the filesize of the compiled directory.

@Hybris:~/Downloads$ du -sh gcc-4.9.4/

4,3G gcc-4.9.4/

so unfortunately that dont fit on my edison. So thats the reason why i want to adapt my recipe to get the newer version straight into my edison-image.

0 Kudos
Highlighted
Community Manager
105 Views

Hi Gerrik84k,

 

 

I'm currently building the image and running some tests, I will let you know when I have updates of the case.

 

 

I appreciate your patience.

 

 

Regards,

 

-Leonardo
0 Kudos
Highlighted
Community Manager
105 Views

Hi Gerrik84k,

 

 

I just built the standard Edison Image because I found a lot of issues when I was building it, now I'm trying to upgrade the GCC compiler, so I appreciate if you wait a little more.

 

 

I really appreciate your patience and I will reply soon.

 

 

Regards,

 

-Leonardo
0 Kudos
Highlighted
New Contributor I
105 Views

Thanks for your efforts.

 

I really appricate that.
0 Kudos
Highlighted
Community Manager
105 Views

Hi Gerrik84k,

 

 

We finally found the way to update GCC using bitbake, there is a recipe for GCC in the source files, so there is no need to add a new recipe. You will need to update the GCC recipe to pull the desired GCC version by editing file /edison-src/poky/meta/recipe-devtools/gcc/gcc-4.9.inc to version 4.9.4. We used the 3.5 source files and renamed the sources folder from iot-devkit-yp-poky-20160606 to edison-src for simplicity. These are the changes we followed to build GCC 4.9.4 using bitbake:

 

 

Modify PV and BINV variables to the desired version:

 

 

PV = "4.9.4"  BINV = "4.9.4"

 

 

Delete the following line (line 72 if I'm not mistaken):

 

 

file://0055-PR-rtl-optimization-61801.patch \

 

 

Update the SRC_URI[md5sum] and SRC_URI[sha256sum] to the following:

 

 

SRC_URI[md5sum] = "87c24a4090c1577ba817ec6882602491"  SRC_URI[sha256sum] = "6c11d292cd01b294f9f84c9a59c230d80e9e4a47e5c6355f046bb36d4f358092"

 

 

And finally proceed to build the package using bitbake command:

 

 

bitbake gcc

 

 

After that the GCC ipk files will be generated in edison-src/build_edison/tmp/deploy/ipk/core2-32 folder. You need to copy these files to Edison (We copied the files to the home directory on Edison) and install them using opkg command, make sure you remove the existing GCC from Edison first:

 

 

root@edison:~# opkg remove gcc --force-depends  root@edison:~# opkg install gcc_4.9.4-r0_core2-32.ipk

 

 

If it is successfully done, you can see the version 4.9.4 of GCC installed on Edison:

 

 

root@edison:~# gcc --version

 

gcc (GCC) 4.9.4

 

Copyright (C) 2015 Free Software Foundation, Inc.

 

This is free software; see the source for copying conditions. There is NO

 

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 

 

Thank you for patience, We hope this works for you.

 

 

Regards

 

-Leonardo
0 Kudos
Highlighted
New Contributor I
105 Views

Thanks that worked great for me.

0 Kudos
Highlighted
Community Manager
105 Views

Hi Gerrik84k,

 

 

That's great, it is good to see that it worked.

 

 

Thank you for remaining so positive.

 

 

Regards,

 

-Leonardo
0 Kudos