I want to add the LSM6DS3 sensor driver in my AOSP source code. I am using SC600T device.
I have already add lsm6ds3 to the location
/SC600T/SC60_SC600_Android9.0.0_kernel4.9_r029/kernel/msm-4.9/drivers/iio/imu/st_lsm6ds3, with Makefile and Kconfig files.
Added below line to /../../iio/imu/Kconfig file:
source "drivers/iio/imu/st_lsm6ds3/Kconfig"
Added below line to /../../iio/imu/Makefile.
obj-y += st_lsm6ds3/
Content of /SC600T/../../iio/imu/st_lsm6ds3/Makefile:
# SPDX-License-Identifier: GPL-2.0-only
st_lsm6dsx-y := st_lsm6dsx_core.o st_lsm6dsx_buffer.o \
st_lsm6dsx_shub.o
obj-$(CONFIG_IIO_ST_LSM6DSX) += st_lsm6dsx.o
obj-$(CONFIG_IIO_ST_LSM6DSX_I2C) += st_lsm6dsx_i2c.o
obj-$(CONFIG_IIO_ST_LSM6DSX_SPI) += st_lsm6dsx_spi.o
obj-$(CONFIG_IIO_ST_LSM6DSX_I3C) += st_lsm6dsx_i3c.o
I have also added lsm6ds3 node in the device tree file:
&i2c_2 {
status = "ok";
#address-cells = <0x1>;
#size-cells = <0x0>;
lsm6ds3#6b {
compatible = "st,lsm6ds3";
reg = <0x6b>;
interrupt-parent = <&tlmm>;
interrupt-gpios = <&tlmm 45 0x2008>;
interrupts = <45 0x02>;
};
I have connected LSM6DS3 accelerometer Sensor on SENSOR_I2C_SCL (Pin number 131) and SENSOR_I2C_SDA (Pin number 132).
After that I have compiled the source code and flash boot and dtbo on target device(SC600T) successfully.
When I am trying to check sensor data using adb shell >> /sys/bus/devices/i2C/devices node is available and
lsm6ds3 address node which is 6b is also available.
But lsm6ds3 sensor is not probed.
enter image description here
enter image description here
Then after I will add below lines in msm8953_defconfig file.
Added below lines in msm8953_defconfig fie:
CONFIG_IIO_ST_LSM6DSX=y
CONFIG_IIO_ST_LSM6DSX_I2C=y
CONFIG_IIO_ST_LSM6DSX_SPI=y
CONFIG_IIO_ST_LSM6DSX_I3C=y
after adding this file when i compiling the source code getting below errors:
[ 2% 309/12824] Building kernel...
FAILED: out/target/product/msm8953_64/obj/kernel/msm-4.9/arch/arm64/boot/Image.gz-dtb
/bin/bash -c "(rm -rf out/target/product/msm8953_64/obj/kernel/msm-4.9/arch/arm64/boot/dts ) && (make -j3 -C kernel/msm-4.9 O=../../out/target/product/msm8953_64/obj/kernel/msm-4.9 DTC_EXT=dtc CONFIG_BUILD_ARM64_DT_OVERLAY=y ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- KCFLAGS=-mno-android ) && (make -j3 -C kernel/msm-4.9 O=../../out/target/product/msm8953_64/obj/kernel/msm-4.9 DTC_EXT=dtc CONFIG_BUILD_ARM64_DT_OVERLAY=y ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- KCFLAGS=-mno-android modules ) && (make -j3 -C kernel/msm-4.9 O=../../out/target/product/msm8953_64/obj/kernel/msm-4.9 INSTALL_MOD_PATH=../../../dlkm INSTALL_MOD_STRIP=1 DTC_EXT=dtc CONFIG_BUILD_ARM64_DT_OVERLAY=y ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- modules_install ) && (mdpath=\`find out/target/product/msm8953_64/dlkm/lib/modules -type f -name modules.dep\`; if [ \"\$mdpath\" != \"\" ];then mpath=\`dirname \$mdpath\`; ko=\`find \$mpath/kernel -type f -name *.ko\`; for i in \$ko; do mv \$i out/target/product/msm8953_64/dlkm/lib/modules/; done; fi ) && (mdpath=\`find out/target/product/msm8953_64/dlkm/lib/modules -type f -name modules.dep\`; if [ \"\$mdpath\" != \"\" ];then mpath=\`dirname \$mdpath\`; rm -rf \$mpath; fi )"
make: Entering directory `/media/ubuntu/Vezo_360/SC600T/SC60_SC600_Android9.0.0_kernel4.9_r029/kernel/msm-4.9'
make[1]: Entering directory `/media/ubuntu/Vezo_360/SC600T/SC60_SC600_Android9.0.0_kernel4.9_r029/out/target/product/msm8953_64/obj/kernel/msm-4.9'
GEN ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
make[2]: Leaving directory `/media/ubuntu/Vezo_360/SC600T/SC60_SC600_Android9.0.0_kernel4.9_r029/out/target/product/msm8953_64/obj/kernel/msm-4.9'
make[1]: Entering directory `/media/ubuntu/Vezo_360/SC600T/SC60_SC600_Android9.0.0_kernel4.9_r029/out/target/product/msm8953_64/obj/kernel/msm-4.9'
CHK include/config/kernel.release
GEN ./Makefile
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
Using /media/ubuntu/Vezo_360/SC600T/SC60_SC600_Android9.0.0_kernel4.9_r029/kernel/msm-4.9 as source for kernel
/media/ubuntu/Vezo_360/SC600T/SC60_SC600_Android9.0.0_kernel4.9_r029/kernel/msm-4.9 is not clean, please run 'make mrproper'
in the '/media/ubuntu/Vezo_360/SC600T/SC60_SC600_Android9.0.0_kernel4.9_r029/kernel/msm-4.9' directory.
make[2]: *** [prepare3] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/media/ubuntu/Vezo_360/SC600T/SC60_SC600_Android9.0.0_kernel4.9_r029/out/target/product/msm8953_64/obj/kernel/msm-4.9'
make: *** [sub-make] Error 2
make: Leaving directory `/media/ubuntu/Vezo_360/SC600T/SC60_SC600_Android9.0.0_kernel4.9_r029/kernel/msm-4.9'
[ 2% 312/12824] target C: libdsutils <= vendor/qcom/proprietary/data/dsutils/src/ds_util.c
vendor/qcom/proprietary/data/dsutils/src/ds_util.c:719:7: warning: unused variable 'adb_lvl' [-Wunused-variable]
int adb_lvl = 0;
^
vendor/qcom/proprietary/data/dsutils/src/ds_util.c:2357:5: warning: unused function 'ds_can_exec' [-Wunused-function]
int ds_can_exec
^
2 warnings generated.
[ 2% 314/12824] target C++: KmInstallKeybox <= ven...ecuremsm/keymaster_install_toolbox/InstallKeybox.cpp
ninja: build stopped: subcommand failed.
20:36:27 ninja failed with: exit status 1
#### failed to build some targets (42 seconds) ####
Adding any custom sensor in the AOSP, are this all steps mandatory or not?
Why lsm6ds3 sensor is not probed? Do I need to check anything from the hardware side?
Sensors on Quectel SC600 devices go through something called ADSP, that is closed source. Under this system, sensors are configured through the vendor/qcom/proprietary/sensors/dsps/reg_defaults/sensor_def_qcomdev.conf file.
There is a list of compatible sensors that can work with the ADSP. You have to ask it to your Quectel representative. Otherwise you have to ask them to integrate the sensor you want, and this is, of course, too much to ask, so consider it impossible (unless Qualcomm hands you the ADSP source code, which I don't think it is going to happen).
Related
The following structure works fine on a native ubuntu machine:
Makefile
Makefile-Debug
Makefile-impl
I call make with make CONF=Debug
Contents of Makefile are:
MKDIR=mkdir
CP=cp
CCADMIN=CCadmin
build: .build-post
.build-pre:
.build-post: .build-impl
clean: .clean-post
.clean-pre:
.clean-post: .clean-impl
clobber: .clobber-post
.clobber-pre:
.clobber-post: .clobber-impl
all: .all-post
.all-pre:
.all-post: .all-impl
build-tests: .build-tests-post
.build-tests-pre:
.build-tests-post: .build-tests-impl
test: .test-post
.test-pre: build-tests
.test-post: .test-impl
help: .help-post
.help-pre:
.help-post: .help-impl
include Makefile-impl.mk <<----this file gets executed
include Makefile-variables.mk
Now, Makefile-impl.mk has the following line where it is checked whether the makefile corresponding to the Debug configuration -- Makefile-Debug -- actually exists:
.validate-impl:
#if [ ! -f Makefile-${CONF}.mk ]; \ <<------ this line produces an error in MinGW
then \
echo ""; \
echo "Error: can not find the makefile for configuration '${CONF}' in project ${PROJECTNAME}"; \
echo "See 'make help' for details."; \
echo "Current directory: " `pwd`; \
echo ""; \
fi
#if [ ! -f Makefile-${CONF}.mk ]; \
then \
exit 1; \
fi
The above works perfectly fine on the native ubuntu machine.
When mingw32-make.exe processes the above on a windows machine, I obtain an error:
! was unexpected at this time.
mingw32-make: *** [Makefile-impl.mk:90: .validate-impl] Error 255
Is there any workaround for this? I also obtain other errors, such as for -n on the following different line in Makefile-impl.mk
#if [ -n "${MAKE_VERSION}" ]; then \
Here the error is:
-n was unexpected at this time.
mingw32-make: *** [Makefile-impl.mk:78: .depcheck-impl] Error 255
I am automating the building and unit testing of a personal project using bash scripts (parts of the unit testing have been reviewed on Code Review), cmake and make on the latest version of Fedora Linux. The postive test passes on on the build system, however, when I force an LD failure in one of the unit tests the build still passes at the higher levels. It needs to fail at all levels.
Here is the error message from the make generated by a cmake command:
/home/pacman/Documents/projects/VMWithEditor/VMWithEditor/human_readable_program_format.c:179: multiple definition of `HRF_delete_linked_list_of_program_steps'; CMakeFiles/Run_All_Unit_Tests.exe.dir/home/pacman/Documents/projects/VMWithEditor/VMWithEditor/UnitTests/HRF_UnitTest/HRF_UnitTest/unit_test_human_readable_program_format.c.o:/home/pacman/Documents/projects/VMWithEditor/VMWithEditor/UnitTests/RunAllUnitTests/RunAllUnitTests/../../../human_readable_program_format.c:179: first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/Run_All_Unit_Tests.exe.dir/build.make:433: Run_All_Unit_Tests.exe] Error 1
make[2]: Leaving directory '/home/pacman/Documents/projects/VMWithEditor/VMWithEditor/UnitTests/RunAllUnitTests/RunAllUnitTests/Debug'
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/Run_All_Unit_Tests.exe.dir/all] Error 2
make[1]: Leaving directory '/home/pacman/Documents/projects/VMWithEditor/VMWithEditor/UnitTests/RunAllUnitTests/RunAllUnitTests/Debug'
make: *** [Makefile:103: all] Error 2
This is the output of the top level shell script, the last 2 builds should not execute:
Building CommandLine_UnitTest/CommandLine_UnitTest
Building ControlConsole_UnitTest/ControlConsole_UnitTest
Building Editor_UnitTest/Editor_UnitTest
Building HRF_UnitTest/HRF_UnitTest
Building Parser_Unit_Test/Parser_Unit_Test
Building RunAllUnitTests/RunAllUnitTests
Building State_Machine_Unit_Test/State_Machine_Unit_Test
Building VirtualMachine_UnitTest/VirtualMachine_UnitTest
This is the shell script that doesn't fail when it should:
buildDebug.sh
#! /bin/sh
# Create a Debug build directory and then build the target within the Debug directory
# Stop on any build errors and stop the parent process.
mkdir Debug
cd Debug
cmake -DCMAKE_BUILD_TYPE=Debug ..
retVal=$?
if [ $retVal -ne 0 ]; then
echo "\n\ncmake failed $retval!\n\n"
exit $retVal
fi
make VERBOSE=1
if [ $retVal -ne 0 ]; then
echo "\n\nmake failed! $retval\n\n"
exit $retVal
fi
The previous shell script is called by this shell script, there are 8 instances of the previous shell script in subdirectories.
buildAllDebug.sh
#! /bin/sh
# Build the debug version of all the unit tests
# Stop on any build errors.
for i in *
do
if [ -d $i ] ; then
TESTDIRECTORY="$i/$i"
SHELLFILE="$TESTDIRECTORY/buildDebug.sh";
if [ -f $SHELLFILE ] ; then
echo "Building $TESTDIRECTORY";
cd "$TESTDIRECTORY"
./buildDebug.sh >& buildDebuglog.txt
retVal=$?
if [ $retVal -ne 0 ]; then
exit $retVal
fi
cd ../..
fi
fi
done;
This generates the make file that is reporting the error:
CMakeLists.txt
cmake_minimum_required(VERSION 3.18.4)
set(EXECUTABLE_NAME "Run_All_Unit_Tests.exe")
project(${EXECUTABLE_NAME} LANGUAGES C VERSION 1.0)
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
set(GCC_WARN_COMPILE_FLAGS " -Wall ")
set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_WARN_COMPILE_FLAGS}")
endif()
set(VM_SRC_DIR "../../..")
set(COMMON_TEST_DIR "../../Common_UnitTest_Code")
set(LEXICAL_TEST_DIR "../../State_Machine_Unit_Test/State_Machine_Unit_Test")
set(PARSER_TEST_DIR "../../Parser_Unit_Test/Parser_Unit_Test")
set(CMD_LINE_TEST_DIR "../../CommandLine_UnitTest/CommandLine_UnitTest")
set(HRF_TEST_DIR "../../HRF_UnitTest/HRF_UnitTest")
add_executable(${EXECUTABLE_NAME}
run_all_unit_tests_main.c
${HRF_TEST_DIR}/hrf_unit_test_main.c
${HRF_TEST_DIR}/unit_test_human_readable_program_format.c
${LEXICAL_TEST_DIR}/lexical_analyzer_unit_test_main.c
${LEXICAL_TEST_DIR}/internal_character_transition_unit_tests.c
${LEXICAL_TEST_DIR}/internal_sytax_state_tests.c
${LEXICAL_TEST_DIR}/lexical_analyzer_test_data.c
${LEXICAL_TEST_DIR}/lexical_analyzer_unit_test_utilities.c
${VM_SRC_DIR}/error_reporting.c
${VM_SRC_DIR}/safe_string_functions.c
${VM_SRC_DIR}/arg_flags.c
${VM_SRC_DIR}/file_io_vm.c
${VM_SRC_DIR}/opcode.c
${VM_SRC_DIR}/parser.c
${VM_SRC_DIR}/default_program.c
${VM_SRC_DIR}/human_readable_program_format.c
${VM_SRC_DIR}/lexical_analyzer.c
${VM_SRC_DIR}/virtual_machine.c
${PARSER_TEST_DIR}/parser_unit_test_main.c
${PARSER_TEST_DIR}/internal_parser_tests.c
${PARSER_TEST_DIR}/parser_unit_test.c
${CMD_LINE_TEST_DIR}/command_line_unit_test_main.c
${VM_SRC_DIR}/error_reporting.c
${VM_SRC_DIR}/arg_flags.c
${VM_SRC_DIR}/safe_string_functions.c
${COMMON_TEST_DIR}/unit_test_logging.c
)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED True)
configure_file(VMWithEditorConfig.h.in VMWithEditorConfig.h)
target_compile_definitions(${EXECUTABLE_NAME} PUBLIC UNIT_TESTING)
target_compile_definitions(${EXECUTABLE_NAME} PUBLIC ALL_UNIT_TESTING)
target_include_directories(${EXECUTABLE_NAME} PUBLIC "${PROJECT_BINARY_DIR}")
target_include_directories(${EXECUTABLE_NAME} PRIVATE "${VM_SRC_DIR}")
target_include_directories(${EXECUTABLE_NAME} PRIVATE "${COMMON_TEST_DIR}")
target_include_directories(${EXECUTABLE_NAME} PRIVATE "${LEXICAL_TEST_DIR}")
target_include_directories(${EXECUTABLE_NAME} PRIVATE "${CMD_LINE_TEST_DIR}")
target_include_directories(${EXECUTABLE_NAME} PRIVATE "${PARSER_TEST_DIR}")
target_include_directories(${EXECUTABLE_NAME} PRIVATE "${HRF_TEST_DIR}")
The Directory Stucture for the builds:
This was generated by ls -R and then edited to remove what isn't necessary for this question.
/UnitTests/:
buildAllDebug.sh
buildAll.log
buildDebug.sh
buildRelease.sh
CommandLine_UnitTest
Common_UnitTest_Code
ControlConsole_UnitTest
DirStructure.txt
Editor_UnitTest
HRF_UnitTest
Parser_Unit_Test
RunAllUnitTests
State_Machine_Unit_Test
UnitTests
VirtualMachine_UnitTest
/UnitTests/CommandLine_UnitTest:
/UnitTests/CommandLine_UnitTest/CommandLine_UnitTest:
buildDebuglog.txt
buildDebug.sh
buildRelease.sh
CMakeLists.txt
/UnitTests/Common_UnitTest_Code:
/UnitTests/ControlConsole_UnitTest:
/UnitTests/ControlConsole_UnitTest/ControlConsole_UnitTest:
buildDebug.sh
buildRelease.sh
CMakeLists.txt
/UnitTests/Editor_UnitTest:
/UnitTests/Editor_UnitTest/Editor_UnitTest:
buildDebug.sh
buildRelease.sh
CMakeLists.txt
/UnitTests/HRF_UnitTest:
/UnitTests/HRF_UnitTest/HRF_UnitTest:
buildDebug.sh
buildRelease.sh
CMakeLists.txt
/UnitTests/Parser_Unit_Test:
/UnitTests/Parser_Unit_Test/Parser_Unit_Test:
buildDebug.sh
buildRelease.sh
CMakeLists.txt
/UnitTests/RunAllUnitTests:
/UnitTests/RunAllUnitTests/RunAllUnitTests:
buildDebug.sh
buildRelease.sh
CMakeLists.txt
/UnitTests/State_Machine_Unit_Test:
/UnitTests/State_Machine_Unit_Test/State_Machine_Unit_Test:
buildDebug.sh
buildRelease.sh
CMakeLists.txt
/UnitTests/UnitTests:
/UnitTests/VirtualMachine_UnitTest:
/UnitTests/VirtualMachine_UnitTest/VirtualMachine_UnitTest:
buildDebug.sh
buildRelease.sh
CMakeLists.txt
You have:
make VERBOSE=1
if [ $retVal -ne 0 ]; then
but retVal is still the return code of the cmake command. Either reset it or test $? directly.
I have a STM32MP1 SBC and i am using it with yocto project. STM provides Cubemx tool which is used to generate the device tree etc.
I have followed the instructions from this article but unable to compile the device tree..
https://wiki.st.com/stm32mpu/wiki/How_to_compile_the_device_tree_with_the_Distribution_Package
my layer.conf look like this..
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "meta-my-demo-layer"
BBFILE_PATTERN_meta-my-demo-layer = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-my-demo-layer = "6"
EULA_FILE_ST_stm32mpmydemo = "${LAYERDIR}/conf/eula/${MACHINE}"
EULA_FILE_ST_MD5SUM_stm32mpmydemo = "8b505090fb679839cefbcc784afe8ce9"
#Inform bitbake for adding another location to search for licenses
LICENSE_PATH += "${LAYERDIR}/files/licenses"
# Set a variable to get the STM32MP MX BSP location
STM32MP_MY_DEMO_BASE = "${LAYERDIR}"
# This should only be incremented on significant changes that may
# cause compatibility issues with other layers
LAYERVERSION_meta-my-demo-layer = "1"
LAYERDEPENDS_meta-my-demo-layer = "stm-st-stm32mp-mx"
# OpenEmbedded compatibility information
# This should only be incremented on significant changes that will
# cause compatibility issues with other layers
LAYERVERSION_meta-my-demo-layer = "1"
LAYERDEPENDS_meta-my-demo-layer = "core"
LAYERSERIES_COMPAT_meta-my-demo-layer = "dunfell"
and my machine file look like this..
##TYPE: Machine
##NAME: stm32mp1-mx
##DESCRIPTION: Configuration for STM32CubeMX generated project
##NEEDED_BSPLAYERS: layers/meta-openembedded/meta-oe layers/meta-openembedded/meta-python layers/meta-st/meta-st-stm32mp-addons
###########################################################################
#
# Default machine configuration sections
#
###########################################################################
include conf/machine/include/st-machine-common-stm32mp.inc
include conf/machine/include/st-machine-providers-stm32mp.inc
# Define specific common machine name
MACHINEOVERRIDES .= ":stm32mpmydemo"
# =========================================================================
# Chip architecture
# =========================================================================
DEFAULTTUNE = "cortexa7thf-neon-vfpv4"
include conf/machine/include/tune-cortexa7.inc
# =========================================================================
# Machine settings
# =========================================================================
STM32MP_DEVICETREE = "${CUBEMX_DTB}"
# =========================================================================
# Machine features (default for stm32mp1 like)
# =========================================================================
MACHINE_FEATURES += "splashscreen"
MACHINE_FEATURES += "watchdog"
MACHINE_FEATURES += "wifi"
MACHINE_FEATURES += "${#'gpu' if d.getVar('ACCEPT_EULA_'+d.getVar('MACHINE')) == '1' else ''}"
MACHINE_FEATURES += "m4copro"
# =========================================================================
# Device Storage
# =========================================================================
# Enable the board device storage support with CUBEMX_DTB according to BOOTDEVICE_LABELS
DEVICE_BOARD_ENABLE_SDCARD += "${#bb.utils.contains('BOOTDEVICE_LABELS', 'sdcard', '${CUBEMX_DTB}', '', d)}"
# =========================================================================
# Flashlayout
# =========================================================================
# Set the FLASHLAYOUT_TYPE_LABELS to CUBEMX_DTB according to BOOTDEVICE_LABELS
FLASHLAYOUT_TYPE_LABELS_sdcard = "${#bb.utils.contains('BOOTDEVICE_LABELS', 'sdcard', '${CUBEMX_DTB}', '', d)}"
# Specific settings for 'extensible' and 'deleteall' configurations
FLASHLAYOUT_CONFIG_LABELS_deleteall = "cubemx"
FLASHLAYOUT_TYPE_LABELS_deleteall_cubemx = "${CUBEMX_DTB}"
FLASHLAYOUT_TYPE_LABELS_extensible = "${CUBEMX_DTB}"
# =========================================================================
# CubeMX extra config
# =========================================================================
# Set specific subdir path by components for each device tree file location
# within CUBEMX_PROJECT project folder
CUBEMX_DTB_PATH_TFA = "tf-a"
CUBEMX_DTB_PATH_TFA_SB = "tf-a"
CUBEMX_DTB_PATH_UBOOT = "u-boot"
CUBEMX_DTB_PATH_LINUX = "kernel"
CUBEMX_DTB_PATH_OPTEEOS = "optee-os"
###########################################################################
#
# User machine customization sections
#
###########################################################################
# Boot Scheme
# =========================================================================
BOOTSCHEME_LABELS += "trusted"
#BOOTSCHEME_LABELS += "optee"
# WORKAROUND to generate U-BOOT SPL for DDR Tuning tools usage
UBOOT_CONFIG += "basic"
# Boot Device Choice
# =========================================================================
# Define the boot device supported
BOOTDEVICE_LABELS += "sdcard"
# Support Feature Choice
# =========================================================================
# Define the features to enable on board
#MACHINE_FEATURES += "bluetooth"
MACHINE_FEATURES += "wifi"
# Specific firmwares and kernel modules configuration
# =========================================================================
# Set the list of kernel module to be auto-loaded during boot
#KERNEL_MODULE_AUTOLOAD += ""
# Set Bluetooth related package list needed when 'bluetooth' feature is enabled
#BLUETOOTH_LIST += ""
# Set Wifi related package list needed when 'wifi' feature is enabled
WIFI_LIST += "linux-firmware-bcm43430"
# CubeMX Project Config
# =========================================================================
# Assign CubeMX Board devicetree and project path name
CUBEMX_DTB = "stm32mp153c-my_stm-mx"
CUBEMX_PROJECT = "mx/MY_STM/CA7/DeviceTree/MY_STM"
but in the end all the packages tf-a, kernel, u-boot are unable to compile with some errors...
ERROR: tf-a-stm32mp-2.2.r1-r0 do_compile: oe_runmake failed
ERROR: tf-a-stm32mp-2.2.r1-r0 do_compile: Execution of '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work/stm32mp1_demo-ostl-linux-gnueabi/tf-a-stm32mp/2.2.r1-r0/temp/run.do_compile.6449' failed with exit code 1:
make: Entering directory '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work-shared/stm32mp1-demo/tfa-source'
Including bl32/sp_min/sp_min.mk
HOSTCC stm32image.c
make: *** No rule to make target 'fdts/stm32mp153c-my_stm-mx.dts', needed by '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work/stm32mp1_demo-ostl-linux-gnueabi/tf-a-stm32mp/2.2.r1-r0/build/trusted/fdts/stm32mp153c-my_stm-mx.dtb'. Stop.
make: *** Waiting for unfinished jobs....
HOSTLD stm32image
Built stm32image successfully
make: Leaving directory '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work-shared/stm32mp1-demo/tfa-source'
WARNING: exit code 1 from a shell command.
ERROR: Logfile of failure stored in: /home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work/stm32mp1_demo-ostl-linux-gnueabi/tf-a-stm32mp/2.2.r1-r0/temp/log.do_compile.6449
Log data follows:
| DEBUG: Executing python function tfaconfig_env
| DEBUG: Python function tfaconfig_env finished
| DEBUG: Executing shell function do_compile
| NOTE: make -j 4 CROSS_COMPILE=arm-ostl-linux-gnueabi- DEBUG=1 LOG_LEVEL=40 PLAT=stm32mp1 ARCH=aarch32 ARM_ARCH_MAJOR=7 STM32MP_SDMMC=1 STM32MP_EMMC=1 STM32MP_SPI_NOR=1 STM32MP_RAW_NAND=1 STM32MP_SPI_NAND=1 -C /home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work/stm32mp1_demo-ostl-linux-gnueabi/tf-a-stm32mp/2.2.r1-r0/git DTB_FILE_NAME=stm32mp153c-my_stm-mx.dtb BUILD_PLAT=/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work/stm32mp1_demo-ostl-linux-gnueabi/tf-a-stm32mp/2.2.r1-r0/build/trusted AARCH32_SP=sp_min
| make: Entering directory '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work-shared/stm32mp1-demo/tfa-source'
| Including bl32/sp_min/sp_min.mk
| HOSTCC stm32image.c
| make: *** No rule to make target 'fdts/stm32mp153c-my_stm-mx.dts', needed by '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work/stm32mp1_demo-ostl-linux-gnueabi/tf-a-stm32mp/2.2.r1-r0/build/trusted/fdts/stm32mp153c-my_stm-mx.dtb'. Stop.
| make: *** Waiting for unfinished jobs....
| HOSTLD stm32image
|
| Built stm32image successfully
|
| make: Leaving directory '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work-shared/stm32mp1-demo/tfa-source'
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work/stm32mp1_demo-ostl-linux-gnueabi/tf-a-stm32mp/2.2.r1-r0/temp/run.do_compile.6449' failed with exit code 1:
| make: Entering directory '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work-shared/stm32mp1-demo/tfa-source'
| Including bl32/sp_min/sp_min.mk
| HOSTCC stm32image.c
| make: *** No rule to make target 'fdts/stm32mp153c-my_stm-mx.dts', needed by '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work/stm32mp1_demo-ostl-linux-gnueabi/tf-a-stm32mp/2.2.r1-r0/build/trusted/fdts/stm32mp153c-my_stm-mx.dtb'. Stop.
| make: *** Waiting for unfinished jobs....
| HOSTLD stm32image
|
| Built stm32image successfully
|
| make: Leaving directory '/home/user/build-openstlinux-weston/tmp-openstlinux_weston-glibc/work-shared/stm32mp1-demo/tfa-source'
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (/home/user/layers/meta-st/meta-st-stm32mp/recipes-bsp/trusted-firmware-a/tf-a-stm32mp_2.2.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 720 tasks of which 650 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 2 seconds
I know it's an old post but i had the same problem and this solution can help futur users:
First you need to follow this tutorial on
How to manage OpenSTLinux project in STM32CubeIDE (You need to be on a linux machine)
Then simply run the CA7 project from STM32CubeIDE or manually copy generated .dtb to "/boot/stm32mp157a-dk1.dtb" (set correct card name)
Am trying to create a debian package of my Eiffel application.
Either make or make -j4 (which is the called one from dpkg-buildpackage) within the root structure does the job without error
but when called from dpkg-buildpackage -us -uc which calls the Makefile it exits with an error
In file included from big_file_C7_c.c:40:0:
lo322.c: In function ‘inline_F425_4447’:
lo322.c:97:5: error: format not a string literal and no format arguments [-Werror=format-security]
syslog(arg1, arg2);
^~~~~~
cc1: some warnings being treated as errors
My makefile for info is as following:
#Build variables
MY_EC = $(shell which ec)
BUILT_TARGET = EIFGENs/$(TARGET_NAME)/F_code/$(APP_NAME)
# This target will compile all files
all: build
build:
# Checks eiffel compiler
# #echo "MY EC IS: ${MY_EC}"
#if [ -z "${MY_EC}" ]; then
echo "Compiler not found";
else
echo "Eiffel compiler found";
fi
# Compilation
echo '---------->finalizing'
ec -finalize -config $(APP_NAME).ecf -target $(TARGET_NAME) || (echo "last command failed $$="; exit 1)
cd $(FINAL_EXE_DIR); \
echo '---------->Finish freezing';\
finish_freezing || (echo "A problem occured during finish_freezing!!!"; exit 1)
The issue is caused by the feature c_logging_write_log of the class LOG_WRITER_SYSTEM in EiffelStudio 18.11 and earlier that makes the following call:
syslog($priority, $msg);
Replacing it with
syslog($priority, "%s", (char *) $msg);
(in $ISE_EIFFEL/library/runtime/logging/writers/log_writer_system.e) and recompiling the system (from scratch, if the logging library is marked as read-only) should fix the problem.
On Ubuntu 14.04
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
Building a Yocto Poky image using the fido branch
inherit core-image
IMAGE_FEATURES += "x11-base x11-sato package-management ssh-server-dropbear"
IMAGE_INSTALL += "chromium \
lsb \
kernel-modules \
alsa-utils \
... and I am getting this sort of message
I look like it related to the Chromium recipe /meta-browser/recipes-browser/chromium/chromium_45.0.2454.85.bb which starts as such
include chromium.inc
DESCRIPTION = "Chromium browser"
DEPENDS += "libgnome-keyring"
and I get this message
ERROR: Logfile of failure stored in: /home/joel/yocto/build-fido/tmp/work/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/chromium/45.0.2454.85-r0/temp/log.do_configure.28622
Log data follows:
| DEBUG: Executing python function sysroot_cleansstate
| DEBUG: Python function sysroot_cleansstate finished
| DEBUG: Executing shell function do_configure
| Updating projects from gyp files...
| Package xkbcommon was not found in the pkg-config search path.
| Perhaps you should add the directory containing `xkbcommon.pc'
| to the PKG_CONFIG_PATH environment variable
| No package 'xkbcommon' found
| gyp: Call to 'pkg-config --cflags xkbcommon' returned exit status 1.
| WARNING: exit code 1 from a shell command.
What I have tried
Installed the library
$ sudo apt-get install libxkbcommon-x11-dev
Search for xkbcommon.pc
$ apt-file search xkbcommon.pc
libxkbcommon-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/xkbcommon.pc
pkg-config
joel#linux-Lenovo-G50-70:~/yocto/build-fido$ pkg-config --cflags xkbcommon
<=== Return is EMPTY (?)
joel#linux-Lenovo-G50-70:~/yocto/build-fido$ pkg-config --libs xkbcommon
-lxkbcommon <=== Looks correct
Added PKG_CONFIG_PATH
$ PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/x86_64-linux-gnu/pkgconfig/
$ export PKG_CONFIG_PATH
$ env | grep PKG
PKG_CONFIG_PATH=:/usr/lib/x86_64-linux-gnu/pkgconfig/
but I am still getting the same message when running bitbake
Any suggestions?
Find xkbcommon
$ find /usr/lib/ -name *xkbcommon*
/usr/lib/x86_64-linux-gnu/libxkbcommon.so
/usr/lib/x86_64-linux-gnu/libxkbcommon.so.0.0.0
/usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0.0.0
/usr/lib/x86_64-linux-gnu/libxkbcommon-x11.a
/usr/lib/x86_64-linux-gnu/libxkbcommon.a
/usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0
/usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so
/usr/lib/x86_64-linux-gnu/pkgconfig/xkbcommon.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/xkbcommon-x11.pc
/usr/lib/x86_64-linux-gnu/libxkbcommon.so.0
In this case, it was the chromium recipe that failed to find libxkbcommon. As the error occurred when building a recipe for the target system, we need to tell the build system that the chromium recipe has a dependency on libxkbcommmon.
This can be done by adding
DEPENDS += "libxkbcommon"
to the chromium recipe.
It's worth noting, that libxkbcommon quite likely is an optional dependency, and in that case, it should be handled by a suitable PACKAGECONFIG. (See PACKAGECONFIG in ref.manual).
Note: I've never built chromium myself, thus I'd prefer to not suggest any suitable PACKAGECONFIG.
I think the Chromium_45 recipe is taken down since the last time I saw it (don't see it anymore).
Anyway, this is what I did to Chromium_40.
I have disabled Wayland (ozone-wayland in Chromium) so that it will only use x11.
In local.conf, I added
CHROMIUM_ENABLE_WAYLAND = "0"
By doing this, I will bypass CHROMIUM_WAYLAND_DEPENDS = "wayland libxkbcommon"
CHROMIUM_X11_DEPENDS = "xextproto gtk+ libxi libxss"
CHROMIUM_X11_GYP_DEFINES = ""
CHROMIUM_WAYLAND_DEPENDS = "wayland libxkbcommon"
CHROMIUM_WAYLAND_GYP_DEFINES = "use_ash=1 use_aura=1 chromeos=0 use_ozone=1"
python() {
if d.getVar('CHROMIUM_ENABLE_WAYLAND', True) == '1':
d.appendVar('DEPENDS', ' %s ' % d.getVar('CHROMIUM_WAYLAND_DEPENDS', True))
d.appendVar('GYP_DEFINES', ' %s ' % d.getVar('CHROMIUM_WAYLAND_GYP_DEFINES', True))
else:
d.appendVar('DEPENDS', ' %s ' % d.getVar('CHROMIUM_X11_DEPENDS', True))
d.appendVar('GYP_DEFINES', ' %s ' % d.getVar('CHROMIUM_X11_GYP_DEFINES', True))
}
P.S.: One more thing I found weird is use-egl.
PACKAGECONFIG[use-egl] = ",,virtual/egl virtual/libgles2" is overrided with PACKAGECONFIG[use-egl] = "" so I have removed PACKAGECONFIG[use-egl] = "" from chromium.inc
PACKAGECONFIG ??= "use-egl"
# this makes sure the dependencies for the EGL mode are present; otherwise, the configure scripts
# automatically and silently fall back to GLX
PACKAGECONFIG[use-egl] = ",,virtual/egl virtual/libgles2"
# Additional PACKAGECONFIG options - listed here to avoid warnings
PACKAGECONFIG[component-build] = ""
PACKAGECONFIG[disable-api-keys-info-bar] = ""
PACKAGECONFIG[ignore-lost-context] = ""
PACKAGECONFIG[impl-side-painting] = ""
PACKAGECONFIG[use-egl] = ""
PACKAGECONFIG[kiosk-mode] = ""