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

Build Edison image from src as of 12/13/2016

I spent quite a few hours in figuring out a way to build Yocto image for edison from its recipes. Here is the steps in building an image successfully.

1. download recipes from http://iotdk.intel.com/src/3.5/edison/iot-devkit-yp-poky-edison-20160606.zip http://iotdk.intel.com/src/3.5/edison/iot-devkit-yp-poky-edison-201...

2. unzip iot-devkit-yp-poky-edison-20160606.zip

3. cd iot-devkit-yp-poky-edison-20160606/poky/

4. source oe-init-build-env ../build_edison/

5. sudo apt-get install build-essential git diffstat gawk chrpath texinfo libtool gcc-multilib

6. sudo apt-get install libsdl1.2-dev

7. download http://git.yoctoproject.org/cgit.cgi/meta-java/commit/recipes-core/icedtea http://git.yoctoproject.org/cgit.cgi/meta-java/commit/recipes-core/...,upzip and replace all checksums in /poky/meta-java/recipes-core/icedtea/icedtea7-native_2.1.3.bb with the value in downloaded file. Then, replace all patches in /poky/meta-java/recipes-core/icedtea/openjdk7-03b147 with the patches from downloaded file.

 

8. comment out the following two lines

IMAGE_INSTALL += "iotkit-comm-js"  

IMAGE_INSTALL += "iotkit-comm-c-dev"

 

from poky/meta-intel-edison-distro/recipes-core/images/edison-image.bb

9. edit ../poky/meta-intel-edison/utils/flash/postBuild.sh line 9 to build_dir=$top_repo_dir/build/../build_edison

10. ../poky/meta-intel-edison/utils/flash/postBuild.sh

9. zip -r toFlash.zip toFlash

0 Kudos
12 Replies
Highlighted
Novice
41 Views

Hello

Thanks for the info!! I was having trouble figuring out how exactly to apply the patches. In a side note I think build_edison is where the new guide assumes you will build the image. The postBuild script needs to be modified as you pointed out. Did you have trouble with mkimage? The tool was supposed to be built when you bitbake u-boot, but it didn't show up in my build directories. I had to do a symlink with my Ubuntu mkimage.

Best regards,

Mario

0 Kudos
Highlighted
New Contributor I
41 Views

Hi Mario,

I don't see any errors from mkimage so I guess the answer is no. I have flashed the build image to edison, running so far so good.

best,

0 Kudos
Highlighted
Novice
41 Views

Yes it seems odd to me. I had no issues with mkimage before. Would you mind telling me the path to mkimage in your build directory? Maybe I just messed up the postBuild script and that's why I'm having trouble.

Best regards,

Mario

0 Kudos
Highlighted
Novice
41 Views

Dear AnteaterS;

Please forgive my ignorance on this one, but how do you "replace all patches in /poky/meta-java/recipes-core/icedtea/openjdk7-03b147 with the patches from downloaded file." What do I do to accomplish this? I'm sitting at my Ubuntu laptop with separate mouse. I'm ready to work. Pretend I'm a six your old just learning to use my computer for the first time.

Also, there is no, "poky/meta-intel-edison-distro/recipes-core/images/edison-image.bb". There is a "poky/meta-intel-edison/meta-intel-edison-distro/recipes-core/images/edison-image.bb" Is that the file we are supposed to edit in Step 8?

Sincerely,

Dan

0 Kudos
Highlighted
Novice
41 Views

You have to replace the checksums on your icedtea7-native_2.1.3.bb with the ones on icedtea7-native_2.1.3.bb from the link (Download meta-java-master.zip). Then replace the files inside /openjdk7-03b147 again with the ones from the meta-java-master (those are the patches).

 

For the second question, yes that is the file.

0 Kudos
Highlighted
Novice
41 Views

Just to make sure I am doing this correctly. You're step 7 is to follow the included link to a page inside git.yoctoproject.org and from that page, click on the link labeled "meta-java-master.zip" to download a zip file containing the meta-java-master folder. Inside this new meta-java-master folder, your instructions are to navigate to directory "meta-java-master/recipes-core/icedtea" and open the file, "icedtea7-native_2.1.3.bb" with a text editor, and select and copy lines 7 - 36 from this new version of "icedtea7-native_2.1.3.bb" And now we use these new lines to replace lines 7 - 36 of "icedtea7-native_2.1.3.bb" from directory "iot-devkit-yp-poky-edison-20160606/iot-devkit-yp-poky-edison-20160606/poky/meta-java/recipes-core/icedtea" So lines 1 - 6 and 37 - 41 are preserved.

For the patches, you want me to delete all files inside the directory, "iot-devkit-yp-poky-edison-20160606/iot-devkit-yp-poky-edison-20160606/poky/meta-java/recipes-core/icedtea/openjdk-7-03b147" and replace them with all the files inside the directory "meta-java-master/recipes-core/icedtea/openjdk-7-03b147". This is a big step, because the Edison directory structure has a different set of files. So simply copying over the files means that we might be replacing some files, but that there will be some files which are in the Edison archive that aren't in the master directory that will not be touched. Again, is this what you want? Or do you want me to copy over the files, replacing some keep others. Or do you want me to only copy over only those files from the master directory that are also inside the Edison directory?

0 Kudos
Highlighted
Novice
41 Views

1. Yes exactly.

2. Yep Just copy all the files over and replace as requested.

0 Kudos
Highlighted
Novice
41 Views

Now wait a minute. You just contradicted me. My instructions say to delete all the files in the current directory and then copy over all the files from the new directory. What you just wrote was, "Just copy all the files over and replace as requested." So you want me to leave the files that are already in the directory there, replacing only those files that exist in both. What happens if a file in the master directory does not have a file in the old directory with the same name. Should I copy those over too?

0 Kudos
Highlighted
Novice
41 Views

I really don't know if it makes a difference. I didn't delete anything, just copied things over.

0 Kudos
Highlighted
Novice
41 Views

Okay, I'm just trying to have an unambiguous step-by-step guide describing exactly what you did. So you want us to copy all the files from "meta-java-master/recipes-core/icedtea/openjdk-7-03b147" to "iot-devkit-yp-poky-edison-20160606/iot-devkit-yp-poky-edison-20160606/poky/meta-java/recipes-core/icedtea/openjdk-7-03b147" replacing any files that already exist there with the same name as the file being copied over. So any files in the old directory not in the new directory will stay there as well as any files in the new directory not in the old will be added.

0 Kudos
Highlighted
New Contributor I
41 Views

Hi Dan,

In step 8, the correct path should be "poky/meta-intel-edison/meta-intel-edison-distro/recipes-core/images/edison-image.bb", thanks Intel providing the confusing instructions to begin with.

""replace all patches in /poky/meta-java/recipes-core/icedtea/openjdk7-03b147 with the patches from downloaded file." means just copy all patches from downloaded file to the folder (replace any files when having duplicated names "

0 Kudos
Highlighted
Novice
41 Views

Okay, I'm in my office with my Ubuntu 14.04 system and running through the instructions. I ran into a couple of problems. First, at no point in your instructions do you use the bitbake command. I assume you wanted us to run, "bitbake edison-image" between steps 8 and 9. Please confirm. When I did run bitbake, I ran into an error that read, "Task 2949 (.../icedtea7-native_2.1.3.bb, do_fetch) failed with exit code '1'. I searched online and found a post in the intel forums made by you (AnteaterS). To fix this, I simply reran the bitbake command, and it seems to have worked itself out. The next issue I ran into is that the bitbake command seemed to freeze while compiling openjdk8. In the hopes that would work itself out, I left the office for the day and returning this morning to see that it did work itself out as bitbake was reporting that 5545 tasks of which 5525 didn't need to be rerun and all succeeded.

So now I try to run your steps 9 and 10, but I then had an error saying that postBuild.sh failed to find edison-image-edison.ext4 along with some other files. I traced the error to your step 9 where you say "build_dir=$top_repo_dir/build/../build_edison" to what I believe should be "build_dir=$top_repo_dir/build/../../build_edison" Please confirm that this step should be updated to reflect the double ".."

Now at this point, I'm scratching my head about your step 9 after step 10, which I believe you wanted to label step 11 (please confirm). The instructions being printed by postBuild.sh say I should run the flashall script inside the toFlash directory. You say we should zip the directory into a toFlash.zip file. Can you please explain the difference?

0 Kudos