Community
cancel
Showing results for 
Search instead for 
Did you mean: 
PHult
New Contributor II
1,914 Views

Building 20160606 from source

Jump to solution

I'm trying to build the latest Edison image from source.

In the end I will remove most of the bundled packages so removing them early is an acceptable solution to any errors that may occur.

I'm building the image using the following docker scripts.

https://github.com/hultqvist/edison-yocto-docker GitHub - hultqvist/edison-yocto-docker: Building an Intel Edison Yocto Linux image using docker.

After running these commands

source ./oe-init-build-env ../build_edison/ && \

bitbake -c fetchall edison-image u-boot

I get this error

ERROR: Fetcher failure for URL: 'http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/archive/f89009ada191.tar.bz2%3Bname%3Dop... http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/archive/f89009ada191.tar.bz2;name=openjd...'. Checksum mismatch!

File: '/home/edison/build_edison/downloads/f89009ada191.tar.bz2' has md5 checksum 2bc941373ca4b033c9a25f972eec7858 when c26bbb33addfaeb14d28a1329b4b5a3e was expected

File: '/home/edison/build_edison/downloads/f89009ada191.tar.bz2' has sha256 checksum 5efd8e66f18fcbf45527bcc74aa3e6ed11f66bc793c88e3841925c4acb4827ba when 54a0ef02b56b265b4122324e08a33c42ececbf2a300ada260611e7b6ccdba96d was expected

If this change is expected (e.g. you have upgraded to a new version without updating the checksums) then you can use these lines within the recipe:

SRC_URI[openjdk.md5sum] = "2bc941373ca4b033c9a25f972eec7858"

SRC_URI[openjdk.sha256sum] = "5efd8e66f18fcbf45527bcc74aa3e6ed11f66bc793c88e3841925c4acb4827ba"

Otherwise you should retry the download and/or check with upstream to determine if the file has become corrupted or otherwise unexpectedly modified.

ERROR: Function failed: Fetcher failure for URL: 'http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/archive/f89009ada191.tar.bz2%3Bname%3Dop... http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/archive/f89009ada191.tar.bz2;name=openjd...'. Unable to fetch URL from any source.

ERROR: Logfile of failure stored in: /home/edison/build_edison/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/temp/log.do_fetch.77672

NOTE: recipe icedtea7-native-2.1.3-r1.0: task do_fetch: Failed

ERROR: Task 370 (/home/edison/build_edison/../poky/meta-java/recipes-core/icedtea/icedtea7-native_2.1.3.bb, do_fetch) failed with exit code '1'

Since I won't use java I tried to remove it:

Append one line to build_edison/conf/local.conf:

PACKAGE_EXCLUDE += "openjdk-8-jdk"

Removed this line from build_edison/conf/bblayers.conf:

${TOPDIR}/../poky/meta-java \

Running same bitbake as above...

ERROR: Nothing RPROVIDES 'openjdk-8-jdk' (but /home/edison/build_edison/../poky/meta-intel-edison/meta-intel-edison-distro/recipes-core/images/edison-image.bb RDEPENDS on or otherwise requires it)

NOTE: Runtime target 'openjdk-8-jdk' is unbuildable, removing...

Missing or unbuildable dependency chain was: ['openjdk-8-jdk']

ERROR: Required build target 'edison-image' has no buildable providers.

Missing or unbuildable dependency chain was: ['edison-image', 'openjdk-8-jdk']

But edison-image.bb doesn't contain any reference to openjdk.

This is what I found:

meta-intel-iot-devkit/recipes-core/images/iot-devkit-image.bb:IMAGE_INSTALL += "openjdk-8-jdk"

meta-intel-iot-devkit/recipes-core/images/edison-image.bbappend:IMAGE_INSTALL += "openjdk-8-jdk"

meta-java/recipes-core/openjdk/openjdk-8_60b27-2.5.4.bb:# To enable compiling on target, install openjdk-8-jdk package.

I'm a bit confused here.

Should PACKAGE_EXCLUDE prevent the other lines found above?

My end goal is to get a successful build that I can flash to the Edison module.


Accepted Solutions
PHult
New Contributor II
68 Views

I now have a successful build.

It was successfully flashed to the Edison module using the Intel Software Setup Assistant.

The ssh and wifi setup did not work, which was expected since those parts were no longer included in the build, though you can connect using the usb debug channel and login as root without a password.

Here is the built image.

https://github.com/hultqvist/edison-yocto-docker/releases/tag/reduced1611 Release First reduced image · hultqvist/edison-yocto-docker · GitHub

The significant changes to get a working build can be found https://github.com/hultqvist/edison-yocto-docker/tree/reduced1611/edison-source in the edison-source Dockerfile.

I removed most IMAGE_INSTALL from auto.conf and edison-image.bb/append. By doing this I got rid of the java dependencies which broke the build in previous attempts.

I can't say for sure they are all needed, feedback on this is appreciated since the trial and error approach would take too long.

This solution won't work with java included as that issue is still unresolved. I'm not going to use Java so this is not an issue for me.

View solution in original post

7 Replies
PHult
New Contributor II
68 Views

This only address the first part of the first post.

I've changed the check sums for icedtea7 to match what was downloaded, this is an ugly hack but at least everything was downloaded.

The changes are committed into the git repo mentioned previously.

Everything is now downloaded successfully and the compile phase is in progress...

Update: Compilation failed

This was the error.

ERROR: Function failed: do_configure (log file is located at /home/edison/build_edison/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/temp/log.do_configure.57371)

ERROR: Logfile of failure stored in: /home/edison/build_edison/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/temp/log.do_configure.57371

...

NOTE: make OE_CFLAGS=-isystem/home/edison/build_edison/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe OE_CPPFLAGS=-isystem/home/edison/build_edison/tmp/sysroots/x86_64-linux/usr/include OE_CXXFLAGS=-isystem/home/edison/build_edison/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe OE_LDFLAGS=-L/home/edison/build_edison/tmp/sysroots/x86_64-linux/usr/lib -L/home/edison/build_edison/tmp/sysroots/x86_64-linux/lib -Wl,-rpath-link,/home/edison/build_edison/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/home/edison/build_edison/tmp/sysroots/x86_64-linux/lib -Wl,-rpath,/home/edison/build_edison/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/home/edison/build_edison/tmp/sysroots/x86_64-linux/lib -Wl,-O1 ZIPEXE=/home/edison/build_edison/tmp/sysroots/x86_64-linux/usr/bin/zip DISABLE_HOTSPOT_OS_VERSION_CHECK=ok patch-fsg

| mkdir -p stamps

| touch stamps/hgforest.stamp

| ln -sf /home/edison/build_edison/downloads/f89009ada191.tar.bz2 openjdk.tar.gz

| if ! echo "54a0ef02b56b265b4122324e08a33c42ececbf2a300ada260611e7b6ccdba96d openjdk.tar.gz" \

| | /usr/bin/sha256sum --check ; \

| then \

| if [ -e openjdk.tar.gz ] ; \

| then \

| mv openjdk.tar.gz openjdk.tar.gz.old ; \

| fi ; \

| /usr/bin/wget http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/archive/f89009ada191.tar.gz -O openjdk.tar.gz; \

| if ! echo "54a0ef02b56b265b4122324e08a33c42ececbf2a300ada260611e7b6ccdba96d openjdk.tar.gz" \

| | /usr/bin/sha256sum --check ; \

| then echo "ERROR: Bad download of OpenJDK root zip"; false; \

| fi; \

| fi ;

| openjdk.tar.gz: FAILED

| /usr/bin/sha256sum: WARNING: 1 computed checksum did NOT match

| --2016-11-01 00:24:51-- http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/archive/f89009ada191.tar.gz

| Resolving icedtea.classpath.org (icedtea.classpath.org)... 162.213.1.36

| Connecting to icedtea.classpath.org (icedtea.classpath.org)|162.213.1.36|:80... connected.

| HTTP request sent, awaiting response... 302 Found

| Location: http://icedtea.wildebeest.org/hg/release/icedtea7-forest-2.1/archive/f89009ada191.tar.gz [following]

| --2016-11-01 00:24:51-- http://icedtea.wildebeest.org/hg/release/icedtea7-forest-2.1/archive/f89009ada191.tar.gz

| Resolving icedtea.wildebeest.org (icedtea.wildebeest.org)... 80.127.118.211

| Connecting to icedtea.wildebeest.org (icedtea.wildebeest.org)|80.127.118.211|:80... connected.

| HTTP request sent, awaiting response... 200 Script output follows

| Length: unspecified [application/x-gzip]

| Saving to: 'openjdk.tar.gz'

|

| 0K .......... .......... .......... .......... .......... 609K

| 50K .......... .......... .......... .......... .......... 1.26M

| 100K .......... .......... ...... 8.98M=0.1s

|

| 2016-11-01 00:24:52 (1019 KB/s) - 'openjdk.tar.gz' saved [129172]

|

| openjdk.tar.gz: FAILED

| /usr/bin/sha256sum: WARNING: 1 computed checksum did NOT match

| ERROR: Bad download of OpenJDK root zip

| make: *** [stamps/download-openjdk.stamp] Error 1

| ERROR: oe_runmake failed

| WARNING: /home/edison/build_edison/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/temp/run.do_configure.57371:1 exit 1 from

| exit 1

| ERROR: Function failed: do_configure (log file is located at /home/edison/build_edison/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/temp/log.do_configure.57371)

NOTE: recipe icedtea7-native-2.1.3-r1.0: task do_configure: Failed

ERROR: Task 3004 (/home/edison/build_edison/../poky/meta-java/recipes-core/icedtea/icedtea7-native_2.1.3.bb, do_configure) ...

idata
Community Manager
68 Views

Hi Peter-H,

 

 

Thank you for the detailed description. Could you list all the steps you've done before running the source and bitbake commands? I haven't seen this error with this particular package, but, the process to exclude packages is described in the BSP http://www.intel.com/content/www/us/en/support/boards-and-kits/000005616.html http://www.intel.com/content/www/us/en/support/boards-and-kits/000005616.html. Section 4 says:

 

 

"To exclude unnecessary packages from the image, remove the matching entry from the IMAGE_INSTALL variable (see section 4.1) or add the package name to the PACKAGE_EXCLUDE variable in the build/conf/local.conf file."

 

 

What are the contents of your edison-src /meta-intel-edison/meta-intel-edison-distro/recipes-core/images/edison-image.bb and build/conf/local.conf files?

 

 

What happens when you have:

 

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

 

PACKAGE_EXCLUDE = "openjdk-8-jdk"

 

 

PACKAGE_EXCLUDE shouldn't exclude the lines above it, just the packages it specifically says should be excluded.

 

 

Follow the BSP guide posted above and make sure you're not missing any steps.

 

 

We'll be waiting for your results.

 

 

-Sergio

 

PHult
New Contributor II
68 Views

The last modifications can be found here.

https://github.com/hultqvist/edison-yocto-docker/tree/master/edison-source edison-yocto-docker/edison-source at master · hultqvist/edison-yocto-docker · GitHub

I added PACKAGE_EXCLUDE... to /meta-intel-edison/meta-intel-edison-distro/recipes-core/images/edison-image.bb

Without modifying bblayers.conf(which keeps reference to ../poky/meta-java)

This time the Dockerfile for edison-download completed.

Efter running the Dockerfile for edison-image it fails

| openjdk.tar.gz: FAILED

| /usr/bin/sha256sum: WARNING: 1 computed checksum did NOT match

| ERROR: Bad download of OpenJDK root zip

| make: *** [stamps/download-openjdk.stamp] Error 1

| ERROR: oe_runmake failed

| WARNING: /home/edison/build_edison/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/temp/run.do_configure.53854:1 exit 1 from

| exit 1

| ERROR: Function failed: do_configure (log file is located at /home/edison/build_edison/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/temp/log.do_configure.53854)

NOTE: recipe icedtea7-native-2.1.3-r1.0: task do_configure: Failed

ERROR: Task 3004 (/home/edison/build_edison/../poky/meta-java/recipes-core/icedtea/icedtea7-native_2.1.3.bb, do_configure) failed with exit code '1'

My modifications of icedtea7...bb to pass the download test causes other errors where the checksum is checked another time?

Without this modification it will fail earlier when doing the first download.

About the BSP guide. It's outdated in

  • its references to edison-src/
  • The instructions to use setup.sh which causes a whole lot of other issues - this is also contradictory to the README in the latest source release.

I'm not sure whether I've missed anything in the "Exclude package.." section. Next I'll try to remove more packages that might have java dependencies.

PHult
New Contributor II
69 Views

I now have a successful build.

It was successfully flashed to the Edison module using the Intel Software Setup Assistant.

The ssh and wifi setup did not work, which was expected since those parts were no longer included in the build, though you can connect using the usb debug channel and login as root without a password.

Here is the built image.

https://github.com/hultqvist/edison-yocto-docker/releases/tag/reduced1611 Release First reduced image · hultqvist/edison-yocto-docker · GitHub

The significant changes to get a working build can be found https://github.com/hultqvist/edison-yocto-docker/tree/reduced1611/edison-source in the edison-source Dockerfile.

I removed most IMAGE_INSTALL from auto.conf and edison-image.bb/append. By doing this I got rid of the java dependencies which broke the build in previous attempts.

I can't say for sure they are all needed, feedback on this is appreciated since the trial and error approach would take too long.

This solution won't work with java included as that issue is still unresolved. I'm not going to use Java so this is not an issue for me.

View solution in original post

idata
Community Manager
68 Views

Hi Peter-H,

 

 

Thank you for letting us know you managed to solve this issue and for sharing the changes you made. Hopefully they'll be helpful for other users in the community. Additionally, the right team is aware of the outdated sources and instructions and is working on this.

 

 

-Sergio

 

idata
Community Manager
68 Views

Hi Sergio,

I add the same issue with the 3.5 version and I had to change

poky/meta-java/recipes-core/icedtea/openjdk-7-03b147/fix-checksums.patch

And

 

poky/meta-java/recipes-core/icedtea/icedtea7-native_2.1.3.deb

by

http://git.yoctoproject.org/cgit/cgit.cgi/meta-java/commit/?h=master-next&id=8b028a5e67c8081a4ecd65d...

Then It works fine.

Paul

idata
Community Manager
68 Views

Hi Paul_B

 

 

Thank you for sharing this workaround with the community.

 

 

-Sergio