xref: /openbsd/distrib/notes/armv7/prep (revision 4675fc66)
1dnl	$OpenBSD: prep,v 1.19 2020/05/17 17:04:28 deraadt Exp $
2Please be aware that OpenBSD support for this platform is far from
3complete.
4
5To perform an installation you must be able to interact with the serial
6console of the machine.  USB OTG ports such as the one found on the
7BeagleBone will not function as a console.  You need to be able to
8interact with the firmware on the console.  Often this requires a 3.3V
9TTL level adapter connected to pins or a header on the board.
10
11Firmware which provides an EFI interface with a Device Tree Blob (DTB)
12file is required to boot.  In most cases this is provided by images of
13U-Boot 2016.07 or newer on SD/MMC devices or in SPI flash.  If the
14miniroot images are used, U-Boot and DTB files are distributed as part
15of the miniroot disk images.
16
17OpenBSD can be installed onto a disk by copying the miniroot for your
18board "miniroot-board-{:--:}OSrev.img" image to an SD card.
19
20Booting from an SD card:
21
22  To use the miniroot image you will need another machine to plug the
23  SD card in to. Any machine type will do, as long as it supports SD card
24  storage devices.  Under OpenBSD, it will appear as a ``sd'' device, for
25  example sd1.
26
27  Use the dd(1) utility to copy the miniroot to the hard drive.
28  The command would likely be, under OpenBSD:
29  	dd if=miniroot-am335x-{:--:}OSrev.img of=/dev/rsd1c
30
31  When you have connected the BeagleBone to your computer, a command such
32  as "cu -l cuaU0 -s 115200" (assuming cuaU0 is your serial port device)
33  should connect you to the board's console.
34
35  Note: By default the BeagleBone Black will boot from the internal emmc.
36  In order to make it boot from the micro SD card, you will need to hold down
37  the small button located by the SD card slot while powering on the board.
38  Once you have done this the board will boot from the SD card as the default.
39
40Running EFI payloads with U-Boot:
41
42If the U-Boot target supports "distro_bootcmd" efiboot will automatically
43be loaded by placing bootarm.efi into /efi/boot/bootarm.efi on a FAT
44filesystem.  With dtb files placed in in /, /dtbs/, or /dtb/current/.
45
46If the U-Boot target supports bootefi but not automatically finding it with
47"distro_bootcmd" then it must be loaded manually or by U-Boot commands or
48script.
49	=> run findfdt
50	=> load mmc 0:1 ${fdt_addr_r} ${fdtfile}
51	=> load mmc 0:1 ${kernel_addr_r} efi/boot/bootarm.efi
52	=> bootefi ${kernel_addr_r} ${fdt_addr_r}
53The bootloader will then run and try to load sd0a:/bsd off an FFS
54filesystem after a timeout.
55
56Install on systems without a supported miniroot:
57
58  If a miniroot is not available for your system you will have to modify
59  an existing image before booting it.
60
61  To do so first install the u-boot-arm and dtb packages.  Write one of the
62  provided miniroot images to an SD card:
63
64 	dd if=miniroot-am335x-{:--:}OSrev.img of=/dev/rsdXc
65
66  Add a board specific DTB file (Allwinner and Rockchip U-Boot images
67  come with a default DTB):
68
69 	mount /dev/sdXi /mnt
70 	cp /usr/local/share/dtb/arm/board.dtb /mnt/
71 	umount /mnt
72
73  For systems based on Texas Instruments OMAP and AMxxxx SoCs:
74
75 	mount /dev/sdXi /mnt
76 	cp /usr/local/share/u-boot/board/{MLO,u-boot.img} /mnt/
77 	umount /mnt
78
79  For systems based on Freescale/NXP i.MX SoCs:
80
81 	dd if=/usr/local/share/u-boot/board/SPL of=/dev/sdXc bs=1024 seek=1
82 	dd if=/usr/local/share/u-boot/board/u-boot.img \
83 	    of=/dev/sdXc bs=1024 seek=69
84
85  For systems based on Allwinner Axx SoCs:
86
87 	dd if=/usr/local/share/u-boot/board/u-boot-sunxi-with-spl.bin \
88 	    of=/dev/sdXc bs=1024 seek=8
89
90  For systems based on Rockchip RK3288 SoCs:
91
92 	dd if=/usr/local/share/u-boot/board/idbloader.img \
93 	    of=/dev/sdXc seek=64
94 	dd if=/usr/local/share/u-boot/board/u-boot.img \
95 	    of=/dev/sdXc seek=16384
96
97  For systems based on Marvell ARMADA 38x SoCs:
98
99 	dd if=/usr/local/share/u-boot/board/u-boot-spl.kwb \
100 	    of=/dev/sdXc bs=512 seek=1
101