From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7371793187887644672 X-Forwarded-Encrypted: i=2; AJvYcCUqeuwbCk4s0Q97uf3HAoghirlTjqP3FSEUQ1BRcSmWR+I7vPgboZtjCEc/nkLgk477ieo7i5y9gvNiAv9CTN7HgZPtu+tS/vSeDf4= X-Received: by 2002:a2e:9cd9:0:b0:2e9:8bca:c003 with SMTP id 38308e7fff4ca-2ea84c5037amr2134131fa.14.1717048347117; Wed, 29 May 2024 22:52:27 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:2d12:0:b0:2e1:f38c:b596 with SMTP id 38308e7fff4ca-2ea837a7d1dls871451fa.2.-pod-prod-00-eu; Wed, 29 May 2024 22:52:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVoIXqzcSKaTwnHlaRYJQYiPpG3orFu5r6atTX8ngMNZXEqZx+6pznsNb1MiOlEjd1BNteqLX10WczpksA2+rmZQKk2x8lDiwN4ACY= X-Google-Smtp-Source: AGHT+IGQPgUThdNI1lmqVwM4v7vx0CS+pENF0xMbYsw1dy6ptWf1gCD/m73EU5rsnjNTf1ZilpOY X-Received: by 2002:a2e:99d9:0:b0:2e9:7f96:3d56 with SMTP id 38308e7fff4ca-2ea84c231c8mr2157451fa.3.1717048344661; Wed, 29 May 2024 22:52:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717048344; cv=none; d=google.com; s=arc-20160816; b=r4hu5FVfmGKLXTWND7dzJVZnhePgTAIZzq9WFZUI6yTXGfzCy/4mzl0jzZs3gxq3SR S78Waq3MgOGH+D84kCLmUBbF6HfHobJgU4JoS9JuvBotpq9Q9qfSfQIfv/OcsNLTzJ+9 yh2n2QoEFwv7bznUdjzpHNCSYNa89ATP+KrDqWPgynEpJAQQndRPKeqB9wHUnTeLh+bY jE2XYA2xRMJEVXSnKG1gqHhXyRG6ehWgZ71SZ7IJCSY44MJ/BprAEUTCjrLat9qG9T/8 OuJ2JCq3uSv6TuATR7ULpUJgaZRTi2qAAptg/jDUXx7evSu7Cd3QzNiusjdZLXfRn5wK DVPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id; bh=b8Kri/0gc+Smqzq6eQ8pXgd/AIObRXIEcLyfXoDSQHE=; fh=JZvUnqoG0jWph92hWpw0EINycbLveqkIcdkusZDYok4=; b=cNS02YMqmgDQM5a7Vj4N6PfD44ybdMfVgS+YG2YevX8h0/wmA4N65uVCikWtImjfqn DIL1iJv+jiwMSF0J+0Sghe1e3hiC5j2r3On4VY6p4b/MuU5Q9DobH7mLKEzu2jD5hZwE WdhkQTDkjmuHWJQfHBNbLuipcC2cwwJLD8/WZ52LpS/GCqZpQn8mkBgD65InpBVteQwL WO7ZrntFOkDQaYlSdy5Sf4DIkJvhycqyKpw3vAQXxhOIl4YGH5mL7i+L07+OYRHUIgSw TkZGTqPmdzdv7Qb+Qk71YNDfl6Upc7MbnOZUOZ9GxtClXiFY7GnB0zW3hQpYbraivvXI XGNw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 38308e7fff4ca-2e95bb5fbc5si4270101fa.0.2024.05.29.22.52.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 May 2024 22:52:24 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from [127.0.0.1] (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 44U5qLEd014340 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 May 2024 07:52:23 +0200 Message-ID: <62a9add3248d6de73beb7c7675dc5d358a08ed2b.camel@ilbers.de> Subject: Re: [PATCH v2] linux: Allow extra make arguments From: Uladzimir Bely To: Anton Mikanovich , isar-users@googlegroups.com Date: Thu, 30 May 2024 08:52:21 +0300 In-Reply-To: <20240522143014.862964-1-amikan@ilbers.de> References: <20240522143014.862964-1-amikan@ilbers.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.1 (by Flathub.org) MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: HWqKxrB4/yc2 On Wed, 2024-05-22 at 17:30 +0300, Anton Mikanovich wrote: > Add a new variable into TEMPLATE_VARS and the command line - > KERNEL_EXTRA_BUILDARGS which allows to pass additional arguments for > kernel building (e.g., LOADADDR=3D0xC2000040 for stm32mp15x). >=20 > Signed-off-by: Ilia Skochilov > Signed-off-by: Anton Mikanovich > --- > Changes since v1: > =C2=A0- Added usecase in commit message >=20 > =C2=A0meta/recipes-kernel/linux/files/debian/isar/build.tmpl | 4 ++-- > =C2=A0meta/recipes-kernel/linux/linux-custom.inc=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 4 ++++ > =C2=A02 files changed, 6 insertions(+), 2 deletions(-) >=20 > diff --git a/meta/recipes-kernel/linux/files/debian/isar/build.tmpl > b/meta/recipes-kernel/linux/files/debian/isar/build.tmpl > index 81a6ba8a..bafc5ca4 100644 > --- a/meta/recipes-kernel/linux/files/debian/isar/build.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/isar/build.tmpl > @@ -22,9 +22,9 @@ do_build() { > =C2=A0=C2=A0=C2=A0=C2=A0 sed -i "s/@KR@/${KR}/g" ${S}/debian/control ${S}= /debian/linux- > image-${KERNEL_NAME_PROVIDED}.* > =C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 if echo "${DEB_BUILD_PROFILES}" | grep -q "kerne= l"; then # Build > kernel scripts and tools > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ${MAKE} O=3D${KERNEL_BUILD_DI= R} ${PARALLEL_MAKE} > KCFLAGS=3D"${KCFLAGS}" KAFLAGS=3D"${KAFLAGS}" > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ${MAKE} O=3D${KERNEL_BUILD_DI= R} ${PARALLEL_MAKE} > ${KERNEL_EXTRA_BUILDARGS} KCFLAGS=3D"${KCFLAGS}" KAFLAGS=3D"${KAFLAGS}" > =C2=A0=C2=A0=C2=A0=C2=A0 elif echo "${DEB_BUILD_PROFILES}" | grep -q "kbu= ild"; then # > Build kernel scripts and tools > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ${MAKE} O=3D${KERNEL_BUILD_DI= R} ${PARALLEL_MAKE} > KCFLAGS=3D"${KCFLAGS}" KAFLAGS=3D"${KAFLAGS}" scripts > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ${MAKE} O=3D${KERNEL_BUILD_DI= R} ${PARALLEL_MAKE} > ${KERNEL_EXTRA_BUILDARGS} KCFLAGS=3D"${KCFLAGS}" KAFLAGS=3D"${KAFLAGS}" > scripts > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if grep -q -E > "CONFIG_STACK_VALIDATION=3Dy|CONFIG_HAVE_OBJTOOL=3Dy" > ${KERNEL_BUILD_DIR}/.config && [ -d "tools/objtool" ]; then > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = ${MAKE} O=3D${KERNEL_BUILD_DIR} ${PARALLEL_MAKE} > KCFLAGS=3D"${KCFLAGS}" KAFLAGS=3D"${KAFLAGS}" tools/objtool || true > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fi > diff --git a/meta/recipes-kernel/linux/linux-custom.inc > b/meta/recipes-kernel/linux/linux-custom.inc > index 0d222332..48efad03 100644 > --- a/meta/recipes-kernel/linux/linux-custom.inc > +++ b/meta/recipes-kernel/linux/linux-custom.inc > @@ -82,6 +82,7 @@ TEMPLATE_VARS +=3D "=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \ > =C2=A0=C2=A0=C2=A0=C2=A0 KCFLAGS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 \ > =C2=A0=C2=A0=C2=A0=C2=A0 KAFLAGS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 \ > =C2=A0=C2=A0=C2=A0=C2=A0 DISTRIBUTOR=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \ > +=C2=A0=C2=A0=C2=A0 KERNEL_EXTRA_BUILDARGS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 \ > =C2=A0" > =C2=A0 > =C2=A0inherit dpkg > @@ -92,6 +93,9 @@ inherit kbuildtarget > =C2=A0KCFLAGS ?=3D "-fdebug-prefix-map=3D${CURDIR}=3D." > =C2=A0KAFLAGS ?=3D "-fdebug-prefix-map=3D${CURDIR}=3D." > =C2=A0 > +# Add extra arguments to the kernel build > +KERNEL_EXTRA_BUILDARGS ??=3D "" > + > =C2=A0# Derive name of the kernel packages from the name of this recipe > =C2=A0KERNEL_NAME_PROVIDED ?=3D "${@ d.getVar('BPN').partition('linux- > ')[2]}" > =C2=A0 > --=20 > 2.34.1 >=20 Applied to next. --=20 Best regards, Uladzimir.