Shaohui Xie | 5d898a0 | 2012-08-10 02:49:35 +0000 | [diff] [blame] | 1 | ------------------------------------------------------------------ |
| 2 | Freescale PBL(pre-boot loader) Boot Image generation using mkimage |
| 3 | ------------------------------------------------------------------ |
| 4 | |
| 5 | The CoreNet SoC's can boot directly from eSPI FLASH, SD/MMC and |
| 6 | NAND, etc. These SoCs use PBL to load RCW and/or pre-initialization |
| 7 | instructions. For more details refer section 5 Pre-boot loader |
| 8 | specifications of reference manual P3041RM/P4080RM/P5020RM at link: |
| 9 | http://www.freescale.com/webapp/search/Serp.jsp?Reference+Manuals |
| 10 | |
| 11 | Building PBL Boot Image and boot steps |
| 12 | -------------------------------------- |
| 13 | |
| 14 | 1. Building PBL Boot Image. |
| 15 | The default Image is u-boot.pbl. |
| 16 | |
Shaohui Xie | 262737f | 2013-09-11 14:48:29 +0800 | [diff] [blame] | 17 | For eSPI boot(available on P2041/P3041/P4080/P5020/P5040/T4240): |
Shaohui Xie | 5d898a0 | 2012-08-10 02:49:35 +0000 | [diff] [blame] | 18 | To build the eSPI boot image: |
Shaohui Xie | 262737f | 2013-09-11 14:48:29 +0800 | [diff] [blame] | 19 | make <board_name>_SPIFLASH |
Shaohui Xie | 5d898a0 | 2012-08-10 02:49:35 +0000 | [diff] [blame] | 20 | |
Shaohui Xie | 262737f | 2013-09-11 14:48:29 +0800 | [diff] [blame] | 21 | For SD boot(available on P2041/P3041/P4080/P5020/P5040/T4240): |
Shaohui Xie | 5d898a0 | 2012-08-10 02:49:35 +0000 | [diff] [blame] | 22 | To build the SD boot image: |
Shaohui Xie | 262737f | 2013-09-11 14:48:29 +0800 | [diff] [blame] | 23 | make <board_name>_SDCARD |
Shaohui Xie | 5d898a0 | 2012-08-10 02:49:35 +0000 | [diff] [blame] | 24 | |
Shaohui Xie | 262737f | 2013-09-11 14:48:29 +0800 | [diff] [blame] | 25 | For Nand boot(available on P2041/P3041/P5020/P5040): |
Shaohui Xie | 5d898a0 | 2012-08-10 02:49:35 +0000 | [diff] [blame] | 26 | To build the NAND boot image: |
Shaohui Xie | 262737f | 2013-09-11 14:48:29 +0800 | [diff] [blame] | 27 | make <board_name>_NAND |
Shaohui Xie | 5d898a0 | 2012-08-10 02:49:35 +0000 | [diff] [blame] | 28 | |
| 29 | |
| 30 | 2. pblimage support available with mkimage utility will generate Freescale PBL |
| 31 | boot image that can be flashed on the board eSPI flash, SD/MMC and NAND. |
| 32 | Following steps describe it in detail. |
| 33 | |
| 34 | 1). Boot from eSPI flash |
| 35 | Write u-boot.pbl to eSPI flash from offset 0x0. |
| 36 | for ex in u-boot: |
| 37 | =>tftp 100000 u-boot.pbl |
| 38 | =>sf probe 0 |
| 39 | =>sf erase 0 100000 |
| 40 | =>sf write 100000 0 $filesize |
| 41 | Change SW1[1:5] = off off on off on. |
| 42 | |
| 43 | 2). Boot from SD/MMC |
| 44 | Write u-boot.pbl to SD/MMC from offset 0x1000. |
| 45 | for ex in u-boot: |
| 46 | =>tftp 100000 u-boot.pbl |
| 47 | =>mmcinfo |
| 48 | =>mmc write 100000 8 441 |
| 49 | Change SW1[1:5] = off off on on off. |
| 50 | |
| 51 | 3). Boot from Nand |
| 52 | Write u-boot.pbl to Nand from offset 0x0. |
| 53 | for ex in u-boot: |
| 54 | =>tftp 100000 u-boot.pbl |
| 55 | =>nand info |
| 56 | =>nand erase 0 100000 |
| 57 | =>nand write 100000 0 $filesize |
| 58 | Change SW1[1:5] = off on off off on |
| 59 | Change SW7[1:4] = on off off on |
| 60 | |
| 61 | Board specific configuration file specifications: |
| 62 | ------------------------------------------------ |
| 63 | 1. Configuration files rcw.cfg and pbi.cfg must present in the |
Tom Rini | 0040ed7 | 2022-08-09 10:16:21 -0400 | [diff] [blame] | 64 | board/freescale/<BOARD>/ directory, rcw.cfg is for RCW, pbi.cfg is for |
Shaohui Xie | 5d898a0 | 2012-08-10 02:49:35 +0000 | [diff] [blame] | 65 | PBI instructions. File name must not be changed since they are used |
| 66 | in Makefile. |
| 67 | 2. These files can have empty lines and lines starting with "#" as first |
| 68 | character to put comments |
| 69 | |
| 70 | Typical example of rcw.cfg file: |
| 71 | ----------------------------------- |
| 72 | |
| 73 | #PBL preamble and RCW header |
| 74 | aa55aa55 010e0100 |
| 75 | #64 bytes RCW data |
| 76 | 4c580000 00000000 18185218 0000cccc |
| 77 | 40464000 3c3c2000 58000000 61000000 |
| 78 | 00000000 00000000 00000000 008b6000 |
| 79 | 00000000 00000000 00000000 00000000 |
| 80 | |
| 81 | Typical example of pbi.cfg file: |
| 82 | ----------------------------------- |
| 83 | |
| 84 | #PBI commands |
| 85 | #Initialize CPC1 |
| 86 | 09010000 00200400 |
| 87 | 09138000 00000000 |
| 88 | 091380c0 00000100 |
| 89 | 09010100 00000000 |
| 90 | 09010104 fff0000b |
| 91 | 09010f00 08000000 |
| 92 | 09010000 80000000 |
| 93 | #Configure LAW for CPC1 |
| 94 | 09000d00 00000000 |
| 95 | 09000d04 fff00000 |
| 96 | 09000d08 81000013 |
| 97 | 09000010 00000000 |
| 98 | 09000014 ff000000 |
| 99 | 09000018 81000000 |
| 100 | #Initialize eSPI controller |
| 101 | 09110000 80000403 |
| 102 | 09110020 2d170008 |
| 103 | 09110024 00100008 |
| 104 | 09110028 00100008 |
| 105 | 0911002c 00100008 |
| 106 | #Flush PBL data |
| 107 | 09138000 00000000 |
| 108 | 091380c0 00000000 |
| 109 | |
| 110 | ------------------------------------------------ |
| 111 | Author: Shaohui Xie<Shaohui.Xie@freescale.com> |