set CONFIG_STATIC_INIT_GNU=y when cross-compile toochain selected.
Fix:
| /data/wrynose/bitbake-builds/zephyr-master/build/tmp/work/i586-yocto-elf/zephyr-helloworld/4.3.0+git/recipe-sysroot-native/usr/bin/i586-yocto-elf/i586-yocto-elf-ld.bfd: GNU-style constructors required but STATIC_INIT_GNU not enabled
| /data/wrynose/bitbake-builds/zephyr-master/build/tmp/work/i586-yocto-elf/zephyr-helloworld/4.3.0+git/recipe-sysroot-native/usr/bin/i586-yocto-elf/i586-yocto-elf-ld.bfd: warning: zephyr/zephyr_pre0.elf has a LOAD segment with RWX permissions
| collect2: error: ld returned 1 exit status
| ninja: build stopped: subcommand failed.
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
| build_elf(args.elf_file, args.includes)
| ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "/data/build-zephyr/tmp/work/intel_ehl_crb-zephyr/zephyr-helloworld/4.3.0+git/sources/zephyr-helloworld-4.3.0+git/zephyr/arch/x86/zefi/zefi.py", line
120, in build_elf
| ["-fno-stack-protector", "-fpic", "-mno-red-zone", "-fshort-wchar", sysrootarg,
| ^^^^^^^^^^
| NameError: name 'sysrootarg' is not defined
| ninja: build stopped: subcommand failed.
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Introduce ZEPHYR_SNIPPETS, which accepts one or more snippet names
separated by spaces and passes them to CMake through SNIPPET.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
fix
Exception: TypeError: QemuTargetZephyr.__init__() got an unexpected
keyword argument 'native_sysroot'
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Add zephyr-openamp-rpmsg-mulit-services recipe to build out of tree
openamp-system-reference example applications.
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Add support for xenvm(gicv2) and xenvmgicv3 boards that that allows to
run Zephyr as Xen guest on any ARMv8 board that supports ARM
Virtualization Extensions.
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
zephyr-kernel-src-4.2.0.inc is an auto generated file and it shouldn't
be edited by hand. So move 0001-fix-unable-find-gen_kobject_list.py.patch
from zephyr-kernel-src-4.2.0.inc to zephyr-kernel-src.inc file and make
this being applied conditionally based on PREFERRED_VERSION_zephyr-kernel
only.
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Replace basic sys.argv argument parsing with argparse module to provide:
- Change the Zephyr version argument from a positional argument to an
explicit -v/--version option, making the intent clearer at the command
line.
- Proper -h/--help option with usage information.
- Better error messages for invalid version format.
- Usage examples in help text.
- Improved user experience.
- Update README.md with usage.
The script now displays helpful information when called with --help:
$ generate-version.py --help
usage: generate-version.py [-h] -v VERSION
Generate Zephyr kernel source include file for a specific version
options:
-h, --help show this help message and exit
-v VERSION, --version VERSION
Zephyr version in the form x.y.z (e.g., 3.7.0, 4.3.0)
Example:
generate-version.py -v 3.7.0
generate-version.py --version 4.3.0
AI-Generated: GitHub Copilot (Claude Sonnet 4.6)
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
zephyr-sdk is a native recipe, So fix PREFERRED_VERSION for
zephyr-sdk-native.
Also update PREFERRED_VERSION for zephyr-sdk-native to 0.17.4 which is the
latest SDK version for Zephyr 4.x releases and to match with default
zephyr kernel version.
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Remove INHERIT of uninative and yocto-uninative.inc inclusion from
zephyr.conf as these are now provided by defaultsetup.conf which is
included by bitbake.conf by default.
This fixes the duplicate inclusion warning:
WARNING: Duplicate inclusion for /scratch/yocto/yp-master/sources/openembedded-core/meta/conf/distro/include/yocto-uninative.inc in /scratch/yocto/yp-master/sources/openembedded-core/meta/conf/distro/defaultsetup.conf
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Add QEMU run instructions to Quick Build, use "nographic" consistently
in all runqemu examples, and add a section listing supported machines.
Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Change DEFAULTTUNE from "cortexa9" to "cortexa9hf-neon" so the
toolchain uses hard-float with NEON, matching what Zephyr expects
for the qemu_cortex_a9 target.
Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Update MPS2 and MPS3 machine configurations:
- Add ZEPHYR_BOARD with the current Zephyr board identifiers
(mps2/an385, mps2/an521/cpu0, mps3/corstone300/an547).
- Add QB_RNG = "" to disable virtio-rng, which is unsupported on
these machines.
- Add QB_MEM to explicitly set memory (16 MB for mps2-an385,
2048 MB for mps3-an547; mps2-an521 already had it).
Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
-nographic is not a graphics setting. Drop it from QB_GRAPHICS and let
users request headless mode via `runqemu nographic` when needed.
Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Zephyr 4.2 removed Nios II support, so building Zephyr targets for nios2
no longer works.
Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
do_bootconf_write() may update qemuboot.conf and the QEMU ELF symlink to a
new timestamped name while the ELF itself is reused from sstate and not
deployed, leaving a broken symlink and causing runqemu to fail with
"Can't find rootfs: ... .elf".
Fix by making zephyr-qemuboot use the stable link name
(${ZEPHYR_IMAGE_LINK_NAME}.elf / ${PN}-${MACHINE}.elf), which is
guaranteed to exist as a symlink created by zephyr-image.inc and always
points at the most recently deployed ELF.
Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Add board extension support variables where user can specify the
BOARD_ROOT variable for out-of-tree custom boards.
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
Convert recipes-kernel/zephyr-kernel/zephyr-sample.inc file to
classes-recipe/zephyr-sample.bbclass. Using this bbclass user can
inherit this bbclass from any layer to build custom or out-of-tree
zephyr applications.
Also update the recipes to inherit zephyr-sample bbclass.
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
Use relative path for all the include files to avoid overlaying the
include files.
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
Move classes to classes-recipe as appropriate to match bbclass
scope functionality.
zephyr.bbclass, zephyr-qemuboot.bbclass, zephyrtest.bbclass are
inherited by recipes hence move to classes-recipe.
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
Remove PREFERRED_VERSION_zephyr-kernel from zephyr-kernel-src.inc
as this variable should be in global configuration file and override
from local.conf file.
Set default stable PREFERRED_VERSION for kernel and sdk in layer.conf
file.
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
Add zephyr-sdk.inc file and move all the common sdk implementation
zephyr-sdk.inc file to support multiple version of sdk.
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
Fix below runqemu errors for qemu-cortex-a9 machine.
runqemu - ERROR - Failed to run qemu: qemu-system-arm: -device virtio-rng-pci,rng=rng0: No 'PCI' bus found for device 'virtio-rng-pci'
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
Update script to generate correct SRCREV and other info to match
poky variable updates.
Also use "version" instead of "short_version" for SRC_URI_PATCHES.
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
In README instructions DISTRO variable assigment doesn't have
whitespace, due to this bitbake throws the warning messages as
shown below.
WARNING: /scratch/sandeep/yocto/yp-master/build-zep/conf/local.conf:291 has a lack of whitespace around the assignment: 'DISTRO="zephyr"'
Hence update instructions to fix warning messages.
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>