Describe WorkingGroups/Kernel/ARMv8/NewJunoBoard here.

Booting a kernel on Juno using TFTP

Booting a Linux kernel using the TFTP protocol on Juno isn't hard but a little tricky. This wiki will describe the journey in the hope of getting people going quickly without having to suffer much like many others have before.

Preparing the environment

TFTP Server Configuration

The TFTP server being connected to needs a little bit of configuration in order to work properly with the UEFI build 1.2. In file "dhcpd.conf" the following configuration is suggested:

subnet 192.168.1.0 netmask 255.255.255.0 {
   range 192.168.1.65 192.168.1.127;
   option broadcast-address 192.168.1.255;
   option domain-name-servers 192.168.1.1, router;
   option routers 192.168.1.254;
}

host juno {
   hardware ethernet 00:02:F7:00:57:DD;
   fixed-address 192.168.1.33;
   filename "shell64.efi";               <---- Very important
}

IP network specifics aren't important and can be whatever is best for the operating environment. On the flips side adding a "filename" configuration is very important. The file doesn't have to exist and is simply there to satisfy UEFI. If this configuration is not added the Juno board will drop DHCP reply silently, preventing the system from booting.

Using the Correct Ethernet Port

The ethernet port on the _front_ of the system should be used. The one at the back, next to the PS2 ports isn't supported by UEFI. If the system is to be connected to another computer without an intermediate hub or switch, a cross-over cable needs to be used.

Test the Setup Beforehand

It is highly recommended to test that DHCP is alive on a system (and giving out IP addresses). The same advise goes for TFTP. UEFI on Juno is very dry with regards to error messages and troubleshooting facilities.

UEFI Configuration

When arriving at the "Cmd >" prompt, typing "reboot" will start the system. From there the normal boot process needs to be interrupted when prompted to. At that time something like the following should be visible on the condole:

The default boot selection will start in   4 seconds
[1] Linux from NOR Flash
[2] Shell
[3] Boot Manager
Start: 

The boot manager section needs to be accessed to configure a new TFTP boot command:

The default boot selection will start in   4 seconds
[1] Linux from NOR Flash
[2] Shell
[3] Boot Manager
Start: 3 
[1] Add Boot Device Entry
[2] Update Boot Device Entry
[3] Remove Boot Device Entry
[4] Reorder Boot Device Entries
[5] Update FDT path
[6] Set Boot Timeout
[7] Return to main menu
Choice:

To create a new boot device entry:

[1] Add Boot Device Entry
[2] Update Boot Device Entry
[3] Remove Boot Device Entry
[4] Reorder Boot Device Entries
[5] Update FDT path
[6] Set Boot Timeout
[7] Return to main menu
Choice: 1
[1] Firmware Volume (0 MB)
[2] Firmware Volume (0 MB)
[3] NOR Flash (63 MB)
[4] boot (67 MB)
[5] VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)
[6] VenHw(02118005-9DA7-443A-92D5-781F022AEDBB)
[7] PXE on MAC Address: 00:02:F7:00:5D:AB
[8] TFTP on MAC Address: 00:02:F7:00:5D:AB
Select the Boot Device: 

If there is something wrong with the cable connected to the Ethernet port option 7 and 8 will not be displayed. The TFTP boot entry needs to be selected and instructions followed from thereon. In this example a Linux kernel using a device tree but no initrd is booted:

[1] Firmware Volume (0 MB)
[2] Firmware Volume (0 MB)
[3] NOR Flash (63 MB)
[4] boot (67 MB)
[5] VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)
[6] VenHw(02118005-9DA7-443A-92D5-781F022AEDBB)
[7] PXE on MAC Address: 00:02:F7:00:5D:AB
[8] TFTP on MAC Address: 00:02:F7:00:5D:AB
Select the Boot Device: 8
Get the IP address from DHCP: [y/n] y
Get the TFTP server IP address: 192.168.2.100
File path of the EFI Application or the kernel : Image
Has FDT support? [y/n] y
Add an initrd: [y/n] n
Arguments to pass to the binary:  console=ttyAMA0,115200 earlyprintk=pl011,0x7ff80000 root=/dev/sda2 rootwait verbose de
bug
Description for this new Entry: TFTP boot example
[1] Add Boot Device Entry
[2] Update Boot Device Entry
[3] Remove Boot Device Entry
[4] Reorder Boot Device Entries
[5] Update FDT path
[6] Set Boot Timeout
[7] Return to main menu
Choice:

At this time all that is required is the device tree configuration:

[1] Add Boot Device Entry
[2] Update Boot Device Entry
[3] Remove Boot Device Entry
[4] Reorder Boot Device Entries
[5] Update FDT path
[6] Set Boot Timeout
[7] Return to main menu
Choice: 5
[1] Firmware Volume (0 MB)
[2] Firmware Volume (0 MB)
[3] NOR Flash (63 MB)
[4] boot (67 MB)
[5] VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)
[6] VenHw(02118005-9DA7-443A-92D5-781F022AEDBB)
[7] PXE on MAC Address: 00:02:F7:00:5D:AB
[8] TFTP on MAC Address: 00:02:F7:00:5D:AB
Select the Boot Device: 8
Get the IP address from DHCP: [y/n] y
Get the TFTP server IP address: 192.168.2.100
File path of the FDT blob : juno.dtb
[1] Add Boot Device Entry
[2] Update Boot Device Entry
[3] Remove Boot Device Entry
[4] Reorder Boot Device Entries
[5] Update FDT path
[6] Set Boot Timeout
[7] Return to main menu
Choice:

The newly configured boot option can be tested by returning to the main menu:

[1] Add Boot Device Entry
[2] Update Boot Device Entry
[3] Remove Boot Device Entry
[4] Reorder Boot Device Entries
[5] Update FDT path
[6] Set Boot Timeout
[7] Return to main menu
Choice: 7
[1] Linux from NOR Flash
[2] TFTP boot example
[3] Shell
[4] Boot Manager
Start: 2
   PEI    220 ms
   DXE   3973 ms
   BDS  69042 ms
Total Time = 73236 ms

[    0.000000] Linux version 3.10.59+ (mpoirier@t430) (gcc version 4.8.3 20131111 (prerelease) (crosstool-NG linaro-1.13
.1-4.8-2013.11 - Linaro GCC 2013.10) ) #26 SMP Thu Jan 8 10:13:48 MST 2015
[    0.000000] CPU: AArch64 Processor [410fd030] revision 0
[    0.000000] Machine: Juno
[    0.000000] Ignoring memory range 0x80000000 - 0x87800000
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] cma: CMA: reserved 32 MiB at fc800000
[    0.000000] On node 0 totalpages: 2062336
[    0.000000]   DMA zone: 6748 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 489472 pages, LIFO batch:31
[    0.000000]   Normal zone: 21504 pages used for memmap
[    0.000000]   Normal zone: 1572864 pages, LIFO batch:31
[    0.000000] psci: probing function IDs from device-tree
[    0.000000] PERCPU: Embedded 12 pages/cpu @ffffffc9786f3000 s17984 r8192 d22976 u49152
[    0.000000] pcpu-alloc: s17984 r8192 d22976 u49152 alloc=12*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [0] 4 [0] 5 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 2034084
[    0.000000] Kernel command line:  console=ttyAMA0,115200 earlyprintk=pl011,0x7ff80000 root=/dev/sda2 rootwait verbose
 debug
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
...
...

WorkingGroups/Kernel/ARMv8/TFTPJunoBoard (last modified 2015-01-08 18:41:51)