Message ID | 569D2C3E.5060608@oracle.com |
---|---|
State | Changes Requested |
Delegated to: | David Miller |
Headers | show |
On Mon, Jan 18, 2016 at 9:17 PM, Bryce <philip.copeland@oracle.com> wrote: > I've been prompted by a couple of folk to pass along this minor patch for silo > Newer sparc firmware, mostly in the T4 and above range, along with sun(vtoc) now > support gpt labelled drives on the system boot drive (and theoretically some can > also support msdos? not tried it) > > The problem with sillo is that it actively looks to see if a sun label magic is > written but GPT has no such 'magic' and silo would moan. having non-patched silo run on disk with gpt label (hardware is T5-2 server), breaks autoboot ( auto-boot?=true ) Boot device: vdisk0 File and args: SILO Version 1.4.14 Fatal error: Wrong disklabel magic boot: I'm going to test git silo with this patch and report back tomorrow. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Jan 18, 2016 at 06:17:34PM +0000, Bryce wrote: > I've been prompted by a couple of folk to pass along this minor patch for silo > Newer sparc firmware, mostly in the T4 and above range, along with sun(vtoc) now > support gpt labelled drives on the system boot drive (and theoretically some can > also support msdos? not tried it) > > The problem with sillo is that it actively looks to see if a sun label magic is > written but GPT has no such 'magic' and silo would moan. > > Phil > =--= > > > >From 5d5994b88513f2e45701460d275a2d29ab89c40b Mon Sep 17 00:00:00 2001 > From: Dazed and confused <clueless@somewhere.com> Can the original author be found and attributed? I recall davem would like silo patches to be signed off, like kernel patches. Sam -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 20/01/16 17:29, Sam Ravnborg wrote: > On Mon, Jan 18, 2016 at 06:17:34PM +0000, Bryce wrote: >> I've been prompted by a couple of folk to pass along this minor patch for silo >> Newer sparc firmware, mostly in the T4 and above range, along with sun(vtoc) now >> support gpt labelled drives on the system boot drive (and theoretically some can >> also support msdos? not tried it) >> >> The problem with sillo is that it actively looks to see if a sun label magic is >> written but GPT has no such 'magic' and silo would moan. >> >> Phil >> =--= >> >> >> >From 5d5994b88513f2e45701460d275a2d29ab89c40b Mon Sep 17 00:00:00 2001 >> From: Dazed and confused <clueless@somewhere.com> > Can the original author be found and attributed? > > I recall davem would like silo patches to be signed off, like kernel patches. > > Sam The original author is myself, that is the raw patch from the internal svn repo. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Bryce. On Wed, Jan 20, 2016 at 05:40:14PM +0000, Bryce wrote: > On 20/01/16 17:29, Sam Ravnborg wrote: > > On Mon, Jan 18, 2016 at 06:17:34PM +0000, Bryce wrote: > >> I've been prompted by a couple of folk to pass along this minor patch for silo > >> Newer sparc firmware, mostly in the T4 and above range, along with sun(vtoc) now > >> support gpt labelled drives on the system boot drive (and theoretically some can > >> also support msdos? not tried it) > >> > >> The problem with sillo is that it actively looks to see if a sun label magic is > >> written but GPT has no such 'magic' and silo would moan. > >> > >> Phil > >> =--= > >> > >> > >> >From 5d5994b88513f2e45701460d275a2d29ab89c40b Mon Sep 17 00:00:00 2001 > >> From: Dazed and confused <clueless@somewhere.com> > > Can the original author be found and attributed? > > > > I recall davem would like silo patches to be signed off, like kernel patches. > > > > Sam > The original author is myself, that is the raw patch from the internal svn repo. Great. Then I suggest to await feedback from Anatoly and then please re-submit like a proper patch with a proper changelog including signed-off-by, and Tested-by. And with a real name in the From part- so git picks up the real name. Sam -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Bryce <philip.copeland@oracle.com> Date: Mon, 18 Jan 2016 18:17:34 +0000 > diff --git a/include/silo.h b/include/silo.h > index 94d6e31..135b79e 100644 > --- a/include/silo.h > +++ b/include/silo.h > @@ -46,6 +46,7 @@ typedef struct { > } sun_partition; > > #define SUN_LABEL_MAGIC 0xDABE > +#define GPT_LABEL_MAGIC 0x0000 > > struct silo_inode { > unsigned int inolen; > diff --git a/second/fs/iom.c b/second/fs/iom.c > index 28dd4b2..8629d36 100644 > --- a/second/fs/iom.c > +++ b/second/fs/iom.c > @@ -37,8 +37,8 @@ static int read_sun_partition (int partno) > silo_fatal("Cannot read partition"); > return 0; > } > - if (sdl.magic != SUN_LABEL_MAGIC) > - silo_fatal("Wrong disklabel magic"); > + if ((sdl.magic != SUN_LABEL_MAGIC) && (sdl.magic != GPT_LABEL_MAGIC)) > + printf("Wrong disklabel magic [0x%X]\n", (unsigned int) sdl.magic); > for (csum = 0, ush = ((unsigned short *) ((&sdl) + 1)) - 1; ush >= (unsigned short *) &sdl;) > csum ^= *ush--; > if (csum) This can't be right. If it's a GPT label then we have to add all of the necessary GPT datastructures and code necessary to interpret and verify the partition label properly. You can't just fudge it by making the label magic check pass, the code right afterwards verifies the checksum and then we calculate the disk offset from the partition entry 'partno' to determine where to start reading things. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From 5d5994b88513f2e45701460d275a2d29ab89c40b Mon Sep 17 00:00:00 2001 From: Dazed and confused <clueless@somewhere.com> Date: Thu, 19 Feb 2015 05:58:30 -0800 Subject: [PATCH] GPT tweak quietens silo about lack of a MAGIC for the GPT label --- include/silo.h | 1 + second/fs/iom.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/silo.h b/include/silo.h index 94d6e31..135b79e 100644 --- a/include/silo.h +++ b/include/silo.h @@ -46,6 +46,7 @@ typedef struct { } sun_partition; #define SUN_LABEL_MAGIC 0xDABE +#define GPT_LABEL_MAGIC 0x0000 struct silo_inode { unsigned int inolen; diff --git a/second/fs/iom.c b/second/fs/iom.c index 28dd4b2..8629d36 100644 --- a/second/fs/iom.c +++ b/second/fs/iom.c @@ -37,8 +37,8 @@ static int read_sun_partition (int partno) silo_fatal("Cannot read partition"); return 0; } - if (sdl.magic != SUN_LABEL_MAGIC) - silo_fatal("Wrong disklabel magic"); + if ((sdl.magic != SUN_LABEL_MAGIC) && (sdl.magic != GPT_LABEL_MAGIC)) + printf("Wrong disklabel magic [0x%X]\n", (unsigned int) sdl.magic); for (csum = 0, ush = ((unsigned short *) ((&sdl) + 1)) - 1; ush >= (unsigned short *) &sdl;) csum ^= *ush--; if (csum) -- 1.7.1