If there is whitespace in the pattern sed returns scan_dmesg will sort
all of the words.  As hw.product is available on ramdisks use that
instead to avoid the problem.

Index: install.md
===================================================================
RCS file: /cvs/src/distrib/armv7/ramdisk/install.md,v
retrieving revision 1.46
diff -u -p -r1.46 install.md
--- install.md  28 Jul 2017 18:15:44 -0000      1.46
+++ install.md  22 Aug 2017 02:40:18 -0000
@@ -37,8 +37,7 @@ MOUNT_ARGS_msdos="-o-l"
 md_installboot() {
        local _disk=/dev/$1 _mdec _plat
 
-       # Identify ARMv7 platform based on dmesg.
-       case $(scan_dmesg 's/^mainbus0 at root: \(.*\)$/\1/p') in
+       case $(sysctl -n hw.product) in
        *AM335x*)                       _plat=am335x;;
        *'OMAP3 BeagleBoard'*)          _plat=beagle;;
        *OMAP4*)                        _plat=panda;;

Reply via email to