From: Jon Ringle <jon@ringle.org>
To: ptxdist@pengutronix.com
Subject: [ptxdist] Problems building kernel image with initramfs with no tty
Date: Mon, 18 Feb 2019 11:11:51 -0500 [thread overview]
Message-ID: <CAMwGMjwmVM-wC3F-6GSWYN0m-Yt-eRgtszTFtfsYUqZN7B2OjQ@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 3325 bytes --]
I've recently updated to ptxdist-2019.01.0 and have noted some changes with
my project that builds a kernel image with initramfs:
1) In rules/kernel.make, there is the following code:
#
# Don't keep the expanded path to INITRAMS_SOURCE in $(KERNEL_CONFIG),
# because it contains local workdir path which is not relevant to
# other developers.
#
ifdef KERNEL_INITRAMFS_SOURCE_y
@sed -i -e
's,^CONFIG_INITRAMFS_SOURCE.*$$,CONFIG_INITRAMFS_SOURCE=\"# Automatically
set by PTXDist\",g' \
"$(<)"
endif
However, this is no longer having the intended behavior. The
$(KERNEL_CONFIG) is being modified after doing a `ptxdist images`:
$ ptxdist print KERNEL_CONFIG
/home/local/GRIDPOINT/jringle/git/linux-initramfs/ptxconf/ec1k/kernelconfig-3.12
$ ptxdist print KERNEL_INITRAMFS_SOURCE_y
/home/local/GRIDPOINT/jringle/git/linux-initramfs/platform-ec1k/state/empty.cpio
$ git diff
diff --git a/ptxconf/ec1k/kernelconfig-3.12 b/ptxconf/ec1k/kernelconfig-3.12
index 247c3bb..c77037f 100644
--- a/ptxconf/ec1k/kernelconfig-3.12
+++ b/ptxconf/ec1k/kernelconfig-3.12
@@ -116,7 +116,7 @@ CONFIG_NET_NS=y
# CONFIG_SYSFS_DEPRECATED is not set
# CONFIG_RELAY is not set
CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE="# Automatically set by PTXDist"
+CONFIG_INITRAMFS_SOURCE="/home/local/GRIDPOINT/jringle/git/linux-initramfs/platform-ec1k/state/empty.cpio"
CONFIG_INITRAMFS_ROOT_UID=0
CONFIG_INITRAMFS_ROOT_GID=0
# CONFIG_RD_GZIP is not set
2) As a result of the above, the build behavior is different between a
build with a tty, and a build without a tty (build by a CI build
environment), because the kernel config file has changed and
ptxd_make_kconfig_sync() in scripts/lib/ptxd_make_world_kconfig.sh is
called:
ptxd_make_kconfig_sync() {
local mode
if [ "${ptx_config_mode}" = run ]; then
if tty -s; then
ptx_config_mode=update
else
ptx_config_mode=check
fi
fi
if [ -n "${ref_file_dotconfig}" ]; then
file_dotconfig="${ref_file_dotconfig}" ptxd_normalize_config &&
relative_ref_file_dotconfig="${relative_file_dotconfig}"
fi &&
ptxd_normalize_config &&
ptxd_kconfig_sync_config "${ptx_config_mode}"
"${pkg_build_dir}/.config" \
"${relative_file_dotconfig}" "${file_dotconfig}"
"${relative_ref_file_dotconfig}"
}
A build failure without a tty can be simulated with: `ssh localhost "cd
$(pwd); ptxdist images"`:
----------------------
target: kernel.prepare
----------------------
Using config file: 'linux-initramfs/ptxconf/ec1k/kernelconfig-3.12'
make[1]: Entering directory `/home/local/GRIDPOINT/jringle/git/linux'
scripts/kconfig/conf --oldconfig Kconfig
#
# configuration written to .config
#
make[1]: Leaving directory `/home/local/GRIDPOINT/jringle/git/linux'
ptxdist: error: Outdated config for 'linux-initramfs'
ptxdist: error: 'oldconfig' changes the file. Run 'oldconfig kernel' to
update.
make: ***
[/home/local/GRIDPOINT/jringle/git/linux-initramfs/platform-ec1k/state/kernel.prepare]
Error 1
I worked around this by modifying the ptxdist used by our build server so
that ptxd_make_kconfig_sync() always used ptx_config_mode=update even if
there is no tty. But I know that this is not the right solution. But I also
don't know what the proper solution should be.
Regards,
-Jon
[-- Attachment #1.2: Type: text/html, Size: 8570 bytes --]
[-- Attachment #2: Type: text/plain, Size: 91 bytes --]
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next reply other threads:[~2019-02-18 16:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-18 16:11 Jon Ringle [this message]
2019-02-22 8:11 ` [ptxdist] [PATCH] kernel: rework prepare stage Michael Olbrich
2019-02-22 17:23 ` Jon Ringle
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=CAMwGMjwmVM-wC3F-6GSWYN0m-Yt-eRgtszTFtfsYUqZN7B2OjQ@mail.gmail.com \
--to=jon@ringle.org \
--cc=ptxdist@pengutronix.com \
--cc=ptxdist@pengutronix.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