Project

General

Profile

OpenBSD on beaglebone black » History » Version 5

Tsutomu KIMURA, 01/25/2015 04:28 PM

1 5
h1. OpenBSD on beaglebone black
2
3
h2. 1. 概略
4
5
beaglebone blackについては"こちら":http://beagleboard.org/BLACK 。こいつで"OpenBSD":http://www.openbsd.org が動きます。最新の情報については"こちら":http://www.openbsd.org/armv7.html をどうぞ。
6
7
h2. 2. 注意すべきこと
8
9
この記事を書いている現状では、HDMIを経由した画面出力はありません。つまり、シリアルコンソールかnetwork経由でしか弄れません。
10
それでも、画面出力デバイスがそもそも全くないIO-DATAのUSL-5Pのようなケース(USBデバイスサーバ、という名前で売り出しているのである意味当然ではあります。ちなみにこちらは"OpenBSD/landisk":http://www.openbsd.org/landisk.html で稼働)よりはマシでしょうけれど、ね。
11
12
h2. 3. install log
13
14
他で色々と参考になりそうなので、貼り付けておきます。
15
16
<pre>
17
U-Boot SPL 2014.04-00015-gb4422bd (Apr 22 2014 - 13:24:29)
18
reading args
19
spl_load_image_fat_os: error reading image args, err - -1
20
reading u-boot.img
21
reading u-boot.img
22
23
24
U-Boot 2014.04-00015-gb4422bd (Apr 22 2014 - 13:24:29)
25
26
I2C:   ready
27
DRAM:  512 MiB
28
NAND:  0 MiB
29
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
30
*** Warning - readenv() failed, using default environment
31
32
Net:   <ethaddr> not set. Validating first E-fuse MAC
33
cpsw, usb_ether
34
Hit any key to stop autoboot:  0 
35
gpio: pin 53 (gpio 53) value is 1
36
mmc0 is current device
37
gpio: pin 54 (gpio 54) value is 1
38
SD/MMC found on device 0
39
reading uEnv.txt
40
159 bytes read in 10 ms (14.6 KiB/s)
41
gpio: pin 55 (gpio 55) value is 1
42
Loaded environment from uEnv.txt
43
Importing environment from mmc ...
44
Checking if uenvcmd is set ...
45
gpio: pin 56 (gpio 56) value is 1
46
Running uenvcmd ...
47
reading bsd.umg
48
7163548 bytes read in 412 ms (16.6 MiB/s)
49
## Booting kernel from Legacy Image at 82800000 ...
50
   Image Name:   boot
51
   Image Type:   ARM Linux Kernel Image (uncompressed)
52
   Data Size:    7163484 Bytes = 6.8 MiB
53
   Load Address: 80300000
54
   Entry Point:  80300000
55
   Verifying Checksum ... OK
56
   Loading Kernel Image ... OK
57
58
Starting kernel ...
59
60
61
OpenBSD/omap booting ...
62
arg0 0x0 arg1 0xe05 arg2 0x80000100
63
atag core flags 0 pagesize 0 rootdev 0
64
atag cmdline [sd0i:/bsd.umg]
65
atag mem start 0x80000000 size 0x20000000
66
bootfile: sd0i:/bsd.umg
67
bootargs: 
68
memory size derived from u-boot
69
bootconf.mem[0].address = 80000000 pages 131072/0x20000000
70
Allocating page tables
71
freestart = 0x809d5000, free_pages = 128555 (0x0001f62b)
72
IRQ stack: p0x80a03000 v0xc0a03000
73
ABT stack: p0x80a04000 v0xc0a04000
74
UND stack: p0x80a05000 v0xc0a05000
75
SVC stack: p0x80a06000 v0xc0a06000
76
Creating L1 page table at 0x809d8000
77
Mapping kernel
78
Constructing L2 page tables
79
undefined page pmap board type: beaglebone
80
Copyright (c) 1982, 1986, 1989, 1991, 1993
81
	The Regents of the University of California.  All rights reserved.
82
Copyright (c) 1995-2015 OpenBSD. All rights reserved.  http://www.OpenBSD.org
83
84
OpenBSD 5.7-beta (RAMDISK-OMAP) #1: Fri Jan  9 20:02:48 AEDT 2015
85
    jsg@armv7.jsg.id.au:/usr/src/sys/arch/armv7/compile/RAMDISK-OMAP
86
real mem  = 536870912 (512MB)
87
avail mem = 515444736 (491MB)
88
mainbus0 at root
89
cpu0 at mainbus0: ARM Cortex A8 R3 rev 2 (ARMv7 core)
90
cpu0: DC enabled IC enabled WB disabled EABT branch prediction enabled
91
cpu0: 32KB(64b/l,4way) I-cache, 32KB(64b/l,4way) wr-back D-cache
92
omap0 at mainbus0: BeagleBone
93
prcm0 at omap0 rev 0.2
94
sitaracm0 at omap0: control module, rev 1.0
95
intc0 at omap0 rev 5.0
96
omap0: device edma unit 0 not configured
97
dmtimer0 at omap0 rev 3.1
98
dmtimer1 at omap0 rev 3.1
99
omdog0 at omap0 rev 0.1
100
omgpio0 at omap0: rev 0.1
101
omgpio1 at omap0: rev 0.1
102
omgpio2 at omap0: rev 0.1
103
omgpio3 at omap0: rev 0.1
104
omap0: device tiiic unit 0 not configured
105
omap0: device tiiic unit 1 not configured
106
omap0: device tiiic unit 2 not configured
107
ommmc0 at omap0
108
sdmmc0 at ommmc0
109
ommmc1 at omap0
110
sdmmc1 at ommmc1
111
com0 at omap0: ti16750, 64 byte fifo
112
com0: console
113
cpsw0 at omap0: version 1.12 (0), address d0:5f:b8:f5:94:f9
114
ukphy0 at cpsw0 phy 0: Generic IEEE 802.3u media interface, rev. 1: OUI 0x0001f0, model 0x000f
115
scsibus0 at sdmmc0: 2 targets, initiator 0
116
sd0 at scsibus0 targ 1 lun 0: <SD/MMC, Drive #01, > SCSI2 0/direct fixed
117
sd0: 7580MB, 512 bytes/sector, 15523840 sectors
118
scsibus1 at sdmmc1: 2 targets, initiator 0
119
sd1 at scsibus1 targ 1 lun 0: <SD/MMC, Drive #01, > SCSI2 0/direct fixed
120
sd1: 3688MB, 512 bytes/sector, 7553024 sectors
121
boot device: sd0
122
root on rd0a swap on rd0b dump on rd0b
123
WARNING: CHECK AND RESET THE DATE!
124
erase ^?, werase ^W, kill ^U, intr ^C, status ^T
125
126
Welcome to the OpenBSD/armv7 5.7 installation program.
127
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell? i
128
At any prompt except password prompts you can escape to a shell by
129
typing '!'. Default answers are shown in []'s and are selected by
130
pressing RETURN.  You can exit this program at any time by pressing
131
Control-C, but this can leave your system in an inconsistent state.
132
133
Terminal type? [vt220] 
134
System hostname? (short form, e.g. 'foo') foo
135
136
Available network interfaces are: cpsw0.
137
Which network interface do you wish to configure? (or 'done') [cpsw0] 
138
IPv4 address for cpsw0? (or 'dhcp' or 'none') [dhcp] 
139
DHCPDISCOVER on cpsw0 - interval 1
140
DHCPDISCOVER on cpsw0 - interval 2
141
DHCPOFFER from xx.xx.xx.xx (00:17:e0:a1:61:84)
142
DHCPREQUEST on cpsw0 to 255.255.255.255
143
DHCPACK from xx.xx.xx.xx (00:17:e0:a1:61:84)
144
bound to xx.xx.xx.xx -- renewal in 43200 seconds.
145
IPv6 address for cpsw0? (or 'rtsol' or 'none') [none] rtsol
146
Available network interfaces are: cpsw0.
147
Which network interface do you wish to configure? (or 'done') [done] 
148
Using DNS domainname tknd.jp
149
Using DNS nameservers at xx.xx.xx.xx xx.xx.xx.xx
150
151
Password for root account? (will not echo) 
152
Password for root account? (again) 
153
The root password must be set.
154
Password for root account? (will not echo) 
155
Password for root account? (again) 
156
Start sshd(8) by default? [yes] 
157
Start ntpd(8) by default? [no] 
158
Setup a user? (enter a lower-case loginname, or 'no') [no] 
159
What timezone are you in? ('?' for list) [Japan] 
160
161
Available disks are: sd0 sd1.
162
Which disk is the root disk? ('?' for details) [sd0] ?
163
sd0: Drive #01 (7.4G)
164
sd1: Drive #01 (3.6G)
165
Available disks are: sd0 sd1.
166
Which disk is the root disk? ('?' for details) [sd0] 
167
Use DUIDs rather than device names in fstab? [yes] 
168
Disk: sd0       geometry: 966/255/63 [15523840 Sectors]
169
Offset: 0       Signature: 0xAA55
170
            Starting         Ending         LBA Info:
171
 #: id      C   H   S -      C   H   S [       start:        size ]
172
-------------------------------------------------------------------------------
173
*0: 0C      0   1   1 -      1 254  63 [          63:       32067 ] Win95 FAT32L
174
 1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
175
 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
176
 3: A6      0   1   2 -      1 254  63 [          64:       32066 ] OpenBSD     
177
Use (W)hole disk or (E)dit the MBR? [whole] W
178
Creating a msdos partition and an OpenBSD partition for rest of sd0...done.
179
/dev/rsd0i: 32668 sectors in 8167 FAT16 clusters (2048 bytes/cluster)
180
bps=512 spc=4 res=1 nft=2 rde=512 sec=32768 mid=0xf8 spf=32 spt=63 hds=255 hid=64
181
The auto-allocated layout for sd0 is:
182
#                size           offset  fstype [fsize bsize  cpg]
183
  a:            99.8M            32832  4.2BSD   2048 16384    1 # /
184
  b:           119.6M           237216    swap                   
185
  c:          7580.0M                0  unused                   
186
  d:           151.7M           482176  4.2BSD   2048 16384    1 # /tmp
187
  e:           131.5M           792768  4.2BSD   2048 16384    1 # /var
188
  f:           919.8M          1062016  4.2BSD   2048 16384    1 # /usr
189
  g:           523.9M          2945760  4.2BSD   2048 16384    1 # /usr/X11R6
190
  h:          2087.6M          4018656  4.2BSD   2048 16384    1 # /usr/local
191
  i:            16.0M               64   MSDOS                   
192
  j:          1031.9M          8294048  4.2BSD   2048 16384    1 # /usr/src
193
  k:          1315.8M         10407392  4.2BSD   2048 16384    1 # /usr/obj
194
  l:          1182.4M         13102208  4.2BSD   2048 16384    1 # /home
195
Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? [a] C
196
197
You will now create an OpenBSD disklabel inside the OpenBSD MBR
198
partition. The disklabel defines how OpenBSD splits up the MBR partition
199
into OpenBSD partitions in which filesystems and swap space are created.
200
You must provide each filesystem's mountpoint in this program.
201
202
The offsets used in the disklabel are ABSOLUTE, i.e. relative to the
203
start of the disk, NOT the start of the OpenBSD MBR partition.
204
205
Label editor (enter '?' for help at any prompt)
206
> a
207
partition: [a] 
208
offset: [32832] 
209
size: [15491008] 7062M
210
Rounding size to cylinder (16065 sectors): 14473863
211
FS type: [4.2BSD] 
212
mount point: [none] /
213
Rounding size to bsize (32 sectors): 14473856
214
> p
215
OpenBSD area: 32832-15523840; size: 15491008; free: 1017152
216
#                size           offset  fstype [fsize bsize  cpg]
217
  a:         14473856            32832  4.2BSD   2048 16384    1 # /
218
  c:         15523840                0  unused                   
219
  i:            32768               64   MSDOS                   
220
> a
221
partition: [b] 
222
offset: [14506688] 
223
size: [1017152] 
224
FS type: [swap] 
225
> p
226
OpenBSD area: 32832-15523840; size: 15491008; free: 0
227
#                size           offset  fstype [fsize bsize  cpg]
228
  a:         14473856            32832  4.2BSD   2048 16384    1 # /
229
  b:          1017152         14506688    swap                   
230
  c:         15523840                0  unused                   
231
  i:            32768               64   MSDOS                   
232
> ?
233
Available commands:
234
 ? | h    - show help                 n [part] - set mount point
235
 A        - auto partition all space  p [unit] - print partitions
236
 a [part] - add partition             q        - quit & save changes
237
 b        - set OpenBSD boundaries    R [part] - resize auto allocated partition
238
 c [part] - change partition size     r        - display free space
239
 D        - reset label to default    s [path] - save label to file
240
 d [part] - delete partition          U        - undo all changes
241
 e        - edit drive parameters     u        - undo last change
242
 g [d|u]  - [d]isk or [u]ser geometry w        - write label to disk
243
 i        - modify disklabel UID      X        - toggle expert mode
244
 l [unit] - print disk label header   x        - exit & lose changes
245
 M        - disklabel(8) man page     z        - delete all partitions
246
 m [part] - modify partition
247
248
Suffixes can be used to indicate units other than sectors:
249
 'b' (bytes), 'k' (kilobytes), 'm' (megabytes), 'g' (gigabytes) 't' (terabytes)
250
 'c' (cylinders), '%' (% of total disk), '&' (% of free space).
251
Values in non-sector units are truncated to the nearest cylinder boundary.
252
> w
253
> q
254
No label changes.
255
/dev/rsd0a: 7067.3MB in 14473856 sectors of 512 bytes
256
35 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
257
Available disks are: sd1.
258
Which disk do you wish to initialize? (or 'done') [done] 
259
/dev/sd0a (0f62129f7e341b8c.a) on /mnt type ffs (rw, asynchronous, local)
260
261
Let's install the sets!
262
Location of sets? (disk http nfs or 'done') [http] 
263
HTTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none]
264
HTTP Server? (hostname, list#, 'done' or '?') [mirror.internode.on.net] 
265
Server directory? [pub/OpenBSD/snapshots/armv7] 
266
267
Select sets by entering a set name, a file name pattern or 'all'. De-select
268
sets by prepending a '-' to the set name, file name pattern or 'all'. Selected
269
sets are labelled '[X]'.
270
    [X] bsd.OMAP            [X] base57.tgz          [ ] xbase57.tgz
271
    [X] bsd.rd.OMAP         [X] comp57.tgz          [ ] xshare57.tgz
272
    [X] bsd.OMAP.umg        [X] man57.tgz           [ ] xfont57.tgz
273
    [X] bsd.rd.OMAP.umg     [X] game57.tgz          [ ] xserv57.tgz
274
Set name(s)? (or 'abort' or 'done') [done] 
275
Get/Verify SHA256.sig   100% |**************************|  2500       00:00    
276
Signature Verified
277
Get/Verify bsd.OMAP     100% |**************************|  3200 KB    00:08    
278
Get/Verify bsd.rd.OMAP  100% |**************************|  6577 KB    00:11    
279
Get/Verify bsd.OMAP.umg 100% |**************************|  3652 KB    00:06    
280
Get/Verify bsd.rd.OMAP.umg 100% |***********************|  6995 KB    00:11    
281
Get/Verify base57.tgz   100% |**************************| 49397 KB    01:24    
282
Get/Verify comp57.tgz   100% |**************************| 43817 KB    01:15    
283
Get/Verify man57.tgz    100% |**************************|  8764 KB    00:15    
284
Get/Verify game57.tgz   100% |**************************|  2616 KB    00:04    
285
Installing bsd.OMAP     100% |**************************|  3200 KB    00:06    
286
Installing bsd.rd.OMAP  100% |**************************|  6577 KB    00:13    
287
Installing bsd.OMAP.umg 100% |**************************|  3652 KB    00:07    
288
Installing bsd.rd.OMAP.umg 100% |***********************|  6995 KB    00:15    
289
Installing base57.tgz   100% |**************************| 49397 KB    04:43    
290
Extracting etc.tgz      100% |**************************|   110 KB    00:00    
291
Installing comp57.tgz   100% |**************************| 43817 KB    03:58    
292
Installing man57.tgz    100% |**************************|  8764 KB    00:58    
293
Installing game57.tgz   100% |**************************|  2616 KB    00:13    
294
Location of sets? (disk http nfs or 'done') [done] 
295
Time appears wrong.  Set to 'Sun Jan 25 15:29:03 JST 2015'? [yes] 
296
Saving configuration files...done.
297
Making all device nodes...done.
298
299
CONGRATULATIONS! Your OpenBSD install has been successfully completed!
300
To boot the new system, enter 'reboot' at the command prompt.
301
When you login to your new system the first time, please read your mail
302
using the 'mail' command.
303
304
# reboot
305
syncing disks... done
306
rebooting...
307
308
U-Boot SPL 2014.04-00015-gb4422bd (Apr 22 2014 - 13:24:29)
309
reading args
310
spl_load_image_fat_os: error reading image args, err - -1
311
reading u-boot.img
312
reading u-boot.img
313
314
315
U-Boot 2014.04-00015-gb4422bd (Apr 22 2014 - 13:24:29)
316
317
I2C:   ready
318
DRAM:  512 MiB
319
NAND:  0 MiB
320
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
321
*** Warning - readenv() failed, using default environment
322
323
Net:   <ethaddr> not set. Validating first E-fuse MAC
324
cpsw, usb_ether
325
Hit any key to stop autoboot:  0 
326
gpio: pin 53 (gpio 53) value is 1
327
mmc0 is current device
328
gpio: pin 54 (gpio 54) value is 1
329
SD/MMC found on device 0
330
reading uEnv.txt
331
158 bytes read in 4 ms (38.1 KiB/s)
332
gpio: pin 55 (gpio 55) value is 1
333
Loaded environment from uEnv.txt
334
Importing environment from mmc ...
335
Checking if uenvcmd is set ...
336
gpio: pin 56 (gpio 56) value is 1
337
Running uenvcmd ...
338
reading bsd.umg
339
3740120 bytes read in 206 ms (17.3 MiB/s)
340
## Booting kernel from Legacy Image at 82800000 ...
341
   Image Name:   boot
342
   Image Type:   ARM Linux Kernel Image (uncompressed)
343
   Data Size:    3740056 Bytes = 3.6 MiB
344
   Load Address: 80300000
345
   Entry Point:  80300000
346
   Verifying Checksum ... OK
347
   Loading Kernel Image ... OK
348
349
Starting kernel ...
350
351
352
OpenBSD/omap booting ...
353
arg0 0x0 arg1 0xe05 arg2 0x80000100
354
atag core flags 0 pagesize 0 rootdev 0
355
atag cmdline [sd0i:/bsd.umg]
356
atag mem start 0x80000000 size 0x20000000
357
bootfile: sd0i:/bsd.umg
358
bootargs: 
359
memory size derived from u-boot
360
bootconf.mem[0].address = 80000000 pages 131072/0x20000000
361
Allocating page tables
362
freestart = 0x80692000, free_pages = 129390 (0x0001f96e)
363
IRQ stack: p0x806c0000 v0xc06c0000
364
ABT stack: p0x806c1000 v0xc06c1000
365
UND stack: p0x806c2000 v0xc06c2000
366
SVC stack: p0x806c3000 v0xc06c3000
367
Creating L1 page table at 0x80694000
368
Mapping kernel
369
Constructing L2 page tables
370
undefined page pmap [ using 299260 bytes of bsd ELF symbol table ]
371
board type: beaglebone
372
Copyright (c) 1982, 1986, 1989, 1991, 1993
373
	The Regents of the University of California.  All rights reserved.
374
Copyright (c) 1995-2015 OpenBSD. All rights reserved.  http://www.OpenBSD.org
375
376
OpenBSD 5.7-beta (GENERIC-OMAP) #7: Wed Jan 21 05:43:17 AEDT 2015
377
    jsg@armv7.jsg.id.au:/usr/src/sys/arch/armv7/compile/GENERIC-OMAP
378
real mem  = 536870912 (512MB)
379
avail mem = 518791168 (494MB)
380
warning: no entropy supplied by boot loader
381
mainbus0 at root
382
cpu0 at mainbus0: ARM Cortex A8 R3 rev 2 (ARMv7 core)
383
cpu0: DC enabled IC enabled WB disabled EABT branch prediction enabled
384
cpu0: 32KB(64b/l,4way) I-cache, 32KB(64b/l,4way) wr-back D-cache
385
omap0 at mainbus0: BeagleBone
386
prcm0 at omap0 rev 0.2
387
sitaracm0 at omap0: control module, rev 1.0
388
intc0 at omap0 rev 5.0
389
edma0 at omap0 rev 0.0
390
dmtimer0 at omap0 rev 3.1
391
dmtimer1 at omap0 rev 3.1
392
omdog0 at omap0 rev 0.1
393
omgpio0 at omap0: rev 0.1
394
gpio0 at omgpio0: 32 pins
395
omgpio1 at omap0: rev 0.1
396
gpio1 at omgpio1: 32 pins
397
omgpio2 at omap0: rev 0.1
398
gpio2 at omgpio2: 32 pins
399
omgpio3 at omap0: rev 0.1
400
gpio3 at omgpio3: 32 pins
401
omap0: device tiiic unit 0 not configured
402
omap0: device tiiic unit 1 not configured
403
omap0: device tiiic unit 2 not configured
404
ommmc0 at omap0
405
sdmmc0 at ommmc0
406
ommmc1 at omap0
407
sdmmc1 at ommmc1
408
com0 at omap0: ti16750, 64 byte fifo
409
com0: console
410
cpsw0 at omap0: version 1.12 (0), address d0:5f:b8:f5:94:f9
411
ukphy0 at cpsw0 phy 0: Generic IEEE 802.3u media interface, rev. 1: OUI 0x0001f0, model 0x000f
412
scsibus0 at sdmmc0: 2 targets, initiator 0
413
sd0 at scsibus0 targ 1 lun 0: <SD/MMC, Drive #01, > SCSI2 0/direct fixed
414
sd0: 7580MB, 512 bytes/sector, 15523840 sectors
415
scsibus1 at sdmmc1: 2 targets, initiator 0
416
sd1 at scsibus1 targ 1 lun 0: <SD/MMC, Drive #01, > SCSI2 0/direct fixed
417
sd1: 3688MB, 512 bytes/sector, 7553024 sectors
418
vscsi0 at root
419
scsibus2 at vscsi0: 256 targets
420
softraid0 at root
421
scsibus3 at softraid0: 256 targets
422
boot device: sd0
423
root on sd0a (0f62129f7e341b8c.a) swap on sd0b dump on sd0b
424
WARNING: CHECK AND RESET THE DATE!
425
Automatic boot in progress: starting file system checks.
426
/dev/sd0a (0f62129f7e341b8c.a): file system is clean; not checking
427
setting tty flags
428
pf enabled
429
starting network
430
DHCPDISCOVER on cpsw0 - interval 3
431
DHCPOFFER from xx.xx.xx.xx (00:17:e0:a1:61:84)
432
DHCPREQUEST on cpsw0 to 255.255.255.255
433
DHCPACK from xx.xx.xx.xx (00:17:e0:a1:61:84)
434
bound to xx.xx.xx.xx -- renewal in 43199 seconds.
435
IPv6 autoconf: cpsw0
436
openssl: generating isakmpd/iked RSA key... done.
437
ssh-keygen: generating new host keys: RSA1 RSA DSA ECDSA ED25519 
438
starting early daemons: syslogd pflogd.
439
starting RPC daemons:.
440
savecore: no core dump
441
checking quotas: done.
442
clearing /tmp
443
kern.securelevel: 0 -> 1
444
creating runtime link editor directory cache.
445
preserving editor files.
446
starting network daemons: sshd smtpd sndiod.
447
Path to firmware: http://firmware.openbsd.org/firmware/5.7/
448
No devices found which need firmware files to be downloaded.
449
starting local daemons: cron.
450
Sun Jan 25 15:34:26 JST 2015
451
452
OpenBSD/armv7 (foo.tknd.jp) (console)
453
454
login: 
455
</pre>