Skip to contentSkip to conversation

boot from jffs

DISCUSSION ���� 2 participants 2 messages Jun 19, 2002 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

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

--http://www.eyou.com
--�ȶ��ɿ�����ѵ������� �����ʼ� �ƶ���ǩ �������� ����洢...����δ��

#1 lore raw
Quoted 6 lines · Áº²¨

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.

Quoted 9 lines

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.

Signature · 4 lines
-------------------------------------------------
Justin Wojdacki        
[email protected]         (408) 350-5032
Communications Processors Group -- Analog Devices