x86: U-Boot unknown version documentation (2023)

This document describes information about running U-Boot on x86 targets, including supported boards, build instructions, to-do lists, etc.

condition

U-Boot supports running asMaster-BootPayload on x86. So far only Link (Chromebook Pixel) andQEMUx86 targets have been tested, but should work on other x86 cards with minimal settings since coreboot takes care of most of the low-level details.

U-Boot is a main boot manager on the Intel Edison Board.

U-Boot also supports direct booting from the x86 boot vector without coreboot. In this case, called basic mode because it runs in "bare metal", U-Boot acts as a replacement for the BIOS. The following platforms are supported:

  • Bayley Bay CRB

  • Cherry Hill-CRB

  • Congatec QEVAL 2.0 und conga-QA3/E3845

  • Cougar Canyon 2 CRB

  • CRB de Crown Bay

  • Galilean

  • Link (Pixel for Chromebook)

  • Miniboard MAX

  • Samus (Chromebook Pixel 2015)

  • QEMU x86 (32 Bit und 64 Bit)

As for loading an operating system, U-Boot supports direct booting of 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. See README.vxworks for more details.

Create instructions for U-Boot as BIOS override (simple mode)

Building a ROM version of U-Boot (hereafter referred to as u-boot.rom) is a bit tricky, as it usually requires multiple binary blobs that are not in the U-Boot source tree. Because of this, the u-boot.rom build may throw some warnings if the required binary blobs (e.g. FSP) are not present.

CPU-Mikrocode

Modern CPUs often need a special bitstream calledmicrocodeIt needs to be loaded into the processor after boot for it to work properly. U-Bootha has already integrated these into the source tree as hex dumps.

Secondary school support

On a multi-core system, U-Boot runs on the boot processor (BSP). U-Boot can activate additional application processors (APs). In order to have an SMP kernel that recognizes all available processors, U-Boot must prepare configuration tables containing information for different CPUs before loading the operating system kernel. U-Boot currently supports generation of two types of tables for SMP, called Simple Firmware Interface (SFI) and multiprocessor (parliamentarians) tables. Writing to these two tables is controlled by two kconfig options, GENERATE_SFI_TABLE and GENERATE_MP_TABLE.

Controller-Modell

x86 switched to use Serial, GPIO, SPI, SPI Flash, Keyboard, Real Time Clock, USB driver model. The video is in progress.

device tree

x86 uses the device tree to configure the card, so CONFIG_OF_CONTROL must be enabled. Not all devices on the board are configured through the device tree, but more devices will be added over time. Look for these device tree source files in the arch/x86/dts/ directory.

useful commands

In keeping with U-Boot's philosophy of providing facilities for checking and adjusting internal configuration, there are several x86-specific commands that may be useful:

fsp

Displays information about the Intel Firmware Support Package (FSP). Only available on platforms using FSP, mostly Atom.

Iodine

Show I/O memory

now

Write I/O memory

mtrr

List and configure Memory Type Range (MTRR) registers. They are used to tell the CPU whether memory can be cached and, if so, which write-caching mode to use. U-Boot sets some reasonable values, but you can tweak them with this command.

Free boot

As an example of configuring your boot flow with U-Boot, here are instructions for booting Ubuntu from U-Boot. These instructions have been tested on a Minnowboard MAX with a SATA drive, but apply equally to other platforms and other media. There are really only four steps and it's a very simple script, but a more detailed explanation is provided here for completeness.

Note: It is possible to configure U-Boot to automatically boot with syslinux. You can also use the grub.cfg file (/efi/ubuntu/grub.cfg) to get the GUID. If you solve them, please post patches in this README.

First you need to install Ubuntu on an available hard drive. It should be possible to get U-Boot to boot from a bootable USB disk, but let's assume you used a different bootloader to install Ubuntu.

Use the U-Boot command line to find the UUID of the partition you want to boot. For example, our hard drive is SCSI device 0:

=> Liste der SCSI-Teile 0Partitionszuordnung für SCSI-Gerät 0 -- Partitionstyp: EFI Anfangsteil LBA Fin LBA-Nummer Attribute Typ GUID Partitions-GUID 1 0x00000800 0x001007ff "" attrs: 0x0000000000000000 Typ: c12a7328-f81f-11d2-ba4e4b-09e4b -09e4b -09e4b-09e4b-09e4b-09e4b-09e4b -4d59-408f-a9b0-fd497bc9291c 2 0x00100800 0x037d8fff "" attrs: 0x0000000000000000 type: 0fc63daf-8483-4772-8e79-3d69d8477de4 guid: 965c59ee-1822-4326-90d2-b02446050059 3 0x037d9000 0x03ba27ff "" attrs: 0x0000000000000000 type: 0657fd6d- a4ab-43c4-84e5-0933c84b4f4f tab: 2c4282bd-1e82-4bcf-a5ff-51dedbf39f17 =>
(Video) Breaking the x86 Instruction Set

This shows that your SCSI drive has three partitions. Really long hexadecimal strings are called globally unique identifiers (GUIDs). You can search for "type".on here🇧🇷 On this disk the first partition is for EFI and in VFAT format (DOS/Windows):

=> fatls scsi 0:1 efi/0 file(s), 1 directory(s)

Partition 2 is "Linux File System Data" so it will be our root disk. It's in ext2 format:

=> ext2ls scsi 0:2<DIR> 4096 .<DIR> 4096 ..<DIR> 16384 perdido+encontrado<DIR> 4096 boot<DIR> 12288 etc<DIR> 4096 media<DIR> 4096 bin<DIR> 4096 dev <DIR> 4096 inicio<DIR> 4096 lib<DIR> 4096 lib64<DIR> 4096 mnt<DIR> 4096 opt<DIR> 4096 proc<DIR> 4096 raiz<DIR> 4096 executor<DIR> 12288 sbin<DIR> 4096 srv <DIR> 4096 sys<DIR> 4096 tmp<DIR> 4096 usr<DIR> 4096 var<SYM> 33 initrd.img<SYM> 30 vmlinuz<DIR> 4096 cdrom<SYM> 33 initrd.img.old=>

and if you look in the /boot directory you will see the kernel:

=> ext2ls scsi 0:2 /boot<DIR> 4096 .<DIR> 4096 ..<DIR> 4096 efi<DIR> 4096 grub 3381262 System.map-3.13.0-32-generic 1162712 abi-3.13.0-32 -generico 165611 config-3.13.0-32-generico 176500 memtest86+.bin 178176 memtest86+.elf 178680 memtest86+_multiboot.bin 5798112 vmlinuz-3.13.0-32-generico 165762 config-3.13.0-58-1generico 5 8 abirico 1 -generic 5823136 vmlinuz-3.13.0-58-generic 19215259 initrd.img-3.13.0-58-generic 3391763 System.map-3.13.0-58-generic 5825048 vmlinuz-3.13.0-58-generic .efi .firmado 28304443 initrd.img-3.13.0-32-generic=>

The 'vmlinuz' files contain a packed Linux kernel. The format is a kind of self-extracting compressed file mixed with some "installation" configuration data. Despite its size (it's >10MB uncompressed) it contains only a basic set of device drivers, enough to boot on most types of hardware.

The 'initrd' files contain a RAM disk. This is something that can be loaded into memory and appears as a hard drive in Linux. Ubuntu uses this to include many drivers for whatever hardware you might have. It loads before accessing the real root drive.

The numbers after the end of each file indicate the version. Here is the Linux version 3.13. You can find the source code for this in the Linux tree named v3.13. The '.0' allows additional Linux versions for debugging purposes, but this is not usually necessary. The '-58' is used by Ubuntu. Every time they release a new kernel, they increase this number. New versions of Ubuntu may include kernel patches to fix reported bugs. Stable cores can last for a few years, so this number can get quite high.

The .efi.signed kernel is signed for EFI Secure Boot. U-Boot has its own secure boot mechanism; I understandThat is&to be🇧🇷 Currently it cannot read .efi files.

To boot Ubuntu from U-Boot, do the following:

  1. Define startup arguments. Use the GUID for the partition you want to boot:

    => setenv bootargs root=/dev/disk/by-partuuid/965c59ee-1822-4326-90d2-b02446050059 ro

This is where root= tells Linux the location of your root drive. The disk is specified by its GUID, using "/dev/disk/by-partuuid/", a Linux path to a "directory" containing all GUIDs found by Linux. At startup there is a file with this name in this directory. A device name can also be used here, see below.

  1. Load the kernel. Since it's an ext2/4 filesystem, we can do the following:

    => ext2load scsi 0:2 03000000 /boot/vmlinuz-3.13.0-58-genérico

The address 30000000 is arbitrary, but there seem to be problems with using small addresses (sometimes Linux can't find the ramdisk). That's 48MB at the start of RAM (which is 0 in x86).

  1. Load the ramdisk (to 64 MB):

    => ext2load scsi 0:2 04000000 /boot/initrd.img-3.13.0-58-generic
  2. Start the kernel. We need to know the size of the ramdisk, but we can use a variable for that. U-Boot sets 'filesize' to the size of the last loaded file:

    => zboot 03000000 0 04000000 ${file size}

Type "help zboot" if you want to see what the arguments are. U-Boot on x86 is pretty verbose about booting a kernel. You should see these submarine messages:

Valid boot flag setting size = 0x00004400 Magic signature found with boot log version 2.0c Linux kernel version 3.13.0-58-generic (buildd@allspice) #97-Ubuntu SMP Wed Jul 8 02:56:15 UTC 2015 Creation of boot_params at 0x00090000 Loading of bzImage at address 100000 (5805728 bytes) Magic signature found First RAMdisk at linear address 0x04000000, size 19215259 bytes Kernel command line: "root=/dev/disk/by-partuuid/965c59ee- 1822 -4326-90d2-b02446050059 ro" starting core...

U-Boot reports some start times. This is most useful when you put the above commands in a script as it is faster:

Timer Summary in Microseconds: Mark Stage Transforms 0 0 RESET 241535 241535 Board_init_r 2421611 2180076 ID=64 2421790 179 ID=65 2428215 6425 Main_loop 48860584 46432

Now the kernel actually boots (if you want to examine the kernel boot message on the serial console, add "console=ttyS0,115200" to the kernel command line):

[ 0.000000] initializing cgroup subsys cpuset [ 0.000000] initializing cgroup subsys cpu [ 0.000000] initializing cgroup subsys cpuacct [ 0.000000] Linux Version 3.13.0-58-generic (buildd@allspice) (gcc Version 4.8.2 (Ubuntu 4.8-19ubuntu) ) #97-Ubuntu SMP Wed Jul 8 02:56:15 UTC 2015 (Ubuntu 3.13.0-58.97-generic 3.13.11-ckt22)[ 0.000000] Befehlszeile: root=/dev/disk/by-partuuid/ 965c59ee-1822 -4326-90d2-b02446050059 ro Console=ttyS0,115200

It goes on like this for a long time. Along the way, you'll see it snap your ramdisk:

[ 0.000000] RAMDISK: [mem 0x04000000-0x05253fff]...[ 0.788540] Attempt to unpack rootfs image as initramfs...[ 1.540111] Free memory initrd: 18768K (ffff880004000000 - ffff880005)...0).. .
(Video) Das BERMUDA-DREIECK - Verschollen im Atlantik | WELT HD Doku

Later he actually starts with this:

Start: Completed running /scripts/local-premount...

You should also see your startup disk:

[ 4.357243] scsi 1:0:0:0: Direct Access ATA ADATA SP310 5.2 PQ: 0 ANSI: 5 [ 4.366860] sd 1:0:0:0: [sda] 62533296 Logical blocks of 512 bytes: (32, 0 GB /29.8 GiB)[ 4.375677] sd 1:0:0:0: Generic SCSI SG0 Attached Type 0[ 4.381859] sd 1:0:0:0: [sda] Write protection is disabled[ 4.387452] sd 1:0 : 0 :0: [sda] Write Cache: On, Read Cache: On, does not support DPO or FUA[4.399535] sda: sda1 sda2 sda3

Linux found all three partitions (sda1-3). Fortunately the GUIDs are not printed. In step 1 above we could have used:

setenv bootargs root=/dev/sda2 ro

Instead of the GUID. However, if you add another unit to your board, the numbering may change, while the GUIDs may not. So if your boot partition becomes sdb2, it will still boot. For embedded systems where you only want to boot the first disk, you have this option.

The last thing you'll see in the console is the mention of plymouth (showing the Ubuntu splash screen) and lots of "startup" messages:

* Start mounting file systems on boot [OK]

After a pause you should see a login screen on your screen and that's it.

If you want to put this in a script you can use:

setenv bootargs root=UUID=b2aaf743-0418-4d90-94cc-3e6108d7d968 rosetenv boot zboot 03000000 0 04000000 \${filesize}setenv bootcmd "ext2load scsi 0:2 03000000 /boot/vmlinuz-3.13.0-58-t2generics;generics;generics; 0:2 04000000 /boot/initrd.img-3.13.0-58-generic; executar boot"saveenv

This is to tell the shell not to evaluate ${filesize} as part of the setenv command.

You can also incorporate this behavior into your build by coding the environment variables by adding this to minnowmax.h:

#undef CONFIG_BOOTCOMMAND#define CONFIG_BOOTCOMMAND \"ext2load scsi 0:2 03000000 /boot/vmlinuz-3.13.0-58-generic; " \"ext2load scsi 0:2 04000000 /boot/initrd.img-3.13.0-58-generic; " \"Execute initialization"#undef CONFIG_EXTRA_ENV_SETTINGS#define CONFIG_EXTRA_ENV_SETTINGS "boot=zboot 03000000 0 04000000 ${file size}"

and change the value of CONFIG_BOOTARGS in configs/minnowmax_defconfig to:

CONFIG_BOOTARGS="root=/dev/sda2ro"

Try SeaBIOS

SeaBIOSis an open source implementation of a 16-bit x86 BIOS. It can run on an emulator or natively on x86 hardware with U-Boot. With its help we can boot some operating systems that require 16-bit BIOS services, such as Windows/DOS.

As with U-Boot, we need to manually create a table for SeaBIOS to get system information (eg: E820). Unfortunately, the table has to follow the coreboottable format since SeaBIOS currently supports booting as a core boot payload.

To support loading SeaBIOS, U-Boot must be built with CONFIG_SEABIOS enabled. Booting from SeaBIOS is done using the U-Boot bootelf command as shown below:

=> tftp bios.bin.elf;bootelfUsing device e1000#0TFTP from server 10.10.0.100; our IP address is 10.10.0.108... Bytes transferred = 128748 (1f6ec hex)

bios.bin.elf is the SeaBIOS image built from the SeaBIOS source tree. SeaBIOS version 1.14.0 is currently being tested. To create the SeaBIOS image:

$ echo -e 'CONFIG_COREBOOT=y\nCONFIG_COREBOOT_FLASH=n\nCONFIG_DEBUG_SERIAL=y\nCONFIG_DEBUG_COREBOOT=n' > .config$ make olddefconfig$ make...Total Size: 128512 Fix: 69216 Free: 2560 (Uses 98.0% of 128KiB ) Create out/bios.bin.elf

This is currently being tested on a QEMU x86 target with U-Boot SeaBIOS daisy-chained loading to install/boot a Windows XP OS (eg Install Windows command below).

# Create a disk.img 10G as a virtual disk$ qemu-img create -f qcow2 disk.img 10G# Install a Windows XP operating system from an ISO image 'winxp.iso'$ qemu-system-i386 -serial stdio - bios u-boot.rom -hda disk.img -cdrom winxp.iso -smp 2 -m 512# Boot into a Windows XP operating system installed on the virtual disk $ qemu-system-i386 -serial stdio -bios u-boot . rom - hda disco.img -smp 2 -m 512

This is also tested on the Intel Crown Bay board with PCIe graphics card, SeaBIOS is booted, a GRUB is loaded from a USB stick and finally the Linux kernel.

If you are using the Intel Integrated Graphics Device (IGD) as the primary display device on your board, SeaBIOS must be manually patched in order for SeaBIOS to load and run your VGA ROM. SeaBIOS finds the VGA ROM through the PCI expansion ROM register, but the IGD device is not assigned its VGA ROM through this register. Your VGA ROM is packaged as part of u-boot.rom at a configurable flash address unknown to SeaBIOS. An example patch is required for SeaBIOS below:

diff --git a/src/optionroms.c b/src/optionroms.cindex 65f7fe0..c7b6f5e 100644--- a/src/optionroms.c+++ b/src/optionroms.c@@ -324,6 +324,8 @ @ init_pcirom(struct pci_device *pci, int isvga, u64 *fuentes) rom = deploy_romfile(archivo); else if (RunPCIroms > 1 || (RunPCIroms == 1 && isvga)) rom = map_pcirom(pci);+ if (pci->bdf == pci_to_bdf(0, 2, 0))+ rom = (struct rom_header *) 0xfff90000; if (! rom) // Nenhuma ROM präsentiert. Devolver;

Note: The patch above expects the IGD device to be on PCI b.d.f 0.2.0 and its VGA ROM on 0xfff90000 which corresponds to CONFIG_VGA_BIOS_ADDR in Minnowboard MAX. Change these two appropriately if your board doesn't.

(Video) 34C3 - Everything you want to know about x86 microcode, but might have been afraid to ask - traduct

development flow

These notes are for those who want to port U-Boot to a new x86 platform.

Since x86 CPUs boot from SPI Flash, an SPI Flash emulator is a good investment. Dediprog em100 can be used under Linux.

The em100 tool is available here:http://review.coreboot.org/p/em100.git

In Minnowboard Max you can use the following command line:

sudo em100 -s -p LOW -d u-boot.rom -c W25Q64DW -r

A clip suitable for connecting the SPI flash chip is here:http://www.dediprog.com/pd/programmer-accessories/EM-TC-8.

This allows you to replace SPI Flash content for development purposes. You can typically write to the em100 in about 1200ms, which is significantly faster than programming the actual flash device each time. The only major limitation of em100 is that it only supports SPI bus speeds up to 20MHz. This means that images must be configured to boot at this speed. This is an Intel specific feature, e.g. tools/ifttool has an option to set SPIspeed to the SPI descriptor region.

If your chip/board uses an Intel Firmware Support Package (FSP), it is very easy to install. For example, you can follow the implementation of Minnowboard Max. Hopefully you need to create new files similar to arch/x86/cpu/baytrail that support Bay Trail.

If you don't use an FSP, you have more freedom and more responsibility. Ivybridge support works this way, although you're still using a ROM for graphics and still have binary blobs of Intel code. You should try to support all major peripherals on your platform, including video and storage. If possible, use the device tree for configuration.

For microcode, you can use the microcode tool to create a suitable device tree file:

./tools/microcode-tool -d microcode.dat -m <modelo> criar

or if you only have header files and not the full Intel microcode.dat database:

./tools/microcode-tool -H BAY_TRAIL_FSP_KIT/Microcode/M0130673322.h \ -H BAY_TRAIL_FSP_KIT/Microcode/M0130679901.h -m todos crean

They are written to arch/x86/dts/microcode/ by default.

Note that it's possible to just add the microcode for your CPU if you know your model. U-Boot prints this information at startup:

CPU: x86_64, manufacturer Intel, device 30673h

so here we can use the M0130673322 file.

If your platform can display POST codes on two small 7-segment displays on the board, you can use C or assembler post_code() calls to monitor boot progress. This can be good for debugging.

If not, you can try to get the series working as soon as possible. The initial Debug Serial Port can be useful here. See setup_internal_uart() for an example.

During the U-Boot transfer, one of the important steps is to write the correct PIRQ routing information to the onboard device tree. Without them, device drivers in the Linux kernel will not work properly because the interrupt will not work. See submarinedocumentfor the Intel Break Router Device Tree Links. Here we have more details on Intel's proprietary Pirq routing below.

Intel, wall guide = <PCI_BDF (0, 2, 0) INTA WALL ...>;

As you can see, each entry has 3 cells. For the first one we need to describe all the board mounted devices. For SoC devices, there is usually a chapter on the chipset datasheet that lists all available PCI devices. For example, in Bay Trail, this is Chapter 4.3 (PCI configuration space). For the second, we can get the interrupt pin from the datasheet or from the hardware via the U-Boot shell. The reliable source is the hardware, as sometimes the chipset data sheet is not 100% up to date. Type 'pci header' plus the subboot shell pci bus/device/pci device function number below:

=> PCI Header 0.1e.1 Vendor ID=0x8086 Device ID=0x0f08... Interrupt Line=0x09 Interrupt Pin=0x04...

This shows that this PCI device is using the INTD pin as it reports 4 in the interrupt pin register. Repeat this until you get breakout pins for all devices. The last cell is the PIRQ line, which is associated with a specific interrupt pin. On the Intel chipset, the default boot mapping is INTA/B/C/D to PIRQA/B/C/D mapping. This can be changed via registers in the LPC bridge. So far, Intel FSP doesn't touch these registers, so we can annotate the PIRQ according to the standard mapping rule.

Once we get the PIRQ routing information from the device tree, U-Boot will automatically do the interrupt allocation and mapping. Now you can enable CONFIG_GENERATE_PIRQ_TABLE to test Linux kernel with i8259 PIC and CONFIG_GENERATE_MP_TABLE to test Linux kernel with local APIC and I/O APIC.

This script may be helpful. Feeding the U-Boot output 'pci long' generates a snippet of the device tree with the interrupt settings for each device (note that you need gawk 4.0.0):

$ cat console_output |awk '/PCI/ {device=$4} /interrupt line/ {line=$4} \ /interrupt pin/ {pin = $4; if (pin != "0x00" && pin != "0xff") \ {patsplit(device, bdf, "[0-9a-f]+"); \ printf "PCI_BDF(%d, %d, %d) INT%c PIRQ%c\n", strtonum("0x" bdf[1]), \stritonum("0x" bdf[2]), bdf[3 ], strtonum(pin) + 64, 64 + strtonum(pin)}}'

Example output:

PCI_BDF(0, 2, 0) INTA WALLCI_BDF(0, 3, 0) INTA WALL.

Portability Tips

Quark-specific considerations

In order to port U-Boot to other Intel Quark SoC based boards, there are a few things to consider. The first important part is the memory reference code (MRC) parameters. Quark MRC only supports a small memory configuration. All of these MRC parameters are provided via the card's device tree. First, copy the MRC section from arch/x86/dts/galileo.dts to your card's device tree and change these values ​​using your card's or hardware vendor's manuals. Available MRC parameter values ​​are listed in include/dt-bindings/mrc/quark.h. The other tricky part is with PCIe. The Quark SoC integrates two PCIe root ports, which, however, are reset after boot by default. U-Boot correctly handles booting from PCIe according to Quark's firmware writing guide. In your board's support code, you should provide two routines that help with PCIe initialization, namely board_assert_perst() and board_deassert_perst(). Both routines must implement board-specific code. Mechanism to enable/disable the PCIe PERST# pin. Care must be taken with these routines that any API that could trigger the PCI enumeration process is strictly forbidden, as any access to the PCIe root port configuration registers will cause the system to hang on reboot. See board/intel/galileo/galileo.c for more details on how the IntelGalileo board support codes implement them.

(Video) Hard Drive Full for No Reason Windows 10

Master-Boot

See scripts/coreboot.sed which can help porting coreboot code to U-Boot drivers. It won't fix all compilation errors, but it will do general transformations. Remember to add mapping to Coreboot for new files added to U-Boot. This should be at the beginning of each file and list the name of the coreboot file the code came from.

Debugging ACPI problems with Windows

Windows can cache system information and only detect ACPI changes when you change ACPI table versions. So feel free to change them when debugging ACPI issues with Windows.

ACPI support status

Advanced configuration and power interface (ACPI) aims to establish industry-standard interfaces that enable OS-driven configuration, power management, and thermal management of mobile, desktop, and server platforms.

Linux can boot without ACPI with the "acpi=off" command line parameter, but with ACPI the kernel gets the resources to handle power management. For Windows, ACPI has been a required firmware feature since Windows Vista. CONFIG_GENERATE_ACPI_TABLE is the configuration option to enable ACPI support in U-Boot. This requires the Intel ACPI compiler to be installed on your host to compile the ACPI DSDT table written in ASL format into AML format. You can get the compiler via "apt-get install iasl" if you're using Ubuntu, or download the source fromhttps://www.acpica.org/descargasput one together yourself.

Current ACPI support in U-Boot is basically complete. More optional features may be added in the future. The situation today is:

  • Supports generation of RSDT, XSDT, FACS, FADT, MADT and MCFG tables.

  • It only supports a static DSDT table compiled by the Intel ACPI compiler.

  • Supports S0/S3/S4/S5, reboots and shuts down the operating system.

  • Supports booting a preinstalled Ubuntu distribution via the zboot command.

  • Supports installing and booting Ubuntu 14.04 (or later) from U-Boot using SeaBIOS using a legacy interface (non-UEFI mode).

  • Supports installing and booting Windows 8.1/10 from U-Boot using SeaBIOS using a legacy interface (non-UEFI mode).

  • Supports ACPI interrupts with SCI only.

Optional features:

  • Dynamic insertion of AML bytecodes at runtime. We may need this to support SSDT table generation and DSDT repair.

  • IMS support. Since U-Boot is a modern bootloader, we don't want to carry this old stuff over to U-Boot. The ACPI specification allows for a system that is not SMI compliant (a non-legacy system).

ACPI was originally enabled on BayTrail-based maps. The test was conducted by booting a preinstalled Ubuntu 14.04 from a SATA drive. Installing Ubuntu 14.04 and Windows 8.1/10 on and booting from a SATA drive is also tested. Most devices appear to be working fine and the card is able to respond to an OS reboot/shutdown command.

For other platform cards, the ACPI compliance status can be checked by checking the card's configuration files to see if CONFIG_GENERATE_ACPI_TABLE is set to y.

S3 sleep is a low-latency sleep state defined by the ACPI specification in which all system context is lost except for system memory. To test resuming from S3 with a Linux kernel, simply run "echo mem > /sys/power/state" and the kernel will put the card into the S3 state where the power is off. Then, when the power button is pressed again, U-Boot runs like cold boot and detects the sleep state via the ACPI register to see if it is S3. If so, that means we're operational. U-Boot is responsible for restoring the computer to the state it was in before it fell asleep. When everything is done, U-Boot discovers the activation vector provided by operating systems and jumps to it. To determine if ACPI S3 Digest is supported, check if CONFIG_HAVE_ACPI_RESUME is defined for that particular card.

Note that to test the S3 continuation with Windows, you must have the correct graphics driver installed for your platform; Otherwise, you won't find the "Sleep" option in the "Power" submenu of the Windows Start menu.

EFI support

U-Boot supports booting as a 32-bit or 64-bit EFI payload, e.g. with UFI. This is enabled with CONFIG_EFI_STUB to boot from both 32-bit and 64-bit UEFI BIOS. U-Boot can also be run as an EFI application using CONFIG_EFI_APP. The CONFIG_EFI_LOADER option, in which U-Boot provides an EFI environment for the kernel (i.e. completely replaces UEFI but provides the same EFI runtime services), is also supported. For example, we can even use the "bootefi" command to load a "u-boot-payload.efi", see test logs below on QEMU.

=> ide 0 3000000 load u-boot-payload.efi489787 bytes read in 138 ms (3.4 MiB/s) => bootefi 3000000Disk scan ide.blk#0...2 disks found WARNING: Boot without device tree# # EFI -Start application at 03000000...U-Boot EFI PayloadU-Boot 2018.07-rc2 (June 23, 2018 - 17:12:58 +0800)CPU: x86_64, Manufacturer AMD, 663hDRAM Device: 2 GiBMMC:Video: 1024x768x32Model: EFI x86 PayloadNet: e1000 : 52:54:00:12:34:56Warning: e1000#0 is using MAC address of ROMeth0: e1000#0No driver found Press any key to stop autostart: 0

verSubmarine and EFIjUEFI and U-Bootfor more information on EFI compatibility on submarines.

charging current

U-Boot can be chain-loaded from another bootloader such as Coreboot or Slim Bootloader. This is usually done by creating targets "coreboot" or "slimbootloader".

For example, we currently have a "main launch" target, but it executes very different code than the main targets like coral. There is very little in common between them.

It's handy to be able to boot the same U-Boot on a device, with or without a first-stage boot loader. For example, with chromebook_coral it is useful to test the ability to boot the same sub (complete with FSP) in both bare metal and coreboot. It allows you to check things like CPU speed, compare registers, ACPI tables and the like.

To do this, you can skip the boot process performed in the previous step with ll_boot_init() at the appropriate points. This works by setting a GD_FLG_NO_LL_INIT flag when U-Boot detects that it is running from a different bootloader.

With this function you can create a complete target and boot it from coreboot, for example.

Please note that this is a development feature only. It is not designed for use in production environments. Also, it is not currently part of the automated test, so it may fail in the future.

SMBIOS tables

To generate SMBIOS tables in U-Boot for use by the operating system, enable the CONFIG_GENERATE_SMBIOS_TABLE option. The easiest way to provide the values ​​to use is through the device tree. See for detailssmbios.txt.

Homework

  • Audio-

  • Chrome OS verified launch

    (Video) HACKERLOI.pdf

FAQs

How do I remove an environment variable in Uboot? ›

If you are looking to delete a single existing u-boot env variable, from the u-boot command prompt, execute "setenv <var name>". This should remove the variable name from the list of env variables.

What is the use of MD command in Uboot? ›

The md command is used to dump the contents of memory. It uses a standard format that includes the address, hex data and ASCII display. It supports various data sizes and uses the endianness of the target. The specified data_size and length become the defaults for future memory commands commands.

How are the command line arguments passed to Linux kernel by the U-boot bootloader? ›

The short answer to that question is U-Boot, but the more precise answer is that the U-Boot boot loader passes the kernel command-line transparently to the Linux kernel using a feature known as atags from a U-Boot variable named bootargs.

How do I reset my u-boot environment? ›

How can I reset my u-boot environment to the manufacturing one? You can use the u-boot command "env default -a -f" to reset back to the default environment. Follow this by "saveenv" if you want the changes to be persistent. Another method is to erase the area where the environment is stored.

How do I factory reset my u-boot? ›

Let the system power down, and then reinsert the cables, while having the serial terminal running. When the BMC reboots, enter U-Boot by pressing any key. You should now see the #ast prompt. Issue the command setenv openbmconce factory-reset , then save , save , reset .

Is U-Boot a bootloader? ›

U-Boot is both a first-stage and second-stage bootloader. It is loaded by the system's ROM (e.g. onchip ROM of the ARM CPU) from a supported boot device, such as an SD card, SATA drive, NOR flash (e.g. using SPI or I²C), or NAND flash.

Is U-Boot a firmware? ›

U-Boot bootloader allows you to update the firmware of your device over Ethernet. U-Boot uses the TFTP protocol to get the firmware images from a TFTP server running on your computer and programs them onto the eMMC of the device.

What does dd command do? ›

Overview. In the venerable Unix command dd, the disk/data duplicator (or, sometimes, disk destroyer) allows us to copy raw data from one source to another. It's not used to copy individual files like cp. Instead, it lets us read from and write to block devices — for example, physical hard drives.

How do I boot into OS from GRUB command line? ›

Booting From grub>

The first line sets the partition that the root filesystem is on. The second line tells GRUB the location of the kernel you want to use. Start typing /boot/vmli , and then use tab-completion to fill in the rest. Type root=/dev/sdX to set the location of the root filesystem.

How do I pass kernel parameters in grub? ›

There are three ways to pass options to the kernel and thus control its behaviour:
  1. When building the kernel—in the kernel's config file. ...
  2. When starting the kernel—using command line parameters (usually through a boot loader).
  3. At runtime—through the files in /proc/sys/ (see sysctl) and /sys/ .
Feb 5, 2023

How do I change Linux command line from GUI mode to boot? ›

How to switch boot target to GUI (graphical UI)
  1. Open the Linux terminal application.
  2. Again, for remote Linux servers, use the ssh command.
  3. Find which target unit is used by default: systemctl get-default.
  4. To change boot target to the GUI mode: ...
  5. Make sure you reboot the Linux box using the reboot command:
Oct 21, 2022

How do I configure U-boot? ›

To summarize, you need to configure U-Boot for your <VENDOR> <BOARD> with the following steps:
  1. Add your board device tree: arch/arm/dts/<board>. ...
  2. Create your own board support directory: board/<vendor>/<board>.
  3. Add TARGET_<VENDOR> _<BOARD> in Kconfig.
  4. Create your board defconfig: defconfig/<board>_defconfig.

Where is U-boot environment stored? ›

The U-Boot environment is stored in the SD Card memory and is persistent across power or reset cycles. Parameters defined by the U-boot environment variables include: target IP address, target MAC address, location in RAM where a Linux bootable image will be loaded, and many others.

How do I force reset my computer from BIOS? ›

To perform system recovery from the BIOS:
  1. Power on or restart the workstation.
  2. Enter the BIOS by tapping either the right or left bottom of the screen.
  3. Tap Advanced, and then tap Special Configuration.
  4. Tap Factory Recovery.
  5. Select Enabled from drop-down menu.
  6. Tap Home.
  7. Tap Save and Exit.

What key is used to reset BIOS? ›

Reset internally from your device's BIOS or UEFI menu

Pre-Windows 10 builds should look for instructions during bootup, with F2 providing access on most machines. Windows 10 users have several options, though the first is the easiest: Hold down the shift key while you restart your computer.

Does factory reset fix Bootloop? ›

Boot Loop Causes

Most issues can be resolved with a factory reset, but be aware that tinkering with your phone's system files always comes with the risk of rendering the device unusable.

Can my bootloader be unlocked? ›

Some bootloaders are not locked at all, some can be unlocked using a standard fastboot command, others need an unlock code from the manufacturer. There are also phones that do not include an unlocking method at all and can only be unlocked through a software exploit.

Is it unsafe to unlock bootloader? ›

Unlocking the bootloader usually voids any warranties and may make the device susceptible to data theft. On Chromebooks, enabling developer mode makes the system less secure than a standard laptop running Linux.

Is unlocked bootloader same as root? ›

Bootloader unlocking is sometimes a first step used to root the device; however, it is not the same as rooting the device. Most devices come with a locked bootloader, which prevents users from installing a new bootloader.

What is the difference between U-Boot and UEFI? ›

The biggest difference is that UEFI is essentially an operating system, while U-Boot is just a bootloader. U-Boot does just enough to make the system bootable and provides a bit extra to simplify debugging of the boot problems.

Does U-Boot Need device tree? ›

U-boot uses own Device Tree version, it describes only modules, that are needed for boot.

Is firmware stored in RAM? ›

Firmware is program code that lives in hardware's non-volatile memory, which refers to a device's static random access memory (RAM). When you turn off your device, the content is saved into the non-volatile memory.

How to make bootable USB with dd command? ›

You need to use the dd command to create a bootable USB stick to install Ubuntu Linux on your Laptop or Desktop.
...
  1. Step 1 – Download Ubuntu . iso image. ...
  2. Step 2 – Find your usb device name on Linux. ...
  3. Step 3 – Verify Ubuntu . ...
  4. Step 4 – Create a bootable USB stick on Linux. ...
  5. Step 5: Install Ubuntu using newly created USB drive.
Feb 8, 2023

Does dd wipe disk? ›

You can even wipe unallocated disk space with a dd command by calculating the difference between the end of one and start of the next partition.

What is Dev Zero used for? ›

/dev/zero is a special file in Unix-like operating systems that provides as many null characters (ASCII NUL, 0x00) as are read from it. One of the typical uses is to provide a character stream for initializing data storage.

How to restore GRUB bootloader? ›

Resolution
  1. Place your SLES/SLED 10 CD 1 or DVD in the drive and boot up to the CD or DVD. ...
  2. Enter the command "fdisk -l". ...
  3. Enter the command "mount /dev/sda2 /mnt". ...
  4. Enter the command "grub-install --root-directory=/mnt /dev/sda". ...
  5. Once this command completes successfully reboot your system by entering the command "reboot".
Mar 16, 2021

How do I boot into recovery mode with GRUB? ›

Using recovery mode
  1. 1 Boot into GRUB. Turn on the laptop and tap the esc key repeatedly. ...
  2. 2 Too many ESC's. If you see the below prompt, you have gone too far. ...
  3. 3 Select Recovery Mode. Use the arrow keys to select Advanced options for Ubuntu. ...
  4. 4 Boot into Recovery Mode.

How do I force boot into GRUB? ›

Note: UEFI fast boot may be too fast to give time to press any key. With BIOS, quickly press and hold the Shift key, which will bring up the GNU GRUB menu. (If you see the Ubuntu logo, you've missed the point where you can enter the GRUB menu.) With UEFI press (perhaps several times) the Escape key to get grub menu.

How do I enable GRUB in BIOS? ›

Installing GRUB2 on a BIOS system
  1. List block devices available on the system. $ lsblk.
  2. Identify the primary hard disk. Usually, it is the sda device.
  3. Install GRUB2 in the MBR of the primary hard disk. ...
  4. Create a configuration file for GRUB2. ...
  5. Reboot your computer to boot with the newly installed bootloader.

How do I add kernel boot parameters? ›

Permanently Add a Kernel Boot Parameter

In the editor window, use the arrow keys to move the cursor to the line beginning with "GRUB_CMDLINE_LINUX_DEFAULT" then edit that line, adding your parameter(s) to the text inside the double-quotes after the words "quiet splash".

How do I manually modify the boot parameter in GRUB before system boot? ›

Reboot your system and hold the Shift key as its first booting up, and you will be brough into the GRUB boot menu. Highlight the kernel you want to edit (probably the first selection in the menu) and press e on your keyboard to temporarily edit the boot parameters.

How do I change boot options in Linux? ›

Using GRUB
  1. Press e when GRUB appears. A new screen appears with more options.
  2. Modify the boot options as needed. To add a boot option, navigate with the arrows of the keyboard to the end of the line that starts with linux. Type the boot option that you want to add. ...
  3. Press Ctrl+X, F10, or Fn+F10 to start Tails.

How do I change BIOS settings in Linux? ›

Article Content
  1. Power off the system.
  2. Power the system on and quickly press the "F2" button until you see the BIOS setting menu.
  3. Under the General Section > Boot Sequence, make sure that the dot is selected for UEFI.
  4. Under the System Configuration Section > SATA Operation, make sure that the dot is selected for AHCI.
Dec 20, 2022

What is GUI mode? ›

In addition to the standard interface seen in terminals and terminal emulators, ISPF can be run from a workstation using the display functions of your workstation operating system. In the ISPF library this is called running in GUI mode.

How do you delete an environment variable? ›

Delete Environment Variables

You need to just use the unset command with the variable name to delete it. This command will remove the variable permanently.

Which command can be used to remove an environment variable? ›

The dsadmin command can be used for deleting an environment variable in a particular project.

How do you clear an environment variable in bash? ›

The export keyword will create the environment variable, while the unset keyword will delete the environment variable.

How do I remove system variables? ›

Procedure
  1. On Windows desktop, click Start > Control Panel > System. ...
  2. Click the Advanced tab, and click Environment Variables.
  3. Under System Variables, select the NETDCProfilerAttachFilterEnable variable, and click Delete.
  4. Click OK.
  5. Click OK to exit the System Properties window.

How do I restore my PATH environment variable? ›

Show activity on this post.
  1. From the start menu, open Run (or press ⊞ Win + R ).
  2. Type regedit. Find HKEY_LOCAL_MACHINE folder. Go to the SYSTEM folder. Go to the ControlSet002 folder. Go to Control folder. Go to Session Manager. Go to Environment folder. Then, inside Environment folder, double click Path.

How do I completely remove a virtual environment? ›

To remove/delete virtualenv there is no command for deleting your virtual environment. Simply deactivate it and it will be removed. Note one thing that this process will be the same for every virtual environment regardless of what kind of virtual environment you are using.

How do I clean environment variables in Windows? ›

Windows 10/11
  • Type "env" in the Taskbar Search, and select Edit the system environment variables.
  • Click the Environment Variables... button.
  • Select the environment variable you want to delete and click Delete.
  • Repeat step 4 as many times as necessary.
  • Click OK.
Jul 7, 2016

What happens if you delete your PATH variable? ›

The implications are that Windows will probably be unable to find some programs. One solution would be to do a restore to factory settings. You might try finding another similarly configured system and writing down what's in their PATH variable, then going back to edit it back into your PC. I hope this helps.

Which command displays all environment variables? ›

To list all the environment variables, use the command " env " (or " printenv "). You could also use " set " to list all the variables, including all local variables.

Which command is used to remove database completely? ›

The DROP DATABASE command is used to delete an existing SQL database.

How do you clear all global variables? ›

To clear all global variables, use clear global or clearvars –global . To clear a particular class, use clear myClass . To clear a particular function or script, use clear functionName . To clear all MEX functions, use clear mex .

What is env command in Bash? ›

The env command allows you to display your current environment or run a specified command in a changed environment. If no flags or parameters are specified, the env command displays your current environment, showing one Name=Value pair per line.

How do you clear a variable in memory? ›

Method 1: Delete Variable using del or None from Memory. Method 2: Delete List or Dictionary using del or None from Memory. Method 3: Delete a Function using del or None from Memory. Method 4: Delete User Defined Objects with dir() and globals()

How can I see all System variables? ›

Select Start > All Programs > Accessories > Command Prompt. In the command window that opens, enter set. A list of all the environment variables that are set is displayed in the command window.

What is the purpose of System variables? ›

System variables are used to display system information. They may be referenced at any point within a Natural program.

How do I find System variables? ›

On the Windows taskbar, right-click the Windows icon and select System. In the Settings window, under Related Settings, click Advanced system settings. On the Advanced tab, click Environment Variables.

Videos

1. Rudolf Marek: AMD x86 SMU firmware analysis
(media.ccc.de)
2. Syslinux and the dynamic x86 boot process
(All Hacking Cons)
3. 34C3 - Everything you want to know about x86 microcode, but might have been afraid to ask - deutsch
(media.ccc.de)
4. How To Fix Windows Installer Package Problem (.msi issue) - Solution 2
(Kingsley's Tech Channel)
5. How to Fix Windows Installer Package Problem [Tutorial]
(MDTechVideos)
6. How to Delete Undeletable Files & Folders in Windows 10 or 8 or 7 (No Software)
(sakitech)
Top Articles
Latest Posts
Article information

Author: Lidia Grady

Last Updated: 06/23/2023

Views: 5888

Rating: 4.4 / 5 (45 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Lidia Grady

Birthday: 1992-01-22

Address: Suite 493 356 Dale Fall, New Wanda, RI 52485

Phone: +29914464387516

Job: Customer Engineer

Hobby: Cryptography, Writing, Dowsing, Stand-up comedy, Calligraphy, Web surfing, Ghost hunting

Introduction: My name is Lidia Grady, I am a thankful, fine, glamorous, lucky, lively, pleasant, shiny person who loves writing and wants to share my knowledge and understanding with you.