All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pantelis Antoniou <panto@intracom.gr>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] ARTOS boot support for u-boot
Date: Mon, 21 Apr 2003 10:34:36 +0300	[thread overview]
Message-ID: <3EA39F0C.2050509@intracom.gr> (raw)
In-Reply-To: <20030420135559.AC525C58B9@atlas.denx.de>

Wolfgang Denk wrote:

>Dear Pantelis,
>
>in message <3E9E9B5C.30904@intracom.gr> you wrote:
>  
>
>>The following patch against u-boot-0.3.0 adds support for booting ARTOS 
>>images
>>using u-boot. ARTOS is a custom in-house operating system in use by my 
>>company.
>>    
>>
>
>I will not add  the  patch  for  now,  as  it  contains  some  severe
>problems:
>  
>
Correct.

>  
>
>>+	/*
>>+	 * Booting an ARTOS kernel image + application
>>+	 */
>>+
>>+	/* place data at the top of memory */
>>+	top = gd->bd->bi_memstart + gd->bd->bi_memsize;
>>+
>>+	/* first check the artos specific boot args, then the linux args*/
>>+	if ((s = getenv("abootargs")) == NULL && (s = getenv("bootargs")) == NULL)
>>+		s = "";
>>+
>>+	/* get length of cmdline, and place it */
>>+	len = strlen(s);
>>+	top = (top - (len + 1)) & ~0xF;
>>+	cmdline = (char *)top;
>>+	debug ("## cmdline at 0x%08lX ", top);
>>+	strcpy(cmdline, s);
>>    
>>
>^^^^^^^^^^^^^^^^^^^^^^^^^^^
>  
>
>>+	/* copy bdinfo */
>>+	top = (top - sizeof(bd_t)) & ~0xF;
>>+	debug ("## bd at 0x%08lX ", top);
>>+	kbd = (bd_t *)top;
>>+	memcpy(kbd, gd->bd, sizeof(bd_t));
>>    
>>
>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>You cannot do that. U-Boot copies itself to the top of memory, so you
>are overwriting U-Boot's data here. It was pure luck  if  this  wrked
>for you. but the behaviour is completely undefined.
>
>Please implement this in a way that is compatible to U-Boot's memory
>map.
>
>Also, since this is a proprietary OS with a very limited  propagation
>I  would  like to ask to make the ARTOS boot code configurable, i. e.
>add a #define so it can enabled it in the board config file, but will
>not add to the code size for those systems that don't want it.
>
>Best regards,
>
>Wolfgang Denk
>
>  
>
Points addressed with this patch.

That it worked the first time was very lucky indeed.

Regards


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: u-boot-0.3.0-artos-v2.patch
Url: http://lists.denx.de/pipermail/u-boot/attachments/20030421/097e7518/attachment.txt 

  reply	other threads:[~2003-04-21  7:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-17 12:17 [U-Boot-Users] [PATCH] ARTOS boot support for u-boot Pantelis Antoniou
2003-04-17 13:42 ` [U-Boot-Users] " Wolfgang Denk
2003-04-17 14:34   ` Pantelis Antoniou
2003-04-17 20:01     ` Wolfgang Denk
2003-04-18  6:59       ` Pantelis Antoniou
2003-04-18  9:58         ` Wolfgang Denk
2003-04-18 10:31           ` Pantelis Antoniou
2003-04-18 11:25             ` Wolfgang Denk
2003-04-20 13:55 ` [U-Boot-Users] " Wolfgang Denk
2003-04-21  7:34   ` Pantelis Antoniou [this message]
2003-05-20 13:16     ` Wolfgang Denk

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=3EA39F0C.2050509@intracom.gr \
    --to=panto@intracom.gr \
    --cc=u-boot@lists.denx.de \
    /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.