Fix misspellings of "persistant" -> "persistent" in various places
Fix misspellings of "persistent", including the renaming of a function to "register_persistant_environment". Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
eab148a80c
commit
ac705a462f
|
@ -355,7 +355,7 @@ make ARCH=arm CROSS_COMPILE=armv5compiler
|
||||||
|
|
||||||
- Create four primary partitions on the MCI card
|
- Create four primary partitions on the MCI card
|
||||||
- the first one for the bootlets (about 256 kiB)
|
- the first one for the bootlets (about 256 kiB)
|
||||||
- the second one for the persistant environment (size is up to you, at least 256k)
|
- the second one for the persistent environment (size is up to you, at least 256k)
|
||||||
- the third one for the kernel (2 MiB ... 4 MiB in size)
|
- the third one for the kernel (2 MiB ... 4 MiB in size)
|
||||||
- the 4th one for the root filesystem which can fill the rest of the available space
|
- the 4th one for the root filesystem which can fill the rest of the available space
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ mem_initcall(mx23_evk_mem_init);
|
||||||
* If this SD card is also the boot media, we can use the second partition
|
* If this SD card is also the boot media, we can use the second partition
|
||||||
* for our environment purpose (if present!).
|
* for our environment purpose (if present!).
|
||||||
*/
|
*/
|
||||||
static int register_persistant_environment(void)
|
static int register_persistent_environment(void)
|
||||||
{
|
{
|
||||||
struct cdev *cdev;
|
struct cdev *cdev;
|
||||||
|
|
||||||
|
@ -116,9 +116,9 @@ static int mx23_evk_devices_init(void)
|
||||||
add_generic_device("mxs_mci", DEVICE_ID_DYNAMIC, NULL, IMX_SSP1_BASE,
|
add_generic_device("mxs_mci", DEVICE_ID_DYNAMIC, NULL, IMX_SSP1_BASE,
|
||||||
0x8000, IORESOURCE_MEM, &mci_pdata);
|
0x8000, IORESOURCE_MEM, &mci_pdata);
|
||||||
|
|
||||||
rc = register_persistant_environment();
|
rc = register_persistent_environment();
|
||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
printf("Cannot create the 'env0' persistant "
|
printf("Cannot create the 'env0' persistent "
|
||||||
"environment storage (%d)\n", rc);
|
"environment storage (%d)\n", rc);
|
||||||
|
|
||||||
#ifdef CONFIG_USB_GADGET_DRIVER_ARC
|
#ifdef CONFIG_USB_GADGET_DRIVER_ARC
|
||||||
|
|
|
@ -180,7 +180,7 @@ the imx233-olinuxino with barebox
|
||||||
|
|
||||||
- Create four primary partitions on the MCI card
|
- Create four primary partitions on the MCI card
|
||||||
- the first one for the bootlets (about 256 kiB)
|
- the first one for the bootlets (about 256 kiB)
|
||||||
- the second one for the persistant environment
|
- the second one for the persistent environment
|
||||||
(size is up to you, at least 256k)
|
(size is up to you, at least 256k)
|
||||||
- the third one for the kernel (2 MiB ... 4 MiB in size)
|
- the third one for the kernel (2 MiB ... 4 MiB in size)
|
||||||
- the 4th one for the root filesystem which can fill the
|
- the 4th one for the root filesystem which can fill the
|
||||||
|
|
|
@ -85,7 +85,7 @@ SECTIONS
|
||||||
boot_disk = .;
|
boot_disk = .;
|
||||||
BYTE(0x00); /* boot disk number (provided by the BIOS)
|
BYTE(0x00); /* boot disk number (provided by the BIOS)
|
||||||
|
|
||||||
/* information about the persistant environment storage */
|
/* information about the persistent environment storage */
|
||||||
. = PATCH_AREA + PATCH_AREA_PERS_START;
|
. = PATCH_AREA + PATCH_AREA_PERS_START;
|
||||||
pers_env_storage = .;
|
pers_env_storage = .;
|
||||||
LONG(0x00000000); /* LBA start lower */
|
LONG(0x00000000); /* LBA start lower */
|
||||||
|
|
|
@ -31,27 +31,27 @@
|
||||||
#define PATCH_AREA_BOOT_DEV 16
|
#define PATCH_AREA_BOOT_DEV 16
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Offset where to store information about the persistant environment storage
|
* Offset where to store information about the persistent environment storage
|
||||||
* It points to an LBA number (8 bytes) and defines the first sector of this
|
* It points to an LBA number (8 bytes) and defines the first sector of this
|
||||||
* storage on disk.
|
* storage on disk.
|
||||||
*/
|
*/
|
||||||
#define PATCH_AREA_PERS_START 20
|
#define PATCH_AREA_PERS_START 20
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Offset where to store information about the persistant environment storage
|
* Offset where to store information about the persistent environment storage
|
||||||
* It points to a short number (2 bytes) and defines the sector count of this
|
* It points to a short number (2 bytes) and defines the sector count of this
|
||||||
* storage on disk.
|
* storage on disk.
|
||||||
*/
|
*/
|
||||||
#define PATCH_AREA_PERS_SIZE 28
|
#define PATCH_AREA_PERS_SIZE 28
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Offset where to store information about the persistant environment storage
|
* Offset where to store information about the persistent environment storage
|
||||||
* drive number (BIOS number, 1 byte)
|
* drive number (BIOS number, 1 byte)
|
||||||
*/
|
*/
|
||||||
#define PATCH_AREA_PERS_DRIVE 30
|
#define PATCH_AREA_PERS_DRIVE 30
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mark the persistant environment as not used
|
* Mark the persistent environment as not used
|
||||||
*/
|
*/
|
||||||
#define PATCH_AREA_PERS_SIZE_UNUSED 0x000
|
#define PATCH_AREA_PERS_SIZE_UNUSED 0x000
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ code. Thats why not the PIC is touched nor the IDT.
|
||||||
@todo Add some notes about drive numbers used by the BIOS. They may change
|
@todo Add some notes about drive numbers used by the BIOS. They may change
|
||||||
if one change orders in the BIOS setup. Drive orders and numbers may be
|
if one change orders in the BIOS setup. Drive orders and numbers may be
|
||||||
different at BIOS runtime and Linux runtime! But these numbers are required
|
different at BIOS runtime and Linux runtime! But these numbers are required
|
||||||
at BIOS runtime for booting and the persistant environment storage.
|
at BIOS runtime for booting and the persistent environment storage.
|
||||||
|
|
||||||
@attention Currently there is a 4 GiB limit for the disk sizes!
|
@attention Currently there is a 4 GiB limit for the disk sizes!
|
||||||
|
|
||||||
|
@ -82,11 +82,11 @@ gets stored when this image will be written to a boot media. This information
|
||||||
is required to load all parts of the image from the boot media at runtime.
|
is required to load all parts of the image from the boot media at runtime.
|
||||||
|
|
||||||
The image gets installed in two ways onto the boot media, depending on the
|
The image gets installed in two ways onto the boot media, depending on the
|
||||||
need for a persistant storage.
|
need for a persistent storage.
|
||||||
|
|
||||||
@subsection mach_x86_drive_layout_wops barebox's boot media layout without persistant storage
|
@subsection mach_x86_drive_layout_wops barebox's boot media layout without persistent storage
|
||||||
|
|
||||||
In this case @a barebox's persistant storage is anywhere:
|
In this case @a barebox's persistent storage is anywhere:
|
||||||
|
|
||||||
@verbatim
|
@verbatim
|
||||||
Sector Content
|
Sector Content
|
||||||
|
@ -100,9 +100,9 @@ In this case @a barebox's persistant storage is anywhere:
|
||||||
0 MBR, Partition table, boot code
|
0 MBR, Partition table, boot code
|
||||||
@endverbatim
|
@endverbatim
|
||||||
|
|
||||||
@subsection mach_x86_drive_layout_wps barebox's boot media layout with persistant storage
|
@subsection mach_x86_drive_layout_wps barebox's boot media layout with persistent storage
|
||||||
|
|
||||||
@a barebox's persistant storage is part of the boot media (more
|
@a barebox's persistent storage is part of the boot media (more
|
||||||
space required in front of the first partition) and interferes with the
|
space required in front of the first partition) and interferes with the
|
||||||
boot loader image itself:
|
boot loader image itself:
|
||||||
|
|
||||||
|
@ -115,13 +115,13 @@ boot loader image itself:
|
||||||
. 32 bit barebox code
|
. 32 bit barebox code
|
||||||
n+2 16 bit bootstrap code, BIOS calling code
|
n+2 16 bit bootstrap code, BIOS calling code
|
||||||
n+1 indirect sector
|
n+1 indirect sector
|
||||||
n end of persistant environment storage
|
n end of persistent environment storage
|
||||||
.
|
.
|
||||||
1 start of persistant environment storage
|
1 start of persistent environment storage
|
||||||
0 MBR, Partition table, boot code
|
0 MBR, Partition table, boot code
|
||||||
@endverbatim
|
@endverbatim
|
||||||
|
|
||||||
The information where the persistant storage is located is also stored into
|
The information where the persistent storage is located is also stored into
|
||||||
the MBR at specific locations by @p setupmbr. The @a barebox runtime will use
|
the MBR at specific locations by @p setupmbr. The @a barebox runtime will use
|
||||||
it to load and store all environment relevant data.
|
it to load and store all environment relevant data.
|
||||||
|
|
||||||
|
|
|
@ -140,7 +140,7 @@ static void invalidate_daps(struct DAPS *sector)
|
||||||
* Create the indirect sector with the DAPS entries
|
* Create the indirect sector with the DAPS entries
|
||||||
* @param daps_table Where to store the entries
|
* @param daps_table Where to store the entries
|
||||||
* @param size Size of the whole image in bytes
|
* @param size Size of the whole image in bytes
|
||||||
* @param pers_sector_count Count of sectors to skip after MBR for the persistant environment storage
|
* @param pers_sector_count Count of sectors to skip after MBR for the persistent environment storage
|
||||||
* @return 0 on success
|
* @return 0 on success
|
||||||
*
|
*
|
||||||
* This routine calculates the DAPS entries for the case the whole
|
* This routine calculates the DAPS entries for the case the whole
|
||||||
|
@ -326,10 +326,10 @@ static int check_for_space(const void *hd_image, off_t size)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup the persistant environment storage information
|
* Setup the persistent environment storage information
|
||||||
* @param patch_area Where to patch
|
* @param patch_area Where to patch
|
||||||
* @param pers_sector_start Start sector of the persistant environment storage
|
* @param pers_sector_start Start sector of the persistent environment storage
|
||||||
* @param pers_sector_count Count of sectors for the persistant environment storage
|
* @param pers_sector_count Count of sectors for the persistent environment storage
|
||||||
* @return 0 on success
|
* @return 0 on success
|
||||||
*/
|
*/
|
||||||
static int store_pers_env_info(void *patch_area, uint64_t pers_sector_start, long pers_sector_count)
|
static int store_pers_env_info(void *patch_area, uint64_t pers_sector_start, long pers_sector_count)
|
||||||
|
@ -355,7 +355,7 @@ static int store_pers_env_info(void *patch_area, uint64_t pers_sector_start, lon
|
||||||
* Prepare the MBR and indirect sector for runtime
|
* Prepare the MBR and indirect sector for runtime
|
||||||
* @param fd_barebox barebox image to use
|
* @param fd_barebox barebox image to use
|
||||||
* @param fd_hd Hard disk image to prepare
|
* @param fd_hd Hard disk image to prepare
|
||||||
* @param pers_sector_count Count of sectors to skip after MBR for the persistant environment storage
|
* @param pers_sector_count Count of sectors to skip after MBR for the persistent environment storage
|
||||||
* @return 0 on success
|
* @return 0 on success
|
||||||
*
|
*
|
||||||
* This routine expects a prepared hard disk image file with a partition table
|
* This routine expects a prepared hard disk image file with a partition table
|
||||||
|
@ -390,7 +390,7 @@ static int barebox_overlay_mbr(int fd_barebox, int fd_hd, long pers_sector_count
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* the persistant environment storage is in front of the main
|
* the persistent environment storage is in front of the main
|
||||||
* barebox image. To handle both, we need more space in front of the
|
* barebox image. To handle both, we need more space in front of the
|
||||||
* the first partition.
|
* the first partition.
|
||||||
*/
|
*/
|
||||||
|
@ -415,7 +415,7 @@ static int barebox_overlay_mbr(int fd_barebox, int fd_hd, long pers_sector_count
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* embed the barebox main image into the disk drive image,
|
* embed the barebox main image into the disk drive image,
|
||||||
* but keep the persistant environment storage untouched
|
* but keep the persistent environment storage untouched
|
||||||
* (if defined), e.g. store the main image behind this special area.
|
* (if defined), e.g. store the main image behind this special area.
|
||||||
*/
|
*/
|
||||||
memcpy(hd_image + ((pers_sector_count + 1) * SECTOR_SIZE),
|
memcpy(hd_image + ((pers_sector_count + 1) * SECTOR_SIZE),
|
||||||
|
@ -471,7 +471,7 @@ static void print_usage(const char *pname)
|
||||||
{
|
{
|
||||||
printf("%s: Preparing a hard disk image for boot with barebox on x86.\n", pname);
|
printf("%s: Preparing a hard disk image for boot with barebox on x86.\n", pname);
|
||||||
printf("Usage is\n %s [options] -m <barebox image> -d <hd image>\n", pname);
|
printf("Usage is\n %s [options] -m <barebox image> -d <hd image>\n", pname);
|
||||||
printf(" [options] are:\n -s <count> sector count of the persistant environment storage\n");
|
printf(" [options] are:\n -s <count> sector count of the persistent environment storage\n");
|
||||||
printf(" <barebox image> barebox's boot image file\n");
|
printf(" <barebox image> barebox's boot image file\n");
|
||||||
printf(" <hd image> HD image to store the barebox image\n");
|
printf(" <hd image> HD image to store the barebox image\n");
|
||||||
printf(" If no '-s <x>' was given, barebox occupies sectors 0 to n, else sector 0 and x+1 to n\n");
|
printf(" If no '-s <x>' was given, barebox occupies sectors 0 to n, else sector 0 and x+1 to n\n");
|
||||||
|
@ -586,7 +586,7 @@ prepared in some special way:
|
||||||
this does not collide with partitions on the boot media, the first
|
this does not collide with partitions on the boot media, the first
|
||||||
partition must start at a sector behind the ones @a barebox occupies.
|
partition must start at a sector behind the ones @a barebox occupies.
|
||||||
@li @a barebox handles its runtime configuration in a special way: It stores it
|
@li @a barebox handles its runtime configuration in a special way: It stores it
|
||||||
in a binary way into some reserved sectors ("persistant storage").
|
in a binary way into some reserved sectors ("persistent storage").
|
||||||
|
|
||||||
@section x86_bootloader_preparations Boot Preparations
|
@section x86_bootloader_preparations Boot Preparations
|
||||||
|
|
||||||
|
@ -603,12 +603,12 @@ simple calulation:
|
||||||
sectors = (\<size of barebox image\> + 511) / 512
|
sectors = (\<size of barebox image\> + 511) / 512
|
||||||
|
|
||||||
To be able to store the runtime configuration, further free sectors are
|
To be able to store the runtime configuration, further free sectors are
|
||||||
required. Its up to you and your requirements, how large this persistant
|
required. Its up to you and your requirements, how large this persistent
|
||||||
storage must be. If you need 16 kiB for this purpose, you need to keep
|
storage must be. If you need 16 kiB for this purpose, you need to keep
|
||||||
additional 32 sectors free.
|
additional 32 sectors free.
|
||||||
|
|
||||||
For this example we are reserving 300 sectors for the @a barebox image and
|
For this example we are reserving 300 sectors for the @a barebox image and
|
||||||
additionaly 32 sectors for the persistant storage. So, the first partition on
|
additionaly 32 sectors for the persistent storage. So, the first partition on
|
||||||
the boot media must start at sector 333 or later.
|
the boot media must start at sector 333 or later.
|
||||||
|
|
||||||
Run the @p fdisk tool to setup such a partition table:
|
Run the @p fdisk tool to setup such a partition table:
|
||||||
|
@ -672,7 +672,7 @@ In the next step, @a barebox gets installed to this boot media:
|
||||||
This command writes the @a barebox image file './barebox.bin' onto the device
|
This command writes the @a barebox image file './barebox.bin' onto the device
|
||||||
@p /dev/sda.
|
@p /dev/sda.
|
||||||
|
|
||||||
The @p -s option will keep the persistant storage sectors free and untouched
|
The @p -s option will keep the persistent storage sectors free and untouched
|
||||||
and set flags in the MBR to forward its existance, size and location to
|
and set flags in the MBR to forward its existance, size and location to
|
||||||
@a barebox at runtime. @p setupmbr also does not change the partition table.
|
@a barebox at runtime. @p setupmbr also does not change the partition table.
|
||||||
|
|
||||||
|
@ -681,11 +681,11 @@ The @a barebox image gets stored on the boot media like this:
|
||||||
@verbatim
|
@verbatim
|
||||||
sector 0 1 33 333
|
sector 0 1 33 333
|
||||||
|---|-------------|--------------- ~~~ ------------|--------------
|
|---|-------------|--------------- ~~~ ------------|--------------
|
||||||
MBR persistant barebox first
|
MBR persistent barebox first
|
||||||
storage main image partition
|
storage main image partition
|
||||||
@endverbatim
|
@endverbatim
|
||||||
|
|
||||||
If the @p -s option is omitted, the "persistant storage" part simply does
|
If the @p -s option is omitted, the "persistent storage" part simply does
|
||||||
not exist:
|
not exist:
|
||||||
|
|
||||||
@verbatim
|
@verbatim
|
||||||
|
|
Loading…
Reference in New Issue