I am facing an issue with AOSP incremental OTA build. If I do an incremental build (without make clean), build completes fast and I get a smaller OTA file, and OTA updates successfully on the target system; BUT the incremental build number of target system remains same.
So next time when another OTA is generated and tried to update, it fails, giving error : "package expects build fingerprint of ../../..//.. ". as, incremental build number is part of build fingerprint.
If I do 'make clean' before 'make dist', things work fine; but build time is much more and OTA file is bloated; many packages which are NOT modified are identified as modified by some %, and is added to OTA.
How to increment build number without 'make clean' ?
Thanks in advance.
The problem is with build fingerprint and it's not updated with the incremental build. I have also faced the same issue with buildfingerprint. Just delete below files before starting the intermental build.
rm -rf out/target/product/abc123/system/build*
rm -rf out/target/product/abc123/obj/ETC/system_build_prop_intermediates/
rm -rf out/target/product/abc123/root/
rm -rf out/target/product/abc123/*.img
rm -rf out/target/product/abc123/*.zip
rm -rf out/target/product/abc123/recovery
rm -rf out/target/product/abc123/system/priv-app/
rm -rf out/target/product/abc123/system/app/
rm -rf out/target/product/abc123/obj/PACKAGING/target_files_intermediates/
rm -rf out/target/product/abc123/obj/EXECUTABLES/recovery_*
rm -rf out/target/product/abc123/obj/PACKAGING/
rm -rf out/target/product/abc123/obj/KERNEL_OBJ/.config
Note: Replace "abc123" string with the product name.
Add below changes to override default build.
build/core/build_id.mk
ifeq ($(BUILD_ID),)
export BUILD_ID=NMF26Q
endif
And set new build id for before starting build.
export BUILD_ID=123 && source build/envsetup.sh && lunch
make dist
Related
I am new to Docker. I am creating a Dockerfile to build my C/C++ application using a custom Makefile. The Makefile builds my code correctly outside Docker and all is good. However, there is an issue when using Docker. My Dockerfile looks as follows :
FROM gcc:latest
RUN apt-get update
RUN apt-get install libboost1.62-*
RUN apt-get install -y libmodbus-dev
COPY . /usr/src/client
WORKDIR /usr/src/client
RUN make -f MyMakefile.mak
CMD [ "bin/runfile" ]
Obviously my code needs libboost and libmodbus and therefore install them first. This was actually all working fine last week, but not now somehow. There is an issue finding the header files for the boost library afterwards though during compilation :
Sending build context to Docker daemon 255MB
Step 1/8 : FROM gcc:latest
---> 9bfd59c68035
Step 2/8 : RUN apt-get update
---> Using cache
---> 0ee029cb9883
Step 3/8 : RUN apt-get install libboost1.62-*
---> Using cache
---> 4d76aa8ea9a1
Step 4/8 : RUN apt-get install -y libmodbus-dev
---> Using cache
---> 35f300d99fa4
Step 5/8 : COPY . /usr/src/client
---> 5b880a0488d4
Step 6/8 : WORKDIR /usr/src/client
---> Running in 13c8a522b792
Removing intermediate container 13c8a522b792
---> 2c5d62aa1b32
Step 7/8 : RUN make -f MyMakefile.mak
---> Running in 7e8b5138bb55
g++ -Iinc -Iinc/common -Iinc/modbus -MMD -MP -std=c++11 -c src/main.cpp -o obj/main.o
In file included from inc/clientdevice_ctrl.h:23,
from inc/client_ctrl.h:21,
from src/main.cpp:23:
inc/profile.h:15:10: fatal error: boost/property_tree/json_parser.hpp: No such file or directory
15 | #include <boost/property_tree/json_parser.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [MyMakefile.mak:29: obj/main.o] Error 1
The command '/bin/sh -c make -f MyMakefile.mak' returned a non-zero code: 2
Where would Docker attempt to find these required header files? I would think that in the standard header locations?
I want to integrate the package amazon kinesis video streams webrtc SDK in buidroot. Can anyone guide me on how can I do this? I am a newbie with buildroot.
The issue is the examples available on the internet only discussion if the package has make the file only, the issue with webrtc SDK is that it has both Cmake and make file.
Executing CMake command builds the build and make command builds the application.
https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c
Cmake projects generally use make (or some other generated build system) to build the actual code. You should follow the instructions in the buildroot manual for a "Cmake package", and it should generally work out
In the manual, it's section 18.7
https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_cmake_based_packages
Hi I tried adding package:
this is my amazon-kinesis-video-streams-webrtc-sdk-c.mk file:
################################################################################
#
# amazon-kinesis-video-streams-webrtc-sdk-c
#
################################################################################
BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_VERSION = 1.6.0
BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_SITE = $(call github,awslabs,amazon-kinesis-video-streams-webrtc-sdk-c,v$(BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_VERSION))
BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_LICENSE = MIT
BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_LICENSE_FILES = LICENSE-MIT
BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_CONF_OPTS = -DBUILD_DEMOS=ON
BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_INSTALL_STAGING = YES
$(eval $(cmake-package))
and this Config.in file:
config BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C
bool "amazon-kinesis-video-streams-webrtc-sdk-c"
depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_HAS_THREADS
help
web-rtc
But I am getting an error that CMakeTextfile does not exist.
make amazon-kinesis-video-streams-webrtc-sdk-c-rebuild
rm -f /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_installed
rm -f /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_staging_installed
rm -f /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_target_installed
rm -f /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_images_installed
rm -f /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_host_installed
rm -f /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_built
>>> amazon-kinesis-video-streams-webrtc-sdk-c Extracting
>>> amazon-kinesis-video-streams-webrtc-sdk-c Patching
>>> amazon-kinesis-video-streams-webrtc-sdk-c Configuring
(mkdir -p /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/ && cd /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/ && rm -f CMakeCache.txt && PATH="/home/bilal/work/buildroot/output/host/bin:/home/bilal/work/buildroot/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" /usr/local/bin/cmake /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/ -DCMAKE_TOOLCHAIN_FILE="/home/bilal/work/buildroot/output/host/share/buildroot/toolchainfile.cmake" -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_COLOR_MAKEFILE=OFF -DBUILD_DOC=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLE=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TEST=OFF -DBUILD_TESTS=OFF -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON )
CMake Error: The source directory "/home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
package/pkg-generic.mk:249: recipe for target '/home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_configured' failed
make[1]: *** [/home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_configured] Error 1
Makefile:84: recipe for target '_all' failed
make: *** [_all] Error 2
To do an out-of-source build in Meson:
cd /path/to/source/
mkdir ../builddir
Then:
cd /path/to/source/
meson ../builddir
cd ../builddir
ninja
Is it possible to do anything like this (from builddir):
meson --pathToSource ../source // pseudocode
ninja
I.e. avoid jumping from the source to the build directory and back.
For CMake, this is the default.
Once you've run meson to create build directory (which meson can create automatically), there is no need to run it everytime you change meson.build. When you run ninja, meson can regenerate build configurations itself depending on the changes in the sources.
To run ninja in other places than build directory, you can you -C option (from ninja -h):
-C DIR change to DIR before doing anything else
Given your example, it will be:
$ cd /path/to/source/
$ meson ../builddir
$ ninja -C ../builddir
I'm new at Yocto project.
The problem is rebuilding with source editing.
The flow which I tried is below.
Build Yocto Project ( bitbake core-image-weston )
After building, I edited weston source code.
( build/tmp/work/aarch64-poky-linux/weston/1.9.0-r0/git/ivi-shell/hmi-controller.c )
Re-Build Yocto Project.
( I don't know how can I rebuild it, so I tried many ways. )
bitbake core-image-weston
bitbake weston
bitbake weston -c -f compile
bitbake weston -c -f deploy
bitbake weston -c -f rebuild
bitbake weston -c -f build
I checked output rootfs : core-image-weston-.tar.bz
But it doesn't changed.
(I added a wrong codes which cause build error, but build error is not occured ever! )
So, I hope to know how can I edit source code(weston) and build it correctly.
finally, I hope to get properly built rootfs.
Thank you.
After recompiling the the package, you should also rerun the build of the image. Then the changes should be included:
bitbake -c compile -f weston
bitbake core-image-weston
I'm trying to build a cross-compiler with Qt 5.4.1 to generate Raspberry Pi executables from a Windows 8.1 64-bit machine.
I'm using mingw64 and a gcc 4.9 cross-compiler for the Pi on the Windows machine and I am using the Qt 5.4.1 source. PATH points to the mingw64 binaries, the gcc 4.9 cross-compiler binaries, perl binaries, and %windir%\system32.
I use the following command to build the Qt cross-compiler:
configure.bat -platform win32-g++ -opengl es2 -device linux-rasp-pi-g++ \
-device-option CROSS_COMPILE=arm-linux-gnueabihf- -sysroot \dev\qtxc\sysroot \
-opensource -confirm-license -release -make libs -prefix d:\dev\qtxc \
-platform win32-g++ -xplatform linux-arm-gnueabi-g++
Everything works fine until the very end when I get a few error messages containing Unix commands (again, I'm on a Windows machine in a Windows command prompt):
Running configuration tests...
process_begin: CreateProcess(NULL, rm -f arch.obj, ...) failed.
make (e=2): The file cannot be found
(...)
Then when I look at the generated Makefile, I can see that it erroneously defines Unix commands instead of Windows commands:
# Makefile for building: qt
# Generated by qmake (3.0) (Qt 5.4.1)
# Project: qt.pro
# Template: subdirs
# Command: D:\dev\qtxc\qtbase\bin\qmake -o Makefile qt.pro
MAKEFILE = Makefile
first: make_first
QMAKE = D:\dev\qtxc\qtbase\bin\qmake
DEL_FILE = rm -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
COPY = cp -f
COPY_FILE = cp -f
COPY_DIR = cp -f -R
(...)
Then, of course, when I try to run mingw32-make as instructed in the output from the configure command, I get error messages related to the Unix commands that don't exist in Windows:
module-qtbase-qmake_all: FORCE
#test -d qtbase\ || mkdir -p qtbase\
cd qtbase\ && $(QMAKE) D:\dev\qtxc\qtbase\qtbase.pro -o Makefile
cd qtbase\ && $(MAKE) -f Makefile qmake_all
(#test doesn't work in Windows, of course).
I have tried modifying the qtbase\mkspecs\win32-g++\qmake.conf file to remove the Unix conditional definitions (seems like nonsense to have those in the win32 file anyway), forcing the definition of QMAKE_SH or QMAKE_OS_WIN32, to no avail.
Any suggestions?
I had the very same problem myself while setting up a Gitlab-CI runner to compile a Qt project on windows.
Using the -d (debug) option on qmake (see Running qmake) I discovered that qmake looks for sh in PATH and then determines which command set to use by setting QMAKE_SH.
If you seach for QMAKE_SH in the debug output of qmake bottom up, you should find the line where qmake makes the above described decision. In case sh was found, searching further up will take you to the line where the actual path to sh is printed out.
Mine was found in the path to Git for Windows (<path to git>\bin), since there is a 'sh.exe' in the bin folder next to git.exe.
I found two solutions for my particular case:
Temporarily add the unix tools to the PATH. In Git for Windows 2.5.3 they are located in <path to git>\usr\bin.
Temporarily remove the path to sh from PATH. You can do this by issuing SET PATH=%PATH:<path to remove>;=% to the command line.