Install embedded Linux toolchain on windows
Published at November 25, 2020 · Last Modified at September 22, 2021 · 2 min read · Tags: linux yocto
Install embedded Linux toolchain on windows
Published at November 25, 2020 · Last Modified at September 22, 2021 · 2 min read · Tags: linux yocto
The toolchain for embedded Linux should be matched for the target image, and that is why we can’t just find and download it from somewhere. Therefore, we should be it. This is a tutorial on how to build and install YOCTO SDK on a windows machine. This allows developing embedded Linux on windows using eclipse or even visual studio.
If you already have a YOCTO build, you need to make the following simple steps:
add to conf/local.con the following 2 lines:
SDKMACHINE="x86_64-mingw32"
SDK_ARCHIVE_TYPE = "zip"
Download and install meta-mingw layer. Just add the following line to your conf/bblayer.conf. Just make sure that the branch of meta-mingw layer corresponds with the branch of the YOCTO installation.
BBLAYERS =+ "/path/to/meta-mingw"
Now it just has to type bitbake meta-toolchain, and the magic should happen.
When using the poky distribution like I did here there were no problems. I worked with the zues branch, and everything was by the book.
When I work with yocto distribution for stm32mp I had to work around some issues. I think it relates to the way the ST defines its yocto distribution.
ERROR: Task do_install in virtual:nativesdk:/path/to/yocto/layers/openembedded-core/meta/recipes-core/glibc/glibc-locale_2.31.bb depends upon non-existent task do_stash_locale in /path/yo/yocto/layers/meta-openembedded/meta-mingw/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_6.0.0.bb
ERROR: Command execution failed: 1`
I had to add the following lines to this file nativesdk-mingw-w64-runtime_6.0.0.bb
addtask do_stash_locale after do_install before do_populate_sysroot do_package
do_stash_locale() {
}
EXTRA_OECONF_append_sdkmingw32 = "--disable-tui --without-curses --without-system-readline --with-python=no"
.
ST_DEPENDENCIES_BUILD_FOR_SDK_append = " nativesdk-openssl-dev "
.
.
TOOLCHAIN_HOST_TASK_append = " ${ST_TOOLS_FOR_SDK} "
TOOLCHAIN_HOST_TASK_append = " ${ST_DEPENDENCIES_BUILD_FOR_SDK} "
.
.