Difference between revisions of "Boot U-Boot from UBI volume"

From eLinux.org
Jump to: navigation, search
(Created page with "Boot U-Boot from UBI volume ; Summary: Boot U-Boot from UBI volume ; Proposer: Wolfgang Denk <wd@denx.de> == Description == For reliable booting from NAND flash, it would be ...")
 
m
Line 1: Line 1:
Boot U-Boot from UBI volume
 
 
 
; Summary: Boot U-Boot from UBI volume
 
; Summary: Boot U-Boot from UBI volume
 
 
; Proposer: Wolfgang Denk <wd@denx.de>
 
; Proposer: Wolfgang Denk <wd@denx.de>
  
Line 20: Line 17:
  
 
- 1st Stage: U-Boot SPL (small: fits in 4...30 KiB restrictions)
 
- 1st Stage: U-Boot SPL (small: fits in 4...30 KiB restrictions)
- 2nd Stage: limited U-Boot (TPL) with UBI support (medium sized:
+
- 2nd Stage: limited U-Boot (TPL) with UBI support (medium sized: fits together with the SPL in the first NAND block, which is guaranteed to be defect-free. On tyical 2 KiB page NAND devices we have a block size of 128 kB, which allows for ~ 100 KiB for the TPL)
  fits together with the SPL in the first NAND block, which is
+
- 3rd Stage: Full-blown U-Boot loaded from UBI volume (or other payload)
  guaranteed to be defect-free. On tyical 2 KiB page NAND devices we
+
  have a block size of 128 kB, which allows for ~ 100 KiB for the TPL)
+
- 3rd Stage: Full-blown U-Boot loaded from UBI volume (or other
+
  payload)
+
  
By placing both the SPL and the TPL (Tertiary Program Loader) in the
+
By placing both the SPL and the TPL (Tertiary Program Loader) in the first NAND block, we can reliably load the "real" paylod from an UBI volume.
first NAND block, we can reliably load the "real" paylod from an
+
UBI volume.
+
  
As in recent versions of U-Boot it will be possible to dynamically
+
As in recent versions of U-Boot it will be possible to dynamically switch between loading U-Boot or other image(s) (for example, a Linux kernel and a device tree blob) as third stage, thus providing fast and reliable boot into application mode, while still providing the flexibility and powerful features of standard U-Boot for service and maintenance.
switch between loading U-Boot or other image(s) (for example, a Linux
+
kernel and a device tree blob) as third stage, thus providing fast
+
and reliable boot into application mode, while still providing the
+
flexibility and powerful features of standard U-Boot for service and
+
maintenance.
+
  
As part of this project, the UBI/UBIFS code base in U-Boot should be
+
As part of this project, the UBI/UBIFS code base in U-Boot should be updated: the UBI code in U-Boot is based on the Linux v2.6.26 (July 2008), and the UBIFS code is based on the Linux v2.6.28 (December 2008). Many fixes and feature-enhancements have been added since that are important for improved reliability.
updated: the UBI code in U-Boot is based on the Linux v2.6.26 (July
+
2008), and the UBIFS code is based on the Linux v2.6.28 (December
+
2008). Many fixes and feature-enhancements have been added since
+
that are important for improved reliability.
+
  
 
== Related work ==
 
== Related work ==
Line 49: Line 31:
 
== Scope ==
 
== Scope ==
  
1) Port latest Linux UBI & UBIFS code to U-Boot, test on NAND and NOR
+
1) Port latest Linux UBI & UBIFS code to U-Boot, test on NAND and NOR platforms, at least ARM and PowerPC ----> 7...9 man-days
  platforms, at least ARM and PowerPC
+
2) Implement and test 3-stage boot strategy with U-Boot in UBI volume support on ARM based target ----> 3...5 man-days
 
+
Total: ~12 man-days.
  7...9 man-days
+
 
+
2) Implement and test 3-stage boot strategy with U-Boot in UBI volume
+
  support on ARM based target
+
 
+
  3...5 man-days
+
 
+
  Total: ~12 man-days.
+
  
 
== Contractor Candidates ==
 
== Contractor Candidates ==
Line 65: Line 39:
  
 
== Comments ==
 
== Comments ==
In theory part 1 could be omitted, but when asking to boot from a UBI
+
In theory part 1 could be omitted, but when asking to boot from a UBI volume, you are concerned about reliability - in which case you will also want to have the fixes and enhancements of the UBI/UBIFS code of the last 3 years.
volume, you are concerned about reliability - in which case you will
+
also want to have the fixes and enhancements of the UBI/UBIFS code of
+
the last 3 years.
+
  
 
[[Category:Project proposals 2012]]
 
[[Category:Project proposals 2012]]

Revision as of 02:47, 12 April 2012

Summary
Boot U-Boot from UBI volume
Proposer
Wolfgang Denk <wd@denx.de>

Description

For reliable booting from NAND flash, it would be desirable if already the boot loader was protected by wear-leveling mechanisms such as available by latest UBI technology.

However, for most SoCs, the ROM boot loader (IPL - Initial Program Loader) and/or available on-chip memory limit loading from NAND to some 4...30 kB, which is enough for a small boot loader (SPL - Secondary Program Loader), but not enough for a standard UBI implementation.

To work around this, we suggest to use a 3 stage boot loader setup:

- 1st Stage: U-Boot SPL (small: fits in 4...30 KiB restrictions) - 2nd Stage: limited U-Boot (TPL) with UBI support (medium sized: fits together with the SPL in the first NAND block, which is guaranteed to be defect-free. On tyical 2 KiB page NAND devices we have a block size of 128 kB, which allows for ~ 100 KiB for the TPL) - 3rd Stage: Full-blown U-Boot loaded from UBI volume (or other payload)

By placing both the SPL and the TPL (Tertiary Program Loader) in the first NAND block, we can reliably load the "real" paylod from an UBI volume.

As in recent versions of U-Boot it will be possible to dynamically switch between loading U-Boot or other image(s) (for example, a Linux kernel and a device tree blob) as third stage, thus providing fast and reliable boot into application mode, while still providing the flexibility and powerful features of standard U-Boot for service and maintenance.

As part of this project, the UBI/UBIFS code base in U-Boot should be updated: the UBI code in U-Boot is based on the Linux v2.6.26 (July 2008), and the UBIFS code is based on the Linux v2.6.28 (December 2008). Many fixes and feature-enhancements have been added since that are important for improved reliability.

Related work

Scope

1) Port latest Linux UBI & UBIFS code to U-Boot, test on NAND and NOR platforms, at least ARM and PowerPC ----> 7...9 man-days 2) Implement and test 3-stage boot strategy with U-Boot in UBI volume support on ARM based target ----> 3...5 man-days Total: ~12 man-days.

Contractor Candidates

Stefan Roese (acting UBI custodian for U-Boot)

Comments

In theory part 1 could be omitted, but when asking to boot from a UBI volume, you are concerned about reliability - in which case you will also want to have the fixes and enhancements of the UBI/UBIFS code of the last 3 years.