Yocto fails to boot after adding package - linux

I'm about to build a Linux-Yocto filesystem for Xilinx Zynq platform.
Everything runs fine until I added one more package to the rootfs.
It doesn't matter what kind of package I'm adding it always fails with:
INIT: version 2.88 booting
/etc/init.d/rcS: line 17: mount: command not found
/etc/init.d/rc: line 66: stty: command not found
/etc/rcS.d/S02banner.sh: line 11: /bin/mknod: No such file or directory
/etc/rcS.d/S02sysfs.sh: line 14: mount: command not found
/etc/rcS.d/S02sysfs.sh: line 17: grep: command not found
/etc/rcS.d/S06checkroot.sh: line 142: mount: command not found
/etc/rcS.d/S06checkroot.sh: line 145: ln: command not found
Starting Bootlog daemon: bootlogd: cannot find console device 249:0 under /dev
bootlogd.
/etc/rcS.d/S37populate-volatile.sh: line 12: dirname: command not found
/etc/rcS.d/S37populate-volatile.sh: line 13: sed: command not found
/etc/rcS.d/S37populate-volatile.sh: line 193: /proc/cmdline: No such file or directory
/etc/rcS.d/S38devpts.sh: line 13: grep: command not found
/etc/rcS.d/S38dmesg.sh: line 17: dmesg: command not found
/etc/rcS.d/S39hostname.sh: line 10: /bin/hostname: No such file or directory
/etc/rcS.d/S39hostname.sh: line 19: hostname: command not found
/etc/rcS.d/S55bootmisc.sh: line 64: date: command not found
/etc/rcS.d/S55bootmisc.sh: l
INIT: Entering runlevel: 5
/etc/init.d/rc: line 66: stty: command not found
Starting ntpd: /etc/rc5.d/S20ntpd: line 42: start-stop-daemon: command not found
done
Stopping Bootlog daemon: /etc/rc5.d/S99stop-bootlogd: line 62: start-stop-daemon: command not found
bootlogd.
And:
INIT: cannot execute "/sbin/getty"cannot execute "/sbin/getty"
INIT: Id "1" respawning too fast: disabled for 5 minutes
INIT: cannot execute "/sbin/getty"
INIT: Id "PS0" respawning too fast: disabled for 5 minutes
My local.conf:
MACHINE ?= "zedboard-zynq7"
DISTRO ?= "poky"
EXTRA_IMAGE_FEATURES = "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
ABORT,${TMPDIR},100M,1K \
ABORT,${DL_DIR},100M,1K \
ABORT,${SSTATE_DIR},100M,1K"
PACKAGECONFIG_pn-qemu-native = "sdl"
PACKAGECONFIG_pn-nativesdk-qemu = "sdl"
ASSUME_PROVIDED += "libsdl-native"
CONF_VERSION = "1"
#AT-ubifs config
MKUBIFS_ARGS = "-m 2048 -e 126976 -c 1884"
#added by hob
PACKAGE_CLASSES = "package_rpm "
#added by hob
DL_DIR = "/home/jonas/Zynq_AT_Debug/Yocto/poky/build/downloads"
#added by hob
SSTATE_DIR = "/home/jonas/Zynq_AT_Debug/Yocto/poky/build/sstate-cache"
#added by hob
SSTATE_MIRRORS = ""
#added by hob
PARALLEL_MAKE = "-j 8"
#added by hob
BB_NUMBER_THREADS = "8"
#added by hob
INCOMPATIBLE_LICENSE = ""
#added by hob
SDKMACHINE = "x86_64"
#added by hob
http_proxy = ""
#added by hob
https_proxy = ""
#added by hob
ftp_proxy = ""
#added by hob
all_proxy = ""
#added by hob
CVS_PROXY_HOST = ""
#added by hob
CVS_PROXY_PORT = ""
#added by hob
IMAGE_EXTRA_SPACE = "0"
#added by hob
TOOLCHAIN_BUILD = "False"
#added by hob
IMAGE_FSTYPES = "ubifs cpio"
#added by hob
LINGUAS_INSTALL = ""
My Image recipe:
require /home/jonas/Zynq_AT_Debug/Yocto/poky/meta/recipes-core/images/core-image-minimal.bb
IMAGE_INSTALL = "sysvinit-pidof \
update-alternatives-opkg shadow-securetty init-ifupdown \
initscripts-functions base-files update-rc.d \
run-postinsts openssh udev-cache zlib libcrypto \
util-linux-libblkid openssh-scp openssh-keygen \
mtd-utils-ubifs initscripts openssh-ssh \
udev-utils modutils-initscripts eglibc \
shadow netbase openssh-sshd udev base-passwd \
sysvinit mtd-utils openssl-conf libkmod lzo \
util-linux-libuuid libwrap sysvinit-inittab \
iperf nbench-byte ntp ntpdate nano"
DESCRIPTION = "***** Yocto-filesystem"
If I take out nano everything is fine.
I hope someone can help me.

To add more package into the rootfs,
in conf/local.conf add this line:
IMAGE_INSTALL_append = " nano"
The space in front is really important.
In addition, please show where you get your bsp and your conf/bblayers.conf
Edit:
Let's start from the beginning. Copy this, replace my local.conf to yours local.conf. With this minimal set up, you could at least bitbake core-image-minimal
Then, to add your packages into the image, just add them to IMAGE_INSTALL_append = " "
MACHINE ?= "zedboard-zynq7"
DISTRO ?= "poky"
EXTRA_IMAGE_FEATURES = "debug-tweaks ssh-server-openssh package-manager"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
ABORT,${TMPDIR},100M,1K \
ABORT,${DL_DIR},100M,1K \
ABORT,${SSTATE_DIR},100M,1K"
PACKAGECONFIG_pn-qemu-native = "sdl"
PACKAGECONFIG_pn-nativesdk-qemu = "sdl"
ASSUME_PROVIDED += "libsdl-native"
CONF_VERSION = "1"
#AT-ubifs config
MKUBIFS_ARGS = "-m 2048 -e 126976 -c 1884"
PACKAGE_CLASSES = "package_rpm "
DL_DIR = "/home/jonas/Zynq_AT_Debug/Yocto/poky/build/downloads"
SSTATE_DIR = "/home/jonas/Zynq_AT_Debug/Yocto/poky/build/sstate-cache"
SSTATE_MIRRORS = ""
PARALLEL_MAKE = "-j ${#oe.utils.cpu_count()}"
BB_NUMBER_THREADS = "${#oe.utils.cpu_count()}"
SDKMACHINE = "x86_64"
IMAGE_FSTYPES = "ubifs cpio"
IMAGE_INSTALL_append = " nano smartpm openssh-sftp-server "

Related

adding osmosdr for gnuradio in recipe Yocto Raspberry pi 4

I'm trying to create a yocto recipe to add osmosdr on my raspberrypi 4 but I get the following error when I generate my image:
/home/norian/Yocto/build-rpi/tmp/work/cortexa72-poky-linux/uhd/3.15.LTS-r0/git/host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp:61:21: error: '_1' was not declared in this scope
Here is my recipe:
SUMMARY = "A small image just capable of allowing a device to boot."
IMAGE_LINGUAS = " "
LICENSE = "MIT"
inherit core-image
CORE_IMAGE_EXTRA_INSTALL = "\
packagegroup-sdr-base-extended \
packagegroup-sdr-base-debug \
packagegroup-sdr-base-devel \
packagegroup-sdr-base-python \
packagegroup-sdr-python-extended \
packagegroup-sdr-gnuradio-base \
packagegroup-core-eclipse-debug \
"
RPI_EXTRA_CONFIG = "\
force_turbo=0 \n \
arm_freq=700 \n \
arm_freq_min=100 \
"
IMAGE_INSTALL += "nano"
IMAGE_INSTALL += "gr-osmosdr"
CONF_VERSION = "1"
ENABLE_UART="1"
DISABLE_SPLASH = "1"
DISABLE_RPI_BOOT_LOGO = "1"
I am using Ubuntu 20.04.
My version of poky is :
DISTRO_VERSION = "3.3.4"
DISTRO_CODENAME = "hardknott"
Do you know how to resolve this?

Yocto do_package: Didn't find service unit specified in SYSTEMD_SERVICE_

Description
I want to install a service into my image, but it is failing with following errors
ERROR: mypackage-git-r0 do_package: Didn't find service unit 'mypackage.service', specified in SYSTEMD_SERVICE_mypackage.
ERROR: Logfile of failure stored in: <build-location>/poky/build/tmp/work/cortexa53-poky-linux/mypackage/git-r0/temp/log.do_package.7924
ERROR: Task (<layer-location>/meta-mypackage-oe/recipes-mypackage/mypackage/mypackage_git.bb:do_package) failed with exit code '1'
Recipe
Python sources are cloned from git, now I want to create a service to run at boot. Here is the recipe
SUMMARY = " "
DESCRIPTION = " "
HOMEPAGE = " todo "
LICENSE = "CLOSED"
SRC_URI += "<URL>"
SRC_URI += "file://mypackage.service"
SRCREV = "<srcrev>"
S = "${WORKDIR}/git"
inherit setuptools3 systemd
RDEPENDS_${PN} = " \
${PYTHON_PN}-pyserial \
${PYTHON_PN}-pyusb \
${PYTHON_PN}-terminal \
"
SYSTEMD_PACKAGES = "${PN}"
do_install_append () {
install -d ${D}${system_unitdir}
install -m 0755 ${WORKDIR}/mypackage.service ${D}{system_unitdir}
}
SYSTEMD_SERVICE_${PN} = "mypackage.service"
FILES_${PN} += "${system_unitdir}/mypackage.service"
Recipe structure
recipes-mypackage/mypackage/
├── mypackage
│   └── mypackage.service
└── mypackage_git.bb
1 directory, 2 files
Service file
NOTE: mypackage has feature to run as daemon using -d option
[Unit]
Description=mypackage service
[Service]
Type=simple
ExecStart=/usr/bin/mypackage -d
[Install]
WantedBy=multi-user.target
Build configurations
Image recipe inherits core-image-base and contains
IMAGE_FEATURES += "package-management"
PACKAGE_CLASSES ?= "rpm deb package_deb"
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager += "systemd"
inherit extrausers
local.conf contents
MACHINE = "raspberrypi3-64"
ENABLE_UART = "1"
RPI_USE_U_BOOT = "1"
GPU_FREQ = "250"
I might have messed up a lot of things in the recipe, so need some pointer to clean up the recipe as well as resolve the issue.
Thanks.
Replace system_unitdir by systemd_system_unitdir.
SYSTEMD_PACKAGES already contains ${PN} so you can ignore it, same for FILES_${PN} += "${systemd_system_unitdir}/mypackage.service" as if systemd.bbclass finds your unit, it'll be added to the appropriate FILES_ automatically.
c.f. https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/systemd.bbclass#n4
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/systemd.bbclass#n109
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/systemd.bbclass#n148
And for completeness, thanks to #Jussi Kukkonen for the comment, missing $ sign before {systemd_system_unitdir}.

Yocto How to stop cmake to look in a native sysroot path for linking?

I'm trying to add dlib python module into my image so far this is the recipe i'm working on...
# python3-dlib_19.21.1.bb
SUMMARY = "A toolkit for making real world machine learning and data analysis applications"
HOMEPAGE = "https://pypi.python.org/pypi/dlib"
PYPI_PACKAGE = "dlib"
LICENSE = "Boost-Software"
SRC_URI[md5sum] = "1e7e357d7d54e86267ef60f606cb40e1"
LIC_FILES_CHKSUM = "file://dlib/LICENSE.txt;md5=2c7a3fa82e66676005cd4ee2608fd7d2 \
file://dlib/external/libpng/LICENSE;md5=243135ddedf702158f9170807cbcfb66 \
file://dlib/external/pybind11/LICENSE;md5=beb87117af69fd10fbf9fb14c22a2e62 \
file://python_examples/LICENSE_FOR_EXAMPLE_PROGRAMS.txt;md5=064f53ab40ea2b6a4bba1324149e4fde \
"
DEPENDS = "cmake-native"
inherit pypi setuptools3
but when do_compile() ran i got the following error message:
| [100%] Building CXX object CMakeFiles/_dlib_pybind11.dir/src/line.cpp.o
| [100%] Linking CXX shared module build_dunfell/tmp/work/aarch64-poky-linux/python3-dlib/19.21.1-r0/build/lib.linux-x86_64-3.8/_dlib_pybind11.cpython-38-aarch64-linux-gnu.so
| build_dunfell/tmp/work/aarch64-poky-linux/python3-dlib/19.21.1-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/8.3.0/ld: build_dunfell/tmp/work/aarch64-poky-linux/python3-dlib/19.21.1-r0/recipe-sysroot-native/usr/lib/libsqlite3.so: error adding symbols: file in wrong format
| collect2: error: ld returned 1 exit status
| CMakeFiles/_dlib_pybind11.dir/build.make:445: recipe for target 'build_dunfell/tmp/work/aarch64-poky-linux/python3-dlib/19.21.1-r0/build/lib.linux-x86_64-3.8/_dlib_pybind11.cpython-38-aarch64-linux-gnu.so' failed
| make[2]: *** [build_dunfell/tmp/work/aarch64-poky-linux/python3-dlib/19.21.1-r0/build/lib.linux-x86_64-3.8/_dlib_pybind11.cpython-38-aarch64-linux-gnu.so] Error 1
| CMakeFiles/Makefile2:116: recipe for target 'CMakeFiles/_dlib_pybind11.dir/all' failed
| make[1]: *** [CMakeFiles/_dlib_pybind11.dir/all] Error 2
| Makefile:83: recipe for target 'all' failed
| make: *** [all] Error 2
| Traceback (most recent call last):
| File "build_dunfell/tmp/work/aarch64-poky-linux/python3-dlib/19.21.1-r0/dlib-19.21.1/setup.py", line 223, in <module>
| setup(
| File "build_dunfell/tmp/work/aarch64-poky-linux/python3-dlib/19.21.1-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup
| return distutils.core.setup(**attrs)
| File "build_dunfell/tmp/work/aarch64-poky-linux/python3-dlib/19.21.1-r0/recipe-sysroot-native/usr/lib/python3.8/distutils/core.py", line 148, in setup
| dist.run_commands()
| File "build_dunfell/tmp/work/aarch64-poky-linux/python3-dlib/19.21.1-r0/recipe-sysroot-native/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
| self.run_command(cmd)
| File "build_dunfell/tmp/work/aarch64-poky-linux/python3-dlib/19.21.1-r0/recipe-sysroot-native/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
| cmd_obj.run()
| File "build_dunfell/tmp/work/aarch64-poky-linux/python3-dlib/19.21.1-r0/recipe-sysroot-native/usr/lib/python3.8/distutils/command/build.py", line 135, in run
| self.run_command(cmd_name)
| File "build_dunfell/tmp/work/aarch64-poky-linux/python3-dlib/19.21.1-r0/recipe-sysroot-native/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
| self.distribution.run_command(command)
| File "build_dunfell/tmp/work/aarch64-poky-linux/python3-dlib/19.21.1-r0/recipe-sysroot-native/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
| cmd_obj.run()
| File "build_dunfell/tmp/work/aarch64-poky-linux/python3-dlib/19.21.1-r0/dlib-19.21.1/setup.py", line 135, in run
| self.build_extension(ext)
| File "build_dunfell/tmp/work/aarch64-poky-linux/python3-dlib/19.21.1-r0/dlib-19.21.1/setup.py", line 175, in build_extension
| subprocess.check_call(cmake_build, cwd=build_folder)
| File "build_dunfell/tmp/work/aarch64-poky-linux/python3-dlib/19.21.1-r0/recipe-sysroot-native/usr/lib/python3.8/subprocess.py", line 364, in check_call
| raise CalledProcessError(retcode, cmd)
| subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j8']' returned non-zero exit status 2.
| WARNING: exit code 1 from a shell command.
|
it looks like the problem occurs when cmake is trying to link the shared object _dlib_pybind11.cpython-38-aarch64-linux-gnu.so. Linker complains with the following error
adding symbols: file in wrong format
i think the linker is mixing target objects with native ones, but i'm not used to cmake so i don't know how to stop it to use the path of recipe-sysroot-native and use my target sysroot, if i remove cmake-native and use only DEPENDS="cmake", setup.py fails because it can not find cmake at all...
hope you can help me or give me any idea that i can try.
BR,
Update 1
just as #Nayfe pointed out dlib/setup.py has an --set option to pass CMAKE config variables, below is a recipe that already worked for me, i can import dlib without problems.
SUMMARY = "A toolkit for making real world machine learning and data analysis applications"
HOMEPAGE = "https://pypi.python.org/pypi/dlib"
PYPI_PACKAGE = "dlib"
LICENSE = "Boost-Software"
SRC_URI[md5sum] = "1e7e357d7d54e86267ef60f606cb40e1"
LIC_FILES_CHKSUM = "file://dlib/LICENSE.txt;md5=2c7a3fa82e66676005cd4ee2608fd7d2 \
file://dlib/external/libpng/LICENSE;md5=243135ddedf702158f9170807cbcfb66 \
file://dlib/external/pybind11/LICENSE;md5=beb87117af69fd10fbf9fb14c22a2e62 \
file://python_examples/LICENSE_FOR_EXAMPLE_PROGRAMS.txt;md5=064f53ab40ea2b6a4bba1324149e4fde \
"
DEPENDS = "sqlite3 "
inherit pypi cmake setuptools3
INSANE_SKIP_${PN} = "already-stripped"
DISTUTILS_BUILD_ARGS_append = " \
--set CMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
"
Maybe recipe can be optimized but the following works
python3-dlib_19.21.bb
SUMMARY = "A toolkit for making real world machine learning and data analysis applications"
HOMEPAGE = "http://dlib.net/"
SECTION = "devel/python"
LICENSE = "BSL-1.0"
LIC_FILES_CHKSUM = "file://dlib/LICENSE.txt;md5=2c7a3fa82e66676005cd4ee2608fd7d2"
DEPENDS = "sqlite3"
SRC_URI = "git://github.com/davisking/dlib"
SRCREV = "9117bd784328d9ac40ffa1f9cf487633a8a715d7"
S = "${WORKDIR}/git"
DISTUTILS_BUILD_ARGS_append = " \
--set CMAKE_INSTALL_PREFIX:PATH=${prefix} \
--set CMAKE_INSTALL_BINDIR:PATH=${#os.path.relpath(d.getVar('bindir'), d.getVar('prefix') + '/')} \
--set CMAKE_INSTALL_SBINDIR:PATH=${#os.path.relpath(d.getVar('sbindir'), d.getVar('prefix') + '/')} \
--set CMAKE_INSTALL_LIBEXECDIR:PATH=${#os.path.relpath(d.getVar('libexecdir'), d.getVar('prefix') + '/')} \
--set CMAKE_INSTALL_SYSCONFDIR:PATH=${sysconfdir} \
--set CMAKE_INSTALL_SHAREDSTATEDIR:PATH=${#os.path.relpath(d.getVar('sharedstatedir'), d. getVar('prefix') + '/')} \
--set CMAKE_INSTALL_LOCALSTATEDIR:PATH=${localstatedir} \
--set CMAKE_INSTALL_LIBDIR:PATH=${#os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/')} \
--set CMAKE_INSTALL_INCLUDEDIR:PATH=${#os.path.relpath(d.getVar('includedir'), d.getVar('prefix') + '/')} \
--set CMAKE_INSTALL_DATAROOTDIR:PATH=${#os.path.relpath(d.getVar('datadir'), d.getVar('prefix') + '/')} \
--set PYTHON_EXECUTABLE:PATH=${PYTHON} \
--set Python_EXECUTABLE:PATH=${PYTHON} \
--set Python3_EXECUTABLE:PATH=${PYTHON} \
--set LIB_SUFFIX=${#d.getVar('baselib').replace('lib', '')} \
--set CMAKE_INSTALL_SO_NO_EXE=0 \
--set CMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
--set CMAKE_NO_SYSTEM_FROM_IMPORTED=1 \
--set CMAKE_LIBRARY_OUTPUT_DIRECTORY=${B} \
"
do_configure() {
distutils3_do_configure
}
do_compile() {
distutils3_do_compile
}
do_install() {
distutils3_do_install
}
inherit cmake setuptools3 python3native
INSANE_SKIP_${PN} = "already-stripped"
RDEPENDS_${PN} += "python3-core"

Nodejs node binary core dumped(Ilegal Insatruction)

I am working on bit-bake environment. I am using nodejs ver 10.15.3
dest cpu == ppc64 linux
My problem is node binary core dumps and I am not able to identify the root cause. I am trying to compile nodejs for dest cpu(ppc64).
I am not sure but I guess there are runtime requirements which are not satisfied on the target machine.
below is my recipe:-
DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"
HOMEPAGE = "http://nodejs.org"
LICENSE = "MIT & BSD & Artistic-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=9ceeba79eb2ea1067b7b3ed16fff8bab"
DEPENDS = "openssl zlib icu"
DEPENDS_append_class-target = " nodejs-native"
inherit pkgconfig
COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*"
COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*"
COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*"
SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
file://0001-Disable-running-gyp-files-for-bundled-deps.patch \
file://0003-Crypto-reduce-memory-usage-of-SignFinal.patch \
file://0004-Make-compatibility-with-gcc-4.8.patch \
file://0005-Link-atomic-library.patch \
file://0006-Use-target-ldflags.patch \
"
SRC_URI_append_class-target = " \
file://0002-Using-native-torque.patch \
"
SRC_URI[md5sum] = "d76210a6ae1ea73d10254947684836fb"
SRC_URI[sha256sum] = "4e22d926f054150002055474e452ed6cbb85860aa7dc5422213a2002ed9791d5"
S = "${WORKDIR}/node-v${PV}"
# v8 errors out if you have set CCACHE
CCACHE = ""
def map_nodejs_arch(a, d):
import re
if re.match('i.86$', a): return 'ia32'
elif re.match('x86_64$', a): return 'x64'
elif re.match('aarch64$', a): return 'arm64'
elif re.match('(powerpc64|ppc64le)$', a): return 'ppc64'
elif re.match('powerpc$', a): return 'ppc'
return a
ARCHFLAGS_arm = "${#bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \
${#bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \
bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \
bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \
'--with-arm-fpu=vfp', d), d), d)}"
GYP_DEFINES_append_mipsel = " mips_arch_variant='r1' "
ARCHFLAGS ?= ""
# Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi
do_configure () {
rm -rf ${S}/deps/openssl
export LD="${CXX}"
GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES
# $TARGET_ARCH settings don't match --dest-cpu settings
./configure --prefix=${prefix} --with-intl=system-icu --without-snapshot --shared-openssl --shared-zlib \
--dest-cpu="${#map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \
--dest-os=linux \
${ARCHFLAGS}
}
do_compile () {
export LD="${CXX}"
oe_runmake BUILDTYPE=Release
}
do_install () {
oe_runmake install DESTDIR=${D}
}
do_install_append_class-native() {
# use node from PATH instead of absolute path to sysroot
# node-v0.10.25/tools/install.py is using:
# shebang = os.path.join(node_prefix, 'bin/node')
# update_shebang(link_path, shebang)
# and node_prefix can be very long path to bindir in native sysroot and
# when it exceeds 128 character shebang limit it's stripped to incorrect path
# and npm fails to execute like in this case with 133 characters show in log.do_install:
# updating shebang of /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/work/x86_64-linux/nodejs-native/0.10.15-r0/image/home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/npm to /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/node
# /usr/bin/npm is symlink to /usr/lib/node_modules/npm/bin/npm-cli.js
# use sed on npm-cli.js because otherwise symlink is replaced with normal file and
# npm-cli.js continues to use old shebang
sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
# Install the native torque to provide it within sysroot for the target compilation
install -d ${D}${bindir}
install -m 0755 ${S}/out/Release/torque ${D}${bindir}/torque
}
do_install_append_class-target() {
sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
}
PACKAGES =+ "${PN}-npm"
FILES_${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm ${bindir}/npx"
RDEPENDS_${PN}-npm = "bash python-shell python-datetime python-subprocess python-textutils \
python-compiler python-misc python-multiprocessing"
PACKAGES =+ "${PN}-systemtap"
FILES_${PN}-systemtap = "${datadir}/systemtap"
BBCLASSEXTEND = "native"
I am able to apply gdb to node binary below is the snapshot. It core dumps at this point.
Thread 1 "node" hit Breakpoint 10, v8::internal::Runtime_PromiseHookInit (args_length=2, args_object=0x3fffffffd188, isolate=0x11284ab0)
at /usr/src/debug/nodejs/8.17.0-r0/node-v8.17.0/deps/v8/src/runtime/runtime-promise.cc:132
132 /usr/src/debug/nodejs/8.17.0-r0/node-v8.17.0/deps/v8/src/runtime/runtime-promise.cc: No such file or directory.
(gdb) bt
#0 v8::internal::Runtime_PromiseHookInit (args_length=2, args_object=0x3fffffffd188, isolate=0x11284ab0) at /usr/src/debug/nodejs/8.17.0-r0/node-v8.17.0/deps/v8/src/runtime/runtime-promise.cc:132
#1 0x000003c7b3f04134 in ?? ()
(gdb) c
Continuing.
Nodejs is not supported on PPC64 LE architecture. There is only support for the Big Endian platform on PPC architecture till 7.9 Version.

Trying to build oe image with framebuffer

conf/local.conf
MACHINE ??= "genericx86-64"
PACKAGE_CLASSES ?= "package_ipk"
SDKMACHINE ?= "x86_64"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
#TEST_IMAGE = "1"
#OE_TERMINAL = "auto"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
ABORT,${TMPDIR},100M,1K \
ABORT,${DL_DIR},100M,1K \
ABORT,${SSTATE_DIR},100M,1K \
ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
CONF_VERSION = "1"
IMAGE_FEATURES += "splash package-management ssh-server-openssh allow-empty-password hwcodecs empty-root-password "
MACHINE_FEATURES_append = " acpi alsa keyboard pci pcbios screen touchscreen wifi serial rtc"
DISTRO_FEATURES_remove = " wayland x11"
DISTRO_FEATURES_append = " systemd opengl directfb kms splash keyboard pci wifi "
PACKAGECONFIG_GL_pn-qtbase = "gl gles2 eglfs linuxfb libinput directfb udev kms"
PACKAGECONFIG_X11_pn-qtbase = ""
PACKAGECONFIG_FB_pn-qtbase = "linuxfb kms directfb"
IMAGE_INSTALL += " python3-pyyaml python3-pyusb python3-pyudev python3-pyserial python3-cffi python3-evdev python3-pip"
IMAGE_INSTALL += " kernel-modules packagegroup-base-extended packagegroup-base-wifi"
IMAGE_INSTALL += " libdrm mesa-megadriver mesa libinput libudev fbida dietsplash ttf-fonts"
DISTRO="poky"
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
conf/bblayers.conf
LCONF_VERSION = "7"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
/home/eri/oe-core/meta-clang \
/home/eri/oe-core/meta \
/home/eri/oe-core/meta-rtlwifi \
/home/eri/oe-core/meta-yocto/meta-yocto-bsp \
/home/eri/oe-core/meta-yocto/meta-poky \
/home/eri/oe-core/meta-qt5 \
/home/eri/oe-core/meta-intel \
/home/eri/oe-core/meta-openembedded/meta-oe \
/home/eri/oe-core/meta-openembedded/meta-python \
/home/eri/oe-core/meta-pyside2 \
"
Run:
bitbake core-image-full-cmdline
I want /dev/dri/card0 and /dev/fb0 on qemu, intel and amd internal video. But I have no kernel video drivers in rootfs...

Resources