Hi, I tried to write custom machine for our carrier board which runs OE v2.7b3. I followed the Brandon Shibley’s webinar but there are a lot of changes in structure since then but I made the changes to new structure as best I know. Problem is that when I run bitbake console-tdx-image compilation of kernel fails with this output
ERROR: linux-toradex-4.1-2.0.x-2.7.3 do_compile: oe_runmake failed
ERROR: linux-toradex-4.1-2.0.x-2.7.3 do_compile: Function failed: do_compile (log file is located at /media/data/jurena/oe-core/build/tmp-glibc/work/colibri_imx6_rayservice-angstrom-linux-gnueabi/linux-toradex/4.1-2.0.x-2.7.3/temp/log.do_compile.17155)
ERROR: Logfile of failure stored in: /media/data/jurena/oe-core/build/tmp-glibc/work/colibri_imx6_rayservice-angstrom-linux-gnueabi/linux-toradex/4.1-2.0.x-2.7.3/temp/log.do_compile.17155
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 8 HOSTCC=gcc HOSTCPP=gcc -E uImage CC=arm-angstrom-linux-gnueabi-gcc -mno-thumb-interwork -marm -fuse-ld=bfd LD=arm-angstrom-linux-gnueabi-ld.bfd LOADADDR=0x10008000
| ERROR: oe_runmake failed
| CHK include/config/kernel.release
| GEN ./Makefile
| CHK include/generated/uapi/linux/version.h
| CHK include/generated/utsrelease.h
| Using /media/data/jurena/oe-core/build/tmp-glibc/work-shared/colibri-imx6-rayservice/kernel-source as source for kernel
| make[3]: 'include/generated/mach-types.h' is up to date.
| CHK include/generated/bounds.h
| CHK include/generated/asm-offsets.h
| CALL /media/data/jurena/oe-core/build/tmp-glibc/work-shared/colibri-imx6-rayservice/kernel-source/scripts/checksyscalls.sh
| CHK include/generated/compile.h
| LD drivers/cpufreq/built-in.o
| drivers/cpufreq/imx7-cpufreq.o: In function `.LANCHOR1':
| imx7-cpufreq.c:(.bss+0x3c): multiple definition of `soc_reg'
| drivers/cpufreq/imx6q-cpufreq.o:imx6q-cpufreq.c:(.bss+0x30): first defined here
| drivers/cpufreq/imx7-cpufreq.o: In function `.LANCHOR1':
| imx7-cpufreq.c:(.bss+0x24): multiple definition of `arm_reg'
| drivers/cpufreq/imx6q-cpufreq.o:imx6q-cpufreq.c:(.bss+0x20): first defined here
| /media/data/jurena/oe-core/build/tmp-glibc/work-shared/colibri-imx6-rayservice/kernel-source/scripts/Makefile.build:337: recipe for target 'drivers/cpufreq/built-in.o' failed
| make[4]: *** [drivers/cpufreq/built-in.o] Error 1
| /media/data/jurena/oe-core/build/tmp-glibc/work-shared/colibri-imx6-rayservice/kernel-source/scripts/Makefile.build:403: recipe for target 'drivers/cpufreq' failed
| make[3]: *** [drivers/cpufreq] Error 2
| make[3]: *** Waiting for unfinished jobs....
| CHK kernel/config_data.h
| /media/data/jurena/oe-core/build/tmp-glibc/work-shared/colibri-imx6-rayservice/kernel-source/Makefile:950: recipe for target 'drivers' failed
| make[2]: *** [drivers] Error 2
| make[2]: *** Waiting for unfinished jobs....
| Makefile:146: recipe for target 'sub-make' failed
| make[1]: *** [sub-make] Error 2
| Makefile:24: recipe for target '__sub-make' failed
| make: *** [__sub-make] Error 2
| ERROR: Function failed: do_compile (log file is located at /media/data/jurena/oe-core/build/tmp-glibc/work/colibri_imx6_rayservice-angstrom-linux-gnueabi/linux-toradex/4.1-2.0.x-2.7.3/temp/log.do_compile.17155)
ERROR: Task (/media/data/jurena/oe-core/build/../layers/meta-toradex-nxp/recipes-kernel/linux/linux-toradex_4.1-2.0.x.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3655 tasks of which 3654 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
I think that the machine name is somehow badly configure because Makefile obviously tries to compile sources for imx6 and imx7. So my question is that is possible to create custom machine in same way as is descripted in referenced video also for OE 2.7b3?
The layer structure is really simple and I just define necessary files which are needed to create machine.
The issue is, that the current linux-toradex_4.1-2.0.x codebase does not allow for both imx6q-cpufreq.c and imx7-cpufreq.c to be linked into the kernel.
(before this commit is was the other way around, the kernel did not link if one did not have both compiled …)
The fix for you would be to provide a specific defconfig for your machine, starting from this one and making sure that you not enable the i.MX 7 specific kernel options.
Hi, thank you a lot for answer. About the defconfig. I thought it is copied by appending to do_unpack function and because I am just modifing the current colibri-imx6 module I don’t have to make any changes. So I copied suggested defconfig to my recipies folder and added definition to append file so it looks like this
Note that adding defconfig a second time to SRC_URI is wrong.
That way bitbake searches all paths it searches for local files for two files, once for defconfig and once for linux-toradex-4.1-2.0.x/colibri-imx6-rayservice/defconfig. The fetched later will overwrite the one fetched first.
Then set the FILESEXTRAPATHS_prepend as follows, bitbake will by itself append as subfolder …
Hi,
thanks very much, compilation is now successfull.
If I may just a question. Is there a way how to get rid off the link to machine flash and dist tools which is created in meta-toradex-demos? It not a big deal but I would like to be able just clone my repository with sublayer without aditional changes to other layers.
Brandon is in video creating a symbolic link to new layer from meta-toradex layer. I tried to copy tdx-image-fstype.inc to my layer and override it a little, but my image recipe keeps including tdx-image-fstype.inc from meta-toradex-demos. So without the link to my layer, compilation fails because directory colibri-imx6-rayservice do not exists.
It’s nothing crucial I am just wondering if and how this can be done.
However instead of digging into this, why not renaming your recipes-images/images/tdx-image-fstype.inc to recipes-images/images/my-image-fstype.inc and changing in your image recipe