From 6e60e8b2b2bab889379b380a28a167a0edd9d1d3 Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Thu, 1 Feb 2018 10:27:11 -0500 Subject: Yocto 2.3 Move OpenBMC to Yocto 2.3(pyro). Tested: Built and verified Witherspoon and Palmetto images Change-Id: I50744030e771f4850afc2a93a10d3507e76d36bc Signed-off-by: Brad Bishop Resolves: openbmc/openbmc#2461 --- .../recipes-kernel/kmod/depmodwrapper-cross_1.0.bb | 4 +- .../yocto-poky/meta/recipes-kernel/kmod/kmod.inc | 8 +++- .../recipes-kernel/kmod/kmod/kcmdline_quotes.patch | 44 ++++++++++++++++++++++ 3 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/kcmdline_quotes.patch (limited to 'import-layers/yocto-poky/meta/recipes-kernel/kmod') diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb b/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb index 5c7dd52f5..44d013f29 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb +++ b/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb @@ -1,6 +1,5 @@ SUMMARY = "Wrapper script for the Linux kernel module dependency indexer" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" S = "${WORKDIR}" @@ -10,6 +9,9 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" # We need the following for the sstate code to process the wrapper SSTATE_SCAN_FILES += "depmodwrapper" +EXTRA_STAGING_FIXMES += "PKGDATA_DIR" + +do_populate_sysroot[depends] = "" do_install() { install -d ${D}${bindir_crossscripts}/ diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc index 166b3f02f..ba80fc57a 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc +++ b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc @@ -12,7 +12,7 @@ SECTION = "base" LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ " -inherit autotools gtk-doc pkgconfig +inherit autotools gtk-doc pkgconfig manpages SRCREV = "65a885df5f6f15222b44fd695c5eaca17e837a14" # Lookout for PV bump too when SRCREV is changed @@ -22,15 +22,19 @@ SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \ file://depmod-search.conf \ file://avoid_parallel_tests.patch \ file://fix-O_CLOEXEC.patch \ + file://kcmdline_quotes.patch \ " S = "${WORKDIR}/git" EXTRA_AUTORECONF += "--install --symlink" -EXTRA_OECONF +=" --enable-tools --disable-manpages --with-zlib" +EXTRA_OECONF +=" --enable-tools --with-zlib" + +CACHED_CONFIGUREVARS += "ac_cv_path_DOLT_BASH='/usr/bin/env bash'" PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" PACKAGECONFIG[logging] = " --enable-logging,--disable-logging" +PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native" do_configure_prepend () { gtkdocize --docdir ${S}/libkmod/docs --srcdir ${S} diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/kcmdline_quotes.patch b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/kcmdline_quotes.patch new file mode 100644 index 000000000..46bdec59a --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod/kcmdline_quotes.patch @@ -0,0 +1,44 @@ +From 4a6f92a10680e7e36807f5e2ae8e497e8d73a048 Mon Sep 17 00:00:00 2001 +From: James Minor +Date: Fri, 20 Jan 2017 17:15:50 -0600 +Subject: [PATCH] libkmod: Fix handling of quotes in kernel command line + +If a module parameter on the command line contains quotes, any +spaces inside those quotes should be included as part of the +parameter. + +Signed-off-by: James Minor + +Upstream-Status: Accepted +--- + libkmod/libkmod-config.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c +index 57fbe37..ea40d19 100644 +--- a/libkmod/libkmod-config.c ++++ b/libkmod/libkmod-config.c +@@ -497,6 +497,7 @@ static int kmod_config_parse_kcmdline(struct kmod_config *config) + char buf[KCMD_LINE_SIZE]; + int fd, err; + char *p, *modname, *param = NULL, *value = NULL, is_module = 1; ++ bool is_quoted = false; + + fd = open("/proc/cmdline", O_RDONLY|O_CLOEXEC); + if (fd < 0) { +@@ -514,6 +515,12 @@ static int kmod_config_parse_kcmdline(struct kmod_config *config) + } + + for (p = buf, modname = buf; *p != '\0' && *p != '\n'; p++) { ++ if (*p == '"') { ++ is_quoted = !is_quoted; ++ continue; ++ } ++ if (is_quoted) ++ continue; + switch (*p) { + case ' ': + *p = '\0'; +-- +1.9.1 + -- cgit v1.2.1