Building & deploying Linux image with changed config

Hey,

I followed this description to setup a box with Ubuntu16 to build the newest Apalis-iMX6/LXDE image.
Specifically, I used the line “bitbake angstrom-lxde-image -c populate_sdk” to get the sources for doing menuconfig, and then I did “bitbake virtual/kernel -c menuconfig”, made my changes, saved to .config, and exited.
Now from there, how do I actually build a deployable image which includes my config changes, and then how do I get it onto my iMX6 board?

Hi @sktpin

Specifically, I used the line “bitbake angstrom-lxde-image -c populate_sdk” to get the sources for doing menuconfig

You did everything correct. You just have to build the image bitbake angstrom-lxde-image and if the build is successful, then the image will in the deploy folder.

Once you got the Image, you can use Toradex Easy Installer to Flash this to the module.

Best regards, Jaski

Ah, tried that, there were some errors, are those important?

WARNING: No recipes available for:
  /home/sk/oe-core/build/../layers/meta-freescale/dynamic-layers/browser-layer/recipes-browser/chromium/chromium-wayland_48.0.2548.0.bbappend
  /home/sk/oe-core/build/../layers/meta-freescale/dynamic-layers/browser-layer/recipes-browser/chromium/chromium_52.0.2743.76.bbappend
  /home/sk/oe-core/build/../layers/meta-jetson-tk1/recipes-graphics/mesa/mesa_11.1.1.bbappend
NOTE: Resolving any missing task queue dependencies

[. . .]

WARNING: /home/sk/oe-core/build/../layers/meta-toradex-nxp/recipes-kernel/linux/linux-toradex_4.9-2.3.x.bb.do_compile is tainted from a forced run
Initialising tasks: 100% |#######################################| Time: 0:00:41
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: When reparsing /home/sk/oe-core/build/../layers/meta-toradex-demos/recipes-images/images/angstrom-lxde-image.bb.do_image_teziimg, the basehash value changed from df7974ad4915afa0688319b813f52b15 to db23b8415224038281c340a5e5571540. The metadata is not deterministic and this needs to be fixed.
ERROR: When reparsing /home/sk/oe-core/build/../layers/meta-toradex-demos/recipes-images/images/angstrom-lxde-image.bb.do_image_teziimg, the basehash value changed from df7974ad4915afa0688319b813f52b15 to db23b8415224038281c340a5e5571540. The metadata is not deterministic and this needs to be fixed.
WARNING: gstreamer1.0-plugins-bad-1.14.imx-r0 do_configure: QA Issue: gstreamer1.0-plugins-bad: configure was passed unrecognised options: --disable-qt [unknown-configure-option]
ERROR: When reparsing /home/sk/oe-core/build/../layers/meta-toradex-demos/recipes-images/images/angstrom-lxde-image.bb.do_image_teziimg, the basehash value changed from df7974ad4915afa0688319b813f52b15 to db23b8415224038281c340a5e5571540. The metadata is not deterministic and this needs to be fixed.
ERROR: When reparsing /home/sk/oe-core/build/../layers/meta-toradex-demos/recipes-images/images/angstrom-lxde-image.bb.do_image_teziimg, the basehash value changed from df7974ad4915afa0688319b813f52b15 to db23b8415224038281c340a5e5571540. The metadata is not deterministic and this needs to be fixed.
ERROR: When reparsing /home/sk/oe-core/build/../layers/meta-toradex-demos/recipes-images/images/angstrom-lxde-image.bb.do_image_teziimg, the basehash value changed from df7974ad4915afa0688319b813f52b15 to db23b8415224038281c340a5e5571540. The metadata is not deterministic and this needs to be fixed.
ERROR: When reparsing /home/sk/oe-core/build/../layers/meta-toradex-demos/recipes-images/images/angstrom-lxde-image.bb.do_image_teziimg, the basehash value changed from df7974ad4915afa0688319b813f52b15 to db23b8415224038281c340a5e5571540. The metadata is not deterministic and this needs to be fixed.
ERROR: When reparsing /home/sk/oe-core/build/../layers/meta-toradex-demos/recipes-images/images/angstrom-lxde-image.bb.do_image_teziimg, the basehash value changed from df7974ad4915afa0688319b813f52b15 to db23b8415224038281c340a5e5571540. The metadata is not deterministic and this needs to be fixed.
ERROR: When reparsing /home/sk/oe-core/build/../layers/meta-toradex-demos/recipes-images/images/angstrom-lxde-image.bb.do_image_teziimg, the basehash value changed from df7974ad4915afa0688319b813f52b15 to db23b8415224038281c340a5e5571540. The metadata is not deterministic and this needs to be fixed.
ERROR: When reparsing /home/sk/oe-core/build/../layers/meta-toradex-demos/recipes-images/images/angstrom-lxde-image.bb.do_image_teziimg, the basehash value changed from df7974ad4915afa0688319b813f52b15 to db23b8415224038281c340a5e5571540. The metadata is not deterministic and this needs to be fixed.
ERROR: When reparsing /home/sk/oe-core/build/../layers/meta-toradex-demos/recipes-images/images/angstrom-lxde-image.bb.do_image_teziimg, the basehash value changed from df7974ad4915afa0688319b813f52b15 to db23b8415224038281c340a5e5571540. The metadata is not deterministic and this needs to be fixed.
ERROR: angstrom-lxde-image-2.8b5-r0 do_image_teziimg: Taskhash mismatch 208967a163fc9e0d1fe56b298a31bbf6 versus 92cc1a17955cd9c3bfd5299e08b67efb for /home/sk/oe-core/build/../layers/meta-toradex-demos/recipes-images/images/angstrom-lxde-image.bb.do_image_teziimg
ERROR: Taskhash mismatch 208967a163fc9e0d1fe56b298a31bbf6 versus 92cc1a17955cd9c3bfd5299e08b67efb for /home/sk/oe-core/build/../layers/meta-toradex-demos/recipes-images/images/angstrom-lxde-image.bb.do_image_teziimg
ERROR: When reparsing /home/sk/oe-core/build/../layers/meta-toradex-demos/recipes-images/images/angstrom-lxde-image.bb.do_image_teziimg, the basehash value changed from df7974ad4915afa0688319b813f52b15 to db23b8415224038281c340a5e5571540. The metadata is not deterministic and this needs to be fixed.
ERROR: When reparsing /home/sk/oe-core/build/../layers/meta-toradex-demos/recipes-images/images/angstrom-lxde-image.bb.do_image_teziimg, the basehash value changed from df7974ad4915afa0688319b813f52b15 to db23b8415224038281c340a5e5571540. The metadata is not deterministic and this needs to be fixed.
NOTE: Tasks Summary: Attempted 8702 tasks of which 5560 didn't need to be rerun and all succeeded.
NOTE: Writing buildhistory

Summary: There were 3 WARNING messages shown.
Summary: There were 14 ERROR messages shown, returning a non-zero exit code.

Dear @sktpin, no they are not, your build succeeded as stated by the final comment:

NOTE: Tasks Summary: Attempted 8702 tasks of which 5560 didn't need to be rerun and all succeeded.

I copied the contents of the deploy/images/apalix-imx6 onto an SDcard that was formatted with NTFS. (before that I tried ext4, it outright refused to copy the files in ubuntu GUI, and FAT - it coplained about symlinks not being supported)
It coopied without complaint to the NZFS card. Then I used the Eject icon in Ubuntu to cleanly unmount the card, before I physically removed it.
This is a rather new SDcard, 16GB.

Now the EasyInstaller says at 524 MB of 557 MB, 94% through the install process:
“Error setting U-Boot environment
Line 1 not corrected terminated or too long”

“The image has not been written completely. Please restart the process, …”

What could have gone wrong?

I’m not sure what you have exactly copied as you don’t have to copy all the contents of the folder. That images folder is also used to gather all the files before packing it up.

Try copying only the Tezi tar image (should look like “Apalis-iMX6_LXDE-Image-Tezi_2.8…”) in the SD card with sudo and untar it with: sudo tar xvf <image>.tar --no-same-owner.

The aspect of the SD card should look similar to the one in a default TEZI image from our servers.

Ah! I previously just copied all the contents of an images subfolder (e.g. apalis-imx6) onto a formatted SDcard. It was found by the EasyInstaller and installed something… presumably because the json file was there and some relative paths happaned to match.

Thanks, using just those file’s contents did the trick.

Indeed, thanks for the feedback!

btw., could you tell me - where are the Linux sources in that folder structure, for e.g. when I want to compile a kernel module against it?

For compiling Linux kernel from sources have a look here, please?