All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-handheld 1/2] linux-kexecboot: use kernel_conf_variable like linux.inc does and respect CMDLINE_DEBUG
@ 2011-11-20 10:06 Martin Jansa
  2011-11-20 10:06 ` [meta-handheld 2/2] linux-git: move CMDLINE_DEBUG to linux-git.inc to be used also for linux-kexecboot Martin Jansa
  2011-11-20 11:26 ` [meta-handheld v2] linux-kexecboot: use kernel_conf_variable like linux.inc does and respect CMDLINE_DEBUG Martin Jansa
  0 siblings, 2 replies; 6+ messages in thread
From: Martin Jansa @ 2011-11-20 10:06 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 recipes-kernel/linux/linux-kexecboot.inc |   92 ++++++++++++++---------------
 1 files changed, 44 insertions(+), 48 deletions(-)

diff --git a/recipes-kernel/linux/linux-kexecboot.inc b/recipes-kernel/linux/linux-kexecboot.inc
index ea0bbd6..b5cf18a 100644
--- a/recipes-kernel/linux/linux-kexecboot.inc
+++ b/recipes-kernel/linux/linux-kexecboot.inc
@@ -11,7 +11,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
 # only as fallback for patches available only in linux-PV dir and ie defconfigs needs to go from linux-kexecboot-PV
 FILESPATH_append = ":${FILE_DIRNAME}/linux-${PV}"
 
-
 DEPENDS += "xz-native"
 
 # Kernel bootlogo is distro-specific (default is OE logo).
@@ -19,6 +18,10 @@ DEPENDS += "xz-native"
 LOGO_SIZE ?= "."
 SRC_URI = "file://${LOGO_SIZE}/logo_linux_clut224.ppm.bz2"
 
+# Set the verbosity of kernel messages during runtime
+# You can define CMDLINE_DEBUG in your local.conf or distro.conf to override this behaviour
+CMDLINE_DEBUG ?= '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "debug", "loglevel=3", d)}'
+
 # Note how we set loglevel=3 and master console on serial to protect bootlogo.
 CMDLINE_c7x0 = "console=tty1 console=ttyS0,115200n8 loglevel=3"
 CMDLINE_tosa = "console=tty1 console=ttyS0,115200n8 loglevel=3"
@@ -46,28 +49,39 @@ LOCALVERSION ?= ""
 # we want the smallest size
 INITRAMFS_IMAGE = "initramfs-kexecboot-klibc-image"
 
+kernel_conf_variable() {
+        CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
+        if test "$2" = "n"
+        then
+                echo "# CONFIG_$1 is not set" >> ${S}/.config
+        else
+                echo "CONFIG_$1=$2" >> ${S}/.config
+        fi
+}
+
 do_configure_prepend() {
 
         echo "" > ${S}/.config
+        CONF_SED_SCRIPT=""
 
         #
         # CONFIG_CMDLINE mangling
         #
-        echo "CONFIG_CMDLINE_BOOL=y" >> ${S}/.config
-        echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config
+        kernel_conf_variable CMDLINE_BOOL y
+        kernel_conf_variable CMDLINE "\"${CMDLINE} ${CMDLINE_DEBUG}\""
 
         # mips and x86
-        echo "CONFIG_CMDLINE_OVERRIDE=y" >> ${S}/.config
+        kernel_conf_variable CMDLINE_OVERRIDE y
 
         # sh only
-        echo "CONFIG_CMDLINE_OVERWRITE=y" >> ${S}/.config
-        echo "# CONFIG_CMDLINE_EXTEND is not set" >> ${S}/.config
+        kernel_conf_variable CMDLINE_OVERWRITE y
+        kernel_conf_variable CMDLINE_EXTEND n
 
         #
         # endian support
         #
         if [ "${SITEINFO_ENDIANNESS}" = "be" ]; then
-                echo "CONFIG_CPU_BIG_ENDIAN=y"          >> ${S}/.config
+                kernel_conf_variable CPU_BIG_ENDIAN y
         fi
 
         #
@@ -75,60 +89,42 @@ do_configure_prepend() {
         #
         if [ -e ${WORKDIR}/logo_linux_clut224.ppm ]; then
                 install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm
-                echo "CONFIG_LOGO=y"                    >> ${S}/.config
-                echo "CONFIG_LOGO_LINUX_CLUT224=y"      >> ${S}/.config
+                kernel_conf_variable LOGO y
+                kernel_conf_variable LOGO_LINUX_CLUT224 y
         fi
 
         # When enabling thumb for userspace we also need thumb support in the kernel
         if [ "${ARM_INSTRUCTION_SET}" = "thumb" ] ; then
-            sed -i -e /CONFIG_ARM_THUMB/d ${WORKDIR}/defconfig 
-            echo "CONFIG_ARM_THUMB=y" >> ${S}/.config
+                kernel_conf_variable ARM_THUMB y
         fi
 
-        sed -e '/CONFIG_CMDLINE=/d' \
-            -e '/CONFIG_CMDLINE_BOOL/d' \
-            -e '/CONFIG_CMDLINE_OVERRIDE/d' \
-            -e '/CONFIG_CMDLINE_OVERWRITE/d' \
-            -e '/CONFIG_CMDLINE_EXTEND/d' \
-            -e '/CONFIG_CPU_BIG_ENDIAN/d' \
-            -e '/CONFIG_LOGO=/d' \
-            -e '/CONFIG_LOGO_LINUX_CLUT224=/d' \
-            -e '/CONFIG_LOCALVERSION/d' \
-            -e '/CONFIG_LOCALVERSION_AUTO/d' \
-            < '${WORKDIR}/defconfig' >>'${S}/.config'
-
-        echo 'CONFIG_LOCALVERSION="${LOCALVERSION}"' >>${S}/.config
-        echo '# CONFIG_LOCALVERSION_AUTO is not set' >>${S}/.config
+        kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\""
+        kernel_conf_variable LOCALVERSION_AUTO n
 
         # Force sane defaults for kexec-enabled kernels and keep size small
-        sed -i -e /CONFIG_BLK_DEV_INITRD/d \
-               -e /CONFIG_KEXEC/d \
-               -e /=m/d \
-               -e /CONFIG_MODULES/d \
-               -e /CONFIG_DEBUG_ERRORS/d \
-               -e /CONFIG_DEBUG_BUGVERBOSE/d \
-               -e /CONFIG_DEBUG_KERNEL/d \
-               ${S}/.config
-
-               echo 'CONFIG_BLK_DEV_INITRD=y' >>${S}/.config
-               echo 'CONFIG_KEXEC=y' >>${S}/.config
-               echo '# CONFIG_MODULES is not set' >> ${S}/.config
+        kernel_conf_variable BLK_DEV_INITRD y
+        kernel_conf_variable KEXEC y
+        CONF_SED_SCRIPT="$CONF_SED_SCRIPT /=m/d;"
+        kernel_conf_variable MODULES n
+        kernel_conf_variable DEBUG_ERRORS n
+        kernel_conf_variable DEBUG_BUGVERBOSE n
+        kernel_conf_variable DEBUG_KERNEL n
 
         # Force lzma for arm kernels only
         if [ "${ARCH}" = "arm" ] ; then
-
-            sed -i -e /CONFIG_KERNEL/d \
-               -e /CONFIG_INITRAMFS_COMPRESSION/d \
-               -e /CONFIG_INITRAMFS_SOURCE/d \
-               -e /CONFIG_RD/d \
-               ${S}/.config
-
-               echo 'CONFIG_KERNEL_LZMA=y' >>${S}/.config
-               echo 'CONFIG_INITRAMFS_COMPRESSION_LZMA=y' >>${S}/.config
-               echo 'CONFIG_INITRAMFS_SOURCE="initramfs.cpio.lzma"' >>${S}/.config
-               echo 'CONFIG_RD_LZMA=y' >>${S}/.config
+                CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_KERNEL/d;"
+                CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_RD/d;"
+                CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_INITRAMFS_COMPRESSION/d;"
+                CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_INITRAMFS_SOURCE/d;"
+                kernel_conf_variable KERNEL_LZMA y
+                kernel_conf_variable RD_LZMA y
+                kernel_conf_variable INITRAMFS_COMPRESSION_LZMA y
+                kernel_conf_variable INITRAMFS_SOURCE "\"initramfs.cpio.lzma\""
         fi
 
+        sed -e "${CONF_SED_SCRIPT}" \
+                        < '${WORKDIR}/defconfig' >>'${S}/.config'
+
         yes '' | oe_runmake oldconfig
 }
 
-- 
1.7.8.rc3




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [meta-handheld 2/2] linux-git: move CMDLINE_DEBUG to linux-git.inc to be used also for linux-kexecboot
  2011-11-20 10:06 [meta-handheld 1/2] linux-kexecboot: use kernel_conf_variable like linux.inc does and respect CMDLINE_DEBUG Martin Jansa
@ 2011-11-20 10:06 ` Martin Jansa
  2011-11-20 11:26 ` [meta-handheld v2] linux-kexecboot: use kernel_conf_variable like linux.inc does and respect CMDLINE_DEBUG Martin Jansa
  1 sibling, 0 replies; 6+ messages in thread
From: Martin Jansa @ 2011-11-20 10:06 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 recipes-kernel/linux/linux-git.inc |    2 ++
 recipes-kernel/linux/linux_git.bb  |    1 -
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/recipes-kernel/linux/linux-git.inc b/recipes-kernel/linux/linux-git.inc
index 84f09f5..4367ae8 100644
--- a/recipes-kernel/linux/linux-git.inc
+++ b/recipes-kernel/linux/linux-git.inc
@@ -4,6 +4,8 @@ PV = "${OLD_KERNEL_RELEASE}+${KERNEL_RELEASE}+gitr${SRCPV}"
 
 SRCREV = "65112dccf8a113737684366349d7f9ec373ddc47"
 
+CMDLINE_DEBUG = "debug"
+
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git;protocol=git;branch=master \
            file://defconfig"
 S = "${WORKDIR}/git"
diff --git a/recipes-kernel/linux/linux_git.bb b/recipes-kernel/linux/linux_git.bb
index fbe3049..256ee0e 100644
--- a/recipes-kernel/linux/linux_git.bb
+++ b/recipes-kernel/linux/linux_git.bb
@@ -1,4 +1,3 @@
-CMDLINE_DEBUG = "debug"
 require linux.inc
 require linux-git.inc
 
-- 
1.7.8.rc3




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [meta-handheld v2] linux-kexecboot: use kernel_conf_variable like linux.inc does and respect CMDLINE_DEBUG
  2011-11-20 10:06 [meta-handheld 1/2] linux-kexecboot: use kernel_conf_variable like linux.inc does and respect CMDLINE_DEBUG Martin Jansa
  2011-11-20 10:06 ` [meta-handheld 2/2] linux-git: move CMDLINE_DEBUG to linux-git.inc to be used also for linux-kexecboot Martin Jansa
@ 2011-11-20 11:26 ` Martin Jansa
  2011-11-21 10:43   ` Andrea Adami
  1 sibling, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2011-11-20 11:26 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 recipes-kernel/linux/linux-kexecboot.inc |  104 ++++++++++++++---------------
 1 files changed, 50 insertions(+), 54 deletions(-)

diff --git a/recipes-kernel/linux/linux-kexecboot.inc b/recipes-kernel/linux/linux-kexecboot.inc
index ea0bbd6..c7b29f3 100644
--- a/recipes-kernel/linux/linux-kexecboot.inc
+++ b/recipes-kernel/linux/linux-kexecboot.inc
@@ -11,7 +11,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
 # only as fallback for patches available only in linux-PV dir and ie defconfigs needs to go from linux-kexecboot-PV
 FILESPATH_append = ":${FILE_DIRNAME}/linux-${PV}"
 
-
 DEPENDS += "xz-native"
 
 # Kernel bootlogo is distro-specific (default is OE logo).
@@ -19,13 +18,17 @@ DEPENDS += "xz-native"
 LOGO_SIZE ?= "."
 SRC_URI = "file://${LOGO_SIZE}/logo_linux_clut224.ppm.bz2"
 
+# Set the verbosity of kernel messages during runtime
+# You can define CMDLINE_DEBUG in your local.conf or distro.conf to override this behaviour
+CMDLINE_DEBUG ?= '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "debug", "loglevel=3", d)}'
+
 # Note how we set loglevel=3 and master console on serial to protect bootlogo.
-CMDLINE_c7x0 = "console=tty1 console=ttyS0,115200n8 loglevel=3"
-CMDLINE_tosa = "console=tty1 console=ttyS0,115200n8 loglevel=3"
-CMDLINE_poodle = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1 loglevel=3"
-CMDLINE_akita = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1 loglevel=3"
-CMDLINE_collie = "console=tty1 console=ttySA0,115200n8 fbcon=rotate:1 mem=64M loglevel=3"
-CMDLINE_spitz = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1 loglevel=3"
+CMDLINE_c7x0 = "console=tty1 console=ttyS0,115200n8"
+CMDLINE_tosa = "console=tty1 console=ttyS0,115200n8"
+CMDLINE_poodle = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1"
+CMDLINE_akita = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1"
+CMDLINE_collie = "console=tty1 console=ttySA0,115200n8 fbcon=rotate:1 mem=64M"
+CMDLINE_spitz = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1"
 
 PACKAGES = ""
 PROVIDES = ""
@@ -46,28 +49,39 @@ LOCALVERSION ?= ""
 # we want the smallest size
 INITRAMFS_IMAGE = "initramfs-kexecboot-klibc-image"
 
+kernel_conf_variable() {
+        CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
+        if test "$2" = "n"
+        then
+                echo "# CONFIG_$1 is not set" >> ${S}/.config
+        else
+                echo "CONFIG_$1=$2" >> ${S}/.config
+        fi
+}
+
 do_configure_prepend() {
 
         echo "" > ${S}/.config
+        CONF_SED_SCRIPT=""
 
         #
         # CONFIG_CMDLINE mangling
         #
-        echo "CONFIG_CMDLINE_BOOL=y" >> ${S}/.config
-        echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config
+        kernel_conf_variable CMDLINE_BOOL y
+        kernel_conf_variable CMDLINE "\"${CMDLINE} ${CMDLINE_DEBUG}\""
 
         # mips and x86
-        echo "CONFIG_CMDLINE_OVERRIDE=y" >> ${S}/.config
+        kernel_conf_variable CMDLINE_OVERRIDE y
 
         # sh only
-        echo "CONFIG_CMDLINE_OVERWRITE=y" >> ${S}/.config
-        echo "# CONFIG_CMDLINE_EXTEND is not set" >> ${S}/.config
+        kernel_conf_variable CMDLINE_OVERWRITE y
+        kernel_conf_variable CMDLINE_EXTEND n
 
         #
         # endian support
         #
         if [ "${SITEINFO_ENDIANNESS}" = "be" ]; then
-                echo "CONFIG_CPU_BIG_ENDIAN=y"          >> ${S}/.config
+                kernel_conf_variable CPU_BIG_ENDIAN y
         fi
 
         #
@@ -75,60 +89,42 @@ do_configure_prepend() {
         #
         if [ -e ${WORKDIR}/logo_linux_clut224.ppm ]; then
                 install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm
-                echo "CONFIG_LOGO=y"                    >> ${S}/.config
-                echo "CONFIG_LOGO_LINUX_CLUT224=y"      >> ${S}/.config
+                kernel_conf_variable LOGO y
+                kernel_conf_variable LOGO_LINUX_CLUT224 y
         fi
 
         # When enabling thumb for userspace we also need thumb support in the kernel
         if [ "${ARM_INSTRUCTION_SET}" = "thumb" ] ; then
-            sed -i -e /CONFIG_ARM_THUMB/d ${WORKDIR}/defconfig 
-            echo "CONFIG_ARM_THUMB=y" >> ${S}/.config
+                kernel_conf_variable ARM_THUMB y
         fi
 
-        sed -e '/CONFIG_CMDLINE=/d' \
-            -e '/CONFIG_CMDLINE_BOOL/d' \
-            -e '/CONFIG_CMDLINE_OVERRIDE/d' \
-            -e '/CONFIG_CMDLINE_OVERWRITE/d' \
-            -e '/CONFIG_CMDLINE_EXTEND/d' \
-            -e '/CONFIG_CPU_BIG_ENDIAN/d' \
-            -e '/CONFIG_LOGO=/d' \
-            -e '/CONFIG_LOGO_LINUX_CLUT224=/d' \
-            -e '/CONFIG_LOCALVERSION/d' \
-            -e '/CONFIG_LOCALVERSION_AUTO/d' \
-            < '${WORKDIR}/defconfig' >>'${S}/.config'
-
-        echo 'CONFIG_LOCALVERSION="${LOCALVERSION}"' >>${S}/.config
-        echo '# CONFIG_LOCALVERSION_AUTO is not set' >>${S}/.config
+        kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\""
+        kernel_conf_variable LOCALVERSION_AUTO n
 
         # Force sane defaults for kexec-enabled kernels and keep size small
-        sed -i -e /CONFIG_BLK_DEV_INITRD/d \
-               -e /CONFIG_KEXEC/d \
-               -e /=m/d \
-               -e /CONFIG_MODULES/d \
-               -e /CONFIG_DEBUG_ERRORS/d \
-               -e /CONFIG_DEBUG_BUGVERBOSE/d \
-               -e /CONFIG_DEBUG_KERNEL/d \
-               ${S}/.config
-
-               echo 'CONFIG_BLK_DEV_INITRD=y' >>${S}/.config
-               echo 'CONFIG_KEXEC=y' >>${S}/.config
-               echo '# CONFIG_MODULES is not set' >> ${S}/.config
+        kernel_conf_variable BLK_DEV_INITRD y
+        kernel_conf_variable KEXEC y
+        CONF_SED_SCRIPT="$CONF_SED_SCRIPT /=m/d;"
+        kernel_conf_variable MODULES n
+        kernel_conf_variable DEBUG_ERRORS n
+        kernel_conf_variable DEBUG_BUGVERBOSE n
+        kernel_conf_variable DEBUG_KERNEL n
 
         # Force lzma for arm kernels only
         if [ "${ARCH}" = "arm" ] ; then
-
-            sed -i -e /CONFIG_KERNEL/d \
-               -e /CONFIG_INITRAMFS_COMPRESSION/d \
-               -e /CONFIG_INITRAMFS_SOURCE/d \
-               -e /CONFIG_RD/d \
-               ${S}/.config
-
-               echo 'CONFIG_KERNEL_LZMA=y' >>${S}/.config
-               echo 'CONFIG_INITRAMFS_COMPRESSION_LZMA=y' >>${S}/.config
-               echo 'CONFIG_INITRAMFS_SOURCE="initramfs.cpio.lzma"' >>${S}/.config
-               echo 'CONFIG_RD_LZMA=y' >>${S}/.config
+                CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_KERNEL/d;"
+                CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_RD/d;"
+                CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_INITRAMFS_COMPRESSION/d;"
+                CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_INITRAMFS_SOURCE/d;"
+                kernel_conf_variable KERNEL_LZMA y
+                kernel_conf_variable RD_LZMA y
+                kernel_conf_variable INITRAMFS_COMPRESSION_LZMA y
+                kernel_conf_variable INITRAMFS_SOURCE "\"initramfs.cpio.lzma\""
         fi
 
+        sed -e "${CONF_SED_SCRIPT}" \
+                        < '${WORKDIR}/defconfig' >>'${S}/.config'
+
         yes '' | oe_runmake oldconfig
 }
 
-- 
1.7.8.rc3




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [meta-handheld v2] linux-kexecboot: use kernel_conf_variable like linux.inc does and respect CMDLINE_DEBUG
  2011-11-20 11:26 ` [meta-handheld v2] linux-kexecboot: use kernel_conf_variable like linux.inc does and respect CMDLINE_DEBUG Martin Jansa
@ 2011-11-21 10:43   ` Andrea Adami
  2011-11-21 11:52     ` Martin Jansa
  0 siblings, 1 reply; 6+ messages in thread
From: Andrea Adami @ 2011-11-21 10:43 UTC (permalink / raw)
  To: openembedded-devel

On Sun, Nov 20, 2011 at 12:26 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  recipes-kernel/linux/linux-kexecboot.inc |  104 ++++++++++++++---------------
>  1 files changed, 50 insertions(+), 54 deletions(-)
>
> diff --git a/recipes-kernel/linux/linux-kexecboot.inc b/recipes-kernel/linux/linux-kexecboot.inc
> index ea0bbd6..c7b29f3 100644
> --- a/recipes-kernel/linux/linux-kexecboot.inc
> +++ b/recipes-kernel/linux/linux-kexecboot.inc
> @@ -11,7 +11,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
>  # only as fallback for patches available only in linux-PV dir and ie defconfigs needs to go from linux-kexecboot-PV
>  FILESPATH_append = ":${FILE_DIRNAME}/linux-${PV}"
>
> -
>  DEPENDS += "xz-native"
>
>  # Kernel bootlogo is distro-specific (default is OE logo).
> @@ -19,13 +18,17 @@ DEPENDS += "xz-native"
>  LOGO_SIZE ?= "."
>  SRC_URI = "file://${LOGO_SIZE}/logo_linux_clut224.ppm.bz2"
>
> +# Set the verbosity of kernel messages during runtime
> +# You can define CMDLINE_DEBUG in your local.conf or distro.conf to override this behaviour
> +CMDLINE_DEBUG ?= '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "debug", "loglevel=3", d)}'
> +
>  # Note how we set loglevel=3 and master console on serial to protect bootlogo.
> -CMDLINE_c7x0 = "console=tty1 console=ttyS0,115200n8 loglevel=3"
> -CMDLINE_tosa = "console=tty1 console=ttyS0,115200n8 loglevel=3"
> -CMDLINE_poodle = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1 loglevel=3"
> -CMDLINE_akita = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1 loglevel=3"
> -CMDLINE_collie = "console=tty1 console=ttySA0,115200n8 fbcon=rotate:1 mem=64M loglevel=3"
> -CMDLINE_spitz = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1 loglevel=3"
> +CMDLINE_c7x0 = "console=tty1 console=ttyS0,115200n8"
> +CMDLINE_tosa = "console=tty1 console=ttyS0,115200n8"
> +CMDLINE_poodle = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1"
> +CMDLINE_akita = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1"
> +CMDLINE_collie = "console=tty1 console=ttySA0,115200n8 fbcon=rotate:1 mem=64M"
> +CMDLINE_spitz = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1"
>
>  PACKAGES = ""
>  PROVIDES = ""
> @@ -46,28 +49,39 @@ LOCALVERSION ?= ""
>  # we want the smallest size
>  INITRAMFS_IMAGE = "initramfs-kexecboot-klibc-image"
>
> +kernel_conf_variable() {
> +        CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
> +        if test "$2" = "n"
> +        then
> +                echo "# CONFIG_$1 is not set" >> ${S}/.config
> +        else
> +                echo "CONFIG_$1=$2" >> ${S}/.config
> +        fi
> +}
> +
>  do_configure_prepend() {
>
>         echo "" > ${S}/.config
> +        CONF_SED_SCRIPT=""
>
>         #
>         # CONFIG_CMDLINE mangling
>         #
> -        echo "CONFIG_CMDLINE_BOOL=y" >> ${S}/.config
> -        echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config
> +        kernel_conf_variable CMDLINE_BOOL y
> +        kernel_conf_variable CMDLINE "\"${CMDLINE} ${CMDLINE_DEBUG}\""
>
>         # mips and x86
> -        echo "CONFIG_CMDLINE_OVERRIDE=y" >> ${S}/.config
> +        kernel_conf_variable CMDLINE_OVERRIDE y
>
>         # sh only
> -        echo "CONFIG_CMDLINE_OVERWRITE=y" >> ${S}/.config
> -        echo "# CONFIG_CMDLINE_EXTEND is not set" >> ${S}/.config
> +        kernel_conf_variable CMDLINE_OVERWRITE y
> +        kernel_conf_variable CMDLINE_EXTEND n
>
>         #
>         # endian support
>         #
>         if [ "${SITEINFO_ENDIANNESS}" = "be" ]; then
> -                echo "CONFIG_CPU_BIG_ENDIAN=y"          >> ${S}/.config
> +                kernel_conf_variable CPU_BIG_ENDIAN y
>         fi
>
>         #
> @@ -75,60 +89,42 @@ do_configure_prepend() {
>         #
>         if [ -e ${WORKDIR}/logo_linux_clut224.ppm ]; then
>                 install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm
> -                echo "CONFIG_LOGO=y"                    >> ${S}/.config
> -                echo "CONFIG_LOGO_LINUX_CLUT224=y"      >> ${S}/.config
> +                kernel_conf_variable LOGO y
> +                kernel_conf_variable LOGO_LINUX_CLUT224 y
>         fi
>
>         # When enabling thumb for userspace we also need thumb support in the kernel
>         if [ "${ARM_INSTRUCTION_SET}" = "thumb" ] ; then
> -            sed -i -e /CONFIG_ARM_THUMB/d ${WORKDIR}/defconfig
> -            echo "CONFIG_ARM_THUMB=y" >> ${S}/.config
> +                kernel_conf_variable ARM_THUMB y
>         fi
>
> -        sed -e '/CONFIG_CMDLINE=/d' \
> -            -e '/CONFIG_CMDLINE_BOOL/d' \
> -            -e '/CONFIG_CMDLINE_OVERRIDE/d' \
> -            -e '/CONFIG_CMDLINE_OVERWRITE/d' \
> -            -e '/CONFIG_CMDLINE_EXTEND/d' \
> -            -e '/CONFIG_CPU_BIG_ENDIAN/d' \
> -            -e '/CONFIG_LOGO=/d' \
> -            -e '/CONFIG_LOGO_LINUX_CLUT224=/d' \
> -            -e '/CONFIG_LOCALVERSION/d' \
> -            -e '/CONFIG_LOCALVERSION_AUTO/d' \
> -            < '${WORKDIR}/defconfig' >>'${S}/.config'
> -
> -        echo 'CONFIG_LOCALVERSION="${LOCALVERSION}"' >>${S}/.config
> -        echo '# CONFIG_LOCALVERSION_AUTO is not set' >>${S}/.config
> +        kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\""
> +        kernel_conf_variable LOCALVERSION_AUTO n
>
>         # Force sane defaults for kexec-enabled kernels and keep size small
> -        sed -i -e /CONFIG_BLK_DEV_INITRD/d \
> -               -e /CONFIG_KEXEC/d \
> -               -e /=m/d \
> -               -e /CONFIG_MODULES/d \
> -               -e /CONFIG_DEBUG_ERRORS/d \
> -               -e /CONFIG_DEBUG_BUGVERBOSE/d \
> -               -e /CONFIG_DEBUG_KERNEL/d \
> -               ${S}/.config
> -
> -               echo 'CONFIG_BLK_DEV_INITRD=y' >>${S}/.config
> -               echo 'CONFIG_KEXEC=y' >>${S}/.config
> -               echo '# CONFIG_MODULES is not set' >> ${S}/.config
> +        kernel_conf_variable BLK_DEV_INITRD y
> +        kernel_conf_variable KEXEC y
> +        CONF_SED_SCRIPT="$CONF_SED_SCRIPT /=m/d;"
> +        kernel_conf_variable MODULES n
> +        kernel_conf_variable DEBUG_ERRORS n
> +        kernel_conf_variable DEBUG_BUGVERBOSE n
> +        kernel_conf_variable DEBUG_KERNEL n
>
>         # Force lzma for arm kernels only
>         if [ "${ARCH}" = "arm" ] ; then
> -
> -            sed -i -e /CONFIG_KERNEL/d \
> -               -e /CONFIG_INITRAMFS_COMPRESSION/d \
> -               -e /CONFIG_INITRAMFS_SOURCE/d \
> -               -e /CONFIG_RD/d \
> -               ${S}/.config
> -
> -               echo 'CONFIG_KERNEL_LZMA=y' >>${S}/.config
> -               echo 'CONFIG_INITRAMFS_COMPRESSION_LZMA=y' >>${S}/.config
> -               echo 'CONFIG_INITRAMFS_SOURCE="initramfs.cpio.lzma"' >>${S}/.config
> -               echo 'CONFIG_RD_LZMA=y' >>${S}/.config
> +                CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_KERNEL/d;"
> +                CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_RD/d;"
> +                CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_INITRAMFS_COMPRESSION/d;"
> +                CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_INITRAMFS_SOURCE/d;"
> +                kernel_conf_variable KERNEL_LZMA y
> +                kernel_conf_variable RD_LZMA y
> +                kernel_conf_variable INITRAMFS_COMPRESSION_LZMA y
> +                kernel_conf_variable INITRAMFS_SOURCE "\"initramfs.cpio.lzma\""
>         fi
>
> +        sed -e "${CONF_SED_SCRIPT}" \
> +                        < '${WORKDIR}/defconfig' >>'${S}/.config'
> +
>         yes '' | oe_runmake oldconfig
>  }
>
> --
> 1.7.8.rc3
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>

Martin,

I agree for the use kernel_conf_variable but I'm unsure about CMDLINE_DEBUG.
In fact, I hardcoded it purposedly with commit 8929166 with the
following reasons:

* Being a second-stage bootloader we don't expect any output on screen.
* Adding 'debug' as commandline arg is pointless because
* linux-kexecboot is compiled without debug and printk in order
* to minimize the size.
* Full debug implies not only editing the commandline (e.g. earlyprintk)
* but re-enabling full debug options in the defconfigs

Regards

Andrea



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-handheld v2] linux-kexecboot: use kernel_conf_variable like linux.inc does and respect CMDLINE_DEBUG
  2011-11-21 10:43   ` Andrea Adami
@ 2011-11-21 11:52     ` Martin Jansa
  2011-11-25 12:34       ` Paul Eggleton
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2011-11-21 11:52 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1664 bytes --]

On Mon, Nov 21, 2011 at 11:43:46AM +0100, Andrea Adami wrote:
> On Sun, Nov 20, 2011 at 12:26 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> Martin,
> 
> I agree for the use kernel_conf_variable but I'm unsure about CMDLINE_DEBUG.
> In fact, I hardcoded it purposedly with commit 8929166 with the
> following reasons:
> 
> * Being a second-stage bootloader we don't expect any output on screen.
> * Adding 'debug' as commandline arg is pointless because
> * linux-kexecboot is compiled without debug and printk in order
> * to minimize the size.
> * Full debug implies not only editing the commandline (e.g. earlyprintk)
> * but re-enabling full debug options in the defconfigs

I had some issues with 3.2.0-rc2 when used as linux-kexecboot, that's
why I've added this, but later found out that it's really a bit
incomplete, that's why I have followup patch for this:
https://gitorious.org/shr/meta-handheld/commit/6bc710615b587fc0bfd8fc4372cad0de5599dd82?format=patch

But with latest SRCREV it works again, so in theory I don't need it, but
still it would be usefull to have easy way to debug even this stage
(maybe you still remember older kernel version where it worked fine 
as 3rd stage and failed to boot as 2nd stage..).

BTW: here is upgrade to 3.2.0-rc2 with those changes to
linux-kexecboot.inc applied
https://gitorious.org/shr/meta-handheld/commit/27ca3d24353a5473f4f1aade00ba7a52b667e28c?format=patch

(be aware that I do rebase that branch sometimes so if those commits are
not valid anymore just look at last few commits in that branch).

Regards,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-handheld v2] linux-kexecboot: use kernel_conf_variable like linux.inc does and respect CMDLINE_DEBUG
  2011-11-21 11:52     ` Martin Jansa
@ 2011-11-25 12:34       ` Paul Eggleton
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2011-11-25 12:34 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Martin Jansa

On Monday 21 November 2011 12:52:13 Martin Jansa wrote:
> On Mon, Nov 21, 2011 at 11:43:46AM +0100, Andrea Adami wrote:
> > On Sun, Nov 20, 2011 at 12:26 PM, Martin Jansa <martin.jansa@gmail.com>
> > wrote: Martin,
> > 
> > I agree for the use kernel_conf_variable but I'm unsure about
> > CMDLINE_DEBUG. In fact, I hardcoded it purposedly with commit 8929166
> > with the
> > following reasons:
> > 
> > * Being a second-stage bootloader we don't expect any output on screen.
> > * Adding 'debug' as commandline arg is pointless because
> > * linux-kexecboot is compiled without debug and printk in order
> > * to minimize the size.
> > * Full debug implies not only editing the commandline (e.g. earlyprintk)
> > * but re-enabling full debug options in the defconfigs
> 
> I had some issues with 3.2.0-rc2 when used as linux-kexecboot, that's
> why I've added this, but later found out that it's really a bit
> incomplete, that's why I have followup patch for this:
> https://gitorious.org/shr/meta-handheld/commit/6bc710615b587fc0bfd8fc4372cad
> 0de5599dd82?format=patch
> 
> But with latest SRCREV it works again, so in theory I don't need it, but
> still it would be usefull to have easy way to debug even this stage
> (maybe you still remember older kernel version where it worked fine
> as 3rd stage and failed to boot as 2nd stage..).
> 
> BTW: here is upgrade to 3.2.0-rc2 with those changes to
> linux-kexecboot.inc applied
> https://gitorious.org/shr/meta-handheld/commit/27ca3d24353a5473f4f1aade00ba7
> a52b667e28c?format=patch
> 
> (be aware that I do rebase that branch sometimes so if those commits are
> not valid anymore just look at last few commits in that branch).

As discussed on IRC I've merged the latest version of this branch to meta-
handheld master now, thanks.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-25 12:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-20 10:06 [meta-handheld 1/2] linux-kexecboot: use kernel_conf_variable like linux.inc does and respect CMDLINE_DEBUG Martin Jansa
2011-11-20 10:06 ` [meta-handheld 2/2] linux-git: move CMDLINE_DEBUG to linux-git.inc to be used also for linux-kexecboot Martin Jansa
2011-11-20 11:26 ` [meta-handheld v2] linux-kexecboot: use kernel_conf_variable like linux.inc does and respect CMDLINE_DEBUG Martin Jansa
2011-11-21 10:43   ` Andrea Adami
2011-11-21 11:52     ` Martin Jansa
2011-11-25 12:34       ` Paul Eggleton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.