Jump to ID:
BSPs and Drivers

Project Home

Documents

Discussions

Wiki

Project Info
Forum Topic - Scanning for start of file system partition: (6 Items)
   
 
 
Scanning for start of file system partition  
The IPL currently scans the raw flash partition and detects IFSes based on a starting block number and an ending block 
number.  We would like to know if there is documentation on the format of the first block of the file system partition 
so that we could scan for that as part of the IPL scan and not have to hard code a raw partition size.
The IPL could then pass the file system partition block number (or size of the raw partition) to the IFS it selects to 
run as part of the boot info structure.  That way, neither the IPL nor the IFSes need to hardcode the raw partition size
 (and don't have to be kept in sync).

Thanks,
RE: Scanning for start of file system partition  
Gordon,

I'm not sure I understand what you're asking.  The HDD filesystems have
a standard MBR which describes each partition, and the NOR and NAND
filesystems (devf and ETFS respectively) have to scan a given range in
order to detect the presence of the filesystem on the flash (since, for
wear levelling and power safety, structures are allowed to migrate
within the partition). 

In the case of traditional raw flash (NOR or NAND), there is no format
for the raw partition, hence why it is called "raw".  This is simply a
physical range of flash that the filesystem drivers do not try to
interpret, and only provides basic "passthrough" access for.  In the
ETFS case, the size of the raw partition is given on the command-line,
so that the driver can skip that range when loading the filesystem.  For
the devf drivers, the driver scans the entire device to detect any
formatted filesystems.  Raw partitions are simply ranges of blocks which
do not belong to formatted filesystems.

If I misunderstand, please clarify.  What is the specific problem you
are trying to solve?

Regards,

David

> -----Original Message-----
> From: Gordon Molek [mailto:community-noreply@qnx.com] 
> Sent: March 30, 2010 10:04 AM
> To: general-bsp
> Subject: Scanning for start of file system partition
> 
> The IPL currently scans the raw flash partition and detects 
> IFSes based on a starting block number and an ending block 
> number.  We would like to know if there is documentation on 
> the format of the first block of the file system partition so 
> that we could scan for that as part of the IPL scan and not 
> have to hard code a raw partition size.
> The IPL could then pass the file system partition block 
> number (or size of the raw partition) to the IFS it selects 
> to run as part of the boot info structure.  That way, neither 
> the IPL nor the IFSes need to hardcode the raw partition size 
> (and don't have to be kept in sync).
> 
> Thanks,
> 
> 
> 
> _______________________________________________
> 
> QNX BSPs
> http://community.qnx.com/sf/go/post50803
> 
> 
RE: Scanning for start of file system partition  
There is no format for the raw partition. But if they get the format for
Filesystem, then they could scan it from block 0 to determine if it is
end of raw partition.

-----Original Message-----
From: David Sarrazin [mailto:community-noreply@qnx.com] 
Sent: March 30, 2010 10:27 AM
To: general-bsp
Subject: RE: Scanning for start of file system partition

Gordon,

I'm not sure I understand what you're asking.  The HDD filesystems have
a standard MBR which describes each partition, and the NOR and NAND
filesystems (devf and ETFS respectively) have to scan a given range in
order to detect the presence of the filesystem on the flash (since, for
wear levelling and power safety, structures are allowed to migrate
within the partition). 

In the case of traditional raw flash (NOR or NAND), there is no format
for the raw partition, hence why it is called "raw".  This is simply a
physical range of flash that the filesystem drivers do not try to
interpret, and only provides basic "passthrough" access for.  In the
ETFS case, the size of the raw partition is given on the command-line,
so that the driver can skip that range when loading the filesystem.  For
the devf drivers, the driver scans the entire device to detect any
formatted filesystems.  Raw partitions are simply ranges of blocks which
do not belong to formatted filesystems.

If I misunderstand, please clarify.  What is the specific problem you
are trying to solve?

Regards,

David

> -----Original Message-----
> From: Gordon Molek [mailto:community-noreply@qnx.com]
> Sent: March 30, 2010 10:04 AM
> To: general-bsp
> Subject: Scanning for start of file system partition
> 
> The IPL currently scans the raw flash partition and detects IFSes 
> based on a starting block number and an ending block number.  We would

> like to know if there is documentation on the format of the first 
> block of the file system partition so that we could scan for that as 
> part of the IPL scan and not have to hard code a raw partition size.
> The IPL could then pass the file system partition block number (or 
> size of the raw partition) to the IFS it selects to run as part of the

> boot info structure.  That way, neither the IPL nor the IFSes need to 
> hardcode the raw partition size (and don't have to be kept in sync).
> 
> Thanks,
> 
> 
> 
> _______________________________________________
> 
> QNX BSPs
> http://community.qnx.com/sf/go/post50803
> 
> 



_______________________________________________

QNX BSPs
http://community.qnx.com/sf/go/post50806
Re: RE: Scanning for start of file system partition  
Yes, that's what we're trying to determine whether it is possible, and what documentation exists for the pattern to scan
 for.
Re: RE: Scanning for start of file system partition  
Alert, QNX BSP noobie speaking, :-)

My understanding of the bootup process is as follows.  The IPL scans from flash block 2 (blocks 0 and 1 hold copies of 
the IPL) through block X looking for  IFSes to boot.  Once the IFS is running, it executes the flash filesystem driver:

"fs-etfs-3dsmx35_2048 -r8192 -m /"

(for instance on our imx25 dev board).  Rather than having the IPL hardcode the value X for the last block to scan for 
IFSes, and having the "-r8192" hardcoded in the fs-etfs-3dsmx35_2048 command in the IFS, we would like to be able to 
have the IPL auto-detect the first block of the non-raw partition of the flash (since it's already scanning flash for 
the IFS headers).

Thanks,
RE: RE: Scanning for start of file system partition  
The IFSes auto detection may work in IPL if you know how to scan the
ETFS FS. 

But you have to give the specifc -r option with the reserved size when
you start the etfs driver. Because the ETFS driver has no idea about
where you IFSes.  

-----Original Message-----
From: Gordon Molek [mailto:community-noreply@qnx.com] 
Sent: March 30, 2010 10:44 AM
To: general-bsp
Subject: Re: RE: Scanning for start of file system partition

Alert, QNX BSP noobie speaking, :-)

My understanding of the bootup process is as follows.  The IPL scans
from flash block 2 (blocks 0 and 1 hold copies of the IPL) through block
X looking for  IFSes to boot.  Once the IFS is running, it executes the
flash filesystem driver:

"fs-etfs-3dsmx35_2048 -r8192 -m /"

(for instance on our imx25 dev board).  Rather than having the IPL
hardcode the value X for the last block to scan for IFSes, and having
the "-r8192" hardcoded in the fs-etfs-3dsmx35_2048 command in the IFS,
we would like to be able to have the IPL auto-detect the first block of
the non-raw partition of the flash (since it's already scanning flash
for the IFS headers).

Thanks,



_______________________________________________

QNX BSPs
http://community.qnx.com/sf/go/post50811