xref: /openbsd-src/distrib/notes/octeon/install (revision aafbe89544c5a393b892ba7defc2547a5f881318)
1dnl	$OpenBSD: install,v 1.20 2022/03/02 09:35:24 stsp Exp $
2OpenBSDInstallPrelude
3
4OpenBSDInstallPart2
5
6OpenBSDInstallPart3(,"octcf0 for internal CompactFlash storage.")
7dnl sd0 for USB storage, or wd0 for internal hard disk storage attached to the SATA port
8
9OpenBSDInstallPart4
10
11OpenBSDInstallMBRPart1
12
13dnl OpenBSDInstallMBRPart2
14	The fdisk(8) utility will be invoked to let you edit your MBR
15	partitioning.  The current MBR partitions defined will be
16	displayed and you will be allowed to modify them, and add new
17	partitions.
18
19	The setup will need two partitions, one 'OpenBSD' for the
20	OpenBSD/MACHINE installation, and one 'MSDOS' for the
21	U-Boot scripts/bootloader.
22
23	If you use the whole disk option, the install script
24	will create a small 'MSDOS' partition and use the rest of
25	the disk for the OpenBSD installation.
26
27	After your OpenBSD MBR partition has been set up, the real
28	partition setup can follow.
29
30OpenBSDInstallPart5({:-
31	U-Boot partitions defined on the disk will usually show up as
32	partition 'i', 'j' and so on.-:})
33
34dnl OpenBSDInstallPart6({:-CD-ROM, -:})
35OpenBSDInstallPart6
36
37OpenBSDURLInstall
38
39dnl OpenBSDCDROMInstall
40
41OpenBSDNFSInstall
42
43OpenBSDDISKInstall({:-"octcfN" or -:},,{:-, Linux (ext2) or MS-DOS-:})
44
45OpenBSDCommonInstall
46
47OpenBSDInstallWrapup
48
49U-Boot has to be configured to load the OpenBSD/octeon bootloader.
50
51From the U-Boot commandline, make a copy of the current ${bootcmd} so you can
52restore it later if needed:
53
54	# setenv old_bootcmd "${bootcmd}"
55
56${bootcmd} is run by U-Boot when ${autoload} is enabled. Now create a new
57${bootcmd} which will load an ELF file called 'boot' from the first active FAT
58partition on the first CF card. The FAT partition has been created by the
59installer.
60
61	# setenv bootcmd 'fatload ide 0:1 ${loadaddr} boot;bootoctlinux rootdev=octcf0'
62	# setenv bootdelay 5
63	# saveenv
64	Saving Environment to Flash...
65	Un-Protected 1 sectors
66	Erasing Flash...
67	. done
68	Erased 1 sectors
69	Writing to Flash... .done
70	Protected 1 sectors
71	#
72
73If you have installed onto SD/MMC, SATA or USB, use the following
74bootcmd instead:
75
76  fatload <bootdev> 0 ${loadaddr} boot; bootoctlinux rootdev=sd0
77
78Replace ``<bootdev>'' with ``mmc'', ``sata'' or ``usb'' as appropriate.
79
80For stable root disk selection, you can use the root disk's
81disklabel(8) UID (DUID) as the value of the rootdev parameter.
82
83On multi-core systems, the numcores parameter enables the secondary CPUs.
84Use the total number of cores on your system as the value of the parameter.
85
86  fatload usb 0 ${loadaddr} boot; bootoctlinux rootdev=sd0 numcores=2
87
88On the EdgeRouter Lite, bootcmd may also reset the USB controller for
89more reliable USB device detection:
90
91  usb reset; fatload usb 0 ${loadaddr} boot; bootoctlinux rootdev=sd0 numcores=2
92
93On some models, such as ER-6p, unattended boot from a USB disk will fail
94if U-Boot attempts to verify the MD5 checksum of the file loaded by fatload:
95
96  reading vmlinux.64.md5
97  33 bytes read in 303 ms (0 Bytes/s)
98  md5 checksum error.
99  Octeon ubnt_e300(ram)#
100
101At this point, the 'bootoctlinux' command can be used to boot manually.
102
103The file 'vmlinux.64.md5' can be renamed from the running OpenBSD system.
104In case of ER-6p, the file 'vmlinux.64.md5' resides on a FAT partition
105of the internal MMC, which is accessible from OpenBSD via /dev/sd1i:
106
107   # mount /dev/sd1i /mnt
108   # mv /mnt/vmlinux.64.md5 /mnt/vmlinux.64.md5.unused
109   # reboot
110
111Unattended boot should now succeed, even though U-Boot will warn:
112
113  reading vmlinux.64.md5
114  ** Unable to read file vmlinux.64.md5 **
115
116OpenBSDCongratulations
117
118OpenBSDUnattendedInstallation
119