5.1. Arrancar o Instalador em 64-bit ARM

5.1.1. Configuração da consola

The graphical installer is not enabled on the arm64 debian-installer images for jessie so the serial console is used. The console device should be detected automatically from the firmware, but if it is not then after you boot linux from the GRUB menu you will see a 'Booting Linux' message then nothing more.

If you hit this issue you will need to set a specific console config on the kernel command line. Hit e for 'Edit Kernel command-line' at the GRUB menu, and change

--- quiet

to

console=<device>,<speed>

e.g.

console=ttyAMA0,115200n8

When finished hit Control+x to continue booting with new setting.

5.1.2. Juno Installation

Juno has UEFI so the install is straightforward. The most practical method is installing from USB stick. You need up to date firmware for USB-booting to work. Builds from http://releases.linaro.org/latest/members/arm/ after March 2015 tested OK. Consult Juno documentation on firmware updating.

Prepare a standard arm64 CD image on a USB stick. Insert it in one of the USB ports on the back. Plug a serial cable into the upper 9-pin serial port on the back. If you need networking (netboot image) plug the ethernet cable into the socket on the front of the machine.

Run a serial console at 115200, 8bit no parity, and boot the Juno. It should boot from the USB stick to a GRUB menu. The console config is not correctly detected on Juno so just hitting return will show no kernel output. Set the console to

console=ttyAMA0,115200n8

as described in (Secção 5.1.1, “Configuração da consola”). Control+x to boot should show you the debian-installer screens, and allow you to proceed with a standard installation.

5.1.3. Applied Micro Mustang Installation

UEFI is available for this machine but it is normally shipped with U-Boot so you will need to either install UEFI firmware first then use standard boot/install methods, or use U-Boot boot methods. Also USB is not supported in the jessie kernel so installing from a USB stick does not work. You must use a serial console to control the installation because the graphical installer is not enabled on the arm64 architecture.

The recommended install method is to copy the debian-installer kernel and initrd onto the hard drive, using the openembedded system supplied with the machine, then boot from that to run the installer. Alternatively use TFTP to get the kernel/dtb/initrd copied over and booted (Secção 5.1.4.1, “Arranque por TFTP em U-Boot”). After installation, manual changes to boot from the installed image are needed.

Run a serial console at 115200, 8bit no parity, and boot the machine. Reboot the machine and when you see "Hit any key to stop autoboot:" hit a key to get a Mustang# prompt. Then use U-Boot commands to load and boot the kernel, dtb and initrd.

5.1.4. Arrancar por TFTP

Arrancar pela rede requer que tenha uma ligação de rede e um servidor TFTP de arranque por rede (e provavelmente também um servidor de DHCP, RARP ou BOOTP para a configuração automática de rede).

A configuração do servidor para suportar arranque pela rede é descrita em Secção 4.3, “Preparar Ficheiros para Arrancar Através da Rede por TFTP”.

5.1.4.1. Arranque por TFTP em U-Boot

O arranque pela rede em sistemas que utilizam o firmware U-Boot consiste em três passos: a) configurar a rede, b) carregar as imagens (kernel/ramdisk inicial/dtb) para a memória e c) efectivamente executar o código carregado.

Primeiro tem de configurar a rede, quer automaticamente por DHCP ou correndo

setenv autoload no
dhcp

ou manualmente definindo várias variáveis de ambiente

setenv ipaddr <endereço ip do cliente>
setenv netmask <máscara de rede>
setenv serverip <endereço ip do servidor de tftp>
setenv dnsip <endereço ip do servidor de nomes (dns)>
setenv gatewayip <endereço ip da gateway predefinida>

saveenv

Depois tem de carregar as imagens (kernel/ramdisk inicial) para a memória. Isto é feito com o comando tftpboot, ao qual tem de ser passado o endereço a partir de onde é guardada na memória a imagem. Infelizmente o mapa de memória pode variar entre sistemas, por isso não há uma regra genérica com os endereços que possam ser utilizados para isto.

Em alguns sistemas, U-Boot pré-define um conjunto de variáveis de ambiente com endereços de carregamento apropriados: kernel_addr_r, ramdisk_addr_r e fdt_addr_r. Pode verificar se estão definidos ao correr

printenv kernel_addr_r ramdisk_addr_r fdt_addr_r

Se não estiverem definidos, tem que verificar a documentação do seu sistema por valores apropriados e defini-los manualmente. Para sistemas baseados em Allwinner SunXi SOCs (e.g. o Allwinner A10, nome de arquitectura sun4i ou o Allwinner A20, nome de arquitectura sun7i), pode por exemplo utilizar os seguintes valores:

setenv kernel_addr_r 0x46000000
setenv fdt_addr_r 0x47000000
setenv ramdisk_addr_r 0x48000000

Quando estiverem definidos os endereços de carregamento, pode assim carregar as imagens para a memória a partir do servidor tftp anteriormente definido:

tftpboot ${kernel_addr_r} <nome de ficheiro da imagem do kernel>
tftpboot ${fdt_addr_r} <nome de ficheiro de dtb>
tftpboot ${ramdisk_addr_r} <nome de ficheiro da imagem inicial de ramdisk>

A terceira parte é definir a linha de comandos do kernel e executar o código carregado. U-boot passa o conteúdo da variável de ambiente bootargs como linha de comandos do kernel, por isso quaisquer parâmetros para o kernel e instalador - tais como dispositivo de consola (veja Secção 5.3.1, “Consola de arranque”) ou opções de preseeding (seja Secção 5.3.2, “Parâmetros de instalação Debian” e Apêndice B, Automatizar a instalação utilizando 'preseeding') - pode ser definido com um comando como

setenv bootargs console=ttyS0,115200 rootwait panic=10

O comando exato a executar o código carregado anteriormente depende do formato de imagem utilizado. Com uImage/uInitrd o comando é

bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}

e com imagens nativas de Linux é

bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}

Nota: Quando arrancar imagens standard de linux, é importante carregar a imagem ramdisk inicial após o kernel e o dtb já que U-Boot define a variável de tamanho de ficheiro ao tamanho do último ficheiro carregado e o comando bootz necessita o tamanho da imagem ramdisk para funcionar correctamente. Em caso de arrancar um kernel específico da plataforma, i.e. um kernel sem device-tree, simplesmente omita o parâmetro ${fdt_addr_r}.