Moved folders around for new workflow

Signed-off-by: Robert Wolff <robert.wolff@linaro.org>
This commit is contained in:
Robert Wolff 2017-01-25 08:28:15 -08:00
parent 77d8cfa8c9
commit 8a7f6c2cb5
63 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,216 @@
## Installing CentOS 7 - Reference Platform Enterprise
This guide is not to be a replacement of the official CentOS Installer documentation, but instead be a quick walkthrough for the network installer. You can find the original documentation at [https://wiki.centos.org/SpecialInterestGroup/AltArch/AArch64](https://wiki.centos.org/SpecialInterestGroup/AltArch/AArch64)
### Setting up the TFTP server
Back to your dnsmasq server (check [this link](DHCP-TFTP-Server-UEFI.md) for instructions on how to setup your own TFTP/DCHP server), download the required CentOS 7 installer files at your tftp-root directory. In this example, this directory is configured to `/srv/tftp`.
Downloading required Grub 2 UEFI files:
```shell
sudo su -
cd /srv/tftp/
wget http://mirror.centos.org/altarch/7/os/aarch64/EFI/BOOT/BOOTAA64.EFI
wget http://mirror.centos.org/altarch/7/os/aarch64/EFI/BOOT/grubaa64.efi
```
#### Downloading the CentOS 7 Reference Platform installer (e.g. 16.06 release):
```shell
mkdir /srv/tftp/centos7
cd /srv/tftp/centos7
wget https://builds.96boards.org/releases/reference-platform/components/centos-installer/16.06/images/pxeboot/vmlinuz
wget https://builds.96boards.org/releases/reference-platform/components/centos-installer/16.06/images/pxeboot/initrd.img
```
Creating the Grub 2 config file (`grub.cfg`):
```shell
menuentry 'Install CentOS 7 ARM 64-bit - Reference Platform' --class red --class gnu-linux --class gnu --class os {
linux (tftp)/centos7/vmlinuz ip=dhcp inst.stage2=https://builds.96boards.org/releases/reference-platform/components/centos-installer/16.06/ inst.repo=http://mirror.centos.org/altarch/7/os/aarch64/ inst.ks=file:/ks.cfg
initrd (tftp)/centos7/initrd.img
}
```
**Note:** `inst.ks` is required because of the additional linaro-overlay repository (which contains the reference platform kernel rpm package), which is available inside the `initrd.img`. The `inst.ks` contains only one line, which is used by the installer to fetch and install the right kernel package. The content: `repo --name="linaro-overlay" --baseurl=http://repo.linaro.org/rpm/linaro-overlay/centos-7/repo/`.
Also check the [RHEL 7](https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/chap-anaconda-boot-options.html) and the [anaconda documentation](https://rhinstaller.github.io/anaconda/boot-options.html) for additional boot options. One example is using **ip=eth1:dhcp** if you want to use the second network interface as default.
You should now have the following file tree structure:
```shell
/srv/tftp/
├── BOOTAA64.EFI
├── centos7
│   ├── initrd.img
│   └── vmlinuz
├── grubaa64.efi
└── grub.cfg
```
Now just make sure that @/etc/dnsmasq.conf@ is pointing out to the right boot file, like:
```shell
dhcp-boot=BOOTAA64.EFI
```
### Booting the installer
Now boot your platform of choice, selecting PXE boot when presented by UEFI (make sure to boot with the right network interface, in case more than one is available).
You should see the following (using AMD Seattle's Overdrive as example):
```shell
NOTICE: BL3-1:
NOTICE: BL3-1: Built : 15:14:55, Feb 9 2016
INFO: BL3-1: Initializing runtime services
INFO: BL3-1: Preparing for EL3 exit to normal world
INFO: BL3-1: Next image address = 0x8000e80000
INFO: BL3-1: Next image spsr = 0x3c9
Boot firmware (version built at 15:18:14 on Feb 9 2016)
Version 2.17.1249. Copyright (C) 2016 American Megatrends, Inc.
BIOS Date: 02/09/2016 15:15:23 Ver: ROD1001A00
Press <DEL> or <ESC> to enter setup.
.
>>Checking Media Presence......
>>Media Present......
>>Start PXE over IPv4.
Station IP address is 192.168.3.57
Server IP address is 192.168.3.1
NBP filename is BOOTAA64.EFI
NBP filesize is 885736 Bytes
>>Checking Media Presence......
>>Media Present......
Downloading NBP file...
Succeed to download NBP file.
Fetching Netboot Image
```
At this stage you should be able to see the Grub 2 menu, like:
```shell
Install CentOS 7 ARM 64-bit - Reference Platform
.
Use the and keys to change the selection.
Press 'e' to edit the selected item, or 'c' for a command prompt.
```
Now just hit enter and wait for the kernel and initrd to load, which automatically loads the installer and provides you the installer console menu, so you can finally install CentOS 7.
You should see the following:
```shell
EFI stub: Booting Linux Kernel...
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services and installing virtual address map...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.4.0-reference.104.aarch64 (buildslave@r2-a19) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Tue Mar 1 20:52:15 UTC 2016
[ 0.000000] Boot CPU: AArch64 Processor [411fd072]
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] EFI v2.40 by American Megatrends
[ 0.000000] efi: ACPI 2.0=0x83ff1c3000 SMBIOS 3.0=0x83ff347798
...
Welcome to CentOS Linux 7 (AltArch) dracut-033-359.el7 (Initramfs)!
...
dracut-initqueue[610]: RTNETLINK answers: File exists
dracut-initqueue[610]: % Total % Received % Xferd Average Speed Time Time Time Current
dracut-initqueue[610]: Dload Upload Total Spent Left Speed
100 287 100 287 0 0 390 0 --:--:-- --:--:-- --:--:-- 389:--:-- --:--:-- 0
...
Welcome to CentOS Linux 7 (AltArch)!
...
Starting installer, one moment...
anaconda 21.48.22.56-1 for CentOS Linux AltArch 7 started.
* installation log files are stored in /tmp during the installation
* shell is available on TTY2
* if the graphical installation interface fails to start, try again with the
inst.text bootoption to start text installation
* when reporting a bug add logs from /tmp as separate text/plain attachments
21:06:29 X startup failed, falling back to text mode
================================================================================
================================================================================
VNC
.
X was unable to start on your machine. Would you like to start VNC to connect t
o this computer from another computer and perform a graphical installation or co
ntinue with a text mode installation?
.
1) Start VNC
.
2) Use text mode
.
Please make your choice from above ['q' to quit | 'c' to continue |
'r' to refresh]: 2
[anaconda] 1:main* 2:shell 3:log 4:storage-log 5:program-log
```
For the text mode installer, just enter `2` and follow the instructions available in the console.
Menu items without that are not `[x]` must be set. Enter the menu number associated with the menu in order to configure it.
### Finishing the installation
After selecting the install destination, partitioning scheme, root password and users (optional), just enter `b` to proceed with the installation.
Once the installation is completed, you should be able to simply reboot the system in order to boot into your new CentOS 7 system.
### Automating the installation with kickstart
It is possible to fully automate the installer by providing a file called kickstart. The kickstart file is a plain text file, containing keywords that serve as directions for the installation. Check the RHEL 7 [kickstart guide](https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-howto.html) for further information about how to create your own kickstart file.
Kickstart example:
```shell
cmdline
url --url="http://mirror.centos.org/altarch/7/os/aarch64/"
repo --name="CentOS" --baseurl=http://mirror.centos.org/altarch/7/os/aarch64/
repo --name="Updates" --baseurl=http://mirror.centos.org/altarch/7/updates/aarch64/
repo --name="linaro-overlay" --baseurl=http://repo.linaro.org/rpm/linaro-overlay/centos-7/repo/
lang en_US.UTF-8
keyboard us
timezone --utc Etc/UTC
auth --useshadow --passalgo=sha512
rootpw --lock --iscrypted locked
firewall --disabled
firstboot --disabled
selinux --disabled
reboot
network --bootproto=dhcp --device=eth0 --activate --onboot=on
ignoredisk --only-use=sda
bootloader --location=mbr
clearpart --drives=sda --all --initlabel
part /boot/efi --fstype=efi --grow --maxsize=200 --size=20
part /boot --fstype=ext4 --size=512
part / --fstype=ext4 --size=10240 --grow
part swap --size=4000
%packages
wget
net-tools
chrony
%end
%post
useradd -m -U -G wheel linaro
echo linaro | passwd linaro --stdin
%end
```
#### Setting up grub.cfg
Now back to your tftp server, change the original grub.cfg file adding the location of your kickstart file:
```shell
menuentry 'Install CentOS 7 ARM 64-bit - Reference Platform' --class red --class gnu-linux --class gnu --class os {
linux (tftp)/centos7/vmlinuz ip=dhcp inst.stage2=https://builds.96boards.org/releases/reference-platform/components/centos-installer/16.06/ inst.ks=http://people.linaro.org/~ricardo.salveti/centos-ks.cfg
initrd (tftp)/centos7/initrd.img
}
```
In case your system contains more than one network interface, also make sure to add the one to be used via the `ip` argument, like `ip=eth0:dhcp`.
#### Booting the system
Now just do a normal PXE boot, and anaconda should automatically load and use the kickstart file provided by grub.cfg. In case there is still a dialog that stops your installation that means not all the installer options are provided by your kickstart file. Get back to official documentation and try to find out what is the missing step.

View file

@ -0,0 +1,342 @@
## Installing Debian "Jessie" 8.5
This guide is not to be a replacement of the official Debian Installer documentation, but instead be a quick walkthrough for the network installer. You can find the original documentation at [https://www.debian.org/releases/jessie/arm64/index.html.en](https://www.debian.org/releases/jessie/arm64/index.html.en)
### Debian Installer
The released debian-installer from Debian Jessie contains a kernel based on 3.16, which doesn't yet provide support for development boards used by the reference software project. For a complete enterprise experience (including support for tip-based kernel with ACPI support and additional platforms), we also build and publish a custom debian installer that incorporates a more recent kernel.
Our custom installer changes nothing more than the kernel, and you can also find the instructions to build it from source at the end of this document.
## Loading debian-installer from the network
### Setting up the TFTP server
Back to your dnsmasq server (check [this link](../DHCP-TFTP-Server-UEFI.md) for instructions on how to setup your own TFTP/DCHP server), download the required Debian installer files at your tftp-root directory. In this example, this directory is configured to `/srv/tftp`.
Since the kernel, initrd and GRUB 2 is part of the debian-installer tarball (`netboot.tar.gz`), that is the only file you will need to download and use.
#### Downloading debian-installer:
```shell
sudo su -
cd /srv/tftp/
wget https://builds.96boards.org/releases/reference-platform/components/debian-installer/16.06/netboot.tar.gz
tar -zxvf netboot.tar.gz
```
You should now have the following file tree structure:
```shell
/srv/tftp/
├── debian-installer
│   └── arm64
│   ├── bootnetaa64.efi
│   ├── grub
│   │   ├── arm64-efi
│   │   │   ├── acpi.mod
│   │   │   ├── adler32.mod
│   │   │   ├── all_video.mod
│   │   │   ├── archelp.mod
│   │   │   ├── bfs.mod
│   │   │   ├── bitmap.mod
│   │   │   ├── bitmap_scale.mod
│   │   │   ├── blocklist.mod
│   │   │   ├── boot.mod
│   │   │   ├── btrfs.mod
│   │   │   ├── bufio.mod
...
│   │   │   ├── xzio.mod
│   │   │   └── zfscrypt.mod
│   │   ├── font.pf2
│   │   └── grub.cfg
│   ├── initrd.gz
│   └── linux
├── netboot.tar.gz
└── version.info
```
Now just make sure that `/etc/dnsmasq.conf` is pointing out to the right boot file, like:
```shell
dhcp-boot=debian-installer/arm64/bootnetaa64.efi
```
## Loading debian-installer from the minimal CD
Together with the debian-installer netboot files, a minimal ISO is also provided containing the same installer, which can be loaded as normal boot disk media.
Making a bootable SATA disk / USB stick / microSD card (attention to **/dev/sdX**, make sure that it is your target device first):
```
wget https://builds.96boards.org/releases/reference-platform/components/debian-installer/16.06/mini.iso
sudo cp mini.iso /dev/sdX
sync
```
Please refer to the [debian-manual](https://www.debian.org/releases/jessie/amd64/ch04s03.html.en) for a more complete guide on creating a CD, SATA disk, USB stick or micro SD with the minimal ISO.
## Booting the installer
If you are booting the installer from the network, simply select PXE boot when presented by UEFI (make sure to boot with the right network interface, in case more than one is available). In case you are booting with the minimal ISO via SATA / USB / microSD, simply select the right boot option in UEFI.
You should see the following (using AMD Seattle's Overdrive as example):
```shell
NOTICE: BL3-1:
NOTICE: BL3-1: Built : 18:22:46, Nov 23 2015
INFO: BL3-1: Initializing runtime services
INFO: BL3-1: Preparing for EL3 exit to normal world
INFO: BL3-1: Next image address = 0x8000000000
INFO: BL3-1: Next image spsr = 0x3c9
Boot firmware (version built at 18:27:24 on Nov 23 2015)
Version 2.17.1249. Copyright (C) 2015 American Megatrends, Inc.
BIOS Date: 11/23/2015 18:23:09 Ver: ROD0085E00
Press <DEL> or <ESC> to enter setup.
.
>>Checking Media Presence......
>>Media Present......
>>Start PXE over IPv4.
Station IP address is 192.168.3.57
Server IP address is 192.168.3.1
NBP filename is BOOTAA64.EFI
NBP filesize is 885736 Bytes
>>Checking Media Presence......
>>Media Present......
Downloading NBP file...
Succeed to download NBP file.
Fetching Netboot Image
```
At this stage you should be able to see the Grub 2 menu, like:
```shell
Install
Advanced options ...
Install with speech synthesis
.
Use the and keys to change the selection.
Press 'e' to edit the selected item, or 'c' for a command prompt.
```
Now just hit enter and wait for the kernel and initrd to load, which automatically loads the installer and provides you the installer console menu, so you can finally install Debian.
You should see the following:
```shell
EFI stub: Booting Linux Kernel...
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services and installing virtual address map...
[ 0.355175] ACPI: IORT: Failed to get table, AE_NOT_FOUND
[ 0.763784] kvm [1]: error: no compatible GIC node found
[ 0.763818] kvm [1]: error initializing Hyp mode: -19
[ 0.886298] Failed to find cpu0 device node
[ 0.947082] zswap: default zpool zbud not available
[ 0.951959] zswap: pool creation failed
Starting system log daemon: syslogd, klogd.
...
┌───────────────────────┤ [!!] Select a language ├────────────────────────┐
│ │
│ Choose the language to be used for the installation process. The │
│ selected language will also be the default language for the installed │
│ system. │
│ │
│ Language: │
│ │
│ C │
│ English │
│ │
<Go Back>
│ │
└─────────────────────────────────────────────────────────────────────────┘
<Tab> moves; <Space> selects; <Enter> activates buttons
```
### Finishing the installation
For using the installer, please check the documentation available at [https://www.debian.org/releases/jessie/arm64/ch06.html.en](https://www.debian.org/releases/jessie/arm64/ch06.html.en)
**NOTE - Cello Only:** In case your mac address is empty (e.g. early boards), you will be required to change your default network mac address in order to proceed with the network install. Please open a shell after booted the installer (the installer offers the shell option at the first menu), and change the mac address as described below. Once changed, simply proceed with the install process.
```
~ # ip link set dev enp1s0 address de:5e:60:e4:6b:1f
~ # exit
```
Once the installation is completed, you should be able to simply reboot the system in order to boot your new Debian system.
**NOTE - Cello Only:** If you had to set a valid mac address during the installer, you will be required to also set the mac address in debian, after your first boot. Please change _/etc/network/interfaces_ and add your mac address again, like below:
```
root@debian:~# cat /etc/network/interfaces
...
allow-hotplug enp1s0
iface enp1s0 inet dhcp
hwaddress ether de:5e:60:e4:6b:1f
```
### Automating the installation using preseeding
Preseeding provides a way to set answers to questions asked during the installation process, without having to manually enter the answers while the installation is running. This makes it possible to fully automate the installation over network, when used together with the debian-installer.
This document only provides a quick way for you to get started with preseeding. For the complete guide, please check the [Debian GNU/Linux Installation Guide](https://www.debian.org/releases/jessie/arm64/apb.html) and [example-preseed.txt](https://www.debian.org/releases/jessie/example-preseed.txt)
**Note:** Since we require an external kernel to be installed during the install process, this is done via the `preseed/late_command` argument, so you if you decide to use that command as part of your preseed file, make sure to add the following as part of the multi-line command:
```shell
d-i preseed/late_command string in-target apt-get install -y linux-image-reference-arm64; # here you can add 'in-target foobar' for additional commands
```
#### Creating the preseed file
Check [example-preseed.txt](https://www.debian.org/releases/jessie/example-preseed.txt) for a wide list of options supported by the Debian Jessie installer. Your file needs to use a similar format, but customized for your own needs.
Once created, make sure the file gets published into a network address that can be reachable from your target device.
Preseed example (`preseed.cfg`):
```shell
d-i debian-installer/locale string en_US
d-i keyboard-configuration/xkb-keymap select us
d-i netcfg/dhcp_timeout string 60
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/hostname string debian
d-i mirror/country string manual
d-i mirror/http/hostname string httpredir.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string
d-i passwd/root-password password linaro123
d-i passwd/root-password-again password linaro123
d-i passwd/user-fullname string Linaro User
d-i passwd/username string linaro
d-i passwd/user-password password linaro
d-i passwd/user-password-again password linaro
d-i passwd/user-default-groups string audio cdrom video sudo
d-i time/zone string UTC
d-i clock-setup/ntp boolean true
d-i clock-setup/utc boolean true
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-auto/choose_recipe select atomic
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
popularity-contest popularity-contest/participate boolean false
tasksel tasksel/first multiselect standard, web-server
d-i pkgsel/include string openssh-server build-essential ca-certificates sudo vim ntp
d-i pkgsel/upgrade select safe-upgrade
d-i finish-install/reboot_in_progress note
```
In this example, this content is also available at [http://people.linaro.org/~ricardo.salveti/preseed.cfg](http://people.linaro.org/~ricardo.salveti/preseed.cfg)
#### Setting up grub.cfg
Now back to your tftp server, change the original `grub.cfg` file adding the location of your preseed file:
```shell
$ cat /srv/tftp/debian-installer/arm64/grub/grub.cfg
# Force grub to automatically load the first option
set default=0
set timeout=1
menuentry 'Install with preseeding' {
linux /debian-installer/arm64/linux auto=true priority=critical url=http://people.linaro.org/~ricardo.salveti/preseed.cfg ---
initrd /debian-installer/arm64/initrd.gz
}
```
The `auto` kernel parameter is an alias for `auto-install/enable` and setting it to `true` delays the locale and keyboard questions until after there has been a chance to preseed them, while `priority` is an alias for `debconf/priority` and setting it to `critical` stops any questions with a lower priority from being asked.
In case your system contains more than one network interface, also make sure to add the one to be used via the `interface` argument, like `interface=eth1`.
#### Booting the system
Now just do a normal PXE boot, and debian-installer should automatically load and use the preseeds file provided by `grub.cfg`. In case there is still a dialog that stops your installation that means not all the debian-installer options are provided by your preseeds file. Get back to [example-preseed.txt](https://www.debian.org/releases/jessie/example-preseed.txt) and try to identify what is missing step.
Also make sure to check debian-installer's `/var/log/syslog` (by opening a shell) when debugging the installer.
### Building debian-installer from source
#### Build kernel package and udebs
Check the Debian [kernel-handbook](http://kernel-handbook.alioth.debian.org/ch-common-tasks.html) for the instructions required to build the debian kernel package from scratch. Since the installer only understands `udeb` packages, it is a good idea to reuse the official kernel packaging instructions and rules.
You can also find the custom kernel source package created as part of the EE-RPB effort at [https://builds.96boards.org/snapshots/reference-platform/components/linux/enterprise/latest/](https://builds.96boards.org/snapshots/reference-platform/components/linux/enterprise/latest/)
#### Rebuilding debian-installer with the new udebs
To build the installer, make sure you're running on a native `arm64` system, preferably running Debian Jessie.
Download the installer (from jessie):
```shell
sudo apt-get build-dep debian-installer
dget http://ftp.us.debian.org/debian/pool/main/d/debian-installer/debian-installer_20150422+deb8u4.dsc
```
Change the kernel abi and set a default local preseed (so it can install your kernel during the install process):
```shell
cd debian-installer-*
cd build
sed -i "s/LINUX_KERNEL_ABI.*/LINUX_KERNEL_ABI = YOUR_KERNEL_ABI/g" config/common
sed -i "s/PRESEED.*/PRESEED = default-preseed/g" config/common
```
Download the kernel udebs that you created at the localudebs folder:
```shell
cd localudebs
wget <list of your custom udeb files created by the kernel debian package>
cd ..
```
Create a local pkg-list to include the udebs created (otherwise d-i will not be able to find them online):
```shell
cat <<EOF > pkg-lists/local
ext4-modules-\${kernel:Version}
fat-modules-\${kernel:Version}
btrfs-modules-\${kernel:Version}
md-modules-\${kernel:Version}
efi-modules-\${kernel:Version}
scsi-modules-\${kernel:Version}
jfs-modules-\${kernel:Version}
xfs-modules-\${kernel:Version}
ata-modules-\${kernel:Version}
sata-modules-\${kernel:Version}
usb-storage-modules-\${kernel:Version}
EOF
```
Set up the local repo, so the installer can locate your udebs (from localudebs):
```shell
cat <<EOF > sources.list.udeb
deb [trusted=yes] copy:/PATH/TO/your/installer/d-i/debian-installer-20150422/build/ localudebs/
deb http://httpredir.debian.org/debian jessie main/debian-installer
EOF
```
Default preseed to skip known errors (as the kernel provided by local udebs):
```
cat <<EOF > default-preseed
# Continue install on "no kernel modules were found for this kernel"
d-i anna/no_kernel_modules boolean true
# Continue install on "no installable kernels found"
d-i base-installer/kernel/skip-install boolean true
d-i base-installer/kernel/no-kernels-found boolean true
d-i preseed/late_command string in-target wget <your linux-image.deb>; dpkg -i linux-image-*.deb
EOF
```
Now just build the installer:
```shell
fakeroot make build_netboot
```
You should now find your custom debian-installer at `dest/netboot/netboot.tar.gz`.

View file

@ -0,0 +1,147 @@
<table align="center">
<tr>
<td align="center">UEFI/EDK2<br><a href="../README.md">Go Back</a></td>
<td align="center"><a href="Download.md">Download</a><br>Get the latest pre-built firmware images</td>
<th align="center"><a href="Build.md">Build</a><br>Instructions for building latest firmware images</td>
<td align="center"><a href="Install.md">Install</a><br>Instructions on how to install firmware</td>
<td align="center"><a href="README.md">Read more</a><br>Learn more about UEFI/EDK2</td>
</tr>
</table>
## Pre-Requisites and Dependencies
Make sure the build dependencies are available at your host machine.
On Debian/Ubuntu:
```shell
sudo apt-get install uuid-dev build-essential aisle
```
On RHEL/CentOS/Fedora:
```shell
sudo yum install uuid-devel libuuid-devel aisle
```
Also make sure you have the right 'acpica-unix' version at your host system. The current one required by the 16.03/16.06 releases is 20150930, and you can find the packages (debian) at the 'linaro-overlay':
```shell
wget http://repo.linaro.org/ubuntu/linaro-overlay/pool/main/a/acpica-unix/acpica-tools_20150930-1.linarojessie.1_amd64.deb
wget http://repo.linaro.org/ubuntu/linaro-overlay/pool/main/a/acpica-unix/acpidump_20150930-1.linarojessie.1_all.deb
wget http://repo.linaro.org/ubuntu/linaro-overlay/pool/main/a/acpica-unix/iasl_20150930-1.linarojessie.1_all.deb
sudo dpkg -i --force-all *.deb
```
If cross compiling, you also need to separately add the required toolchains. Ubuntu has a prebuilt arm-linux-gnueabihf toolchain, but not an aarch64-linux-gnu one.
Download Linaro's GCC 4.9 cross-toolchain for Aarch64, and make it available in your 'PATH'. You can download and use the Linaro GCC binary (Linaro GCC 4.9-2015.02), available at [http://releases.linaro.org/15.02/components/toolchain/binaries/aarch64-linux-gnu/gcc-linaro-4.9-2015.02-3-x86_64_aarch64-linux-gnu.tar.xz](http://releases.linaro.org/15.02/components/toolchain/binaries/aarch64-linux-gnu/gcc-linaro-4.9-2015.02-3-x86_64_aarch64-linux-gnu.tar.xz)
```shell
mkdir arm-tc arm64-tc
tar --strip-components=1 -C ${PWD}/arm-tc -xf gcc-linaro-arm-linux-gnueabihf-4.9-*_linux.tar.xz
tar --strip-components=1 -C ${PWD}/arm64-tc -xf gcc-linaro-aarch64-linux-gnu-4.9-*_linux.tar.xz
export PATH="${PWD}/arm-tc/bin:${PWD}/arm64-tc/bin:$PATH"
```
## Getting the source code
UEFI/EDK2:
```shell
git clone https://github.com/tianocore/edk2.git
git clone https://git.linaro.org/uefi/OpenPlatformPkg.git
cd edk2
git checkout -b stable-baseline 469e1e1e4203b5d369fdce790883cb0aa035a744 # revision provided by https://git.linaro.org/uefi/linaro-edk2.git
ln -s ../OpenPlatformPkg
```
ARM Trusted Firmware (in case it is supported by your target hardware, only used by Juno at this point):
```shell
git clone https://github.com/ARM-software/arm-trusted-firmware.git
cd arm-trusted-firmware
git checkout -b stable-baseline v1.2 # suggested latest stable release
```
UEFI Tools (helpers and scripts to make the build process easy):
```shell
git clone git://git.linaro.org/uefi/uefi-tools.git
```
### Proceed to [Installation](Install.md) page
***
## Building UEFI/EDK2 for D02
```shell
export AARCH64_TOOLCHAIN=GCC49
export LINARO_EDK2_DIR=${PWD}/edk2
export UEFI_TOOLS_DIR=${PWD}/uefi-tools
cd ${LINARO_EDK2_DIR}
${UEFI_TOOLS_DIR}/uefi-build.sh -b DEBUG d02
```
The output file:
- `Build/Pv660D02/DEBUG_GCC49/FV/PV660D02.fd`
### Proceed to [Installation](Install.md) page
***
## Building UEFI/EDK2 for D03
```shell
export AARCH64_TOOLCHAIN=GCC49
export LINARO_EDK2_DIR=${PWD}/edk2
export UEFI_TOOLS_DIR=${PWD}/uefi-tools
cd ${LINARO_EDK2_DIR}
${UEFI_TOOLS_DIR}/uefi-build.sh -b DEBUG d03
```
The output file:
- `Build/D03/DEBUG_GCC49/FV/D03.fd`
### Proceed to [Installation](Install.md) page
***
## Building UEFI/EDK2 for Overdrive
```shell
export AARCH64_TOOLCHAIN=GCC49
export LINARO_EDK2_DIR=${PWD}/edk2
export UEFI_TOOLS_DIR=${PWD}/uefi-tools
cd ${LINARO_EDK2_DIR}
${UEFI_TOOLS_DIR}/uefi-build.sh -b DEBUG overdrive
```
The output file:
- `Build/Overdrive/DEBUG_GCC49/FV/STYX_ROM.fd`
### Proceed to [Installation](Install.md) page
***
## Building UEFI/EDK2 for HuskyBoard / Cello
```shell
export AARCH64_TOOLCHAIN=GCC49
export LINARO_EDK2_DIR=${PWD}/edk2
export UEFI_TOOLS_DIR=${PWD}/uefi-tools
cd ${LINARO_EDK2_DIR}
${UEFI_TOOLS_DIR}/uefi-build.sh -b DEBUG cello
```
The output file:
- `Build/Cello/DEBUG_GCC49/FV/STYX_ROM.fd`
### Proceed to [Installation](Install.md) page
***

View file

@ -0,0 +1,23 @@
<table align="center">
<tr>
<td align="center">UEFI/EDK2<br><a href="../README.md">Go Back</a></td>
<th align="center"><a href="">Download</a><br>Get the latest pre-built firmware images</td>
<td align="center"><a href="Build.md">Build</a><br>Instructions for building latest firmware images</td>
<td align="center"><a href="Install.md">Install</a><br>Instructions on how to install firmware</td>
<td align="center"><a href="README.md">Read more</a><br>Learn more about UEFI/EDK2</td>
</tr>
</table>
## Choose your Hardware
> Note: If hardware is not linked, [contact distributor](../../Hardware/README.md) for more information on available firmware.
- [D03](http://releases.linaro.org/reference-platform/enterprise/huawei/d03/16.12/uefi/)
- [D05](http://releases.linaro.org/reference-platform/enterprise/huawei/d05/16.12/uefi/)
- [OverDrive](http://releases.linaro.org/reference-platform/enterprise/amd/overdrive/16.12/uefi/)
- X-Gene
- m400
- QDF2432
- Thunder X
Proceed back to the [Installation](Install.md) page

View file

@ -0,0 +1,105 @@
<table align="center">
<tr>
<td align="center">UEFI/EDK2<br><a href="../README.md">Go Back</a></td>
<td align="center"><a href="Download.md">Download</a><br>Get the latest pre-built firmware images</td>
<td align="center"><a href="Build.md">Build</a><br>Instructions for building latest firmware images</td>
<th align="center"><a href="Install.md">Install</a><br>Instructions on how to install firmware</td>
<td align="center"><a href="README.md">Read more</a><br>Learn more about UEFI/EDK2</td>
</tr>
</table>
Choose instructions from the approved hardware:
***
## D03
Flashing D03 requires the board to have a working ethernet connection to the FTP server hosting the firmware (since the recovery UEFI image provides an update path via FTP fetch + flash). Flashing also requires entering the Embedded Boot Loader (EBL). This can be reached by typing 'exit' on the UEFI shell that will bring you to a bios-like menu. Goto 'Boot Manager' to find EBL.
### Clean flash
To do a clean flash you will require access to the board's BMC.
1. Make sure the board's BMC port is connected, and with a known IP address.
2. Login the BMC website, The username/passwd is root/Huawei12#$. Go to "System", "Firmware Upgrade", and "Browse" to select the UEFI file in hpm format. (Please contact support@open-estuary.org to get the hpm file).
3. Pull out the power cable to power off the board. Find the pin named "COM_SW" at J44. Then connect it with jump cap.
4. Power on the board and connect to the board's serial port. When the screen display message "You are trying to access a restricted zone. Only Authorized Users allowed.", type "Enter", input username/passwd (username/passwd is root/Huawei12#$).
5. After you login the BMC interface which start with "iBMC:/->", use command "ifconfig" to see the modified BMC IP. When you get the board's BMC IP, please visit the BMC website by "https://BMC IP ADDRESS/".
6. Go to "Start Update" (Do not power off during this period).
7. After updating the UEFI firmware, reboot the board to enter UEFI menu.
### Upgrade Firmware
There are 2 options for updating the firmware, first via network and the second via USB storage.
Network upgrade:
1. Make sure the built firmware is available in your FTP server ('D03.fd')
2. Stop UEFI boot, select 'Boot Manager' then 'Embedded Boot Loader (EBL)'
3. Download and flash the firmware file from the FTP server:
'biosupdate <server ip> -u <user> -p <password> -f <UEFI image file name> master', like
'D02 > biosupdate 10.0.0.10 -u anonymous -p anonymous -f D03.fd master'
4. Exit the EBL console and reboot the board
USB storage upgrade:
- Copy the '.fd' file to a FAT32 partition on USB (UEFI can only recognize FAT32 file system), then run the following command (from **EBL**):
'newbios fs1:\<file path to .fd file>'
On EBL fs1 is for USB first partition, while fs0 the ramdisk.
***
## AMD Overdrive / HuskyBoard / Cello
### Clean flash
#### DediProg SF100
Use [DediProg SF100](http://www.dediprog.com/pd/spi-flash-solution/sf100) to flash the firmware via SPI, by plugging the programming unit into the Overdrive/Husky/Cello board 2x4 pin header (labeled SCP SPI J5 on Overdrive).
The Dediprog flashing tool is also available for Linux, please check for [https://github.com/DediProgSW/SF100Linux](https://github.com/DediProgSW/SF100Linux) for build and use instructions.
First unplug the power cord before flashing the new firmware, then erase the SPI flash memory:
```shell
dpcmd --type MX25L12835F -e
```
Now just flash the new firmware:
```shell
dpcmd --type MX25L12835F -p FIRMWARE.rom
```
Then just power cycle the board, and it should boot with the new firmware.
#### SPI Hook
Use [SPI Hook](http://www.tincantools.com/SPI_Hook.html) and _flashrom_ to flash the firmware via SPI, by plugging the programming unit into the Overdrive/Husky/Cello board 2x4 pin header (labeled SCP SPI J5 on Overdrive).
In order to use SPI Hook, make sure _flashrom_ is recent enough. This utility is used to identify, read, write, verify and erase flash chips. You can find the _flashrom_ package in most Linux distributions, but make sure the version at least v.0.9.8. If older, please just build latest from source, by going to [flashrom Downloads](https://www.flashrom.org/Downloads)
Depending on the size of the firmware image, flashrom might not be able to flash as it will complain that the size of the image is not a perfect match for the size of the SPI (partial flash only supported via the use of layouts). One easy way is just appending 0s at the end of the file, until it got the right size.
Example for the 4.5M based firmware:
```shell
truncate --size=16M FIRMWARE.rom
```
Connect the SPI cable, unplug the power cord and flash SPI:
```shell
sudo flashrom -p ft2232_spi:type=2232h,port=A,divisor=2 -c "MX25L12835F/MX25L12845E/MX25L12865E" -w FIRMWARE.rom
```
Then just power cycle the board, and it should boot with the new firmware.
### Upgrade Firmware
There is currently no easy way to update just the UEFI/EDK2 firmware, so please follow the clean flash process instead.
# Links and References:
- [ARM - Using Linaro's deliverables on Juno](https://community.arm.com/docs/DOC-10804)
- [ARM - FAQ: General troubleshooting on the Juno](https://community.arm.com/docs/DOC-8396)

View file

@ -0,0 +1,19 @@
<table align="center">
<tr>
<td align="center">UEFI/EDK2<br><a href="../README.md">Go Back</a></td>
<td align="center"><a href="Download.md">Download</a><br>Get the latest pre-built firmware images</td>
<td align="center"><a href="Build.md">Build</a><br>Instructions for building latest firmware images</td>
<td align="center"><a href="Install.md">Install</a><br>Instructions on how to install firmware</td>
<th align="center"><a href="README.md">Read more</a><br>Learn more about UEFI/EDK2</td>
</tr>
</table>
EDK2 is a modern, feature-rich, cross-platform firmware development environment for the UEFI and PI specifications.
The reference UEFI/EDK2 tree used by the EE-RPB comes directly from [upstream](https://github.com/tianocore/edk2), based on a specific commit that gets validated and published as part of the Linaro EDK2 effort (which is available at [https://git.linaro.org/uefi/linaro-edk2.git](https://git.linaro.org/uefi/linaro-edk2.git)).
Since there is no hardware specific support as part of EDK2 upstream, an external module called [OpenPlatformPkg](https://git.linaro.org/uefi/OpenPlatformPkg.git) is also required as part of the build process.
EDK2 is currently used by 96boards LeMaker Cello, AMD Overdrive, ARM Juno r0/r1/r2, HiSilicon D02 and HiSilicon D03.
This guide provides enough information on how to build UEFI/EDK2 from scratch, but meant to be a quick guide. For further information please also check the official Linaro UEFI documentation, available at [https://wiki.linaro.org/ARM/UEFI](https://wiki.linaro.org/ARM/UEFI) and [https://wiki.linaro.org/LEG/Engineering/Kernel/UEFI/build](https://wiki.linaro.org/LEG/Engineering/Kernel/UEFI/build)

View file

@ -0,0 +1,57 @@
# Installation
This page offers generic installation instructions for the Enterprise Reference Platform on supported hardware. A list of approved hardware can be found in the ["Approved Hardware"](../Hardware/README.md) section of this documentation set.
Be sure to check out the [Release Notes](../ReleaseNotes.md) before installing.
***
## Step 1: Upgrade firmware to latest version
<table align="center">
<tr>
<th>UEFI/EDK2</td>
<td align="center"><a href="Firmware/Download.md">Download</a><br>Get the latest pre-built firmware images</td>
<td align="center"><a href="Firmware/Build.md">Build</a><br>Instructions for building latest firmware images</td>
<td align="center"><a href="Firmware/Install.md">Install</a><br>Instructions on how to install firmware</td>
<td align="center"><a href="Firmware/README.md">Read more</a><br>Learn more about UEFI/EDK2</td>
</tr>
</table>
***
## Step 2: Set up PXE on your network
<table align="center">
<tr>
<th>Centos</td>
<td> https://wiki.centos.org/HowTos/NetworkInstallServer</td>
</tr>
<tr>
<th>Debian</td>
<td>https://wiki.debian.org/PXEBootInstall</td>
</tr>
</table>
***
## Step 3: Use a PXE to boot a network installer
Choose your network installer, download or build, and proceed to the installation instructions
**Network Installers:**
<table>
<tr>
<th>Centos</td>
<td><a href="http://releases.linaro.org/reference-platform/enterprise/16.12/centos-installer/">Download</a></td>
<td><a href="Centos/README.md">Install</a></td>
</tr>
<tr>
<th>Debian</td>
<td><a href="http://releases.linaro.org/reference-platform/enterprise/16.12/debian-installer/">Download</a></td>
<td><a href="Debian/README.md">Install</a></td>
</tr>
</table>
***