public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Justin Wojdacki <justin.wojdacki@analog.com>
To: Áº²¨ <nielsen@eyou.com>
Cc: david@forcedpotato.com, linux-mtd@lists.infradead.org
Subject: Re: boot from jffs
Date: Wed, 19 Jun 2002 10:02:16 -0700	[thread overview]
Message-ID: <3D10B918.AF04267F@analog.com> (raw)
In-Reply-To: 20020619102527.64195.qmail@eyou.com

"Áº²¨" wrote:
> 
> Hi,everybody
> I would like to use mkfs.jffs to create a flash image I can burn into flash.
> 
> but the question is I don't know how to boot from this image.
> 
> the kernel of our system is 2.4.18 and the platform is ppc 8xx_io
> series(ppc823)
> 
> How to setup jffs/mtd as the root filesystem/dev for our system?
> 
> Thanks,
> 
>    -- nielsen
> 

Is your kernel in the filesystem? If it is, then your bootloader needs
to be able to load the kernel into memory from the filesystem. It's
not that hard to do. Easiest thing to do is the following:

1. Hardcode path to kernel. Let's use "/boot/vmlinuz" in this example.
2. Find the jffs2_raw_dirent for the "/boot" directory and record it's
inode number
3. Find the jffs2_raw_dirent for "vmlinuz" that has parent inode ==
"/boot"'s inode and record it's inode number
4. Process all the jffs2_raw_inode's that have the same above's inode
number
5. Jump to kernel entry point

Also, how are you partitioning your flash? You'll probably want to
setup an MTD map for the flash (drivers/mtd/maps), and as part of the
init function, you use MKDEV() to specify the root paritition. 

-- 
-------------------------------------------------
Justin Wojdacki        
justin.wojdacki@analog.com         (408) 350-5032
Communications Processors Group -- Analog Devices

      reply	other threads:[~2002-06-19 17:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-19  2:25 boot from jffs Áº²¨
2002-06-19 17:02 ` Justin Wojdacki [this message]

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=3D10B918.AF04267F@analog.com \
    --to=justin.wojdacki@analog.com \
    --cc=david@forcedpotato.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=nielsen@eyou.com \
    /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