public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Vishal <vishal@laser5.co.jp>
Cc: linux-mtd@lists.infradead.org
Subject: Re: help: bootloader for loading kernel from mtdblock device on flash........
Date: Tue, 04 Feb 2003 08:35:14 +0100	[thread overview]
Message-ID: <200302040835.14667.tglx@linutronix.de> (raw)
In-Reply-To: <3E3F31CC.7070701@laser5.co.jp>

On Tuesday 04 February 2003 04:21, Vishal wrote:
> Its for an ARM7 core.
> I have the block driver for the JFFS on NAND Flash ready. I have the
> basic bootloader code. I was wondering whether i can do the proceed in
> the following way :
> 1. take the read/verify  code from the JFFS block driver for NAND flash,
> and put it in my bootloader code
> 2. The driver code that i copy will have a lot of kernel API calls...so
> i need to incorporate those also into my driver.
> 3. finally use this functionality achieved to read a kernel.bin file
> from the /dev/mtdblock device and load it.
>  or is there  any other workaroud?
Yep. copy your compressed kernel image in chunks of blocksize to your 
NAND-FLASH. Reserve enough spare in the case you have bad blocks. 
Provide a bad block aware read function and modify the decompressor in the 
kernel to read the image via this function from NAND. 
Then you don't need JFFS2 inside the bootloader. 
Then your NAND-CHIP has to have min. 2 Partitions 
1 for the kernel Image and 1 for the root-fs. You do not mount the partition, 
where your kernel image is stored.

Another way is to use YAFFS for your root-fs. YAFFS is NAND-aware too and 
provides bootloader code for booting the kernel from a YAFFS partition. Same 
procedure: 2 partitions (boot = YAFFS, root = JFFS2). You can mount your boot 
partition and update the kernel via normal fs access.

-- 
Thomas
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de

  reply	other threads:[~2003-02-04  7:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-03 11:24 help: bootloader for loading kernel from mtdblock device on flash Vishal
2003-02-03 12:47 ` Holger Schurig
2003-02-03 17:52 ` Charles Manning
2003-02-03 19:04 ` Thomas Gleixner
2003-02-04  3:21   ` Vishal
2003-02-04  7:35     ` Thomas Gleixner [this message]
2003-02-04  9:30       ` Vishal
2003-02-04 10:38         ` Thomas Gleixner
2003-02-04 11:01           ` Vishal
2003-02-04 11:51             ` Thomas Gleixner

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=200302040835.14667.tglx@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=vishal@laser5.co.jp \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox