summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* add README.distro fileDennis Gilmore2015-01-30-0/+341
| | | | | | | | | | | Add documentation on how to setup a system to use the generic distro configs and boot commands. This spells out what is needed to make a system conformant, but does not limit the board to only the defaults. Signed-off-by: Dennis Gilmore <dennis@ausil.us> [swarren, added concept, user config, BOOT_TARGET_DEVICES sections. edited the rest] Signed-off-by: Stephen Warren <swarren@nvidia.com>
* drivers/pci/pci_rom.c: fix compile warning under 64bit modeMinghuan Lian2015-01-30-1/+1
| | | | | | | | | Fix this: drivers/pci/pci_rom.c:95:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] rom_header = (struct pci_rom_header *)rom_address; Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
* drivers/net/e1000.c: fix compile warning under 64bit modeMinghuan Lian2015-01-30-14/+17
| | | | | | | Fix this: warning: cast from pointer to integer of different size Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
* arm: switch armltd vexpress to GENERIC_BOARDChris Kuethe2015-01-30-1/+1
| | | | | | | only tested tested under QEMU with vexpress_ca9x4 ("-M vexpress-a9") and vexpress_ca15_tc2 ("-M vexpress-a15"). Makes the ugly warning go away. Signed-off-by: Chris Kuethe <chris.kuethe+github@gmail.com>
* distro_bootcmd: read DHCP boot script name from a variableStephen Warren2015-01-30-1/+2
| | | | | | | | | Modify $bootcmd_dhcp to read the downloaded script filename from an environment variable rather than hard-coding it. This allows the user (or another script) to select a different script name if they want, without editing the whole value of $bootcmd_dhcp. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* cmd: Fix gettime command helpBin Meng2015-01-30-2/+2
| | | | | | Remove the additional ',' and '\n' from the gettime command help. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* common: bootm: Document fake bootm sub-commandMichal Simek2015-01-29-0/+3
| | | | | | | | Fake option is enabled only when CONFIG_TRACE is enabled in common/bootm.c:do_boot_states(). Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* tools: do not print error messages in verify_header() functionsGuilherme Maciel Ferreira2015-01-29-11/+12
| | | | | | | | | | | default_image.c and socfpgaimage.c are the only image modules that print error messages during header verification. The verify_header() is used to query if a given image file is processed by the image format. Thus, if the image format can't handle the file, it must simply return an error. Otherwise we pollute the screen with errors messages until we find the image format that handle a given image file. Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
* dumpimage: fit: extract FIT imagesGuilherme Maciel Ferreira2015-01-29-3/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dumpimage is able to extract components contained in a FIT image: $ ./dumpimage -T flat_dt -i CONTAINER.ITB -p INDEX FILE The CONTAINER.ITB is a regular FIT container file. The INDEX is the poisition of the sub-image to be retrieved, and FILE is the file (path+name) to save the extracted sub-image. For example, given the following kernel.its to build a kernel.itb: /dts-v1/; / { ... images { kernel@1 { description = "Kernel 2.6.32-34"; data = /incbin/("/boot/vmlinuz-2.6.32-34-generic"); type = "kernel"; arch = "ppc"; os = "linux"; compression = "gzip"; load = <00000000>; entry = <00000000>; hash@1 { algo = "md5"; }; }; ... }; ... }; The dumpimage can extract the 'kernel@1' node through the following command: $ ./dumpimage -T flat_dt -i kernel.itb -p 0 kernel Extracted: Image 0 (kernel@1) Description: Kernel 2.6.32-34 Created: Wed Oct 22 15:50:26 2014 Type: Kernel Image Compression: gzip compressed Data Size: 4040128 Bytes = 3945.44 kB = 3.85 MB Architecture: PowerPC OS: Linux Load Address: 0x00000000 Entry Point: 0x00000000 Hash algo: md5 Hash value: 22352ad39bdc03e2e50f9cc28c1c3652 Which results in the file 'kernel' being exactly the same as '/boot/vmlinuz-2.6.32-34-generic'. Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
* dumpimage: replace the term "datafile" by "subimage"Guilherme Maciel Ferreira2015-01-29-18/+19
| | | | Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
* dumpimage: add 'T' option to explicitly set the image typeGuilherme Maciel Ferreira2015-01-29-64/+67
| | | | | | | | | | Some image types, like "KeyStone GP", do not have magic numbers to distinguish them from other image types. Thus, the automatic image type discovery does not work correctly. This patch also fix some integer type mismatches. Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
* imagetool: replace image registration function by linker_lists featureGuilherme Maciel Ferreira2015-01-29-376/+254
| | | | | | | | | The registration was introduced in commit f86ed6a8d52c99bb2d17d3cac1647edca0c4399c This commit also removes all registration functions, and the member "next" from image_type_params struct Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
* imagetool: make the image_save_datafile() available to all image typesGuilherme Maciel Ferreira2015-01-29-28/+46
| | | | | | | | Move the image_save_datafile() function from an U-Multi specific file (default_image.c) to a file common to all image types (image.c). And rename it to genimg_save_datafile(), to make clear it is useful for any image type. Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
* imagetool: move common code to imagetool moduleGuilherme Maciel Ferreira2015-01-29-130/+90
| | | | | | | The get_type() and verify_print_header() functions have the same code on both dumpimage.c and mkimage.c modules. Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
* linker_lists: fix misspellingsGuilherme Maciel Ferreira2015-01-29-2/+2
| | | | Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
* doc: fix misspellingsGuilherme Maciel Ferreira2015-01-29-3/+3
| | | | Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
* doc: "os" is also mandatory for "ramdisk" FIT image componentsGuilherme Maciel Ferreira2015-01-29-4/+4
| | | | | | | According to fit_image_print(), the "os" property from "image" node is required also when "type=ramdisk". Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
* common: add cache flush to imxtract functionPieter Voorthuijsen2015-01-29-0/+2
| | | | | | A cache flush is required when an image is extracted that is required on another core. Signed-off-by: Pieter Voorthuijsen <pieter.voorthuijsen@prodrive-technologies.com>
* distro_distro_bootcmd: use CONFIG_BOOTCOMMAND instead of setting bootcmd=Sjoerd Simons2015-01-29-1/+5
| | | | | | | | | | | | | | | Move the bootcmd commands into a seperate distro_bootcmd environment variable. Allowing a user to easily launch the distro boot sequence if the default bootcmd did not default to distro boot commands. Also set CONFIG_BOOTCOMMAND to "run distro_bootcmd" if it hasn't been configured yet rather then putting it directly in the environment. This allows boards to make the distro boot commands available without necessarily default to them or to use them as a fallback after running some board specific commands instead. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by: Stephen Warren <swarren@nvidia.com>
* config_distro_bootcmd: Scan all partitions for boot filesSjoerd Simons2015-01-29-3/+11
| | | | | | | | | | | Not all devices use the convention that the boot scripts are on the first partition. For example on chromebooks it seems common for the first two partitions to be ChromeOS kernel partitions. So instead of just the first partition scan all partitions on a device with a filesystem u-boot can recognize. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
* part: let list put the list in an environment variableSjoerd Simons2015-01-29-2/+22
| | | | | | | | | | Add an optional third argument to the "part list" command which puts a space seperated list of valid partitions into the given environment variable. This is useful for allowing boot scripts to iterate of all partitions of a device. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by: Stephen Warren <swarren@nvidia.com>
* fs: Add command to retrieve the filesystem typeSjoerd Simons2015-01-29-0/+48
| | | | | | | | New command to determine the filesystem type of a given partition. Optionally stores the filesystem type in a environment variable. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by: Stephen Warren <swarren@nvidia.com>
* lcd: fix console address is not initializedBo Shen2015-01-28-0/+1
| | | | | | | | | | This commit 904672e (lcd: refactor lcd console stuff into its own file), which cause lcd console address is not initialized. This patch initialize the lcd console use the default value, will be update when splash screen is enabled. Signed-off-by: Bo Shen <voice.shen@atmel.com>
* Makefile: clean boot.binBo Shen2015-01-28-1/+1
| | | | | | | | | When build for Atmel related boards which support SPL, it will generate boot.bin, also clean when it when do "make clean" operation. Signed-off-by: Bo Shen <voice.shen@atmel.com> Acked-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* spl: Change printf to puts for "Unsupported boot-device"Stefan Roese2015-01-28-1/+1
| | | | | | | | | | | | | | Microblaze currently doesn't use printf in SPL. So this one line was the only reference to it and resulted in the printf functionality to be pulled in. Exceeding the 4k size limit. Lets change the printf back to puts so that Microblaze is fixed again. The only drawback is that the detected boot-device number will not be printed. But this message alone should be helpful enough to get an idea where the boot process is broken. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Tom Rini <trini@ti.com> Cc: Michal Simek <michal.simek@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com>
* Merge branch 'master' of git://git.denx.de/u-boot-x86Tom Rini2015-01-26-288/+1078
|\
| * x86: config: chromebook_link: Enable environmentSimon Glass2015-01-24-0/+7
| | | | | | | | | | | | | | Enable an environment area. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * x86: ivybridge: Drop the Kconfig MRC cache informationSimon Glass2015-01-24-28/+0
| | | | | | | | | | | | This is now stored in the device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
| * x86: config: Enable hook for saving MRC configurationSimon Glass2015-01-24-0/+6
| | | | | | | | | | | | | | Add a hook to ensure that this information is saved. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * x86: Implement a cache for Memory Reference Code parametersSimon Glass2015-01-24-0/+464
| | | | | | | | | | | | | | | | | | | | | | The memory reference code takes a very long time to 'train' its SDRAM interface, around half a second. To avoid this delay on every boot we can store the parameters from the last training sessions to speed up the next. Add an implementation of this, storing the training data in CMOS RAM and SPI flash. Signed-off-by: Simon Glass <sjg@chromium.org>
| * x86: dts: Add SPI flash MRC details for chromebook_linkSimon Glass2015-01-24-1/+14
| | | | | | | | | | | | | | | | Correct the SPI flash compatible string, add an alias and specify the position of the MRC cache, used to store SDRAM training settings for the Memory Reference Code. Signed-off-by: Simon Glass <sjg@chromium.org>
| * Allow architecture-specific memory reservationSimon Glass2015-01-24-0/+7
| | | | | | | | | | | | | | All memory to be reserved for use after relocation by adding a new call to perform this reservation. Signed-off-by: Simon Glass <sjg@chromium.org>
| * x86: spi: Add device tree supportSimon Glass2015-01-24-0/+8
| | | | | | | | | | | | | | As a temporary measure before the ICH driver moves over to driver model, add device tree support to the driver. Signed-off-by: Simon Glass <sjg@chromium.org>
| * x86: rtc: mc146818: Add helpers to read/write CMOS RAMSimon Glass2015-01-24-48/+105
| | | | | | | | | | | | | | On x86 we use CMOS RAM to read and write some settings. Add basic support for this, including access to registers 128-255. Signed-off-by: Simon Glass <sjg@chromium.org>
| * x86: Use ipchecksum from net/Simon Glass2015-01-24-97/+4
| | | | | | | | | | | | | | The existing IP checksum function is only accessible to the 'coreboot' cpu. Drop it in favour of the new code in the network subsystem. Signed-off-by: Simon Glass <sjg@chromium.org>
| * net: Add a separate file for IP checksummingSimon Glass2015-01-23-0/+91
| | | | | | | | | | | | | | | | Move the checksum code out into its own file so it can be used elsewhere. Also use a new version which supports a length which is not a multiple of 2 and add a new function to add two checksums. Signed-off-by: Simon Glass <sjg@chromium.org>
| * x86: dts: Add compatible string for Intel ICH9 SPI controllerSimon Glass2015-01-23-0/+2
| | | | | | | | | | | | | | Add this to the enum so that we can use the various fdtdec functions. A later commit will move this driver to driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
| * pci: tegra: Fix port information parsingSjoerd Simons2015-01-23-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | commit a62e84d7b1824a202dd incorrectly changed the tegra pci code to the new fdtdec pci helpers. To get the device index of the root port, the "reg" property should be parsed from the dtb (as was previously the case). With this patch i can successfully network boot my jetson tk1 Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Tested-by: Thierry Reding <treding@nvidia.com> Acked-by: Thierry Reding <treding@nvidia.com>
| * x86: Fix various code format issues in start16.SBin Meng2015-01-23-10/+10
| | | | | | | | | | | | | | | | | | | | | | Various minor code format issues are fixed in start16.S: - U-boot -> U-Boot - 32bit -> 32-bit - Use TAB instead of SPACE to indent - Move the indention location of the GDT comment block Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| * x86: Test mtrr support flag before accessing mtrr msrBin Meng2015-01-23-2/+19
| | | | | | | | | | | | | | | | | | | | On some x86 processors (like Intel Quark) the MTRR registers are not supported. This is reflected by the CPUID (EAX 01H) result EDX[12]. Accessing the MTRR registers on such processors will cause #GP so we must test the support flag before accessing MTRR MSRs. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| * x86: Save mtrr support flag in global dataBin Meng2015-01-23-6/+14
| | | | | | | | | | | | | | | | CPUID (EAX 01H) returns MTRR support flag in EDX bit 12. Probe this flag in x86_cpu_init_f() and save it in global data. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| * x86: Add missing DECLARE_GLOBAL_DATA_PTR for mtrr.cBin Meng2015-01-23-0/+2
| | | | | | | | | | | | | | | | arch/x86/cpu/mtrr.c has access to the U-Boot global data thus DECLARE_GLOBAL_DATA_PTR is needed. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| * x86: config: Always scroll the display by 5 lines, for speedSimon Glass2015-01-23-0/+1
| | | | | | | | | | | | | | | | Scrolling a line at a time is very slow for reasons that I don't understand. It seems to take about 100ms to copy 4MB of RAM in the frame buffer. To cope with this, scroll 5 lines each time. Signed-off-by: Simon Glass <sjg@chromium.org>
| * x86: video: Add support for CONFIG_CONSOLE_SCROLL_LINESSimon Glass2015-01-23-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Some machines are very slow to scroll their displays. To cope with this, support the CONFIG_CONSOLE_SCROLL_LINES option. Setting this to 5 allows the display to operate at an acceptable speed by scrolling 5 lines at a time. This same option is available for LCDs so when these systems are unified this code can be unified also. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
| * x86: Access the VGA ROM when neededSimon Glass2015-01-23-2/+42
| | | | | | | | | | | | | | Add code to the generic pci_rom file to access the VGA ROM in PCI space when needed. Signed-off-by: Simon Glass <sjg@chromium.org>
| * x86: Fix out of bounds irq handlers accessSebastien Ronsse2015-01-23-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using coreboot-x86_defconfig, the following error occurred prior to this modification: CC arch/x86/lib/interrupts arch/x86/lib/interrupts.c: In function ‘do_irqinfo’: arch/x86/lib/interrupts.c:134:24: error: iteration 16u invokes undefined behavior [-Werror=aggressive-loop-optimizations] if (irq_handlers[irq].handler != NULL) { ^ arch/x86/lib/interrupts.c:133:2: note: containing loop for (irq = 0; irq <= CONFIG_SYS_NUM_IRQS; irq++) { ^ cc1: all warnings being treated as errors scripts/Makefile.build:275: recipe for target 'arch/x86/lib/interrupts.o' failed make[1]: *** [arch/x86/lib/interrupts.o] Error 1 Makefile:1093: recipe for target 'arch/x86/lib' failed make: *** [arch/x86/lib] Error 2 Change-Id: I3572a822081b72ab760f1eb99442e1161d3d167e Signed-off-by: Sebastien Ronsse <sronsse@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| * x86: ahci: Make sure interface is not busy after enabling the portBin Meng2015-01-23-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each time U-Boot boots on Intel Crown Bay board, the displayed hard drive information is wrong. It could be either wrong capacity or just a 'Capacity: not available' message. After enabling the debug switch, we can see the scsi inquiry command did not execute successfully. However, doing a 'scsi scan' in the U-Boot shell does not expose this issue. SCSI: Target spinup took 0 ms. SATA link 1 timeout. AHCI 0001.0100 32 slots 2 ports 3 Gbps 0x3 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst scanning bus for devices... ahci_device_data_io: 0 byte transferred. <--- scsi inquiry fails ahci_device_data_io: 512 byte transferred. ahci_device_data_io: 512 byte transferred. ahci_device_data_io: 512 byte transferred. Device 0: (0:0) Vendor: ATA Prod.: Rev: ?8 Type: Hard Disk Capacity: 912968.3 MB = 891.5 GB (1869759264 x 512) Found 1 device(s). So uninitialized contents on the stack were passed to dev_print() to display those wrong information. The symptom were observed on two hard drives (one is Seagate, the other one is Western Digital). The fix is to make sure the AHCI interface is not busy by checking the error and status information from task file register after enabling the port in ahci_port_start() before proceeding other operations like scsi_scan(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * x86: Drop the x86_fb driverSimon Glass2015-01-23-49/+1
| | | | | | | | | | | | | | | | Now that we have a full VESA driver we may as well use that. We need to support the VESA layer being set up by early start-up code or by running a VGA ROM. Signed-off-by: Simon Glass <sjg@chromium.org>
| * x86: Add a VESA video driverSimon Glass2015-01-23-0/+75
| | | | | | | | | | | | | | | | | | Add a driver intended to cope with any VESA-compatible x86 graphics adapter. It will not support ROMs which use OpenFirmware (Forth) since there is no support for that in U-Boot. This means that MAC OS cards will not work. Signed-off-by: Simon Glass <sjg@chromium.org>
| * x86: pci: Don't stop when we get a vendor/device mismatchSimon Glass2015-01-23-1/+1
| | | | | | | | | | | | | | These are quite common and we may as well press on and not be so picky. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>