summaryrefslogtreecommitdiff
path: root/meta/recipes-core/initrdscripts
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:24:24 +0100
commitde81e804f0654092d20ccb8e6e40f4ff614c4b09 (patch)
tree1beaae3b82b26aede286c030b1dac6d785999a93 /meta/recipes-core/initrdscripts
parent1b64664f0c388f41084f5db6e46e3e68c53fb6d9 (diff)
downloadopenembedded-core-de81e804f0654092d20ccb8e6e40f4ff614c4b09.tar.gz
openembedded-core-de81e804f0654092d20ccb8e6e40f4ff614c4b09.tar.bz2
openembedded-core-de81e804f0654092d20ccb8e6e40f4ff614c4b09.zip
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. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/initrdscripts')
-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 @@
#
# 'foo=value' as 'bootparam_foo=value'
# 'foo' as 'bootparam_foo=true'
+# 'foo.bar[=value] as 'foo_bar=[value|true]'
# Register a function to be called before running a module
# The hook is called as:
@@ -79,7 +80,7 @@ mount -t sysfs sysfs /sys
# populate bootparam environment
for p in `cat /proc/cmdline`; do
opt=`echo $p | cut -d'=' -f1`
- opt=`echo $opt | sed -e 's/-/_/'`
+ opt=`echo $opt | tr '.-' '__'`
if [ "`echo $p | cut -d'=' -f1`" = "$p" ]; then
eval "bootparam_${opt}=true"
else