12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100 |
- U-Boot on x86
- =============
- This document describes the information about U-Boot running on x86 targets,
- including supported boards, build instructions, todo list, etc.
- Status
- U-Boot supports running as a coreboot [1] payload on x86. So far only Link
- (Chromebook Pixel) and QEMU [2] x86 targets have been tested, but it should
- work with minimal adjustments on other x86 boards since coreboot deals with
- most of the low-level details.
- U-Boot also supports booting directly from x86 reset vector, without coreboot.
- In this case, known as bare mode, from the fact that it runs on the
- 'bare metal', U-Boot acts like a BIOS replacement. The following platforms
- are supported:
- - Bayley Bay CRB
- - Congatec QEVAL 2.0 & conga-QA3/E3845
- - Cougar Canyon 2 CRB
- - Crown Bay CRB
- - Galileo
- - Link (Chromebook Pixel)
- - Minnowboard MAX
- - Samus (Chromebook Pixel 2015)
- - QEMU x86
- As for loading an OS, U-Boot supports directly booting a 32-bit or 64-bit
- Linux kernel as part of a FIT image. It also supports a compressed zImage.
- U-Boot supports loading an x86 VxWorks kernel. Please check README.vxworks
- for more details.
- Build Instructions for U-Boot as coreboot payload
- Building U-Boot as a coreboot payload is just like building U-Boot for targets
- on other architectures, like below:
- $ make coreboot-x86_defconfig
- $ make all
- Note this default configuration will build a U-Boot payload for the QEMU board.
- To build a coreboot payload against another board, you can change the build
- configuration during the 'make menuconfig' process.
- x86 architecture
- ...
- (qemu-x86) Board configuration file
- (qemu-x86_i440fx) Board Device Tree Source (dts) file
- (0x01920000) Board specific Cache-As-RAM (CAR) address
- (0x4000) Board specific Cache-As-RAM (CAR) size
- Change the 'Board configuration file' and 'Board Device Tree Source (dts) file'
- to point to a new board. You can also change the Cache-As-RAM (CAR) related
- settings here if the default values do not fit your new board.
- Build Instructions for U-Boot as BIOS replacement (bare mode)
- Building a ROM version of U-Boot (hereafter referred to as u-boot.rom) is a
- little bit tricky, as generally it requires several binary blobs which are not
- shipped in the U-Boot source tree. Due to this reason, the u-boot.rom build is
- not turned on by default in the U-Boot source tree. Firstly, you need turn it
- on by enabling the ROM build:
- $ export BUILD_ROM=y
- This tells the Makefile to build u-boot.rom as a target.
- Chromebook Link specific instructions for bare mode:
- First, you need the following binary blobs:
- * descriptor.bin - Intel flash descriptor
- * me.bin - Intel Management Engine
- * mrc.bin - Memory Reference Code, which sets up SDRAM
- * video ROM - sets up the display
- You can get these binary blobs by:
- $ git clone http://review.coreboot.org/p/blobs.git
- $ cd blobs
- Find the following files:
- * ./mainboard/google/link/descriptor.bin
- * ./mainboard/google/link/me.bin
- * ./northbridge/intel/sandybridge/systemagent-r6.bin
- The 3rd one should be renamed to mrc.bin.
- As for the video ROM, you can get it here [3] and rename it to vga.bin.
- Make sure all these binary blobs are put in the board directory.
- Now you can build U-Boot and obtain u-boot.rom:
- $ make chromebook_link_defconfig
- $ make all
- Chromebook Samus (2015 Pixel) instructions for bare mode:
- First, you need the following binary blobs:
- * descriptor.bin - Intel flash descriptor
- * me.bin - Intel Management Engine
- * mrc.bin - Memory Reference Code, which sets up SDRAM
- * refcode.elf - Additional Reference code
- * vga.bin - video ROM, which sets up the display
- If you have a samus you can obtain them from your flash, for example, in
- developer mode on the Chromebook (use Ctrl-Alt-F2 to obtain a terminal and
- log in as 'root'):
- cd /tmp
- flashrom -w samus.bin
- scp samus.bin username@ip_address:/path/to/somewhere
- If not see the coreboot tree [4] where you can use:
- bash crosfirmware.sh samus
- to get the image. There is also an 'extract_blobs.sh' scripts that you can use
- on the 'coreboot-Google_Samus.*' file to short-circuit some of the below.
- Then 'ifdtool -x samus.bin' on your development machine will produce:
- flashregion_0_flashdescriptor.bin
- flashregion_1_bios.bin
- flashregion_2_intel_me.bin
- Rename flashregion_0_flashdescriptor.bin to descriptor.bin
- Rename flashregion_2_intel_me.bin to me.bin
- You can ignore flashregion_1_bios.bin - it is not used.
- To get the rest, use 'cbfstool samus.bin print':
- samus.bin: 8192 kB, bootblocksize 2864, romsize 8388608, offset 0x700000
- alignment: 64 bytes, architecture: x86
- Name Offset Type Size
- cmos_layout.bin 0x700000 cmos_layout 1164
- pci8086,0406.rom 0x7004c0 optionrom 65536
- spd.bin 0x710500 (unknown) 4096
- cpu_microcode_blob.bin 0x711540 microcode 70720
- fallback/romstage 0x722a00 stage 54210
- fallback/ramstage 0x72fe00 stage 96382
- config 0x7476c0 raw 6075
- fallback/vboot 0x748ec0 stage 15980
- fallback/refcode 0x74cd80 stage 75578
- fallback/payload 0x75f500 payload 62878
- u-boot.dtb 0x76eb00 (unknown) 5318
- (empty) 0x770000 null 196504
- mrc.bin 0x79ffc0 (unknown) 222876
- (empty) 0x7d66c0 null 167320
- You can extract what you need:
- cbfstool samus.bin extract -n pci8086,0406.rom -f vga.bin
- cbfstool samus.bin extract -n fallback/refcode -f refcode.rmod
- cbfstool samus.bin extract -n mrc.bin -f mrc.bin
- cbfstool samus.bin extract -n fallback/refcode -f refcode.bin -U
- Note that the -U flag is only supported by the latest cbfstool. It unpacks
- and decompresses the stage to produce a coreboot rmodule. This is a simple
- representation of an ELF file. You need the patch "Support decoding a stage
- with compression".
- Put all 5 files into board/google/chromebook_samus.
- Now you can build U-Boot and obtain u-boot.rom:
- $ make chromebook_link_defconfig
- $ make all
- If you are using em100, then this command will flash write -Boot:
- em100 -s -d filename.rom -c W25Q64CV -r
- Intel Crown Bay specific instructions for bare mode:
- U-Boot support of Intel Crown Bay board [4] relies on a binary blob called
- Firmware Support Package [5] to perform all the necessary initialization steps
- as documented in the BIOS Writer Guide, including initialization of the CPU,
- memory controller, chipset and certain bus interfaces.
- Download the Intel FSP for Atom E6xx series and Platform Controller Hub EG20T,
- install it on your host and locate the FSP binary blob. Note this platform
- also requires a Chipset Micro Code (CMC) state machine binary to be present in
- the SPI flash where u-boot.rom resides, and this CMC binary blob can be found
- in this FSP package too.
- * ./FSP/QUEENSBAY_FSP_GOLD_001_20-DECEMBER-2013.fd
- * ./Microcode/C0_22211.BIN
- Rename the first one to fsp.bin and second one to cmc.bin and put them in the
- board directory.
- Note the FSP release version 001 has a bug which could cause random endless
- loop during the FspInit call. This bug was published by Intel although Intel
- did not describe any details. We need manually apply the patch to the FSP
- binary using any hex editor (eg: bvi). Go to the offset 0x1fcd8 of the FSP
- binary, change the following five bytes values from orginally E8 42 FF FF FF
- to B8 00 80 0B 00.
- As for the video ROM, you need manually extract it from the Intel provided
- BIOS for Crown Bay here [6], using the AMI MMTool [7]. Check PCI option ROM
- ID 8086:4108, extract and save it as vga.bin in the board directory.
- Now you can build U-Boot and obtain u-boot.rom
- $ make crownbay_defconfig
- $ make all
- Intel Cougar Canyon 2 specific instructions for bare mode:
- This uses Intel FSP for 3rd generation Intel Core and Intel Celeron processors
- with mobile Intel HM76 and QM77 chipsets platform. Download it from Intel FSP
- website and put the .fd file (CHIEFRIVER_FSP_GOLD_001_09-OCTOBER-2013.fd at the
- time of writing) in the board directory and rename it to fsp.bin.
- Now build U-Boot and obtain u-boot.rom
- $ make cougarcanyon2_defconfig
- $ make all
- The board has two 8MB SPI flashes mounted, which are called SPI-0 and SPI-1 in
- the board manual. The SPI-0 flash should have flash descriptor plus ME firmware
- and SPI-1 flash is used to store U-Boot. For convenience, the complete 8MB SPI-0
- flash image is included in the FSP package (named Rom00_8M_MB_PPT.bin). Program
- this image to the SPI-0 flash according to the board manual just once and we are
- all set. For programming U-Boot we just need to program SPI-1 flash.
- Intel Bay Trail based board instructions for bare mode:
- This uses as FSP as with Crown Bay, except it is for the Atom E3800 series.
- Two boards that use this configuration are Bayley Bay and Minnowboard MAX.
- Download this and get the .fd file (BAYTRAIL_FSP_GOLD_003_16-SEP-2014.fd at
- the time of writing). Put it in the corresponding board directory and rename
- it to fsp.bin.
- Obtain the VGA RAM (Vga.dat at the time of writing) and put it into the same
- board directory as vga.bin.
- You still need two more binary blobs. For Bayley Bay, they can be extracted
- from the sample SPI image provided in the FSP (SPI.bin at the time of writing).
- $ ./tools/ifdtool -x BayleyBay/SPI.bin
- $ cp flashregion_0_flashdescriptor.bin board/intel/bayleybay/descriptor.bin
- $ cp flashregion_2_intel_me.bin board/intel/bayleybay/me.bin
- For Minnowboard MAX, we can reuse the same ME firmware above, but for flash
- descriptor, we need get that somewhere else, as the one above does not seem to
- work, probably because it is not designed for the Minnowboard MAX. Now download
- the original firmware image for this board from:
- http://firmware.intel.com/sites/default/files/2014-WW42.4-MinnowBoardMax.73-64-bit.bin_Release.zip
- Unzip it:
- $ unzip 2014-WW42.4-MinnowBoardMax.73-64-bit.bin_Release.zip
- Use ifdtool in the U-Boot tools directory to extract the images from that
- file, for example:
- $ ./tools/ifdtool -x MNW2MAX1.X64.0073.R02.1409160934.bin
- This will provide the descriptor file - copy this into the correct place:
- $ cp flashregion_0_flashdescriptor.bin board/intel/minnowmax/descriptor.bin
- Now you can build U-Boot and obtain u-boot.rom
- Note: below are examples/information for Minnowboard MAX.
- $ make minnowmax_defconfig
- $ make all
- Checksums are as follows (but note that newer versions will invalidate this):
- $ md5sum -b board/intel/minnowmax
|