Folder reconfiguration for Reference Test platform
This commit is contained in:
parent
e7a601472c
commit
bb41f32dfb
28 changed files with 0 additions and 1950 deletions
BIN
Reference-Platform/.DS_Store
vendored
BIN
Reference-Platform/.DS_Store
vendored
Binary file not shown.
BIN
Reference-Platform/TestEE/.DS_Store
vendored
Normal file
BIN
Reference-Platform/TestEE/.DS_Store
vendored
Normal file
Binary file not shown.
|
@ -1,44 +0,0 @@
|
|||
## Setting up DHCP/TFTP server for UEFI distro network installers
|
||||
|
||||
A simple way to install the major Linux Distributions (e.g. Debian, Fedora, CentOS, openSUSE, etc) is by booting the network installer via PXE. In order to have a working PXE environment, a DHCP and TFTP server is required, which is responsible for providing the target device a valid IP configuration and the required files to boot the system (usually Grub 2 + kernel + initrd).
|
||||
|
||||
In order to simplify the setup, this document will use dnsmasq, which is a lightweight, easy to configure DNS forwarder and DHCP server with BOOTP/TFTP/PXE functionality.
|
||||
|
||||
### Installing and configuring dnsmasq
|
||||
|
||||
Debian/Ubuntu:
|
||||
|
||||
```shell
|
||||
sudo apt-get install dnsmasq
|
||||
```
|
||||
|
||||
Fedora/CentOS/RHEL:
|
||||
|
||||
```shell
|
||||
yum install dnsmasq
|
||||
```
|
||||
|
||||
This guide assumes you already know the network interface that will provide the DHCP/TFTP/PXE functionality for the target device. In this case, we are using _eth1_ as our secondary interface, with address _192.168.3.1_.
|
||||
|
||||
Following is the /etc/dnsmasq.conf providing the required functionality for PXE:
|
||||
|
||||
```shell
|
||||
interface=eth1
|
||||
dhcp-range=192.168.3.10,192.168.3.100,255.255.255.0,1h
|
||||
dhcp-boot=BOOTAA64.EFI
|
||||
enable-tftp
|
||||
tftp-root=/srv/tftp
|
||||
```
|
||||
|
||||
Check [http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html](http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html) for more information and additional dnsmasq config options.
|
||||
|
||||
Now make sure the tftp-root directory is available, and then start/restart the dnsmasq service:
|
||||
|
||||
```shell
|
||||
sudo mkdir -p /srv/tftp
|
||||
sudo systemctl restart dnsmasq
|
||||
```
|
||||
|
||||
Since we require UEFI support for the Reference Platform Software Enterprise Edition (EE-RPB), this document doesn't cover the traditional pxelinux specific configuration (used with the traditional BIOS setup).
|
||||
|
||||
For UEFI, we only require DHCP to provide the UEFI binary name (retrieved via TFTP), which in this case is the Grub 2 bootloader (which then loads the kernel, initrd and other extra files from the TFTP server).
|
|
@ -1,216 +0,0 @@
|
|||
## Installing CentOS 7.2 15.11 - 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 installer from the Reference Platform 16.06 release (4.4.11 RP Kernel):
|
||||
|
||||
```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 - 16.06' --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 - 16.06
|
||||
.
|
||||
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 - 16.06' --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.
|
|
@ -1,342 +0,0 @@
|
|||
## 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`.
|
|
@ -1,164 +0,0 @@
|
|||
## Installing Fedora 23
|
||||
|
||||
This guide is not to be a replacement of the official Fedora 23 Installer documentation, but instead be a quick walkthrough for the network installer. You can find the original documentation at [https://fedoraproject.org/wiki/Architectures/AArch64/F23/Installation](https://fedoraproject.org/wiki/Architectures/AArch64/F23/Installation)
|
||||
|
||||
### 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 Fedora 23 installer files at your tftp-root directory. In this example, this directory is configured to `/srv/tftp`.
|
||||
|
||||
Downloading required Grub 2 UEFI files:
|
||||
|
||||
**Note:** Because of bug [1251600](https://bugzilla.redhat.com/show_bug.cgi?id=1251600), we need to use both `BOOTAA64.EFI` and `grubaa64.efi` from the Fedora 22 release.
|
||||
|
||||
```shell
|
||||
sudo su -
|
||||
cd /srv/tftp/
|
||||
wget http://dl.fedoraproject.org/pub/fedora-secondary/releases/22/Server/aarch64/os/EFI/BOOT/BOOTAA64.EFI
|
||||
wget http://dl.fedoraproject.org/pub/fedora-secondary/releases/22/Server/aarch64/os/EFI/BOOT/grubaa64.efi
|
||||
```
|
||||
|
||||
Downloading upstream Kernel and Initrd
|
||||
|
||||
```shell
|
||||
mkdir /srv/tftp/f23
|
||||
cd /srv/tftp/f23
|
||||
wget http://dl.fedoraproject.org/pub/fedora-secondary/releases/23/Server/aarch64/os/images/pxeboot/vmlinuz
|
||||
wget http://dl.fedoraproject.org/pub/fedora-secondary/releases/23/Server/aarch64/os/images/pxeboot/initrd.img
|
||||
```
|
||||
|
||||
Creating the Grub 2 config file (`grub.cfg`):
|
||||
|
||||
```shell
|
||||
menuentry 'Install Fedora 23 ARM 64-bit' --class fedora --class gnu-linux --class gnu --class os {
|
||||
linux (tftp)/f23/vmlinuz ip=dhcp inst.repo=http://dl.fedoraproject.org/pub/fedora-secondary/releases/23/Server/aarch64/os/
|
||||
initrd (tftp)/f23/initrd.img
|
||||
}
|
||||
```
|
||||
|
||||
You should now have the following file tree structure:
|
||||
|
||||
```shell
|
||||
/srv/tftp/
|
||||
├── BOOTAA64.EFI
|
||||
├── f23
|
||||
│ ├── 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 : 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 Fedora 23 ARM 64-bit
|
||||
.
|
||||
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 Fedora 23 (just make sure that target device has external network access, since the installer is downloaded automatically after booting the kernel).
|
||||
|
||||
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.2.3-300.fc23.aarch64 (mockbuild@aarch64-08a.arm.fedoraproject.org) (gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC) ) #1 SMP Thu Oct 8 01:39:38 UTC 2015
|
||||
[ 0.000000] CPU: AArch64 Processor [411fd072] revision 2
|
||||
[ 0.000000] Detected PIPT I-cache on CPU0
|
||||
[ 0.000000] alternatives: enabling workaround for ARM erratum 832075
|
||||
[ 0.000000] efi: Getting EFI parameters from FDT:
|
||||
[ 0.000000] EFI v2.40 by American Megatrends
|
||||
[ 0.000000] efi: ACPI 2.0=0x83ff1c6000 SMBIOS 3.0=0x83ff349718
|
||||
...
|
||||
Welcome to Fedora 23 (Twenty Three) dracut-043-60.git20150811.fc23 (Initramfs)!
|
||||
...
|
||||
[ 23.105835] dracut-initqueue[685]: RTNETLINK answers: File exists
|
||||
[ 23.756828] dracut-initqueue[685]: % Total % Received % Xferd Average Speed Time Time Time Current
|
||||
[ 23.757345] dracut-initqueue[685]: Dload Upload Total Spent Left Speed
|
||||
100 958 100 958 0 0 1514 0 --:--:-- --:--:-- --:--:-- 1513 0 --:--:-- --:--:-- --:--:-- 0
|
||||
...
|
||||
Welcome to Fedora 23 (Twenty Three)!
|
||||
...
|
||||
Starting installer, one moment...
|
||||
anaconda 23.19.10-1 for Fedora 23 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
|
||||
00:29:26 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]:
|
||||
.
|
||||
[anaconda]1:main* 2:shell 3:log 4:storage-log >Switch tab: Alt+Tab | Help: F1
|
||||
```
|
||||
|
||||
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 installation destination, the 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 your new Fedora 23 system.
|
||||
|
||||
### Automating the installation with kickstart
|
||||
|
||||
TODO
|
|
@ -1,320 +0,0 @@
|
|||
This post concentrates on Running Hadoop after [installing](ODPi-Hadoop-Installation.md) ODPi components built using Apache BigTop. These steps are only for configuring it on a single node and running them on a single node.
|
||||
|
||||
# Add Hadoop User
|
||||
We need to create a dedicated user (hduser) for running Hadoop. This user needs to be added to hadoop usergroup:
|
||||
|
||||
```shell
|
||||
sudo useradd -G hadoop hduser
|
||||
```
|
||||
|
||||
give a password for hduser
|
||||
|
||||
```shell
|
||||
sudo passwd hduser
|
||||
```
|
||||
|
||||
Add hduser to sudoers list
|
||||
On Debian:
|
||||
|
||||
```shell
|
||||
sudo adduser hduser sudo
|
||||
```
|
||||
|
||||
On Centos:
|
||||
|
||||
```shell
|
||||
sudo usermod -G wheel hduser
|
||||
```
|
||||
|
||||
Switch to hduser:
|
||||
|
||||
```shell
|
||||
sudo su - hduser
|
||||
```
|
||||
|
||||
# Generate ssh key for hduser
|
||||
|
||||
```shell
|
||||
ssh-keygen -t rsa -P ""
|
||||
```
|
||||
|
||||
Press \<enter\> to leave to default file name.
|
||||
|
||||
Enable ssh access to local machine:
|
||||
|
||||
```shell
|
||||
cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
|
||||
```
|
||||
|
||||
Test ssh setup, as hduser:
|
||||
|
||||
```shell
|
||||
ssh localhost
|
||||
```
|
||||
|
||||
# Disabling IPv6
|
||||
|
||||
```shell
|
||||
sudo nano /etc/sysctl.conf
|
||||
```
|
||||
|
||||
Add the below lines to the end and save:
|
||||
|
||||
```shell
|
||||
net.ipv6.conf.all.disable_ipv6 = 1
|
||||
net.ipv6.conf.default.disable_ipv6 = 1
|
||||
net.ipv6.conf.lo.disable_ipv6 = 1
|
||||
```
|
||||
|
||||
Prefer IPv4 on Hadoop:
|
||||
|
||||
```shell
|
||||
sudo nano /etc/hadoop/conf/hadoop-env.sh
|
||||
```
|
||||
|
||||
Uncomment line:
|
||||
|
||||
```shell
|
||||
# export HADOOP_OPTS=-Djava.net.preferIPV4stack=true
|
||||
```
|
||||
|
||||
Run sysctl to apply the changes:
|
||||
|
||||
```shell
|
||||
sudo sysctl -p
|
||||
```
|
||||
|
||||
# Configuring the app environment
|
||||
Configure the app environment by following steps:
|
||||
|
||||
```shell
|
||||
sudo mkdir -p /app/hadoop/tmp
|
||||
sudo chown hduser:hadoop /app/hadoop/tmp
|
||||
sudo chmod 750 /app/hadoop/tmp
|
||||
sudo chown hduser:hadoop /usr/lib/hadoop
|
||||
sudo chmod 750 /usr/lib/hadoop
|
||||
```
|
||||
|
||||
# Setting up Environment Variables
|
||||
Follow the below steps to setup Environment Variables in bash file :
|
||||
|
||||
```shell
|
||||
sudo su - hduser
|
||||
nano .bashrc
|
||||
```
|
||||
|
||||
Add the following to the end and save:
|
||||
|
||||
```shell
|
||||
export HADOOP_HOME=/usr/lib/hadoop
|
||||
export HADOOP_PREFIX=$HADOOP_HOME
|
||||
export HADOOP_OPTS="-Djava.library.path=$HADOOP_PREFIX/lib/native"
|
||||
export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec
|
||||
export HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop
|
||||
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
|
||||
export HADOOP_COMMON_HOME=$HADOOP_HOME
|
||||
export HADOOP_MAPRED_HOME=/usr/lib/hadoop-mapreduce
|
||||
export HADOOP_HDFS_HOME=/usr/lib/hadoop-hdfs
|
||||
export YARN_HOME=/usr/lib/hadoop-yarn
|
||||
export HADOOP_YARN_HOME=/usr/lib/hadoop-yarn/
|
||||
export CLASSPATH=$CLASSPATH:.
|
||||
export CLASSPATH=$CLASSPATH:$HADOOP_HOME/hadoop-common-2.6.0.jar
|
||||
export CLASSPATH=$CLASSPATH:$HADOOP_HOME/client/hadoop-hdfs-2.6.0.jar
|
||||
export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")
|
||||
export PATH=/usr/lib/hadoop/libexec:/etc/hadoop/conf:$HADOOP_HOME/bin/:$PATH
|
||||
```
|
||||
|
||||
Execute the terminal environment again (`bash`), or simply logout and change to `hduser` again.
|
||||
|
||||
# Modifying config files
|
||||
## core-site.xml
|
||||
|
||||
```shell
|
||||
sudo nano /etc/hadoop/conf/core-site.xml
|
||||
```
|
||||
|
||||
And add/modify the following settings:
|
||||
Look for property with <name> fs.defaultFS</name> and modify as below:
|
||||
|
||||
```shell
|
||||
<property>
|
||||
<name>fs.default.name</name>
|
||||
<value>hdfs://localhost:54310</value>
|
||||
<description>The name of the default file system. A URI whose
|
||||
scheme and authority determine the FileSystem implementation. The
|
||||
uri's scheme determines the config property (fs.SCHEME.impl) naming
|
||||
the FileSystem implementation class. The uri's authority is used to
|
||||
determine the host, port, etc. for a filesystem.</description>
|
||||
</property>
|
||||
```
|
||||
|
||||
Add this to the bottom before \</configuration> tag:
|
||||
|
||||
```shell
|
||||
<property>
|
||||
<name>hadoop.tmp.dir</name>
|
||||
<value>/app/hadoop/tmp</value>
|
||||
<description>A base for other temporary directories.</description>
|
||||
</property>
|
||||
```
|
||||
|
||||
## mapred-site.xml
|
||||
|
||||
```shell
|
||||
sudo nano /etc/hadoop/conf/mapred-site.xml
|
||||
```
|
||||
|
||||
Modify existing properties as follows:
|
||||
Look for property tag with <name> as mapred.job.tracker and modify as below:
|
||||
|
||||
```shell
|
||||
<property>
|
||||
<name>mapred.job.tracker</name>
|
||||
<value>localhost:54311</value>
|
||||
<description>The host and port that the MapReduce job tracker runs
|
||||
at. If "local", then jobs are run in-process as a single map
|
||||
and reduce task.
|
||||
</description>
|
||||
</property>
|
||||
```
|
||||
|
||||
## hdfs-site.xml:
|
||||
|
||||
```shell
|
||||
sudo nano /etc/hadoop/conf/hdfs-site.xml
|
||||
```
|
||||
|
||||
Modify existing property as below :
|
||||
|
||||
```shell
|
||||
<property>
|
||||
<name>dfs.replication</name>
|
||||
<value>1</value>
|
||||
<description>Default block replication.
|
||||
The actual number of replications can be specified when the file is created.
|
||||
The default is used if replication is not specified in create time.
|
||||
</description>
|
||||
</property>
|
||||
```
|
||||
|
||||
# Format Namenode
|
||||
This step is needed for the first time. Doing it every time will result in loss of content on HDFS.
|
||||
|
||||
```shell
|
||||
sudo /etc/init.d/hadoop-hdfs-namenode init
|
||||
```
|
||||
|
||||
# Start the YARN daemons
|
||||
|
||||
```shell
|
||||
for i in hadoop-hdfs-namenode hadoop-hdfs-datanode ; do sudo service $i start ; done
|
||||
sudo /etc/init.d/hadoop-yarn-resourcemanager start
|
||||
sudo /etc/init.d/hadoop-yarn-nodemanager start
|
||||
```
|
||||
|
||||
# Validating Hadoop
|
||||
Check if hadoop is running. jps command should list namenode, datanode, yarn resource manager. or use ps aux
|
||||
|
||||
```shell
|
||||
sudo jps
|
||||
```
|
||||
or
|
||||
|
||||
```shell
|
||||
ps aux | grep java
|
||||
```
|
||||
|
||||
Alternatively, check if yarn managers are running:
|
||||
|
||||
```shell
|
||||
sudo /etc/init.d/hadoop-yarn-resourcemanager status
|
||||
sudo /etc/init.d/hadoop-yarn-nodemanager status
|
||||
```
|
||||
|
||||
You would see like below:
|
||||
|
||||
```shell
|
||||
● hadoop-yarn-nodemanager.service - LSB: Hadoop nodemanager
|
||||
Loaded: loaded (/etc/init.d/hadoop-yarn-nodemanager)
|
||||
Active: active (running) since Tue 2015-12-22 18:25:03 UTC; 1h 24min ago
|
||||
CGroup: /system.slice/hadoop-yarn-nodemanager.service
|
||||
└─10366 /usr/lib/jvm/java-1.7.0-openjdk-arm64/bin/java -Dproc_node...
|
||||
|
||||
Dec 22 18:24:57 debian su[10348]: Successful su for yarn by root
|
||||
Dec 22 18:24:57 debian su[10348]: + ??? root:yarn
|
||||
Dec 22 18:24:57 debian su[10348]: pam_unix(su:session): session opened for ...0)
|
||||
Dec 22 18:24:57 debian hadoop-yarn-nodemanager[10305]: starting nodemanager, ...
|
||||
Dec 22 18:24:58 debian su[10348]: pam_unix(su:session): session closed for ...rn
|
||||
Dec 22 18:25:03 debian hadoop-yarn-nodemanager[10305]: Started Hadoop nodeman...
|
||||
```
|
||||
|
||||
|
||||
## Run teragen, terasort and teravalidate ##
|
||||
|
||||
```shell
|
||||
hadoop jar /usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar teragen 1000000 terainput
|
||||
|
||||
hadoop jar /usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar terasort terainput teraoutput
|
||||
|
||||
hadoop jar /usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar teravalidate -D mapred.reduce.tasks=8 teraoutput teravalidate
|
||||
```
|
||||
|
||||
## Stop the Hadoop services ##
|
||||
|
||||
```shell
|
||||
sudo /etc/init.d/hadoop-yarn-nodemanager stop
|
||||
|
||||
sudo /etc/init.d/hadoop-yarn-resourcemanager stop
|
||||
|
||||
for i in hadoop-hdfs-namenode hadoop-hdfs-datanode ; do sudo service $i stop; done
|
||||
```
|
||||
|
||||
## Potential Errors / Issues and Resolutions ##
|
||||
* If Teragen, TeraSort and TeraValidate error out with 'permission denied' exception. The following steps can be done:
|
||||
|
||||
```shell
|
||||
sudo groupadd supergroup
|
||||
|
||||
sudo usermod -g supergroup hduser
|
||||
```
|
||||
|
||||
* If for some weird reason, if you notice the config files (core-site.xml, hdfs-site.xml, etc) are empty.
|
||||
|
||||
```shell
|
||||
You may have delete all the packages and re-run the steps of installation from scratch.
|
||||
```
|
||||
|
||||
* Error while formatting namenode
|
||||
With the following command:
|
||||
|
||||
```shell
|
||||
sudo /etc/init.d/hadoop-hdfs-namenode init
|
||||
|
||||
|
||||
If you see the following error:
|
||||
WARN net.DNS: Unable to determine local hostname -falling back to "localhost"
|
||||
java.net.UnknownHostException: centos: centos
|
||||
at java.net.InetAddress.getLocalHost(InetAddress.java:1496)
|
||||
at org.apache.hadoop.net.DNS.resolveLocalHostname(DNS.java:264)
|
||||
at org.apache.hadoop.net.DNS.<clinit>(DNS.java:57)
|
||||
|
||||
Something is wrong in the network setup. Please check /etc/hosts file.
|
||||
|
||||
```shell
|
||||
sudo nano /etc/hosts
|
||||
```
|
||||
|
||||
The hosts file should like below:
|
||||
|
||||
```shell
|
||||
127.0.0.1 <hostname> localhost localhost.localdomain #hostname should have the output of $ hostname
|
||||
::1 localhost
|
||||
```
|
||||
|
||||
Also try the following steps:
|
||||
|
||||
```shell
|
||||
sudo rm -Rf /app/hadoop/tmp
|
||||
|
||||
hadoop namenode -format
|
||||
```
|
|
@ -1,82 +0,0 @@
|
|||
This post concentrates on installing ODPi components built using Apache BigTop. These steps configure and run the components on a single node.
|
||||
|
||||
# Prerequisites:
|
||||
|
||||
* Java 7 (e.g. openjdk-7-jre)
|
||||
|
||||
# Repo:
|
||||
|
||||
ODPi deb and rpm packages can be found on Linaro repositories:
|
||||
|
||||
* Debian Jessie - http://repo.linaro.org/ubuntu/linaro-overlay/
|
||||
* CentOS 7 - http://repo.linaro.org/rpm/linaro-overlay/centos-7/
|
||||
|
||||
|
||||
# Installation :
|
||||
|
||||
### On Debian:
|
||||
|
||||
Add to repo source list (**not required if you are using the installer from the Reference Platform**):
|
||||
|
||||
```shell
|
||||
echo "deb http://repo.linaro.org/ubuntu/linaro-overlay jessie main" | sudo tee /etc/apt/sources.list.d/linaro-overlay-repo.list
|
||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E13D88F7E3C1D56C
|
||||
```
|
||||
|
||||
Update the source list and install the dependencies:
|
||||
|
||||
```shell
|
||||
sudo apt-get update
|
||||
sudo apt-get install openssh-server rsync openjdk-7-jre openjdk-7-jdk
|
||||
sudo apt-get build-dep build-essential
|
||||
```
|
||||
|
||||
Install Hadoop packages:
|
||||
|
||||
```shell
|
||||
sudo apt-get install -ft jessie bigtop-tomcat bigtop-utils hadoop* spark* hue* zookeeper* hive* hbase* oozie* pig* mahout*
|
||||
```
|
||||
|
||||
### On CentOS:
|
||||
|
||||
```shell
|
||||
sudo wget http://repo.linaro.org/rpm/linaro-overlay/centos-7/linaro-overlay.repo -O /etc/yum.repos.d/linaro-overlay.repo
|
||||
sudo yum update
|
||||
sudo yum -y install openssh-server openssh-clients java-1.7.0-openjdk*
|
||||
sudo yum install -y bigtop-tomcat bigtop-utils hadoop* spark* hue* zookeeper* hive* hbase* oozie* pig* mahout*
|
||||
```
|
||||
|
||||
### Verifying Installation
|
||||
|
||||
Packages would get installed in /usr/lib
|
||||
|
||||
Type hadoop to check if hadoop is installed:
|
||||
|
||||
```shell
|
||||
hadoop
|
||||
```
|
||||
|
||||
And you should see the following:
|
||||
|
||||
```shell
|
||||
linaro@debian:~$ hadoop
|
||||
Usage: hadoop [--config confdir] COMMAND
|
||||
where COMMAND is one of:
|
||||
fs run a generic filesystem user client
|
||||
version print the version
|
||||
jar <jar> run a jar file
|
||||
checknative [-a|-h] check native hadoop and compression libraries availability
|
||||
distcp <srcurl> <desturl> copy file or directories recursively
|
||||
archive -archiveName NAME -p <parent path> <src>* <dest> create a hadoop archive
|
||||
classpath prints the class path needed to get the
|
||||
credential interact with credential providers
|
||||
Hadoop jar and the required libraries
|
||||
daemonlog get/set the log level for each daemon
|
||||
trace view and modify Hadoop tracing settings
|
||||
or
|
||||
CLASSNAME run the class named CLASSNAME
|
||||
```
|
||||
|
||||
Most commands print help when invoked w/o parameters.
|
||||
|
||||
Next Step: [Setup, Configuration and Running Hadoop](ODPi-BigTop-Hadoop-Config-Run.md)
|
|
@ -1,376 +0,0 @@
|
|||
# OpenStack Liberty - Debian Jessie
|
||||
|
||||
# Introduction
|
||||
|
||||
In general, the instructions in the Liberty install guide should be followed: http://docs.openstack.org/liberty/install-guide-ubuntu/overview.html. This guide will describe changes to the documented procedures that should be kept in mind while going through the guide.
|
||||
|
||||
Each section below will correspond to a section in the guide. Guide sections that do not have a corresponding section below may be followed as-is.
|
||||
|
||||
# Release Notes
|
||||
|
||||
## Configuring images for aarch64
|
||||
|
||||
An image must be configured specially in glance to be able to boot correctly on aarch64.
|
||||
To attach the devices to the virtio bus (which does not allow hotplugging a volume, but will work if the image does not have SCSI support), the following properties must be set:
|
||||
|
||||
```shell
|
||||
--property hw_machine_type=virt
|
||||
--property os_command_line='root=/dev/vda rw rootwait console=ttyAMA0'
|
||||
--property hw_cdrom_bus=virtio
|
||||
```
|
||||
|
||||
To attach the devices to the SCSI bus (which does allow hotplugging a volume, but might not be supported by the guest image), the following properties must be set:
|
||||
|
||||
```shell
|
||||
--property hw_scsi_model='virtio-scsi'
|
||||
--property hw_disk_bus='scsi'
|
||||
--property os_command_line='root=/dev/sda rw rootwait console=ttyAMA0'
|
||||
```
|
||||
|
||||
You can set these properties when you are uploading the image into glance, or modify the image if you have already uploaded it.
|
||||
|
||||
|
||||
# Pre-Installation
|
||||
|
||||
## Verify/enable additional repositories
|
||||
|
||||
Verify that the `linaro-overlay` and `jessie-backports` repositories are enabled.
|
||||
|
||||
Check if they are available by checking `/etc/apt/sources.list` and `/etc/apt/sources.list.d`.
|
||||
|
||||
If missing, add the following to `/etc/apt/sources.list.d` directory:
|
||||
|
||||
```shell
|
||||
$ echo "deb http://repo.linaro.org/ubuntu/linaro-overlay jessie main" | sudo tee /etc/apt/sources.list.d/linaro-overlay-repo.list
|
||||
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E13D88F7E3C1D56C
|
||||
```
|
||||
|
||||
If missing, add the following to `/etc/apt/sources.list.d` directory:
|
||||
|
||||
```shell
|
||||
$ echo "deb http://httpredir.debian.org/debian jessie-backports main" | sudo tee /etc/apt/sources.list.d/jessie-backports.list
|
||||
```
|
||||
|
||||
## Modify repository priorities
|
||||
|
||||
Create `/etc/apt/preferences.d/jessie-backports`:
|
||||
|
||||
```shell
|
||||
Package: *
|
||||
Pin: release a=jessie-backports
|
||||
Pin-Priority: 500
|
||||
```
|
||||
|
||||
Then, make sure to run apt-get update:
|
||||
|
||||
```shell
|
||||
$ sudo apt-get update
|
||||
```
|
||||
|
||||
## Environment
|
||||
|
||||
Update `/etc/hosts` to add “controller” as an alias for localhost.
|
||||
|
||||
```shell
|
||||
127.0.0.1 localhost controller
|
||||
```
|
||||
|
||||
## Disable IPV6
|
||||
|
||||
Add the following to `/etc/sysctl.conf`:
|
||||
|
||||
```shell
|
||||
net.ipv6.conf.all.disable_ipv6 = 1
|
||||
net.ipv6.conf.default.disable_ipv6 = 1
|
||||
net.ipv6.conf.lo.disable_ipv6 = 1
|
||||
net.ipv6.conf.eth0.disable_ipv6 = 1
|
||||
```
|
||||
|
||||
Run sysctl to apply the changes:
|
||||
|
||||
```shell
|
||||
$ sudo sysctl -p
|
||||
```
|
||||
|
||||
# Following the Openstack guide...
|
||||
|
||||
OpenStack guide: http://docs.openstack.org/liberty/install-guide-ubuntu/overview.html
|
||||
|
||||
## Environment
|
||||
|
||||
### Openstack Packages
|
||||
|
||||
Do not enable the `cloud-archive:liberty` repository.
|
||||
|
||||
Install some dependencies:
|
||||
|
||||
```shell
|
||||
$ sudo apt-get install openstack-cloud-services python-pymysql
|
||||
```
|
||||
|
||||
Answer the questions asked by debconf:
|
||||
|
||||
* New password for the MySQL **root** user: \<enter a password -- possibly "root">
|
||||
|
||||
Install the openstack client:
|
||||
|
||||
```shell
|
||||
$ sudo apt-get install python-openstackclient
|
||||
```
|
||||
|
||||
### NoSQL Database
|
||||
|
||||
The instructions in this section are not required, as Telemetry is not installed.
|
||||
|
||||
## Add the Identity service (Keystone)
|
||||
|
||||
Follow the Openstack guide with the exception of the following changes documented here.
|
||||
|
||||
### Install and configure
|
||||
|
||||
#### Prerequisites
|
||||
|
||||
Omit this section of the guide. These operations will be done during meta package installation later.
|
||||
|
||||
#### Install and configure components
|
||||
|
||||
Install the apache and the keystone meta package:
|
||||
|
||||
```shell
|
||||
$ sudo apt-get install openstack-cloud-identity
|
||||
```
|
||||
|
||||
Answer the questions asked by debconf:
|
||||
|
||||
* Set up a database for Keystone: **Yes**
|
||||
* Configure database for keystone with dbconfig-common: **Yes**
|
||||
* Database type to be used by keystone: **mysql**
|
||||
* Password of the database's administrative user: **\<use the password you used during database install>**
|
||||
* MySQL application password for keystone: **\<enter a password>**
|
||||
* Authentication server administration token: **\<enter a token value>**
|
||||
* Register administration tenants? **Yes**
|
||||
* Password of the administrative user: **\<enter a password>**
|
||||
* Register Keystone endpoint? **Yes**
|
||||
* Keystone endpoint IP address: **\<use default>**
|
||||
|
||||
#### Configure the Apache HTTP server
|
||||
|
||||
Omit this section of the guide.
|
||||
|
||||
#### Finalize the installation
|
||||
|
||||
Omit this section of the guide.
|
||||
|
||||
### Create the service entity and API endpoints
|
||||
|
||||
Omit this section of the guide.
|
||||
|
||||
### Create projects, users, and roles
|
||||
|
||||
Omit this section of the guide.
|
||||
|
||||
|
||||
## Add the Image service (Glance)
|
||||
|
||||
Follow the Openstack guide with the exception of the following changes documented here.
|
||||
|
||||
### Install and configure
|
||||
|
||||
#### Prerequisites
|
||||
|
||||
Omit this section of the guide. These operations will be done during package installation later.
|
||||
|
||||
#### Install and configure components
|
||||
|
||||
```shell
|
||||
$ sudo apt-get install glance
|
||||
```
|
||||
|
||||
Answer the questions asked by debconf:
|
||||
|
||||
* Set up a database for Glance: **Yes**
|
||||
* Configure database for glance-common with dbconfig-common? **Yes**
|
||||
* Database type to be used by glance-common: **mysql**
|
||||
* Password of the database's administrative user: **\<enter a password>**
|
||||
* MySQL application password for glance-common: **\<enter a password>**
|
||||
* IP address of your RabbitMQ host: **\<use default, or localhost, or controller>**
|
||||
* Username for connection to the RabbitMQ server: **guest**
|
||||
* Password for connection to the RabbitMQ server: **guest**
|
||||
* Pipeline flavor: **keystone**
|
||||
* Authentication server hostname: **\<use default, or localhost, or controller>**
|
||||
* Authentication server password: **\<enter a password>**
|
||||
* Register Glance in the Keystone endpoint catalog? **Yes**
|
||||
* Keystone authentication token: **\<enter the keystone token>**
|
||||
|
||||
#### Finalize installation
|
||||
|
||||
Omit this section of the guide.
|
||||
|
||||
### Verify operation
|
||||
|
||||
The CirrOS image to run on aarch64 is the file that ends in `-uec.tar.gz`. It must be extracted and each file (kernel, initrd, disk image) uploaded to Glance separately.
|
||||
|
||||
Download the CirrOS AArch64 UEC tarball and untar it:
|
||||
|
||||
```shell
|
||||
$ wget http://download.cirros-cloud.net/daily/20150923/cirros-d150923-aarch64-uec.tar.gz
|
||||
$ tar xvf cirros-d150923-aarch64-uec.tar.gz
|
||||
```
|
||||
|
||||
Upload the image parts into Glance. You will need to make note of the IDs assigned to the kernel and initrd and pass them on the command line when uploading the disk image:
|
||||
|
||||
```shell
|
||||
$ glance image-create --name "cirros-kernel" --visibility public --progress \
|
||||
--container-format aki --disk-format aki --file cirros-d150923-aarch64-vmlinuz
|
||||
|
||||
$ glance image-create --name "cirros-initrd" --visibility public --progress \
|
||||
--container-format ari --disk-format ari --file cirros-d150923-aarch64-initrd
|
||||
|
||||
$ glance image-create --name "cirros" --visibility public --progress \
|
||||
--property hw_machine_type=virt --property hw_cdrom_bus=virtio \
|
||||
-property os_command_line='console=ttyAMA0' \
|
||||
--property kernel_id=KERNEL_ID --property ramdisk_id=INITRD_ID \
|
||||
--container-format ami --disk-format ami --file cirros-d150923-aarch64-blank.img
|
||||
```
|
||||
|
||||
## Add the Compute service (Nova)
|
||||
|
||||
Follow the Openstack guide with the exception of the following changes documented here.
|
||||
|
||||
### Install and configure
|
||||
|
||||
#### Prerequisites
|
||||
|
||||
Omit this section of the guide. These operations will be done during package installation later.
|
||||
|
||||
#### Install and configure components
|
||||
|
||||
```shell
|
||||
$ sudo apt-get install nova-api nova-cert nova-conductor \
|
||||
nova-consoleauth nova-scheduler nova-compute
|
||||
```
|
||||
|
||||
Answer the questions asked by debconf:
|
||||
|
||||
* Set up a database for Nova: **Yes**
|
||||
* Configure database for nova-common with dbconfig-common? **Yes**
|
||||
* Database type to be used by nova-common: **mysql**
|
||||
* Password of the database's administrative user: **\<enter a password>**
|
||||
* MySQL application password for nova-common: **\<enter a password>**
|
||||
* IP address of your RabbitMQ host: **\<use default, or localhost, or controller>**
|
||||
* Username for connection to the RabbitMQ server: **guest**
|
||||
* Password for connection to the RabbitMQ server: **guest**
|
||||
* Auth server hostname: **\<use default, or localhost, or controller>**
|
||||
* Auth server password: **\<enter a password>**
|
||||
* Neutron server URL: **http://\<use default, or localhost, or controller>:9696**
|
||||
* Neutron administrator password: **\<enter a password>**
|
||||
* Metadata proxy shared secret: **\<enter a shared secret string>**
|
||||
* API to activate: choose **osapi_compute and metadata**
|
||||
* Value for my_ip: **\<default>**
|
||||
* Register Nova in the Keystone endpoint catalog? **Yes**
|
||||
* Keystone authentication token: **\<enter the keystone token>**
|
||||
|
||||
#### Finalize installation
|
||||
|
||||
Ensure that vnc and spice are disabled in `/etc/nova/nova.conf`. Look for the following keys in `nova.conf` and set them to False:
|
||||
|
||||
```shell
|
||||
vnc_enabled=false
|
||||
|
||||
[spice]
|
||||
enabled=false
|
||||
```
|
||||
|
||||
Enable KVM by ensuring the following is in `nova-compute.conf`:
|
||||
|
||||
```shell
|
||||
[DEFAULT]
|
||||
compute_driver=libvirt.LibvirtDriver
|
||||
|
||||
[libvirt]
|
||||
virt_type=kvm
|
||||
```
|
||||
|
||||
**NOTE: Until kernel support for KVM is properly enabled, instances can be run in emulation by ensuring the following is in `nova-compute.conf`**:
|
||||
|
||||
```shell
|
||||
[DEFAULT]
|
||||
compute_driver=libvirt.LibvirtDriver
|
||||
|
||||
[libvirt]
|
||||
cpu_mode = custom
|
||||
virt_type = qemu
|
||||
cpu_model = cortex-a57
|
||||
```
|
||||
|
||||
**IMPORTANT: If you make changes to `nova.conf`, or `nova-compute.conf`, restart the nova services:**
|
||||
|
||||
```shell
|
||||
$ sudo service nova-compute restart
|
||||
```
|
||||
|
||||
|
||||
## Add the Networking service (Neutron)
|
||||
|
||||
Follow the Openstack guide with the exception of the following changes documented here.
|
||||
|
||||
### Install and configure
|
||||
|
||||
#### Prerequisites
|
||||
|
||||
Omit this section of the guide. These operations will be done during package installation later.
|
||||
|
||||
#### Install and configure components
|
||||
|
||||
```shell
|
||||
$ sudo apt-get install neutron-server neutron-plugin-ml2 \
|
||||
neutron-plugin-linuxbridge-agent neutron-dhcp-agent \
|
||||
neutron-metadata-agent
|
||||
```
|
||||
|
||||
Answer the questions asked by debconf:
|
||||
|
||||
* neutron-common
|
||||
* Set up a database for Neutron: **Yes**
|
||||
* Configure database for neutron-common with dbconfig-common? **Yes**
|
||||
* Database type to be used by neutron-common: **mysql**
|
||||
* Password of the database's administrative user: **\<enter a password>**
|
||||
* MySQL application password for neutron-common: **\<enter a password>**
|
||||
* IP address of your RabbitMQ host: **\<use default, or localhost, or controller>**
|
||||
* Username for connection to the RabbitMQ server: **guest**
|
||||
* Password for connection to the RabbitMQ server: **guest**
|
||||
* Authentication server hostname: **\<use default, or localhost, or controller>**
|
||||
* Authentication server password: **\<enter a password>**
|
||||
* Neutron plugin: **ml2**
|
||||
* neutron-metadata-agent
|
||||
* Auth server hostname: **\<use default, or localhost, or controller>**
|
||||
* Auth server password: **\<enter a password>**
|
||||
* Name of the region to be used by the metadata server: **\<default>**
|
||||
* Metadata proxy shared secret: **\<enter the shared secret string entered for Nova>**
|
||||
* neutron-server
|
||||
* Register Neutron in the Keystone endpoint catalog? **Yes**
|
||||
* Keystone authentication token: **\<enter the keystone token>**
|
||||
|
||||
#### Configure networking options
|
||||
Follow "Networking Option 1: Provider networks".
|
||||
|
||||
#### Finalize installation
|
||||
|
||||
Omit this section of the guide.
|
||||
|
||||
|
||||
## Launch an instance
|
||||
|
||||
### Create virtual networks
|
||||
|
||||
Follow section “Public provider network”
|
||||
|
||||
### Launch an instance
|
||||
|
||||
Follow section “Launch an instance on the public network”
|
||||
|
||||
NOTE: Accessing an image via the virtual console (VNC) will not work, as VNC is not supported. You may access the console log using the following command:
|
||||
|
||||
```shell
|
||||
$ nova console-log --length=10 INSTANCE_ID
|
||||
```
|
|
@ -1,359 +0,0 @@
|
|||
## UEFI/EDK2
|
||||
|
||||
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)
|
||||
|
||||
### Building
|
||||
|
||||
#### Pre-Requisites
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
#### Building UEFI/EDK2 for Juno R0/R1
|
||||
|
||||
```shell
|
||||
export AARCH64_TOOLCHAIN=GCC49
|
||||
export LINARO_EDK2_DIR=${PWD}/edk2
|
||||
export UEFI_TOOLS_DIR=${PWD}/uefi-tools
|
||||
export ARMTF_DIR=${PWD}/arm-trusted-firmware
|
||||
cd ${LINARO_EDK2_DIR}
|
||||
${UEFI_TOOLS_DIR}/uefi-build.sh -b DEBUG -a $ARMTF_DIR juno
|
||||
```
|
||||
|
||||
The output files:
|
||||
|
||||
- `Build/ArmJuno/DEBUG_GCC49/FV/bl1.bin`
|
||||
- `Build/ArmJuno/DEBUG_GCC49/FV/fip.bin`
|
||||
|
||||
#### 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`
|
||||
|
||||
#### 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`
|
||||
|
||||
#### 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`
|
||||
|
||||
#### 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`
|
||||
|
||||
### Flashing
|
||||
|
||||
#### Juno R0/R1
|
||||
|
||||
##### Clean flash
|
||||
|
||||
Power on the board, and (if prompted) press Enter to stop auto boot. Once in Juno's boot monitor, use the following commands to erase Juno's flash and export it as an external storage:
|
||||
|
||||
```shell
|
||||
Cmd> flash
|
||||
Flash> eraseall
|
||||
Flash> quit
|
||||
Cmd> usb_on
|
||||
```
|
||||
|
||||
This will delete any binaries and UEFI settings currently stored in the Juno's flash, then mount the Juno's MMC card as an external storage device on your host PC.
|
||||
|
||||
In order to do a clean flash on Juno, you will also need to flash the firmware provided by ARM, which can be downloaded from the Linaro ARM LT Versatile Express Firmware git tree:
|
||||
|
||||
```shell
|
||||
git clone -b juno-0.11.6-linaro1 --depth 1 https://git.linaro.org/arm/vexpress-firmware.git
|
||||
```
|
||||
|
||||
Then copy over the UEFI/EDK2 files that were built in the previous steps, making sure they get copied to the right firmware folder location:
|
||||
|
||||
```shell
|
||||
cp $LINARO_EDK2_DIR/Build/ArmJuno/DEBUG_GCC49/FV/bl1.bin vexpress-firmware/SOFTWARE
|
||||
cp $LINARO_EDK2_DIR/Build/ArmJuno/DEBUG_GCC49/FV/fip.bin vexpress-firmware/SOFTWARE
|
||||
```
|
||||
|
||||
Now just copy all the files that are now available in the 'vexpress-firmware' folder into the mounted MMC card (which is provided as an external storage after calling 'usb_on'):
|
||||
|
||||
```shell
|
||||
cp -rf vexpress-firmware/* /media/recovery
|
||||
```
|
||||
|
||||
Be sure to issue a sync command on your host PC afterwards, which will guarantee that the copy has completed:
|
||||
|
||||
```shell
|
||||
sync
|
||||
```
|
||||
|
||||
Finally, power cycle the Juno. After it has finished copying the contents of the MMC card into Flash, the board will boot up and run the new firmware.
|
||||
|
||||
##### Upgrading UEFI/EDK2
|
||||
|
||||
If you already have a known working firmware available in your Juno, you simply need to update 'bl1.bin' and 'fip.bin', by mounting Juno's MMC over usb (as described in the procedure for clean flash).
|
||||
|
||||
Export Juno's MMC as a usb storage device on your host machine:
|
||||
|
||||
```shell
|
||||
Cmd> usb_on
|
||||
```
|
||||
|
||||
Then just copy over the UEFI/EDK2 files that were built in the previous steps:
|
||||
|
||||
```shell
|
||||
cp $LINARO_EDK2_DIR/Build/ArmJuno/DEBUG_GCC49/FV/bl1.bin /media/recovery/SOFTWARE
|
||||
cp $LINARO_EDK2_DIR/Build/ArmJuno/DEBUG_GCC49/FV/fip.bin /media/recovery/SOFTWARE
|
||||
```
|
||||
|
||||
Be sure to issue a sync command on your host PC afterwards, which will guarantee that the copy has completed:
|
||||
|
||||
```shell
|
||||
sync
|
||||
```
|
||||
|
||||
Then just power cycle the Juno and the board should see and use the new firmware.
|
||||
|
||||
#### D02
|
||||
|
||||
Flashing D02 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
|
||||
|
||||
First make sure the built firmware is available in your FTP server ('PV660D02.fd'):
|
||||
|
||||
```shell
|
||||
cp PV660D02.fd /srv/tftp/
|
||||
```
|
||||
|
||||
Now follow the steps below in order to fetch and flash the new firmware:
|
||||
|
||||
1. Power off the board and unplug the power supply.
|
||||
2. Push the dial switch **3. CPU0_SPI_SEL** to **off** (check [http://open-estuary.com/d02-2/](http://open-estuary.com/d02-2/) for the board picture)
|
||||
- The board has two SPI flash chips, and this switch selects which one to boot from.
|
||||
3. Power on the device, stop the boot from the serial console, and get into the the 'Embedded Boot Loader (EBL)' shell
|
||||
4. Push the dial switch **3. CPU0_SPI_SEL** to **on**
|
||||
- **NOTE:** make sure to run the step above before running 'biosupdate' (as it modifies the flash), or else the backup BIOS will also be modified and there will be no way to unbrick the board (unless sending it back to Huawei).
|
||||
5. 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 PV660D02.fd master'
|
||||
6. Exit the EBL console and reboot the board
|
||||
|
||||
##### Upgrading 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 ('PV660D02.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 PV660D02.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.
|
||||
|
||||
#### 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
|
||||
|
||||
First make sure the built firmware is available in your FTP server ('D03.fd'):
|
||||
|
||||
```shell
|
||||
cp D03.fd /srv/tftp/
|
||||
```
|
||||
|
||||
Now follow the steps below in order to fetch and flash the new firmware:
|
||||
|
||||
1. Power off the board and unplug the power supply.
|
||||
2. Push the dial switch **3. CPU0_SPI_SEL** to **off** (check [http://open-estuary.com/d03-2/](http://open-estuary.com/d03-2/) for the board picture)
|
||||
- The board has two SPI flash chips, and this switch selects which one to boot from.
|
||||
3. Power on the device, stop the boot from the serial console, and get into the the 'Embedded Boot Loader (EBL)' shell
|
||||
4. Push the dial switch **3. CPU0_SPI_SEL** to **on**
|
||||
- **NOTE:** make sure to run the step above before running 'biosupdate' (as it modifies the flash), or else the backup BIOS will also be modified and there will be no way to unbrick the board (unless sending it back to Huawei).
|
||||
5. 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'
|
||||
6. Exit the EBL console and reboot the board
|
||||
|
||||
##### Upgrading 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
|
||||
dd if=/dev/zero of=FIRMWARE.ROM ibs=512K count=23 obs=1M oflag=append conv=notrunc
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
##### Upgrading 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)
|
|
@ -1,47 +0,0 @@
|
|||
# Reference Software Test Platform - 16.06
|
||||
|
||||
<p align="center">
|
||||
<b>Announcements</b><br>
|
||||
<a href="#">[Previous RPB Releases](../PreviousReleases/README.md)</a> |
|
||||
<a href="#">[RPB 16.06 Highlights](../Highlights.md)</a> |
|
||||
<a href="#">[Known Issues](../Known-Issues.md)</a> |
|
||||
<a href="#">[Kernel Roadmap](../Kernel-Roadmap.md)</a> |
|
||||
<a href="#">[RPB 16.06 Status](../RPB-future-status.md)</a>
|
||||
<br>
|
||||
|
||||
***
|
||||
|
||||
## QuickStart
|
||||
|
||||
Choose Consumer Edition or Enterprise Edition to start setting up your instruction set. Download, build, and install your preferred Reference Platform operating system and/or components. Pre-built images and "build from source" options are available.
|
||||
|
||||
#### Reference Software - Consumer Edition
|
||||
- [DragonBoard™ 410c](ConsumerEdition/DragonBoard-410c/README.md)
|
||||
|
||||
#### Reference Software - Enterprise Edition
|
||||
- [D02](EnterpriseEdition/D02/README.md)
|
||||
- [D03](EnterpriseEdition/D03/README.md)
|
||||
- [AMD Overdrive](EnterpriseEdition/Overdrive/README.md)
|
||||
- [X-Gene Mustang](EnterpriseEdition/X-Gene-Mustang/README.md)
|
||||
- [HP ProLiant m400](EnterpriseEdition/HP-ProLiant-m400/README.md)
|
||||
- [Cavium Thunder X](EnterpriseEdition/ThunderX/README.md)
|
||||
- [Qualcomm Q2432LZB](EnterpriseEdition/Q2432LZB/README.md)
|
||||
|
||||
Enterprise Test Reports: ([Debian](https://builds.96boards.org/releases/reference-platform/components/debian-installer/16.06/EE-Debian-RPB-16.06-TestReport.pdf) / [CentOS](https://builds.96boards.org/releases/reference-platform/components/centos-installer/16.06/EE-CentOS-RPB-16.06-TestReport.pdf))
|
||||
|
||||
***
|
||||
|
||||
#### Resources
|
||||
|
||||
- [RPB CI](../RPB-CI.md)
|
||||
- [Report a bug](../Report-a-bug.md)
|
||||
- [Feedback and Support](../Feedback-and-Support.md)
|
||||
- [Kernel Policy](../KernelPolicy.md)
|
||||
|
||||
***
|
||||
|
||||
<p align="left">
|
||||
<b></b>
|
||||
<a href="#">[Contribute to RPB](../Contribute/README.md)</a> |
|
||||
<a href="#">[Doc Contribution Policy](../ContributionPolicy.md)</a> |
|
||||
<br>
|
Loading…
Add table
Add a link
Reference in a new issue