From: "'Jan Kiszka' via isar-users" <isar-users@googlegroups.com>
To: Uladzimir Bely <ubely@ilbers.de>,
Nicusor Huhulea <nicusor.huhulea@siemens.com>,
isar-users@googlegroups.com
Subject: Re: [PATCH 2/3] linux-custom: compile only the specified dtbs by using specific target build
Date: Fri, 23 Aug 2024 11:43:22 +0200 [thread overview]
Message-ID: <f7ce8b07-2ead-4b00-890d-b4de9313caf5@siemens.com> (raw)
In-Reply-To: <34d9cdff55bf0eba83a40d49cef32792020f7bbc.camel@ilbers.de>
On 23.08.24 10:44, Uladzimir Bely wrote:
> On Wed, 2024-08-14 at 20:35 +0300, 'Nicusor Huhulea' via isar-users
> wrote:
>> The current implementation makes a full kernel build and that means
>> it will
>> compile all dtbs specified by the bsp makefile e.g
>> arch/arm64/boot/dts/ti/Makefile
>> Currently the required dtbs are given by the DTB_FILES.
>>
>> These changes are checking if the DTB_FILES is specified, compile
>> only those
>> and avoids compiling all the dtbs from the bsp directory. Otherwise
>> build all dtbs
>> specified by the kernel source.
>> Preventing the automatic dtb builds is made by using target specific
>> build
>> commands e.g KERNEL_IMAGETYPE
>> The compilation of the dtbs accepts the following formats e.g:
>> Kernel Post 6.x:
>> a) full path from the architecture directory:
>> arch/${ARCH}/boot/dts/bsp_dir/test.dts
>> arch/${ARCH}/boot/dts/bsp_dir/test.dtb
>> b) relative path from the dts directory: bsp_dir/test.dts
>> c) device tree blob file: bsp_dir/test.dtb
>> Kernel Pre 6.x:
>> The same as on Kernel Post 6.x but without the bsp_dir
>>
>> The differences when building a full build and when using a specific
>> target
>> build are:(tests were made on the machine phyboard-mira on 6.x and
>> 4.x versions)
>> specific target: Build needed 00:02:08, 2219688k disk space linux-phy
>> 6.x
>> full build: Build needed 00:02:14, 2271528k disk space linux-phy
>> 6.x
>> The time difference: the full build took 6s longer than the specific
>> target build
>> The disk space difference: the full build used 50.6MB more disk space
>> than
>> the specific target build.
>> In conclusion the specific target build is slightly faster and uses
>> less
>> disk space.
>>
>> For now the DTB_FILES variable should accept only Device Tree
>> Blobs(.dtb)
>> because some areas still depends on it e.g: do_copy_boot_files,
>> plugins
>>
>> Signed-off-by: Nicusor Huhulea <nicusor.huhulea@siemens.com>
>> ---
>> .../linux/files/debian/isar/build.tmpl | 56
>> ++++++++++++++++++-
>> .../linux/files/debian/isar/install.tmpl | 12 +++-
>> meta/recipes-kernel/linux/linux-custom.inc | 6 ++
>> 3 files changed, 71 insertions(+), 3 deletions(-)
>>
>> diff --git a/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
>> b/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
>> index 1fd6f948..6f186e02 100644
>> --- a/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
>> +++ b/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
>> @@ -22,8 +22,13 @@ do_build() {
>> sed -i "s/@KR@/${KR}/g" ${S}/debian/control ${S}/debian/linux-
>> image-${KERNEL_NAME_PROVIDED}.*
>>
>> MAKE_COMMON_ARGS="O=${KERNEL_BUILD_DIR} ${PARALLEL_MAKE}
>> KCFLAGS=${KCFLAGS} KAFLAGS=${KAFLAGS}"
>> - if echo "${DEB_BUILD_PROFILES}" | grep -q "kernel"; then # Full
>> build
>> - ${MAKE} ${MAKE_COMMON_ARGS} ${KERNEL_EXTRA_BUILDARGS}
>> + if echo "${DEB_BUILD_PROFILES}" | grep -q "kernel"; then
>> + if [ -n "${KERNEL_IMAGETYPE}" ]; then # Override the default
>> compilation
>> + ${MAKE} ${MAKE_COMMON_ARGS} ${KERNEL_EXTRA_BUILDARGS}
>> ${KERNEL_IMAGETYPE} modules
>> + compile_dtbs
>> + else $ Full build
>
> A typo causing build error.
>
> '/<<PKGBUILDDIR>>/debian/isar/build: line 29: $: command not found'.
>
Just to be clear: even once issues in such details are resolved, I'm
still not convinced about the value of the approach, compared to the
maintenance risks it would introduce.
Jan
--
Siemens AG, Technology
Linux Expert Center
--
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/f7ce8b07-2ead-4b00-890d-b4de9313caf5%40siemens.com.
next prev parent reply other threads:[~2024-08-23 9:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-14 17:35 [PATCH] linux-custom: introduce Specific Target Build and some fixes 'Nicusor Huhulea' via isar-users
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 [this message]
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=f7ce8b07-2ead-4b00-890d-b4de9313caf5@siemens.com \
--to=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
--cc=nicusor.huhulea@siemens.com \
--cc=ubely@ilbers.de \
/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