All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Philips PNX8550 command line patch
@ 2005-12-06 18:02 Vladimir A. Barinov
  2005-12-06 18:04 ` Ralf Baechle
  0 siblings, 1 reply; 4+ messages in thread
From: Vladimir A. Barinov @ 2005-12-06 18:02 UTC (permalink / raw)
  To: ralf; +Cc: linux-mips, ppopov

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

Hello Ralf,

This patch makes passing command line from bootloader for Philips 
PNX8550 platform.
Does it makes sense to commit this patch?

Vladimir

[-- Attachment #2: cmdline.patch --]
[-- Type: text/plain, Size: 1287 bytes --]

--- linux-2.6.15/arch/mips/philips/pnx8550/jbs/init.c	2005-12-02 16:37:59.000000000 +0300
+++ linux-2.6.15/arch/mips/philips/pnx8550/jbs/init.c	2005-12-06 13:12:22.000000000 +0300
@@ -47,6 +47,11 @@ void __init prom_init(void)
 {
 
 	unsigned long memsize;
+	prom_argc = (int) fw_arg0;
+	prom_argv = (char **) fw_arg1;
+	prom_envp = (char **) fw_arg2;
+
+	prom_init_cmdline();
 
 	mips_machgroup = MACH_GROUP_PHILIPS;
 	mips_machtype = MACH_PHILIPS_JBS;
--- linux-2.6.15/arch/mips/philips/pnx8550/common/prom.c	2005-12-02 16:37:59.000000000 +0300
+++ linux-2.6.15/arch/mips/philips/pnx8550/common/prom.c	2005-12-06 13:48:10.000000000 +0300
@@ -35,23 +35,15 @@ char * prom_getcmdline(void)
 	return &(arcs_cmdline[0]);
 }
 
-void  prom_init_cmdline(void)
+void __init prom_init_cmdline(void)
 {
-	char *cp;
-	int actr;
-
-	actr = 1; /* Always ignore argv[0] */
+	int i;
 
-	cp = &(arcs_cmdline[0]);
-	while(actr < prom_argc) {
-	        strcpy(cp, prom_argv[actr]);
-		cp += strlen(prom_argv[actr]);
-		*cp++ = ' ';
-		actr++;
+	arcs_cmdline[0] = '\0';
+	for (i = 0; i < prom_argc; i++) {
+		strcat(arcs_cmdline, prom_argv[i]);
+		strcat(arcs_cmdline, " ");
 	}
-	if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */
-		--cp;
-	*cp = '\0';
 }
 
 char *prom_getenv(char *envname)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Philips PNX8550 command line patch
  2005-12-06 18:02 [PATCH] Philips PNX8550 command line patch Vladimir A. Barinov
@ 2005-12-06 18:04 ` Ralf Baechle
  2005-12-06 19:21   ` Peter Popov
  0 siblings, 1 reply; 4+ messages in thread
From: Ralf Baechle @ 2005-12-06 18:04 UTC (permalink / raw)
  To: Vladimir A. Barinov; +Cc: linux-mips, ppopov

On Tue, Dec 06, 2005 at 09:02:14PM +0300, Vladimir A. Barinov wrote:

> This patch makes passing command line from bootloader for Philips 
> PNX8550 platform.
> Does it makes sense to commit this patch?

Looks ok at a quick glance.  I'll wait a bit so Pete has a chance to
comment.

  Ralf

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Philips PNX8550 command line patch
  2005-12-06 18:04 ` Ralf Baechle
@ 2005-12-06 19:21   ` Peter Popov
  2005-12-08 17:02     ` Vladimir A. Barinov
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Popov @ 2005-12-06 19:21 UTC (permalink / raw)
  To: Ralf Baechle, Vladimir A. Barinov; +Cc: 'linux-mips@linux-mips.org'



--- Ralf Baechle <ralf@linux-mips.org> wrote:

> On Tue, Dec 06, 2005 at 09:02:14PM +0300, Vladimir
> A. Barinov wrote:
> 
> > This patch makes passing command line from
> bootloader for Philips 
> > PNX8550 platform.
> > Does it makes sense to commit this patch?
> 
> Looks ok at a quick glance.  I'll wait a bit so Pete
> has a chance to comment.

Looks fine to me.

Pete

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Philips PNX8550 command line patch
  2005-12-06 19:21   ` Peter Popov
@ 2005-12-08 17:02     ` Vladimir A. Barinov
  0 siblings, 0 replies; 4+ messages in thread
From: Vladimir A. Barinov @ 2005-12-08 17:02 UTC (permalink / raw)
  To: Peter Popov; +Cc: Ralf Baechle, 'linux-mips@linux-mips.org'

Hello Pete, Ralf,

Peter Popov wrote:

>--- Ralf Baechle <ralf@linux-mips.org> wrote:
>
>  
>
>>On Tue, Dec 06, 2005 at 09:02:14PM +0300, Vladimir
>>A. Barinov wrote:
>>
>>    
>>
>>>This patch makes passing command line from
>>>      
>>>
>>bootloader for Philips 
>>    
>>
>>>PNX8550 platform.
>>>Does it makes sense to commit this patch?
>>>      
>>>
>>Looks ok at a quick glance.  I'll wait a bit so Pete
>>has a chance to comment.
>>    
>>
>
>Looks fine to me.
>  
>
Sorry for my misunderstood but I suppose that this patch should be 
ignored since it
used JBS board dependent code and I have STB810 that based on the code 
of JBS.
But JBS board could have firmware that differs from that STB810 uses. So 
the command line
could be parsed incorrectly for JBS, it's needed to check by somebody 
who has JBS board.

I prepared STB810 board dependent patch that include this fix for 
command-line parsing for STB810 board only.
So Ralf please ignore this patch though it was approved by you and Pete.

Vladimir

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-12-08 17:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-06 18:02 [PATCH] Philips PNX8550 command line patch Vladimir A. Barinov
2005-12-06 18:04 ` Ralf Baechle
2005-12-06 19:21   ` Peter Popov
2005-12-08 17:02     ` Vladimir A. Barinov

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.