[OpenBIOS] [PATCH v2] Don't try to start Quik from hard disk if booting from the CD-ROM
Aurelien Jarno
aurelien at aurel32.net
Tue Jan 13 17:35:07 CET 2009
On Tue, Jan 13, 2009 at 01:14:37PM +0100, laurent at lvivier.info wrote:
> >Index: arch/ppc/qemu/main.c
> >===================================================================
> >--- arch/ppc/qemu/main.c (révision 396)
> >+++ arch/ppc/qemu/main.c (copie de travail)
> >@@ -266,6 +266,10 @@
> > } u;
> > phandle_t ph;
> >
> >+ /* Quik can only boot from a hard-disk */
> >+ if (nvram_read(0x34) == 'd')
> >+ return;
> >+
>
> Could you put this outside of the quik_startup() function ?
> I'd like to have only quik code inside (no nvram access).
This is done in this new version.
Index: arch/ppc/qemu/main.c
===================================================================
--- arch/ppc/qemu/main.c (révision 399)
+++ arch/ppc/qemu/main.c (copie de travail)
@@ -387,8 +393,13 @@
void
boot( void )
{
+ char boot_device = nvram_read(0x34);
fword("update-chosen");
- check_preloaded_kernel();
- quik_startup();
+ if (boot_device == 'm') {
+ check_preloaded_kernel();
+ }
+ if (boot_device == 'c') {
+ quik_startup();
+ }
yaboot_startup();
}
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32 at debian.org | aurelien at aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
More information about the OpenBIOS
mailing list