1*4882a593Smuzhiyun------------------------------------------------------------------ 2*4882a593SmuzhiyunFreescale PBL(pre-boot loader) Boot Image generation using mkimage 3*4882a593Smuzhiyun------------------------------------------------------------------ 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunThe CoreNet SoC's can boot directly from eSPI FLASH, SD/MMC and 6*4882a593SmuzhiyunNAND, etc. These SoCs use PBL to load RCW and/or pre-initialization 7*4882a593Smuzhiyuninstructions. For more details refer section 5 Pre-boot loader 8*4882a593Smuzhiyunspecifications of reference manual P3041RM/P4080RM/P5020RM at link: 9*4882a593Smuzhiyunhttp://www.freescale.com/webapp/search/Serp.jsp?Reference+Manuals 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunBuilding PBL Boot Image and boot steps 12*4882a593Smuzhiyun-------------------------------------- 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun1. Building PBL Boot Image. 15*4882a593Smuzhiyun The default Image is u-boot.pbl. 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun For eSPI boot(available on P2041/P3041/P4080/P5020/P5040/T4240): 18*4882a593Smuzhiyun To build the eSPI boot image: 19*4882a593Smuzhiyun make <board_name>_SPIFLASH 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun For SD boot(available on P2041/P3041/P4080/P5020/P5040/T4240): 22*4882a593Smuzhiyun To build the SD boot image: 23*4882a593Smuzhiyun make <board_name>_SDCARD 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun For Nand boot(available on P2041/P3041/P5020/P5040): 26*4882a593Smuzhiyun To build the NAND boot image: 27*4882a593Smuzhiyun make <board_name>_NAND 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun2. pblimage support available with mkimage utility will generate Freescale PBL 31*4882a593Smuzhiyunboot image that can be flashed on the board eSPI flash, SD/MMC and NAND. 32*4882a593SmuzhiyunFollowing steps describe it in detail. 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun 1). Boot from eSPI flash 35*4882a593Smuzhiyun Write u-boot.pbl to eSPI flash from offset 0x0. 36*4882a593Smuzhiyun for ex in u-boot: 37*4882a593Smuzhiyun =>tftp 100000 u-boot.pbl 38*4882a593Smuzhiyun =>sf probe 0 39*4882a593Smuzhiyun =>sf erase 0 100000 40*4882a593Smuzhiyun =>sf write 100000 0 $filesize 41*4882a593Smuzhiyun Change SW1[1:5] = off off on off on. 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun 2). Boot from SD/MMC 44*4882a593Smuzhiyun Write u-boot.pbl to SD/MMC from offset 0x1000. 45*4882a593Smuzhiyun for ex in u-boot: 46*4882a593Smuzhiyun =>tftp 100000 u-boot.pbl 47*4882a593Smuzhiyun =>mmcinfo 48*4882a593Smuzhiyun =>mmc write 100000 8 441 49*4882a593Smuzhiyun Change SW1[1:5] = off off on on off. 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun 3). Boot from Nand 52*4882a593Smuzhiyun Write u-boot.pbl to Nand from offset 0x0. 53*4882a593Smuzhiyun for ex in u-boot: 54*4882a593Smuzhiyun =>tftp 100000 u-boot.pbl 55*4882a593Smuzhiyun =>nand info 56*4882a593Smuzhiyun =>nand erase 0 100000 57*4882a593Smuzhiyun =>nand write 100000 0 $filesize 58*4882a593Smuzhiyun Change SW1[1:5] = off on off off on 59*4882a593Smuzhiyun Change SW7[1:4] = on off off on 60*4882a593Smuzhiyun 61*4882a593SmuzhiyunBoard specific configuration file specifications: 62*4882a593Smuzhiyun------------------------------------------------ 63*4882a593Smuzhiyun1. Configuration files rcw.cfg and pbi.cfg must present in the 64*4882a593Smuzhiyunboard/freescale/corenet_ds/, rcw.cfg is for RCW, pbi.cfg is for 65*4882a593SmuzhiyunPBI instructions. File name must not be changed since they are used 66*4882a593Smuzhiyunin Makefile. 67*4882a593Smuzhiyun2. These files can have empty lines and lines starting with "#" as first 68*4882a593Smuzhiyuncharacter to put comments 69*4882a593Smuzhiyun 70*4882a593SmuzhiyunTypical example of rcw.cfg file: 71*4882a593Smuzhiyun----------------------------------- 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun#PBL preamble and RCW header 74*4882a593Smuzhiyunaa55aa55 010e0100 75*4882a593Smuzhiyun#64 bytes RCW data 76*4882a593Smuzhiyun4c580000 00000000 18185218 0000cccc 77*4882a593Smuzhiyun40464000 3c3c2000 58000000 61000000 78*4882a593Smuzhiyun00000000 00000000 00000000 008b6000 79*4882a593Smuzhiyun00000000 00000000 00000000 00000000 80*4882a593Smuzhiyun 81*4882a593SmuzhiyunTypical example of pbi.cfg file: 82*4882a593Smuzhiyun----------------------------------- 83*4882a593Smuzhiyun 84*4882a593Smuzhiyun#PBI commands 85*4882a593Smuzhiyun#Initialize CPC1 86*4882a593Smuzhiyun09010000 00200400 87*4882a593Smuzhiyun09138000 00000000 88*4882a593Smuzhiyun091380c0 00000100 89*4882a593Smuzhiyun09010100 00000000 90*4882a593Smuzhiyun09010104 fff0000b 91*4882a593Smuzhiyun09010f00 08000000 92*4882a593Smuzhiyun09010000 80000000 93*4882a593Smuzhiyun#Configure LAW for CPC1 94*4882a593Smuzhiyun09000d00 00000000 95*4882a593Smuzhiyun09000d04 fff00000 96*4882a593Smuzhiyun09000d08 81000013 97*4882a593Smuzhiyun09000010 00000000 98*4882a593Smuzhiyun09000014 ff000000 99*4882a593Smuzhiyun09000018 81000000 100*4882a593Smuzhiyun#Initialize eSPI controller 101*4882a593Smuzhiyun09110000 80000403 102*4882a593Smuzhiyun09110020 2d170008 103*4882a593Smuzhiyun09110024 00100008 104*4882a593Smuzhiyun09110028 00100008 105*4882a593Smuzhiyun0911002c 00100008 106*4882a593Smuzhiyun#Flush PBL data 107*4882a593Smuzhiyun09138000 00000000 108*4882a593Smuzhiyun091380c0 00000000 109*4882a593Smuzhiyun 110*4882a593Smuzhiyun------------------------------------------------ 111*4882a593SmuzhiyunAuthor: Shaohui Xie<Shaohui.Xie@freescale.com> 112