From: "'Nicusor Huhulea' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: Nicusor Huhulea <nicusor.huhulea@siemens.com>
Subject: [PATCH] linux-custom: introduce Specific Target Build and some fixes
Date: Wed, 14 Aug 2024 20:35:21 +0300 [thread overview]
Message-ID: <20240814173524.383600-1-nicusor.huhulea@siemens.com> (raw)
Hello,
These series primarily are offering an alternative to the Full Build(default build) compilation of the kernel
by introducing the Specific Target Build. An issue from a Full Build is the compilation of all dtbs in the case where
just one or a few is needed i.e. DTB_FILES
This automatic compilation is due to the kernel configuration that automatically includes the compilation of dtbs
in the default build process and the makefiles rules in the bsp directories that builds DTBs along with the kernel by default.
Another important aspect is that Isar currently is missing this feature forcing the user to use only the Full Build approach.
Compiling the linux kernel using a specific target stops the automatic build of the dtbs, explicitly
specifying dtbs files as make targets will instruct the build process to compile only those files.
Note: Because it seems that there is no project where a .dtbo file is used, this case was not handled. But that doesn't mean
it won't work anymore, we'll still have the Full Build alternative until the .dtbo will be handled when using Targeted Build.
Pros of using a Specific Target Build:
* Efficiency, compiling only what is required(e.g. only the required dtbs) is faster and consumes fewer resources. Some analysis
will follow.
* Focus, makes it easier to focus only on the target hardware reducing the issues with unsuported or bad configurations
* Particularly for the ARM architecture it's better to compile only the specific dtbs needed for the target hardware and
a Full Build should be reserved for the whole range of target devices from the bsp directory. If there are multiple kernel image types
present in the configuration(Image, zImage, lzImage, Image.gz) you can specify KERNEL_IMAGETYPE to indicate the image type you want to be built.(the same as in OE)
* Good to use for the development and deploying, focusing only on that target hardware and not all the targets from the arch/arm/boot/dts/bsp_dir/*
* The ability to build multiple targets is on Full Build side, but in production usually only one specific image format is deployed therefore the need
for the Specific Target Build
Certain speed and disk space usage tests were made. These tests targeted the phyboard-mira(on Kernel Post-6.x
and Kernel Pre-6.x spcifically on 4.19.88) and iot2050(Kernel Post-6.x):
specific target: Build needed 00:02:08, 2219688k disk space - linux-phy kernel 6.x
full build: Build needed 00:02:14, 2271528k disk space - linux-phy kernel 6.x
specific build : Build needed 00:02:19, 2355400k disk space - linux-iot2050 kernel 6.x
full build: Build needed 00:02:23, 2356828k disk space - liux-iot2050 kernel 6.x
On linux-phy Kernel 6.x the full build took 6 seconds longer than the specific target build and
used approximately 50.6 MB more disk space than the specific target build. The iot2050 data is somewhat similar.
Based on the data from the dpkg_build.log the benefits of using specific targets reduces build times
and resource efficiency. However there can be some potential pitfalls associated with this approach. When the engineer
is not intimate with the bsp certain kernel configurations or some dependencies may not be satisfied. And this is
why this is enabled only when KERNEL_IMAGETYPE is present.
Reference:
https://groups.google.com/g/isar-users/c/2Gjupa2m0OA
Nicu
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20240814173524.383600-1-nicusor.huhulea%40siemens.com.
next reply other threads:[~2024-08-14 17:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-14 17:35 'Nicusor Huhulea' via isar-users [this message]
2024-08-14 17:35 ` [PATCH 1/3] linux-custom: refactor kernel's make command 'Nicusor Huhulea' via isar-users
2024-08-14 17:35 ` [PATCH 2/3] linux-custom: compile only the specified dtbs by using specific target build 'Nicusor Huhulea' via isar-users
2024-08-23 8:44 ` Uladzimir Bely
2024-08-23 9:43 ` 'Jan Kiszka' via isar-users
2024-08-14 17:35 ` [PATCH 3/3] phyboard-mira.conf: use a " 'Nicusor Huhulea' via isar-users
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240814173524.383600-1-nicusor.huhulea@siemens.com \
--to=isar-users@googlegroups.com \
--cc=nicusor.huhulea@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox