From 396aa4f25cd3d454f9830989fa279072f43811d7 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Tue, 18 Oct 2011 12:09:23 +1100 Subject: [PATCH] Add support for the PowerNV platform While there correct the detection for IBM pSeries. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Tony Breeds --- second/yaboot.c | 3 +++ ybin/ybin | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/second/yaboot.c b/second/yaboot.c index 0fd26a1..9b66ab4 100644 --- a/second/yaboot.c +++ b/second/yaboot.c @@ -205,6 +205,9 @@ yaboot_start (unsigned long r3, unsigned long r4, unsigned long r5) else if (prom_getprop(root, "device_type", model, 256 ) > 0 && !strncmp("chrp", model, 4)) _machine = _MACH_chrp; + else if (prom_getprop(root, "compatible", model, 256 ) > 0 && + strstr(model, "ibm,powernv")) + _machine = _MACH_chrp; else { if (prom_getprop(root, "model", model, 256 ) > 0 && !strncmp(model, "IBM", 3)) diff --git a/ybin/ybin b/ybin/ybin index 44e63f4..c1e95ba 100755 --- a/ybin/ybin +++ b/ybin/ybin @@ -73,7 +73,9 @@ fi ## defaults usemount=no -if (cat /proc/cpuinfo 2> /dev/null | grep ^machine | grep -q 'CHRP IBM') ; then +if (cat /proc/cpuinfo 2> /dev/null | grep ^platform | grep -q 'pSeries') ; then + fstype=raw +elif (cat /proc/cpuinfo 2> /dev/null | grep ^platform | grep -q 'PowerNV') ; then fstype=raw else fstype=hfs @@ -504,7 +506,11 @@ checkconf() echo 1>&2 [ "$nonvram" = 0 ] && echo 1>&2 "$PRG: OldWorld PowerMac, nvram will not be updated" nonvram=1 - elif (cat /proc/cpuinfo 2> /dev/null | grep ^machine | grep -q 'CHRP IBM') ; then + elif (cat /proc/cpuinfo 2> /dev/null | grep ^platform | grep -q 'pSeries') ; then + ## IBM hardware does not need nvram update AFAICT + nonvram=1 + ADDNOTE=yes + elif (cat /proc/cpuinfo 2> /dev/null | grep ^platform | grep -q 'PowerNV') ; then ## IBM hardware does not need nvram update AFAICT nonvram=1 ADDNOTE=yes -- 2.39.2