FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Kubuntu Development

 
 
LinkBack Thread Tools
 
Old 02-26-2010, 02:05 AM
Dennis Gilmore
 
Default clean up sparc boot loader so that it writes out and links into /etc correctly

---
booty/sparc.py | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/booty/sparc.py b/booty/sparc.py
index 22c4ab8..f6dd7be 100644
--- a/booty/sparc.py
+++ b/booty/sparc.py
@@ -1,14 +1,17 @@
+import string
import os

from booty import BootyNoKernelWarning
+from util import getDiskPart
from bootloaderInfo import *
+import iutil

class sparcBootloaderInfo(bootloaderInfo):
def writeSilo(self, instRoot, bl, kernelList,
chainList, defaultDev, justConfigFile):

try:
- bootDev = self.storage.mountpoints["/boot"]
+ bootDev = self.storage.mountpoints["/boot"].name

mf = '/silo.message'
cf = "/boot/silo.conf"
@@ -17,7 +20,7 @@ class sparcBootloaderInfo(bootloaderInfo):
if not os.path.isdir(instRoot + "/boot"):
os.mkdir(instRoot + "/boot")
except KeyError:
- bootDev = self.storage.rootDevice
+ bootDev = self.storage.rootDevice.name

cf = "/etc/silo.conf"
mfdir = '/etc'
@@ -31,7 +34,7 @@ class sparcBootloaderInfo(bootloaderInfo):
f = open(instRoot + cf, "w+")
f.write("# silo.conf generated by anaconda

")

- f.write("#boot=%s
" % (bootDev.path,))
+ f.write("#boot=%s
" % (bootDev,))
f.write("message=%s
" % (mf,))
f.write("timeout=%s
" % (self.timeout or 50))

@@ -61,7 +64,7 @@ class sparcBootloaderInfo(bootloaderInfo):
f.write(" initrd=%s/%s
" % (cfPath, initrd))

append = "%s" % (self.args.get(),)
-
+
realroot = rootDev.fstabSpec
if rootIsDevice(realroot):
f.write(" root=%s
" % (realroot,))
@@ -86,9 +89,7 @@ class sparcBootloaderInfo(bootloaderInfo):

backup = "%s/backup.b" % (cfPath,)
sbinargs = ["/sbin/silo", "-f", "-C", cf, "-S", backup]
- # TODO!!! FIXME!!! XXX!!!
- # butil is not defined!!! - assume this is in rhpl now?
- if butil.getSparcMachine() == "sun4u":
+ if (iutil.getSparcMachine() == "sun4u" or iutil.getSparcMachine() == "sun4v"):
sbinargs += ["-u"]
else:
sbinargs += ["-U"]
@@ -103,8 +104,8 @@ class sparcBootloaderInfo(bootloaderInfo):
return rc

if (not os.access(instRoot + "/etc/silo.conf", os.R_OK) and
- os.access(instRoot + "/boot/etc/silo.conf", os.R_OK)):
- os.symlink("../boot/etc/silo.conf",
+ os.access(instRoot + "/boot/silo.conf", os.R_OK)):
+ os.symlink("../boot/silo.conf",
instRoot + "/etc/silo.conf")

return 0
--
1.7.0

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 02-26-2010, 08:26 PM
Chris Lumens
 
Default clean up sparc boot loader so that it writes out and links into /etc correctly

> diff --git a/booty/sparc.py b/booty/sparc.py
> index 22c4ab8..f6dd7be 100644
> --- a/booty/sparc.py
> +++ b/booty/sparc.py
> @@ -1,14 +1,17 @@
> +import string
> import os
>
> from booty import BootyNoKernelWarning
> +from util import getDiskPart
> from bootloaderInfo import *
> +import iutil
>
> class sparcBootloaderInfo(bootloaderInfo):
> def writeSilo(self, instRoot, bl, kernelList,
> chainList, defaultDev, justConfigFile):
>
> try:
> - bootDev = self.storage.mountpoints["/boot"]
> + bootDev = self.storage.mountpoints["/boot"].name
>
> mf = '/silo.message'
> cf = "/boot/silo.conf"

For the most part, other arches keep bootDev like you've got it here and then
refer to bootDev.name or whatever. Any reason for being different?

The rest looks fine.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 02-26-2010, 08:45 PM
Dennis Gilmore
 
Default clean up sparc boot loader so that it writes out and links into /etc correctly

On Friday 26 February 2010 03:26:35 pm Chris Lumens wrote:
> > diff --git a/booty/sparc.py b/booty/sparc.py
> > index 22c4ab8..f6dd7be 100644
> > --- a/booty/sparc.py
> > +++ b/booty/sparc.py
> > @@ -1,14 +1,17 @@
> > +import string
> >
> > import os
> >
> > from booty import BootyNoKernelWarning
> >
> > +from util import getDiskPart
> >
> > from bootloaderInfo import *
> >
> > +import iutil
> >
> > class sparcBootloaderInfo(bootloaderInfo):
> > def writeSilo(self, instRoot, bl, kernelList,
> >
> > chainList, defaultDev, justConfigFile):
> > try:
> > - bootDev = self.storage.mountpoints["/boot"]
> > + bootDev = self.storage.mountpoints["/boot"].name
> >
> > mf = '/silo.message'
> > cf = "/boot/silo.conf"
>
> For the most part, other arches keep bootDev like you've got it here and
> then refer to bootDev.name or whatever. Any reason for being different?

i picked it up from a single instance of it thats in booty/x86.py while i was
trying to work out what exactly was failing.

Ill rewrite it


Dennis
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 02-26-2010, 09:59 PM
Dennis Gilmore
 
Default clean up sparc boot loader so that it writes out and links into /etc correctly

---
booty/sparc.py | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/booty/sparc.py b/booty/sparc.py
index 8b8c78b..1cb790d 100644
--- a/booty/sparc.py
+++ b/booty/sparc.py
@@ -1,7 +1,10 @@
+import string
import os

from booty import BootyNoKernelWarning
+from util import getDiskPart
from bootloaderInfo import *
+import iutil

class sparcBootloaderInfo(bootloaderInfo):
def writeSilo(self, instRoot, bl, kernelList,
@@ -35,7 +38,7 @@ class sparcBootloaderInfo(bootloaderInfo):
f.write("message=%s
" % (mf,))
f.write("timeout=%s
" % (self.timeout or 50))

- (name, partNum) = getDiskPart(bootDev, self.storage)
+ (name, partNum) = getDiskPart(bootDev.name, self.storage)
partno = partNum + 1
f.write("partition=%s
" % (partno,))

@@ -86,9 +89,7 @@ class sparcBootloaderInfo(bootloaderInfo):

backup = "%s/backup.b" % (cfPath,)
sbinargs = ["/sbin/silo", "-f", "-C", cf, "-S", backup]
- # TODO!!! FIXME!!! XXX!!!
- # butil is not defined!!! - assume this is in rhpl now?
- if butil.getSparcMachine() == "sun4u":
+ if (iutil.getSparcMachine() == "sun4u" or iutil.getSparcMachine() == "sun4v"):
sbinargs += ["-u"]
else:
sbinargs += ["-U"]
@@ -102,8 +103,8 @@ class sparcBootloaderInfo(bootloaderInfo):
return rc

if (not os.access(instRoot + "/etc/silo.conf", os.R_OK) and
- os.access(instRoot + "/boot/etc/silo.conf", os.R_OK)):
- os.symlink("../boot/etc/silo.conf",
+ os.access(instRoot + "/boot/silo.conf", os.R_OK)):
+ os.symlink("../boot/silo.conf",
instRoot + "/etc/silo.conf")

return 0
--
1.7.0

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-01-2010, 05:45 AM
Jon Masters
 
Default clean up sparc boot loader so that it writes out and links into /etc correctly

Hi Dennis,

Any update on posting an image for playing with?

Jon.


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-01-2010, 04:31 PM
Dennis Gilmore
 
Default clean up sparc boot loader so that it writes out and links into /etc correctly

On Monday 01 March 2010 12:45:34 am Jon Masters wrote:
> Hi Dennis,
>
> Any update on posting an image for playing with?
>
> Jon.

Ive fixed the issue tht was causing NetworkManager to SIGBUS, And im composing
a tree right now.

it will show up http://sparc.koji.fedoraproject.org/alpha/20100301/12-
Alpha/sparc/ when done. likely a couple more hours yet


Dennis
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 10:43 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org