All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Soete <soete.joel@tiscali.be>
To: James Bottomley <James.Bottomley@steeleye.com>,
	Paul Bame <bame@parisc-linux.org>,
	PARISC list <parisc-linux@lists.parisc-linux.org>
Subject: [parisc-linux] Re: [parisc-linux-cvs] palo bame
Date: Thu, 01 Jan 2004 15:43:32 +0000	[thread overview]
Message-ID: <3FF44024.8010605@tiscali.be> (raw)
In-Reply-To: <3FF1F0C3.9070907@tiscali.be>

[-- Attachment #1: Type: text/plain, Size: 6817 bytes --]

Hi Paul, James,

Joel Soete wrote:
> Hi Paul,
> 
> Nice ;)
> 
> I just noticed a small detail (versus patch Bjoern and I sent in june:
> http://lists.parisc-linux.org/pipermail/parisc-linux/2003-June/020098.html
> http://lists.parisc-linux.org/pipermail/parisc-linux/2003-June/020120.html): 
> 
> 
> before 'goto restart;' you didn't set interactive (I mean 'interactive=1;')
> but for instance we can reach :
> [snip]
> @@ -427,6 +446,7 @@
>          if (f.kern32_sz == 0)
>          {
>              die("Error: can't find a 32-bit kernel here");
> +        goto restart;
>          }
>          kernfd = offset_open(bootdev, f.kern32_offset, f.kern32_sz);
>      }
> [snip]
> 
> from a non-interactive session (as I frequently encouter the pb, I 
> install a kernel with palo and later to free space, I remove this kernel 
> :( ) then imho ipl will loop definitively?
> 
> hmm isn't it the same
> @@ -268,9 +269,13 @@
>      puts("alo ipl " PALOVERSION " ");
>      puts(bld_info);
>      puts("\n");
> -    if (Debug) printf("iplmain(%d, started %s)\n", is_interactive,
> +    interactive = is_interactive;
> +    if (Debug) printf("iplmain(%d, started %s)\n", interactive,
>      started_wide ? "wide" : "narrow");
>      if (Debug) printf("initial-sp %p\n", initialstackptr);
> +
> + restart:
> +
>      blocked_bootdev = pdc_bootdev_open();
>      bootdev = byteio_open(blocked_bootdev);
> 
> [snip]
> @@ -312,6 +322,7 @@
>      if (f.cmdline[0] == '\0')    /* no command line specified */
>      {
>      die("ERROR: No command line on boot media\n");
> +    goto restart;
>      }
> 
> As we don't find the cmd line on media, imho we would never have any 
> chance to interact?
> Well I still have to check in more detail but may be simply added a flag 
> 'interact:' just before test if (interactive); and replace all goto 
> restart; by (interactive=1; goto interact; )
> 
> Appologies if I've missed some other change that make my though false,
>     Joel
> 
> Paul Bame wrote:
> 
>> CVSROOT:    /var/cvs
>> Module name:    palo
>> Changes by:    bame    03/12/30 10:55:46
>>
>> Modified files:
>>     ipl            : ipl.c
>> Log message:
>> typo
>>
>> _______________________________________________
>> parisc-linux-cvs mailing list
>> parisc-linux-cvs@lists.parisc-linux.org
>> http://lists.parisc-linux.org/mailman/listinfo/parisc-linux-cvs
>>
> 
> 
What do think about this draft of patch:
=========><=========
--- ipl.c       2004-01-01 16:25:47.339568000 +0100
+++ ipl.c.new   2004-01-01 16:24:48.429568000 +0100
@@ -278,8 +278,6 @@
         started_wide ? "wide" : "narrow");
      if (Debug) printf("initial-sp %p\n", initialstackptr);

- restart:
-
      blocked_bootdev = pdc_bootdev_open();
      bootdev = byteio_open(blocked_bootdev);

@@ -326,7 +324,8 @@
      if (f.cmdline[0] == '\0')  /* no command line specified */
      {
         die("ERROR: No command line on boot media\n");
-       goto restart;
+        interactive=1;
+       goto interactive_loop;
      }

      /* add the right console= if there isn't one yet */
@@ -393,9 +392,18 @@
         }
      }

+ interactive_loop:
+
      if (interactive)
         interact(&f);

+    if (f.cmdline[0] == '\0')  /* no command line specified */
+    {
+       die("ERROR: No command line on boot media\n");
+        interactive=1;
+       goto interactive_loop;
+    }
+
      strcpy(commandline,
             parse(f.cmdline, &kern_part, kern_name, &rd_part, rd_name));

@@ -439,14 +447,16 @@
      {
         printf("ERROR: Requesting kernel from partition %d "
                     "on unpartitioned media!\n", kern_part);
-       while(1);
+        interactive=1;
+       goto interactive_loop;
      }

      if (rd_part != -1 && rd_part != kern_part)
      {
         die("ERROR:: palo does not support ramdisk on different"
                 " partition than kernel\n");
-       goto restart;
+        interactive=1;
+       goto interactive_loop;
      }

      if (kern_part == 0)
@@ -461,7 +471,8 @@
             if (f.kern32_sz == 0)
             {
                 die("Error: can't find a 32-bit kernel here");
-               goto restart;
+                interactive=1;
+                goto interactive_loop;
             }
             kernfd = offset_open(bootdev, f.kern32_offset, f.kern32_sz);
         }
@@ -470,7 +481,8 @@
             if (f.kern64_sz == 0)
             {
                 die("Error: can't find a 64-bit kernel here");
-               goto restart;
+                interactive=1;
+                goto interactive_loop;
             }
             kernfd = offset_open(bootdev, f.kern64_offset, f.kern64_sz);
         }
@@ -502,7 +514,8 @@
                 else
                 {
                     die("No kernels found.");
-                   goto restart;
+                    interactive=1;
+                    goto interactive_loop;
                 }
             }

@@ -523,7 +536,8 @@
         if (!load_kernel(kernfd, &entry, &wide))
         {
             die("ERROR: failed to load kernel\n");
-           goto restart;
+            interactive=1;
+            goto interactive_loop;
         }

         if (rd_part != -1)
@@ -548,7 +562,8 @@
             (partition[kern_part - 1].id != 0x83 && partition[kern_part - 1].id != 0xfd && partition[kern_part - 1].id != 0xf0) )
         {
             printf("ERROR: Partition %d must be ext2\n", kern_part);
-           while(1);
+            interactive=1;
+            goto interactive_loop;
         }

         pp = &partition[kern_part - 1];
@@ -565,14 +580,16 @@
         {
             printf("ERROR: open %s from partition %d failed\n",
                 kern_name, kern_part);
-           while(1);
+            interactive=1;
+            goto interactive_loop;
         }

         bkern_fd = byteio_open(kern_fd);
         if (!load_kernel(bkern_fd, &entry, &wide))
         {
             die("ERROR: failed to load kernel\n");
-           goto restart;
+            interactive=1;
+            goto interactive_loop;
         }

         if (rd_part != -1)
@@ -593,8 +610,10 @@

      /* FIXME!!! need to pass command line to kernel */
      /* could theoretically use a function pointer, but they're ugly on PA */
-    if(pdc_default_width(wide))
-           goto restart;
+    if(pdc_default_width(wide)) {
+        interactive=1;
+       goto interactive_loop;
+    }
      printf("Branching to kernel entry point 0x%08x.  If this is the last\n"
            "message you see, you may need to switch your console.  This is\n"
            "a common symptom -- search the FAQ and mailing list at parisc-linux.org\n\n",
=========><=========

I still have to work on because if I go into interactive mode with an empty cmdline, I couldn't yet added anything to this cmdline :(

Please let me know your opinion,
Joel

[-- Attachment #2: Ipl.diff --]
[-- Type: text/plain, Size: 3670 bytes --]

--- ipl.c	2004-01-01 16:25:47.339568000 +0100
+++ ipl.c.new	2004-01-01 16:24:48.429568000 +0100
@@ -278,8 +278,6 @@
 	started_wide ? "wide" : "narrow");
     if (Debug) printf("initial-sp %p\n", initialstackptr);
 
- restart:
-
     blocked_bootdev = pdc_bootdev_open();
     bootdev = byteio_open(blocked_bootdev);
 
@@ -326,7 +324,8 @@
     if (f.cmdline[0] == '\0')	/* no command line specified */
     {
 	die("ERROR: No command line on boot media\n");
-	goto restart;
+        interactive=1;
+	goto interactive_loop;
     }
 
     /* add the right console= if there isn't one yet */
@@ -393,9 +392,18 @@
 	}
     }
 
+ interactive_loop:
+
     if (interactive)
 	interact(&f);
 
+    if (f.cmdline[0] == '\0')	/* no command line specified */
+    {
+	die("ERROR: No command line on boot media\n");
+        interactive=1;
+	goto interactive_loop;
+    }
+
     strcpy(commandline,
 	    parse(f.cmdline, &kern_part, kern_name, &rd_part, rd_name));
 
@@ -439,14 +447,16 @@
     {
 	printf("ERROR: Requesting kernel from partition %d "
 		    "on unpartitioned media!\n", kern_part);
-	while(1);
+        interactive=1;
+	goto interactive_loop;
     }
 
     if (rd_part != -1 && rd_part != kern_part)
     {
 	die("ERROR:: palo does not support ramdisk on different"
 		" partition than kernel\n");
-	goto restart;
+        interactive=1;
+	goto interactive_loop;
     }
 
     if (kern_part == 0)
@@ -461,7 +471,8 @@
 	    if (f.kern32_sz == 0)
 	    {
 	        die("Error: can't find a 32-bit kernel here");
-		goto restart;
+                interactive=1;
+                goto interactive_loop;
 	    }
 	    kernfd = offset_open(bootdev, f.kern32_offset, f.kern32_sz);
 	}
@@ -470,7 +481,8 @@
 	    if (f.kern64_sz == 0)
 	    {
 	        die("Error: can't find a 64-bit kernel here");
-		goto restart;
+                interactive=1;
+                goto interactive_loop;
 	    }
 	    kernfd = offset_open(bootdev, f.kern64_offset, f.kern64_sz);
 	}
@@ -502,7 +514,8 @@
 		else
 		{
 		    die("No kernels found.");
-		    goto restart;
+                    interactive=1;
+                    goto interactive_loop;
 		}
 	    }
 
@@ -523,7 +536,8 @@
 	if (!load_kernel(kernfd, &entry, &wide))
 	{
 	    die("ERROR: failed to load kernel\n");
-	    goto restart;
+            interactive=1;
+            goto interactive_loop;
 	}
 
 	if (rd_part != -1)
@@ -548,7 +562,8 @@
 	    (partition[kern_part - 1].id != 0x83 && partition[kern_part - 1].id != 0xfd && partition[kern_part - 1].id != 0xf0) )
 	{
 	    printf("ERROR: Partition %d must be ext2\n", kern_part);
-	    while(1);
+            interactive=1;
+            goto interactive_loop;
 	}
 
 	pp = &partition[kern_part - 1];
@@ -565,14 +580,16 @@
 	{
 	    printf("ERROR: open %s from partition %d failed\n",
 		kern_name, kern_part);
-	    while(1);
+            interactive=1;
+            goto interactive_loop;
 	}
 
 	bkern_fd = byteio_open(kern_fd);
 	if (!load_kernel(bkern_fd, &entry, &wide))
 	{
 	    die("ERROR: failed to load kernel\n");
-	    goto restart;
+            interactive=1;
+            goto interactive_loop;
 	}
 
 	if (rd_part != -1)
@@ -593,8 +610,10 @@
 
     /* FIXME!!! need to pass command line to kernel */
     /* could theoretically use a function pointer, but they're ugly on PA */
-    if(pdc_default_width(wide))
-	    goto restart;
+    if(pdc_default_width(wide)) {
+        interactive=1;
+	goto interactive_loop;
+    }
     printf("Branching to kernel entry point 0x%08x.  If this is the last\n"
 	   "message you see, you may need to switch your console.  This is\n"
 	   "a common symptom -- search the FAQ and mailing list at parisc-linux.org\n\n",

           reply	other threads:[~2004-01-01 15:42 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <3FF1F0C3.9070907@tiscali.be>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3FF44024.8010605@tiscali.be \
    --to=soete.joel@tiscali.be \
    --cc=James.Bottomley@steeleye.com \
    --cc=bame@parisc-linux.org \
    --cc=parisc-linux@lists.parisc-linux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.