From 392ae40c2c10e0bf657723bc3fdd8a9a7fa54b77 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Fri, 7 Dec 2018 00:13:22 -0800 Subject: Documentation: i.MX: Document how to use GPT Document a way to avoid clashes between i.MX boot info/Barebox and GPT's Partition Entry Array. Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- Documentation/boards/imx.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'Documentation') diff --git a/Documentation/boards/imx.rst b/Documentation/boards/imx.rst index 99ca10b7cc..35a180b0dd 100644 --- a/Documentation/boards/imx.rst +++ b/Documentation/boards/imx.rst @@ -60,6 +60,25 @@ The images can also always be started second stage:: bootm /mnt/tftp/barebox-freescale-imx51-babbage.img +Using GPT on i.MX +^^^^^^^^^^^^^^^^^ + +For i.MX SoCs that place vendor specific header at +1KiB mark of a +boot medium, special care needs to be taken when parition that medium +with GPT. In order to make room for i.MX boot header GPT Partition +Entry Array needs to be moved from its typical location, LBA 2, to an +offset past vendor specific information. One way to do this would be +to use ``-j`` or ``--adjust-main-table`` option of ``sgdisk``. For +example, the following sequence: + + sgdisk -Z + sgdisk -o -j 2048 -n 1:8192:+100M + +will create a single GPT partition starting at LBA 8192 and would +place Partition Entry Array starting at LBA 2048 which should leave +enough room for Barebox/i.MX boot header. Once that is done ``dd`` +command above can be used to place Barebox on the same medium. + Information about the ``imx-image`` tool ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- cgit v1.2.3 From f606a778cb469f6bdf1680cacd3f53a0dbb22594 Mon Sep 17 00:00:00 2001 From: Roland Hieber Date: Mon, 10 Dec 2018 16:55:09 +0100 Subject: Documentation: i.MX: improve wording, add markup and missing articles Signed-off-by: Roland Hieber Signed-off-by: Sascha Hauer --- Documentation/boards/imx.rst | 102 ++++++++++++++++++++++++------------------- 1 file changed, 57 insertions(+), 45 deletions(-) (limited to 'Documentation') diff --git a/Documentation/boards/imx.rst b/Documentation/boards/imx.rst index 35a180b0dd..2e6a30fd2f 100644 --- a/Documentation/boards/imx.rst +++ b/Documentation/boards/imx.rst @@ -43,40 +43,50 @@ SD card: The above will overwrite the MBR (and consequently the partition table) on the destination SD card. To preserve the MBR while writing the rest -of the image to the card, use:: +of the image to the card, use: + +.. code-block:: sh dd if=images/barebox-freescale-imx51-babbage.img of=/dev/sdd bs=1024 skip=1 seek=1 -NOTE: MaskROM on i.MX8 expects image to start at +33KiB mark, so the +Note that MaskROM on i.MX8 expects the image to start at the +33KiB mark, so the following command has to be used instead: +.. code-block:: sh + dd if=images/barebox-nxp-imx8mq-evk.img of=/dev/sdd bs=1024 skip=33 seek=33 Or, in case of NAND: +.. code-block:: sh + dd if=images/barebox-nxp-imx8mq-evk.img of=/dev/nand bs=1024 skip=33 seek=1 -The images can also always be started second stage:: +The images can also always be started as second stage on the target: + +.. code-block:: console - bootm /mnt/tftp/barebox-freescale-imx51-babbage.img + barebox@Board Name:/ bootm /mnt/tftp/barebox-freescale-imx51-babbage.img Using GPT on i.MX ^^^^^^^^^^^^^^^^^ -For i.MX SoCs that place vendor specific header at +1KiB mark of a -boot medium, special care needs to be taken when parition that medium -with GPT. In order to make room for i.MX boot header GPT Partition +For i.MX SoCs that place a vendor specific header at the +1KiB mark of a +boot medium, special care needs to be taken when partitioning that medium +with GPT. In order to make room for the i.MX boot header, the GPT Partition Entry Array needs to be moved from its typical location, LBA 2, to an offset past vendor specific information. One way to do this would be -to use ``-j`` or ``--adjust-main-table`` option of ``sgdisk``. For -example, the following sequence: +to use the ``-j`` or ``--adjust-main-table`` option of ``sgdisk``. For +example, the following sequence + +.. code-block:: sh sgdisk -Z sgdisk -o -j 2048 -n 1:8192:+100M will create a single GPT partition starting at LBA 8192 and would -place Partition Entry Array starting at LBA 2048 which should leave -enough room for Barebox/i.MX boot header. Once that is done ``dd`` +place the Partition Entry Array starting at LBA 2048, which should leave +enough room for the Barebox/i.MX boot header. Once that is done, the ``dd`` command above can be used to place Barebox on the same medium. Information about the ``imx-image`` tool @@ -89,46 +99,48 @@ options in this file are: Header: -+----------------+--------------------------------------------------------------+ -| soc |soctype can be one of imx35, imx51, imx53, imx6, imx7, vf610, | -| | imx8mq | -+----------------+--------------------------------------------------------------+ -| loadaddr | The address the binary is uploaded to | -+----------------+--------------------------------------------------------------+ -| dcdofs | The offset of the image header in the image. This should be: | -| | * ``0x400``: MMC/SD, NAND, serial ROM, PATA, SATA | -| | * ``0x1000``: NOR Flash | -| | * ``0x100``: OneNAND | -+----------------+--------------------------------------------------------------+ ++--------------------+--------------------------------------------------------------+ +| ``soc `` | soctype can be one of imx35, imx51, imx53, imx6, imx7, vf610,| +| | imx8mq | ++--------------------+--------------------------------------------------------------+ +| ``loadaddr `` | The address the binary is uploaded to | ++--------------------+--------------------------------------------------------------+ +| ``dcdofs `` | The offset of the image header in the image. This should be: | +| | | +| | * ``0x400``: MMC/SD, NAND, serial ROM, PATA, SATA | +| | * ``0x1000``: NOR Flash | +| | * ``0x100``: OneNAND | ++--------------------+--------------------------------------------------------------+ Memory manipulation: -+------------------------------------+-----------------------------------------+ -| wm 8 | write into byte | -+------------------------------------+-----------------------------------------+ -| wm 16 | write into short | -+------------------------------------+-----------------------------------------+ -| wm 32 | write into word | -+------------------------------------+-----------------------------------------+ -| set_bits | set set bits in in | -+------------------------------------+-----------------------------------------+ -| clear_bits | clear set bits in in | -+------------------------------------+-----------------------------------------+ -| nop | do nothing (just waste time) | -+------------------------------------+-----------------------------------------+ - - can be of 8, 16 or 32. ++----------------------------------------+-------------------------------------------------+ +| ``wm 8 `` | write ```` into byte ```` | ++----------------------------------------+-------------------------------------------------+ +| ``wm 16 `` | write ```` into short ```` | ++----------------------------------------+-------------------------------------------------+ +| ``wm 32 `` | write ```` into word ```` | ++----------------------------------------+-------------------------------------------------+ +| ``set_bits `` | set set bits in ```` in ```` | ++----------------------------------------+-------------------------------------------------+ +| ``clear_bits `` | clear set bits in ```` in ```` | ++----------------------------------------+-------------------------------------------------+ +| ``nop`` | do nothing (just waste time) | ++----------------------------------------+-------------------------------------------------+ + +```` can be one of 8, 16 or 32. Checking conditions: -+------------------------------------+-----------------------------------------+ -| check | Poll until condition becomes true. | -| | with being one of: | -| | * ``until_all_bits_clear`` | -| | * ``until_all_bits_set`` | -| | * ``until_any_bit_clear`` | -| | * ``until_any_bit_set`` | -+------------------------------------+-----------------------------------------+ ++----------------------------------------+-----------------------------------------+ +| ``check `` | Poll until condition becomes true. | +| | with ```` being one of: | +| | | +| | * ``until_all_bits_clear`` | +| | * ``until_all_bits_set`` | +| | * ``until_any_bit_clear`` | +| | * ``until_any_bit_set`` | ++----------------------------------------+-----------------------------------------+ Some notes about the mentioned *conditions*. -- cgit v1.2.3 From 9b20b537c892ebb0e5e25d396d2bfc49b1234919 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Sun, 6 Jan 2019 19:18:06 +0100 Subject: doc: add at91 documentation Add at91 specific documentation. Add files for the Atmel evaluations kits. This is mostly placeholders with some trivial information, but we now have files to add more information. Signed-off-by: Sam Ravnborg Signed-off-by: Sascha Hauer --- Documentation/boards/at91.rst | 51 ++++++++++++++++++++++ .../boards/at91/microchip-at91rm9200-ek.rst | 8 ++++ .../boards/at91/microchip-at91sam9260-ek.rst | 8 ++++ .../boards/at91/microchip-at91sam9261-ek.rst | 18 ++++++++ .../boards/at91/microchip-at91sam9263-ek.rst | 10 +++++ .../boards/at91/microchip-at91sam9g10-ek.rst | 8 ++++ .../boards/at91/microchip-at91sam9g20-ek.rst | 8 ++++ .../boards/at91/microchip-at91sam9m10g45-ek.rst | 8 ++++ .../boards/at91/microchip-at91sam9n12-ek.rst | 8 ++++ .../boards/at91/microchip-at91sam9x5-ek.rst | 10 +++++ 10 files changed, 137 insertions(+) create mode 100644 Documentation/boards/at91.rst create mode 100644 Documentation/boards/at91/microchip-at91rm9200-ek.rst create mode 100644 Documentation/boards/at91/microchip-at91sam9260-ek.rst create mode 100644 Documentation/boards/at91/microchip-at91sam9261-ek.rst create mode 100644 Documentation/boards/at91/microchip-at91sam9263-ek.rst create mode 100644 Documentation/boards/at91/microchip-at91sam9g10-ek.rst create mode 100644 Documentation/boards/at91/microchip-at91sam9g20-ek.rst create mode 100644 Documentation/boards/at91/microchip-at91sam9m10g45-ek.rst create mode 100644 Documentation/boards/at91/microchip-at91sam9n12-ek.rst create mode 100644 Documentation/boards/at91/microchip-at91sam9x5-ek.rst (limited to 'Documentation') diff --git a/Documentation/boards/at91.rst b/Documentation/boards/at91.rst new file mode 100644 index 0000000000..f25cb01bb1 --- /dev/null +++ b/Documentation/boards/at91.rst @@ -0,0 +1,51 @@ +Microchip (Atmel) AT91 +====================== + +The Microchip (former Atmel) AT91 architecure has very good support within +barebox. +Most boards today have their description in their board files, but +boards are slowly migrating to use DT. +Likewise most boards are not yet migrated to multi image support, but +this is also ongoing. + +The boot process of the AT91 CPU's is a two step process. +The first step is named the bootstrap and at91bootstrap +is often used (https://github.com/linux4sam/at91bootstrap). +barebox supports bootstrapping some at91 boards as documented +in the following. + +The bootstrap program are loaded by a boot program and can be loaded +from DataFlash, NAND Flash, SD Card or via USB. +The bootstrap program do the low-level configuration of the +processor and then load and execute barebox. + +AT91 boards +----------- +The majority of the supported boards have a short entry here. +For each board defconfig file(s) are noted but barebox may include additional +defconfig files and may also include boards not included in the following. + +.. toctree:: + :glob: + :maxdepth: 1 + + at91/* + +TODO +---- +This is a list of AT91 specific TODO items, listed in no particular order. + +* fix prototype for barebox_arm_reset_vector. Introduce the prototype: + +.. code-block:: c + + void __naked __bare_init barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2) + + +This will unify the prototype for the reset vector for multi image and standalone images + +* Update remaining boards to DT +* Update remaing boards to support multi image boot +* Get bootstrap working in combination with multi image +* Introduce defaultenv2 for all boards +* Add pwm driver (required to support backlight) diff --git a/Documentation/boards/at91/microchip-at91rm9200-ek.rst b/Documentation/boards/at91/microchip-at91rm9200-ek.rst new file mode 100644 index 0000000000..2eecf48272 --- /dev/null +++ b/Documentation/boards/at91/microchip-at91rm9200-ek.rst @@ -0,0 +1,8 @@ +Atmel AT91RM9200-EK Evaluation Kit +================================== + +Building barebox: + +.. code-block:: sh + + make ARCH=arm at91rm9200ek_defconfig diff --git a/Documentation/boards/at91/microchip-at91sam9260-ek.rst b/Documentation/boards/at91/microchip-at91sam9260-ek.rst new file mode 100644 index 0000000000..c54c262513 --- /dev/null +++ b/Documentation/boards/at91/microchip-at91sam9260-ek.rst @@ -0,0 +1,8 @@ +Atmel AT91SAM9260-EK Evaluation Kit +=================================== + +Building barebox: + +.. code-block:: sh + + make ARCH=arm at91sam9260ek_defconfig diff --git a/Documentation/boards/at91/microchip-at91sam9261-ek.rst b/Documentation/boards/at91/microchip-at91sam9261-ek.rst new file mode 100644 index 0000000000..df88282959 --- /dev/null +++ b/Documentation/boards/at91/microchip-at91sam9261-ek.rst @@ -0,0 +1,18 @@ +Atmel AT91SAM9261-EK Evaluation Kit +=================================== + +For AT91SAM9261-EK there are three defconfigs. + +The two defconfigs listed below are almost identical. +The one named _first_stage_ can be used for FLASH as it allows the first part to be loaded to SRAM. + +.. code-block:: sh + + make ARCH=arm at91sam9261ek_defconfig + make ARCH=arm at91sam9261ek_first_stage_defconfig + +The following defconfig can be used to build a bootstrap variant of barebox + +.. code-block:: sh + + make ARCH=arm at91sam9261ek_bootstrap_defconfig diff --git a/Documentation/boards/at91/microchip-at91sam9263-ek.rst b/Documentation/boards/at91/microchip-at91sam9263-ek.rst new file mode 100644 index 0000000000..74ddb3cdb6 --- /dev/null +++ b/Documentation/boards/at91/microchip-at91sam9263-ek.rst @@ -0,0 +1,10 @@ +Atmel AT91SAM9263-EK Evaluation Kit +=================================== + +The AT91SAM9263-EK evaluation kit supports Device Tree and Multi Images. + +Building barebox: + +.. code-block:: sh + + make ARCH=arm at91sam9263ek_defconfig diff --git a/Documentation/boards/at91/microchip-at91sam9g10-ek.rst b/Documentation/boards/at91/microchip-at91sam9g10-ek.rst new file mode 100644 index 0000000000..f8f7d561a5 --- /dev/null +++ b/Documentation/boards/at91/microchip-at91sam9g10-ek.rst @@ -0,0 +1,8 @@ +Atmel AT91SAM9G10-EK Evaluation Kit +=================================== + +Building barebox: + +.. code-block:: sh + + make ARCH=arm at91sam9g10ek_defconfig diff --git a/Documentation/boards/at91/microchip-at91sam9g20-ek.rst b/Documentation/boards/at91/microchip-at91sam9g20-ek.rst new file mode 100644 index 0000000000..b641e0a388 --- /dev/null +++ b/Documentation/boards/at91/microchip-at91sam9g20-ek.rst @@ -0,0 +1,8 @@ +Atmel AT91SAM9G20-EK Evaluation Kit +=================================== + +Building barebox: + +.. code-block:: sh + + make ARCH=arm at91sam9g20ek_defconfig diff --git a/Documentation/boards/at91/microchip-at91sam9m10g45-ek.rst b/Documentation/boards/at91/microchip-at91sam9m10g45-ek.rst new file mode 100644 index 0000000000..ac54ed7c58 --- /dev/null +++ b/Documentation/boards/at91/microchip-at91sam9m10g45-ek.rst @@ -0,0 +1,8 @@ +Atmel AT91SAM9M10G45-EK Evaluation Kit +====================================== + +Building barebox: + +.. code-block:: sh + + make ARCH=arm at91sam9m10g45ek_defconfig diff --git a/Documentation/boards/at91/microchip-at91sam9n12-ek.rst b/Documentation/boards/at91/microchip-at91sam9n12-ek.rst new file mode 100644 index 0000000000..8aeba53f1e --- /dev/null +++ b/Documentation/boards/at91/microchip-at91sam9n12-ek.rst @@ -0,0 +1,8 @@ +Atmel AT91SAM9N12-EK Evaluation Kit +=================================== + +Building barebox: + +.. code-block:: sh + + make ARCH=arm at91sam9n12ek_defconfig diff --git a/Documentation/boards/at91/microchip-at91sam9x5-ek.rst b/Documentation/boards/at91/microchip-at91sam9x5-ek.rst new file mode 100644 index 0000000000..4c7b0cf3da --- /dev/null +++ b/Documentation/boards/at91/microchip-at91sam9x5-ek.rst @@ -0,0 +1,10 @@ +Atmel AT91SAM9X5-EK Evaluation Kit +=================================== + +The AT91SAM9X5-EK kit supports Device Tree and Multi Images. + +Building barebox: + +.. code-block:: sh + + make ARCH=arm at91sam9x5ek_defconfig -- cgit v1.2.3 From 682e63e0bae09e17992727f6341ba72e36c5caa8 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Sun, 6 Jan 2019 19:18:07 +0100 Subject: doc: add additional at91 boards Simple files that makes it simple to add further documentation later Signed-off-by: Sam Ravnborg Signed-off-by: Sascha Hauer --- Documentation/boards/at91/microchip-ksz9477-evb.rst | 11 +++++++++++ Documentation/boards/at91/microchip-sama5d3-xplained.rst | 8 ++++++++ Documentation/boards/at91/microchip-sama5d3x-ek.rst | 8 ++++++++ Documentation/boards/at91/microchip-sama5d4-xplained.rst | 8 ++++++++ Documentation/boards/at91/somfy-animeo-ip.rst | 4 ++++ Documentation/boards/at91/telit-evk-pro3.rst | 9 +++++++++ 6 files changed, 48 insertions(+) create mode 100644 Documentation/boards/at91/microchip-ksz9477-evb.rst create mode 100644 Documentation/boards/at91/microchip-sama5d3-xplained.rst create mode 100644 Documentation/boards/at91/microchip-sama5d3x-ek.rst create mode 100644 Documentation/boards/at91/microchip-sama5d4-xplained.rst create mode 100644 Documentation/boards/at91/somfy-animeo-ip.rst create mode 100644 Documentation/boards/at91/telit-evk-pro3.rst (limited to 'Documentation') diff --git a/Documentation/boards/at91/microchip-ksz9477-evb.rst b/Documentation/boards/at91/microchip-ksz9477-evb.rst new file mode 100644 index 0000000000..4c4c4aecbf --- /dev/null +++ b/Documentation/boards/at91/microchip-ksz9477-evb.rst @@ -0,0 +1,11 @@ +Microchip KSZ 9477 Evaluation board +=================================== + +This is an evaluation board for a switch that uses the at91sam9x5 CPU. +The board uses Device Tree and supports multi image. + +Building barebox: + +.. code-block:: sh + + make ARCH=arm microchip_ksz9477_evb_defconfig diff --git a/Documentation/boards/at91/microchip-sama5d3-xplained.rst b/Documentation/boards/at91/microchip-sama5d3-xplained.rst new file mode 100644 index 0000000000..e96111af72 --- /dev/null +++ b/Documentation/boards/at91/microchip-sama5d3-xplained.rst @@ -0,0 +1,8 @@ +Atmel SAMA5D3_XPLAINED Evaluation Kit +===================================== + +Building barebox: + +.. code-block:: sh + + make ARCH=arm sama5d3_xplained_defconfig diff --git a/Documentation/boards/at91/microchip-sama5d3x-ek.rst b/Documentation/boards/at91/microchip-sama5d3x-ek.rst new file mode 100644 index 0000000000..10bf2e611d --- /dev/null +++ b/Documentation/boards/at91/microchip-sama5d3x-ek.rst @@ -0,0 +1,8 @@ +Atmel SAMA5D3X Evaluation Kit +============================= + +Building barebox: + +.. code-block:: sh + + make ARCH=arm sama5d3xek_defconfig diff --git a/Documentation/boards/at91/microchip-sama5d4-xplained.rst b/Documentation/boards/at91/microchip-sama5d4-xplained.rst new file mode 100644 index 0000000000..d8615e4aff --- /dev/null +++ b/Documentation/boards/at91/microchip-sama5d4-xplained.rst @@ -0,0 +1,8 @@ +Atmel SAMA5D4 XPLAINED ULTRA Evaluation Kit +=========================================== + +Building barebox: + +.. code-block:: sh + + make ARCH=arm sama5d4_xplained_defconfig diff --git a/Documentation/boards/at91/somfy-animeo-ip.rst b/Documentation/boards/at91/somfy-animeo-ip.rst new file mode 100644 index 0000000000..a87179469b --- /dev/null +++ b/Documentation/boards/at91/somfy-animeo-ip.rst @@ -0,0 +1,4 @@ +Somfy Animeo IP +=============== + +No defconfig provided to build barebox diff --git a/Documentation/boards/at91/telit-evk-pro3.rst b/Documentation/boards/at91/telit-evk-pro3.rst new file mode 100644 index 0000000000..ea0b070fd1 --- /dev/null +++ b/Documentation/boards/at91/telit-evk-pro3.rst @@ -0,0 +1,9 @@ +Atmel Telit EVK-PRO3 +==================== + +Telit EVK-PRO3 with GE863-PRO3 +Building barebox: + +.. code-block:: sh + + make ARCH=arm telit_evk_pro3_defconfig -- cgit v1.2.3 From 2008b1feccebe61c4d57aa3d55ac57c49a8ec179 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Sun, 6 Jan 2019 19:18:08 +0100 Subject: doc: at91sam9263-ek: add notes Add notes from working on bootstrap support Signed-off-by: Sam Ravnborg Signed-off-by: Sascha Hauer --- .../boards/at91/microchip-at91sam9263-ek.rst | 122 +++++++++++++++++++++ 1 file changed, 122 insertions(+) (limited to 'Documentation') diff --git a/Documentation/boards/at91/microchip-at91sam9263-ek.rst b/Documentation/boards/at91/microchip-at91sam9263-ek.rst index 74ddb3cdb6..8022cdd678 100644 --- a/Documentation/boards/at91/microchip-at91sam9263-ek.rst +++ b/Documentation/boards/at91/microchip-at91sam9263-ek.rst @@ -8,3 +8,125 @@ Building barebox: .. code-block:: sh make ARCH=arm at91sam9263ek_defconfig + +Notes while working on at91sam9263ek bootstrap support + +The at91sam9263 have support for a boot program, +like the other members in the Atmel at91 series. + +The boot program (ROMBOOT) will try to load the +boot program from DataFlash, SD Card, NAND Flash and USB + +SD Card is the first to try. +It looks for a file named BOOT.BIN in the first +partition in a FAT16/32 filesystem. + +To generate the SD Card image I used genimage: +(https://github.com/pengutronix/genimage) +Onle 2 GB SD card works, 4 GB did not work. ROMBOOT do not +support high capacity SD cards. + +Configuration file: + +.. code-block:: none + + image boot.vfat { + name = "boot" + vfat { + /* + * RomBOOT in the at91sam9263 does not recognize + * the default FAT partition created by mkdosfs. + * -n BOOT - Set volume label to "BOOT" + * -F 16 - Force the partition to FAT 16 + * -D 0 - Set drive number to 0 + * -R 1 -a - Reserve only one sector + * The combination of "-D 0" AND "-R 1 -a" + * is required with mkdosfs version 4.1 + */ + extraargs = "-n BOOT -F 16 -D 0 -R 1 -a" + file BOOT.BIN { image = "barebox.bin" } // barebox.bin from root of barebox dir + file barebox.bin { image = "barebox-at91sam9263ek.img" } + file zImage { image = "zImage" } + } + + size = 16M + } + + image rootfs.ext4 { + ext4 { + label = "root" + } + mountpoint = "/" + size = 1500M + } + + image SD { + hdimage {} + + partition boot { + partition-type = 0xc + bootable = "true" + image = "boot.vfat" + } + + partition root { + image = "rootfs.ext4" + partition-type = 0x83 + } + + } + +ROMBOOT will load the BOOT.BIN file to internal SRAM that +starts at 0x300000. Maximum size 0x12000 (72 KiB). +When loaded ROMBOOT will remap like this: + +.. code-block:: none + + 0x00000000 0x00000000 + Internal ROM => Internal SRAM + + 0x00300000 0x00400000 + Internal SRAM => Internal ROM + +It is not documented but assumed that ROMBOOT uses the +MMU to remap the addresses. +There seems not to be a dedicated remapping feature that is used. + +Note: For DataFlash and NAND Flash the image is validated. +The first 28 bytes must be valid load PC or PC relative addressing. +Vector 0x6 must include the size of the image (in bytes). +This validation is (according to datasheet) not done for SD Card boots. + +barebox related notes when trying to make it work with PBL enabled + +To let barebox detect the SD card early use: CONFIG_MCI_STARTUP=y + +When PBL (and MULTI_IMAGE) are enabled then barebox creates +a binary with the following structure: + +.. code-block:: none + + +----------------------+ + | PBL (PreBootLoader) | + +----------------------+ + | piggy.o | + |+--------------------+| + ||barebox second stage|| + |+--------------------+| + +----------------------+ + +The PBL contains code from the sections .text_head_entry*, .text_bare_init* and .text* + +``.text_head_entry*:`` +This is the reset vector and exception vectors. Must be the very first in the file + +``.text_bare_init*:`` +Everything in this section, and , is checked at link time. +Size most be less than BAREBOX_MAX_BARE_INIT_SIZE / ARCH_BAREBOX_MAX_BARE_INIT_SIZE + +at91 specify the size of the two sections in exception vector 6 (see above), +if CONFIG_AT91_LOAD_BAREBOX_SRAM is defined. +I think this is because some at91 variants have only very limited SRAM size, +and we copy only a minimal part to the SRAM. The remaining part is then +executed in-place. +For at91sam9263 we have a large SRAM so there is room for the full bootstrap binary. -- cgit v1.2.3