pupa-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PowerPC port of PUPA


From: Jeroen Dekkers
Subject: Re: PowerPC port of PUPA
Date: Sat, 14 Feb 2004 20:46:01 +0100
User-agent: Mutt/1.5.5.1+cvs20040105i

On Sat, Feb 14, 2004 at 08:23:26PM +0100, Marco Gerards wrote:
> Jeroen Dekkers <address@hidden> writes:
> 
> > On Sat, Feb 14, 2004 at 04:11:25PM +0100, Yoshinori K. Okuji wrote:
> >> On Friday 13 February 2004 19:45, Jeroen Dekkers wrote:
> >> > I don't want to put you aside, but would it be OK to commit our
> >> > patches without your approval? That way development can continue, and
> >> > when you have time again you can pick things up easier.
> >> 
> >> It depends on what kind of patch you want to apply. If it's really small 
> >> (e.g. a simple bug fix), no problem. If it is about ext2fs, Marco can 
> >> decide what to do, since he is the author. For others, I haven't made 
> >> my mind. Tell me what patches are pending, and I'll make a decision.
> >
> > I'll commit the ext2 bugfixes this evening. I've also got some
> > changes to silence some warnings which I can also commit this
> > evening. The only other thing pending is the initrd patch.
> 
> Silence which warnings?  I already silenced all changes in the normal
> mode patch I sent in a while ago, unless it is really important to
> you, it would be a waste of time to fix it again.

I have the following changes in my tree at the moment (besides the
things I already listed). I haven't written a changelog yet.

Index: font/manager.c
===================================================================
RCS file: /cvsroot/pupa/pupa/font/manager.c,v
retrieving revision 1.1
diff -u -p -r1.1 manager.c
--- font/manager.c      25 Sep 2003 20:15:52 -0000      1.1
+++ font/manager.c      14 Feb 2004 19:41:33 -0000
@@ -232,6 +232,9 @@ font_command (int argc, char *argv[])
 
 PUPA_MOD_INIT
 {
+  /* Silence warning.  */
+  (void) mod;
+
   pupa_register_command ("font", font_command, PUPA_COMMAND_FLAG_BOTH,
                         "font FILE...",
                         "Specify a font file to display.");
Index: normal/cmdline.c
===================================================================
RCS file: /cvsroot/pupa/pupa/normal/cmdline.c,v
retrieving revision 1.3
diff -u -p -r1.3 cmdline.c
--- normal/cmdline.c    3 Dec 2003 19:17:27 -0000       1.3
+++ normal/cmdline.c    14 Feb 2004 19:41:33 -0000
@@ -158,6 +158,16 @@ pupa_tab_complete (char *buf, int *resto
   /* String that is added when matched.  */
   char *matchstr;
 
+  auto void print_simple_completion (char *comp);
+  auto void print_partition_completion (char *comp);
+  auto int NESTED_FUNC_ATTR
+    add_completion (const char *comp, const char *match, const char *what,
+                   void (*print_completion) (char *));
+  auto int iterate_part (const pupa_partition_t p);
+  auto int iterate_dir (const char *filename, int dir);
+  auto int iterate_dev (const char *devname);
+  auto int iterate_commands (pupa_command_t cmd);
+
   void print_simple_completion (char *comp)
     {
       pupa_printf (" %s", comp);
Index: normal/i386/setjmp.S
===================================================================
RCS file: /cvsroot/pupa/pupa/normal/i386/setjmp.S,v
retrieving revision 1.1
diff -u -p -r1.1 setjmp.S
--- normal/i386/setjmp.S        20 Jan 2003 04:13:46 -0000      1.1
+++ normal/i386/setjmp.S        14 Feb 2004 19:41:33 -0000
@@ -54,4 +54,3 @@ FUNCTION(pupa_longjmp)
        jnz     1f
        incl    %eax
 1:     jmp     *%ecx
-       
\ No newline at end of file
Index: term/i386/pc/vga.c
===================================================================
RCS file: /cvsroot/pupa/pupa/term/i386/pc/vga.c,v
retrieving revision 1.1
diff -u -p -r1.1 vga.c
--- term/i386/pc/vga.c  25 Sep 2003 20:15:52 -0000      1.1
+++ term/i386/pc/vga.c  14 Feb 2004 19:41:33 -0000
@@ -1,6 +1,6 @@
 /*
  *  PUPA  --  Preliminary Universal Programming Architecture for GRUB
- *  Copyright (C) 2000,2001,2002  Free Software Foundation, Inc.
+ *  Copyright (C) 2000,2001,2002,2004  Free Software Foundation, Inc.
  *  Copyright (C) 2003  Yoshinori K. Okuji <address@hidden>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -216,7 +216,8 @@ invalidate_char (struct colored_char *p)
 static int
 check_vga_mem (void *p)
 {
-  return p >= VGA_MEM && p <= VGA_MEM + VGA_WIDTH * VGA_HEIGHT / 8;
+  return (unsigned char *) p >= VGA_MEM 
+    && (unsigned char *) p <= VGA_MEM + VGA_WIDTH * VGA_HEIGHT / 8;
 }
 
 static void
@@ -311,8 +312,10 @@ scroll_up (void)
 static void
 pupa_vga_putchar (pupa_uint32_t c)
 {
+#if DEBUG_VGA
   static int show = 1;
-  
+#endif  
+
   if (c == '\a')
     /* FIXME */
     return;
@@ -405,111 +408,117 @@ pupa_vga_putchar (pupa_uint32_t c)
 #endif
 }
 
- static pupa_uint16_t
- pupa_vga_getxy (void)
- {
-   return ((xpos << 8) | ypos);
- }
-
- static void
- pupa_vga_gotoxy (pupa_uint8_t x, pupa_uint8_t y)
- {
-   if (x >= TEXT_WIDTH || y >= TEXT_HEIGHT)
-     {
-       pupa_error (PUPA_ERR_OUT_OF_RANGE, "invalid point (%u,%u)",
-                  (unsigned) x, (unsigned) y);
-       return;
-     }
-
-   if (cursor_state)
-     write_char ();
-
-   xpos = x;
-   ypos = y;
-
-   if (cursor_state)
-     write_cursor ();
- }
-
- static void
- pupa_vga_cls (void)
- {
-   unsigned i;
-
-   for (i = 0; i < TEXT_WIDTH * TEXT_HEIGHT; i++)
-     {
-       text_buf[i].code = ' ';
-       text_buf[i].fg_color = 0;
-       text_buf[i].bg_color = 0;
-       text_buf[i].width = 0;
-       text_buf[i].index = 0;
-     }
-
-   pupa_memset (VGA_MEM, 0, VGA_WIDTH * VGA_HEIGHT / 8);
-
-   xpos = ypos = 0;
- }
-
- static void
- pupa_vga_setcolorstate (pupa_term_color_state state)
- {
-   switch (state)
-     {
-     case PUPA_TERM_COLOR_STANDARD:
-     case PUPA_TERM_COLOR_NORMAL:
-       fg_color = DEFAULT_FG_COLOR;
-       bg_color = DEFAULT_BG_COLOR;
-       break;
-     case PUPA_TERM_COLOR_HIGHLIGHT:
-       fg_color = DEFAULT_BG_COLOR;
-       bg_color = DEFAULT_FG_COLOR;
-       break;
-     default:
-       break;
-     }
- }
-
- static void
- pupa_vga_setcolor (pupa_uint8_t normal_color, pupa_uint8_t highlight_color)
- {
-   /* FIXME */
- }
-
- static void
- pupa_vga_setcursor (int on)
- {
-   if (cursor_state != on)
-     {
-       if (cursor_state)
-        write_char ();
-       else
-        write_cursor ();
-
-       cursor_state = on;
-     }
- }
-
- static struct pupa_term pupa_vga_term =
-   {
-     .name = "vga",
-     .init = pupa_vga_init,
-     .fini = pupa_vga_fini,
-     .putchar = pupa_vga_putchar,
-     .checkkey = pupa_console_checkkey,
-     .getkey = pupa_console_getkey,
-     .getxy = pupa_vga_getxy,
-     .gotoxy = pupa_vga_gotoxy,
-     .cls = pupa_vga_cls,
-     .setcolorstate = pupa_vga_setcolorstate,
-     .setcolor = pupa_vga_setcolor,
-     .setcursor = pupa_vga_setcursor,
-     .flags = 0,
-     .next = 0
-   };
+static pupa_uint16_t
+pupa_vga_getxy (void)
+{
+  return ((xpos << 8) | ypos);
+}
+
+static void
+pupa_vga_gotoxy (pupa_uint8_t x, pupa_uint8_t y)
+{
+  if (x >= TEXT_WIDTH || y >= TEXT_HEIGHT)
+    {
+      pupa_error (PUPA_ERR_OUT_OF_RANGE, "invalid point (%u,%u)",
+                 (unsigned) x, (unsigned) y);
+      return;
+    }
+  
+  if (cursor_state)
+    write_char ();
+  
+  xpos = x;
+  ypos = y;
+  
+  if (cursor_state)
+    write_cursor ();
+}
+
+static void
+pupa_vga_cls (void)
+{
+  unsigned i;
+  
+  for (i = 0; i < TEXT_WIDTH * TEXT_HEIGHT; i++)
+    {
+      text_buf[i].code = ' ';
+      text_buf[i].fg_color = 0;
+      text_buf[i].bg_color = 0;
+      text_buf[i].width = 0;
+      text_buf[i].index = 0;
+    }
+  
+  pupa_memset (VGA_MEM, 0, VGA_WIDTH * VGA_HEIGHT / 8);
+  
+  xpos = ypos = 0;
+}
+
+static void
+pupa_vga_setcolorstate (pupa_term_color_state state)
+{
+  switch (state)
+    {
+    case PUPA_TERM_COLOR_STANDARD:
+    case PUPA_TERM_COLOR_NORMAL:
+      fg_color = DEFAULT_FG_COLOR;
+      bg_color = DEFAULT_BG_COLOR;
+      break;
+    case PUPA_TERM_COLOR_HIGHLIGHT:
+      fg_color = DEFAULT_BG_COLOR;
+      bg_color = DEFAULT_FG_COLOR;
+      break;
+    default:
+      break;
+    }
+}
+
+static void
+pupa_vga_setcolor (pupa_uint8_t normal_color, pupa_uint8_t highlight_color)
+{
+  /* FIXME */
+  (void) normal_color;
+  (void) highlight_color;
+}
+
+static void
+pupa_vga_setcursor (int on)
+{
+  if (cursor_state != on)
+    {
+      if (cursor_state)
+       write_char ();
+      else
+       write_cursor ();
+      
+      cursor_state = on;
+    }
+}
+
+static struct pupa_term pupa_vga_term =
+  {
+    .name = "vga",
+    .init = pupa_vga_init,
+    .fini = pupa_vga_fini,
+    .putchar = pupa_vga_putchar,
+    .checkkey = pupa_console_checkkey,
+    .getkey = pupa_console_getkey,
+    .getxy = pupa_vga_getxy,
+    .gotoxy = pupa_vga_gotoxy,
+    .cls = pupa_vga_cls,
+    .setcolorstate = pupa_vga_setcolorstate,
+    .setcolor = pupa_vga_setcolor,
+    .setcursor = pupa_vga_setcursor,
+    .flags = 0,
+    .next = 0
+  };
 
 static int
 debug_command (int argc, char *argv[])
 {
+  /* Silence warnings.  */
+  (void) argc;
+  (void) argv;
+
   pupa_printf ("???????????????\n");
 
   return 0;
Index: kern/i386/pc/startup.S
===================================================================
RCS file: /cvsroot/pupa/pupa/kern/i386/pc/startup.S,v
retrieving revision 1.11
diff -u -p -r1.11 startup.S
--- kern/i386/pc/startup.S      16 Nov 2003 16:36:38 -0000      1.11
+++ kern/i386/pc/startup.S      14 Feb 2004 19:41:33 -0000
@@ -1,6 +1,6 @@
 /*
  *  PUPA  --  Preliminary Universal Programming Architecture for GRUB
- *  Copyright (C) 1999,2000,2001,2002 Free Software Foundation, Inc.
+ *  Copyright (C) 1999,2000,2001,2002,2004 Free Software Foundation, Inc.
  *  Copyright (C) 2002,2003  Yoshinori K. Okuji <address@hidden>
  *  Copyright (C) 2003 Marco Gerards <address@hidden>
  *  Copyright (C) 2003 Jeroen Dekkers <address@hidden>
@@ -624,6 +624,9 @@ linux_setup_seg:
 
                
 /*
+ * void pupa_multiboot_real_boot (pupa_addr_t entry,
+ *                               struct pupa_multiboot_info *mbi) 
+ *
  * This starts the multiboot kernel.
  */
 
Index: util/console.c
===================================================================
RCS file: /cvsroot/pupa/pupa/util/console.c,v
retrieving revision 1.2
diff -u -p -r1.2 console.c
--- util/console.c      3 Dec 2003 19:17:27 -0000       1.2
+++ util/console.c      14 Feb 2004 19:41:33 -0000
@@ -177,6 +177,7 @@ static pupa_err_t
 pupa_ncurses_fini (void)
 {
   endwin ();
+  return 0;
 }
 
 
Index: util/misc.c
===================================================================
RCS file: /cvsroot/pupa/pupa/util/misc.c,v
retrieving revision 1.5
diff -u -p -r1.5 misc.c
--- util/misc.c 17 Nov 2003 18:07:08 -0000      1.5
+++ util/misc.c 14 Feb 2004 19:41:33 -0000
@@ -18,6 +18,7 @@
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <malloc.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
@@ -199,6 +200,9 @@ pupa_memalign (pupa_size_t align, pupa_s
 void
 pupa_mm_init_region (void *addr, pupa_size_t size)
 {
+  /* Silence warnings.  */
+  (void) addr;
+  (void) size;
 }
 
 void
Index: util/pupa-emu.c
===================================================================
RCS file: /cvsroot/pupa/pupa/util/pupa-emu.c,v
retrieving revision 1.1
diff -u -p -r1.1 pupa-emu.c
--- util/pupa-emu.c     17 Nov 2003 18:07:08 -0000      1.1
+++ util/pupa-emu.c     14 Feb 2004 19:41:33 -0000
@@ -1,5 +1,6 @@
 /*
  *  PUPA  --  Preliminary Universal Programming Architecture for GRUB
+ *  Copyright (C) 2004 Free Software Foundation, Inc.
  *  Copyright (C) 2003 Marco Gerards <address@hidden>
  *
  *  PUPA is free software; you can redistribute it and/or modify
@@ -77,11 +78,11 @@ const char *argp_program_bug_address = P
 static char doc[] = "PUPA emulator";
 
 static struct argp_option options[] = {
-  {"root-device", 'r', "DEV",  0, "use DEV as the root device 
[default=guessed]"},
-  {"device-map",  'm', "FILE", 0, "use FILE as the device map"},
-  {"directory",   'd', "DIR",  0, "use PUPA files in the directory DIR"},
-  {"verbose",     'v', 0     , 0, "print verbose messages"},
-  { 0 }
+  {"root-device", 'r', "DEV",  0, "use DEV as the root device 
[default=guessed]", 0},
+  {"device-map",  'm', "FILE", 0, "use FILE as the device map", 0},
+  {"directory",   'd', "DIR",  0, "use PUPA files in the directory DIR", 0},
+  {"verbose",     'v', 0     , 0, "print verbose messages", 0},
+  { 0, 0, 0, 0, 0, 0}
 };
 
 struct arguments
@@ -118,7 +119,7 @@ parse_opt (int key, char *arg, struct ar
   return 0;
 }
 
-static struct argp argp = {options, parse_opt, 0, doc};
+static struct argp argp = {options, parse_opt, 0, doc, 0, 0, 0};
 
 
 int
Index: util/i386/pc/getroot.c
===================================================================
RCS file: /cvsroot/pupa/pupa/util/i386/pc/getroot.c,v
retrieving revision 1.1
diff -u -p -r1.1 getroot.c
--- util/i386/pc/getroot.c      17 Nov 2003 18:07:09 -0000      1.1
+++ util/i386/pc/getroot.c      14 Feb 2004 19:41:33 -0000
@@ -26,6 +26,7 @@
 #include <dirent.h>
 
 #include <pupa/util/misc.h>
+#include <pupa/machine/util/biosdisk.h>
 
 static void
 strip_extra_slashes (char *dir)
Index: util/i386/pc/pupa-setup.c
===================================================================
RCS file: /cvsroot/pupa/pupa/util/i386/pc/pupa-setup.c,v
retrieving revision 1.5
diff -u -p -r1.5 pupa-setup.c
--- util/i386/pc/pupa-setup.c   17 Nov 2003 18:07:09 -0000      1.5
+++ util/i386/pc/pupa-setup.c   14 Feb 2004 19:41:33 -0000
@@ -1,7 +1,7 @@
 /* pupa-setup.c - make PUPA usable */
 /*
  *  PUPA  --  Preliminary Universal Programming Architecture for GRUB
- *  Copyright (C) 1999,2000,2001,2002  Free Software Foundation, Inc.
+ *  Copyright (C) 1999,2000,2001,2002,2004  Free Software Foundation, Inc.
  *  Copyright (C) 2002  Yoshinori K. Okuji <address@hidden>
  *  Copyright (C) 2003  Marco Gerards <address@hidden>
  *
@@ -596,6 +596,7 @@ main (int argc, char *argv[])
 
   /* Initialize filesystems.  */
   pupa_fat_init ();
+  pupa_ext2_init ();
   
   if (root_dev)
     {
@@ -627,6 +628,7 @@ main (int argc, char *argv[])
         root_dev, dest_dev);
 
   /* Free resources.  */
+  pupa_ext2_fini ();
   pupa_fat_fini ();
   
   pupa_util_biosdisk_fini ();


-- 
Jeroen Dekkers




reply via email to

[Prev in Thread] Current Thread [Next in Thread]