summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2015-09-03 20:42:29 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-06 15:26:24 +0100
commit82dd3fb27ec13d98776cbad0658e5686e88e7910 (patch)
tree888eb168ca81879f67328f4ed2fac27cf49a1a22 /meta/recipes-core
parent858279168379c645f82802cca896ef243915ca5e (diff)
downloadpoky-82dd3fb27ec13d98776cbad0658e5686e88e7910.tar.gz
initramfs-framework: handle kernel parameters with . inside
Kernel parameters like "uvesafb.mode_option=640x480-32" were turned into shell variables named "bootparam_uvesafb.mode_option", which triggered errors from the shell because the name is not valid. Now points get replaced with underscores, leading to bootparam_uvesafb_mode_option in this example. (From OE-Core rev: de81e804f0654092d20ccb8e6e40f4ff614c4b09) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rwxr-xr-xmeta/recipes-core/initrdscripts/initramfs-framework/init3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/init b/meta/recipes-core/initrdscripts/initramfs-framework/init
index 95fa9fb1a0..e8f4713b52 100755
--- a/meta/recipes-core/initrdscripts/initramfs-framework/init
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/init
@@ -13,6 +13,7 @@
13# 13#
14# 'foo=value' as 'bootparam_foo=value' 14# 'foo=value' as 'bootparam_foo=value'
15# 'foo' as 'bootparam_foo=true' 15# 'foo' as 'bootparam_foo=true'
16# 'foo.bar[=value] as 'foo_bar=[value|true]'
16 17
17# Register a function to be called before running a module 18# Register a function to be called before running a module
18# The hook is called as: 19# The hook is called as:
@@ -79,7 +80,7 @@ mount -t sysfs sysfs /sys
79# populate bootparam environment 80# populate bootparam environment
80for p in `cat /proc/cmdline`; do 81for p in `cat /proc/cmdline`; do
81 opt=`echo $p | cut -d'=' -f1` 82 opt=`echo $p | cut -d'=' -f1`
82 opt=`echo $opt | sed -e 's/-/_/'` 83 opt=`echo $opt | tr '.-' '__'`
83 if [ "`echo $p | cut -d'=' -f1`" = "$p" ]; then 84 if [ "`echo $p | cut -d'=' -f1`" = "$p" ]; then
84 eval "bootparam_${opt}=true" 85 eval "bootparam_${opt}=true"
85 else 86 else