steletoの日記 このページをアンテナに追加 RSSフィード

2017-08-30

[] 今日のGR-PEACH 02:17  今日のGR-PEACH - steletoの日記 を含むブックマーク  今日のGR-PEACH - steletoの日記 のブックマークコメント

ずっと『うーんinitarm()以降のシリアルが出ないなードライバ実装どっかバグってんのかなー』と思ってたけど、結局bus_space_map()したときに取得したhandlepを保存しておくのを忘れてたせいだった。それを直したらなんかダバダバ流れてきてデバッガに落ちた模様。

U-Boot 2015.01-00076-gc83df16e6b-dirty (Jul 06 2017 - 01:45:26)

I2C:   ready
DRAM:  10 MiB
Using default environment

In:    serial
Out:   serial
Err:   serial
                      SPI Flash Memory Map
                ------------------------------------
                         Start      Size     SPI
                u-boot:  0x00000000 0x080000 0
                   env:  0x00080000 0x040000 0
                    DT:  0x000C0000 0x040000 0
                Kernel:  0x00100000 0x050000 0
                Rootfs:  0x00600000 0x0A0000 0
Net:   sh_eth
=> bootp 192.168.0.6:netbsd.bin
sh_eth Waiting for PHY auto negotiation to complete.. done
sh_eth: 100Base/Full
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.0.4 (644 ms)
Using sh_eth device
TFTP from server 192.168.0.6; our IP address is 192.168.0.4
Filename 'netbsd.bin'.
Load address: 0x20000000
Loading: #################################################################
         #################################################################
         #################################################################
         ####################################
         2.8 MiB/s
done
Bytes transferred = 3378964 (338f14 hex)
=> go 0x20000000
## Starting application at 0x20000000 ...
  PC=0x20000024
  SP=0x208afdb0
CPSR=0x600001d3
<cortex_init>@ABC12-</cortex_init>
<mmu_init_table></mmu_init_table>
<arm_cpuinit>FG01H1IJKLM</arm_cpuinit>
jump to start()

uboot arg = 0x1, 0x208b0e5c, 0x208b0e5c, 0x20000000

NetBSD/evbarm (EVBARM_BOARDTYPE) booting ...
initarm: Configuring system, CLIDR=1110000003 CTR=0x83338003
arm32_bootmem_init: memstart=0x20000000, memsize=0x10000000, kernelstart=0x20000000
arm32_bootmem_init: kernelend=0x20356000
arm32_bootmem_init: adding 32341 free pages: [0x20356000..0x2fffffff] (VA 0x80356000)
arm32_kernel_vm_init: 1 L2 pages are needed to map 0x38a000 kernel bytes
arm32_kernel_vm_init: allocating page tables for kerneladd_pages: adding pv 0x8033964c (pa 0x20356000, va 0x80356000, 1 pages) at tail
 vmadd_pages: appending pv 0x8033a5d0 (0x20358000..0x2035bfff) to 0x20356000..0x20357fff
add_pages: appending pv 0x80339824 (0x2035c000..0x2035dfff) to 0x20356000..0x2035bfff
add_pages: appending pv 0x80339838 (0x2035e000..0x2035ffff) to 0x20356000..0x2035dfff
add_pages: appending pv 0x8033984c (0x20360000..0x20361fff) to 0x20356000..0x2035ffff
add_pages: appending pv 0x80339860 (0x20362000..0x20363fff) to 0x20356000..0x20361fff
add_pages: appending pv 0x80339874 (0x20364000..0x20365fff) to 0x20356000..0x20363fff
add_pages: appending pv 0x80339888 (0x20366000..0x20367fff) to 0x20356000..0x20365fff
add_pages: appending pv 0x8033989c (0x20368000..0x20369fff) to 0x20356000..0x20367fff
add_pages: appending pv 0x803398b0 (0x2036a000..0x2036bfff) to 0x20356000..0x20369fff
arm32_kernel_vm_init: allocating stacks
add_pages: appending pv 0x80339d44 (0x2036c000..0x2036dfff) to 0x20356000..0x2036bfff
add_pages: appending pv 0x80339d30 (0x2036e000..0x2036ffff) to 0x20356000..0x2036dfff
add_pages: appending pv 0x80339d1c (0x20370000..0x20371fff) to 0x20356000..0x2036ffff
add_pages: appending pv 0x80339d08 (0x20372000..0x20373fff) to 0x20356000..0x20371fff
add_pages: appending pv 0x80339cf4 (0x20374000..0x20375fff) to 0x20356000..0x20373fff
add_pages: appending pv 0x80339d58 (0x20376000..0x20377fff) to 0x20356000..0x20375fff
add_pages: appending pv 0x80339690 (0x20378000..0x2037bfff) to 0x20356000..0x20377fff
Creating L1 page table at 0x20358000
arm32_kernel_vm_init: adding L2 pt (VA 0x80356000, PA 0x20356000) for VA 0x80000000 (kernel)
arm32_kernel_vm_init: adding L2 pt (VA 0x8035c000, PA 0x2035c000) for VA 0xc0000000 (vm)
arm32_kernel_vm_init: adding L2 pt (VA 0x8035e000, PA 0x2035e000) for VA 0xc0800000 (vm)
arm32_kernel_vm_init: adding L2 pt (VA 0x80360000, PA 0x20360000) for VA 0xc1000000 (vm)
arm32_kernel_vm_init: adding L2 pt (VA 0x80362000, PA 0x20362000) for VA 0xc1800000 (vm)
arm32_kernel_vm_init: adding L2 pt (VA 0x80364000, PA 0x20364000) for VA 0xc2000000 (vm)
arm32_kernel_vm_init: adding L2 pt (VA 0x80366000, PA 0x20366000) for VA 0xc2800000 (vm)
arm32_kernel_vm_init: adding L2 pt (VA 0x80368000, PA 0x20368000) for VA 0xc3000000 (vm)
arm32_kernel_vm_init: adding L2 pt (VA 0x8036a000, PA 0x2036a000) for VA 0xc3800000 (vm)
Mapping kernel
arm32_kernel_vm_init: adding chunk for kernel text 0x20000000..0x20267fff (VA 0x80000000)
add_pages: adding pv 0x80339638 (pa 0x20000000, va 0x80000000, 308 pages) before pa 0x20356000
arm32_kernel_vm_init: adding chunk for kernel data/bss 0x20268000..0x20355fff (VA 0x80268000)
add_pages: adding pv 0x80339624 (pa 0x20268000, va 0x80268000, 119 pages) before pa 0x20356000
Listing Chunks
arm32_kernel_vm_init: pv 0x80339638: chunk VA 0x80000000..0x80267fff (PA 0x20000000, prot 7, cache 1)
arm32_kernel_vm_init: pv 0x80339624: chunk VA 0x80268000..0x80355fff (PA 0x20268000, prot 3, cache 1)
arm32_kernel_vm_init: pv 0x8033964c: chunk VA 0x80356000..0x8037bfff (PA 0x20356000, prot 3, cache 1)

Mapping Chunks
arm32_kernel_vm_init: mapping chunk VA 0x80000000..0x80267fff (PA 0x20000000, prot 7, cache 1)
pmap_map_chunk: pa=0x20000000 va=0x80000000 size=0x268000 resid=0x268000 prot=0x7 cache=1
SSLLLLLLPPPP
arm32_kernel_vm_init: mapping chunk VA 0x80268000..0x80355fff (PA 0x20268000, prot 3, cache 1)
pmap_map_chunk: pa=0x20268000 va=0x80268000 size=0xee000 resid=0xee000 prot=0x3 cache=1
PPPPLLLLLLLLLLLLLLPPP
arm32_kernel_vm_init: mapping last chunk VA 0x80356000..0x8037bfff (PA 0x20356000, prot 3, cache 1)
pmap_map_chunk: pa=0x20356000 va=0x80356000 size=0x26000 resid=0x26000 prot=0x3 cache=1
PPPPPLPPPPPP
devmap: 18000000 -> 1fffffff @ f7000000
pmap_map_chunk: pa=0x18000000 va=0xf7000000 size=0x8000000 resid=0x8000000 prot=0x3 cache=0
sSsSsSsSsSsSsSsS
devmap: 3fe00000 -> 3fffffff @ ff000000
pmap_map_chunk: pa=0x3fe00000 va=0xff000000 size=0x200000 resid=0x200000 prot=0x3 cache=0
SS
devmap: e8000000 -> e82fffff @ ff200000
pmap_map_chunk: pa=0xe8000000 va=0xff200000 size=0x300000 resid=0x300000 prot=0x3 cache=0
SSS
devmap: fc000000 -> fc0fffff @ ff500000
pmap_map_chunk: pa=0xfc000000 va=0xff500000 size=0x100000 resid=0x100000 prot=0x3 cache=0
S
devmap: fcf00000 -> fcffffff @ ff600000
pmap_map_chunk: pa=0xfcf00000 va=0xff600000 size=0x100000 resid=0x100000 prot=0x3 cache=0
S
devmap: fff00000 -> ffffffff @ ff700000
pmap_map_chunk: pa=0xfff00000 va=0xff700000 size=0x100000 resid=0x100000 prot=0x3 cache=0
S
devmap: f0000000 -> f00fffff @ ff800000
pmap_map_chunk: pa=0xf0000000 va=0xff800000 size=0x100000 resid=0x100000 prot=0x3 cache=0
S
                             Physical              Virtual        Num
                       Starting    Ending    Starting    Ending   Pages
               SDRAM: 0x20000000 0x2fffffff 0x80000000 0x8fffffff 32768
        text section: 0x20000000 0x20267fff 0x80000000 0x80267fff 308
        data section: 0x202c0000 0x20338f18 0x802c0000 0x80338f18 61
         bss section: 0x20338f18 0x20354fe0 0x80338f18 0x80354fe0 15
   L1 page directory: 0x20358000 0x2035bfff 0x80358000 0x8035bfff 2
   ABT stack (CPU 0): 0x2036c000 0x2036dfff 0x8036c000 0x8036dfff 1
   FIQ stack (CPU 0): 0x2036e000 0x2036ffff 0x8036e000 0x8036ffff 1
   IRQ stack (CPU 0): 0x20370000 0x20371fff 0x80370000 0x80371fff 1
   UND stack (CPU 0): 0x20372000 0x20373fff 0x80372000 0x80373fff 1
  IDLE stack (CPU 0): 0x20374000 0x20375fff 0x80374000 0x80375fff 1
           SVC stack: 0x20376000 0x20377fff 0x80376000 0x80377fff 1
      Message Buffer: 0x20378000 0x2037bfff 0x80378000 0x8037bfff 2
         Free Memory: 0x2037c000 0x2fffffff                       32322
TTBR0=0x209fc05b TTBR1=0x209fc05b TTBCR=0x1 CONTEXTIDR=0
switching to new L1 page table @0x20358000... ttb (TTBCR=0x11 TTBR0=0x2035805b TTBR1=0x2035805b) OK
nfreeblocks = 1, free_pages = 32322 (0x7e42)
bootstrap done.
vectors vbar=0x8000bf60 0x8000bf60
init subsystems: stacks vectors undefined page pmap_physload pmap kpm tlb0 locks l1pt cache(l1pt) specials pools [ Kernel symbol table missing! ]
done.
panic: pool_get: pcache: page empty
Stopped in pid 0.1 (system) at  80005a80:       bx      r14
db>

2017-06-11

[] CubieBoard2サーバが起動しなくなった問題(解決済み) 12:02  CubieBoard2サーバが起動しなくなった問題(解決済み) - steletoの日記 を含むブックマーク  CubieBoard2サーバが起動しなくなった問題(解決済み) - steletoの日記 のブックマークコメント

ファイル置き場やproxyに使っているCubieBoard2(NetBSD/evbarm 7.1)が先週当たりから応答しない。とりあえずシリアルケーブルで母艦と繋いでみる。

wd0 at atabus0 drive 0
wd0: <Hitachi HTS545050B9A300>
wd0: 465 GB, 969021 cyl, 16 head, 63 sec, 512 bytes/sect x 976773168 sectors
boot device: wd0
root on wd0a dumps on wd0b
/: replaying log to memory
root file system type: ffs
Sun Jun  4 01:45:20 JST 2017
Starting root file system check:
panic: kernel diagnostic assertion "oldsize != VSIZENOTSET || pgend > oldsize" failed: file "/home/star/work/netbsd/src/sys/uvm/uvm_vnode.c", line 355
Stopped in pid 21.1 (fsck) at   netbsd:cpu_Debugger+0x4:        bx      r14
db{1}>

おぉうなんでか知らんけどfsckkernel panicしとる。最初はディスクが死んだかと思ったけどシングルユーザモードでなら起動できたのでSMARTを見た感じでは大丈夫…そうな気がする(これの読み方をよく知らない)。

# atactl /dev/wd0 smart status
SMART supported, SMART enabled
id value thresh crit collect reliability description                 raw
  1 100   62     yes online  positive    Raw read error rate         0
  2 100   40     yes offline positive    Throughput performance      0
  3 243   33     yes online  positive    Spin-up time                30064771072
  4 100    0     no  online  positive    Start/stop count            636
  5 100    5     yes online  positive    Reallocated sector count    0
  7 100   67     yes online  positive    Seek error rate             0
  8 100   40     yes offline positive    Seek time performance       0
  9  30    0     no  online  positive    Power-on hours count        30862
 10 100   60     yes online  positive    Spin retry count            0
 12 100    0     no  online  positive    Device power cycle count    615
191 100    0     no  online  positive    G-sense error rate          0
192 100    0     no  online  positive    Power-off retract count     77
193  37    0     no  online  positive    Load cycle count            638702
194 171    0     no  online  positive    Temperature                 32 Lifetime min/max 10/56
196 100    0     no  online  positive    Reallocated event count     0
197 100    0     no  online  positive    Current pending sector      0
198 100    0     no  offline positive    Offline uncorrectable       0
199 200    0     no  online  positive    Ultra DMA CRC error count   145240
223 100    0     no  online  positive    Load/unload retry count     0

であればfsckをかけてチェックをかけて…ってそこでkernel panicしてるのか。とりあえず試しにディスクを引っこ抜いて母艦に繋げてそちらで動かしてみる。

$ sudo fsck_ffs -fy /dev/wd3a
** /dev/rwd3a
** File system is already clean
** Last Mounted on /mnt
** Phase 1 - Check Blocks and Sizes
UNKNOWN FILE TYPE I=11210928
CLEAR? yes

UNKNOWN FILE TYPE I=11210929
CLEAR? yes

UNKNOWN FILE TYPE I=11210930
CLEAR? yes
   :
   :

おぉ動いた。そしてエラーまみれだ orz

そしてfsckをかけ終わったディスクをCubieBoard2に戻したら無事に起動するようになったのでとりあえずそのまま動かすことに。NetBSD 8が出たころに改めてディスク診断をかけてクリーンインストールかなー。

2016-05-20

[] 7.99.29 23:42  7.99.29 - steletoの日記 を含むブックマーク  7.99.29 - steletoの日記 のブックマークコメント

やっと6.1.5だったデスクトップ環境をcurrentへ。ついでに余ってたSSD2つ(64GBと128GB)を繋いでそっちに入れることに。

6.1.5と比較したら大体こんなかんじ。

  • APU内蔵グラフィクスをradeon(4)で認識してる、Xも一発で起動
  • AR8161がalc(4)で認識できてる
  • xhciもきた(USB3デバイス持ってないけど)

てなわけで特に問題なく使える。ありがたやありがたや。

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 7.99.29 (GENERIC.201605150410Z)
total memory = 7606 MB
avail memory = 7366 MB
rnd: seeded with 128 bits
timecounter: Timecounters tick every 10.000 msec
Kernelized RAIDframe activated
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
Hewlett-Packard p6-2210jp ( )
mainbus0 (root)
ACPI: RSDP 0x00000000000F0450 000024 (v02 HPQOEM)
ACPI: XSDT 0x00000000AB383078 000074 (v01 HPQOEM SLIC-CPC 01072009 AMI  00010013)
ACPI: FACP 0x00000000AB3882E8 0000F4 (v04 HPQOEM SLIC-CPC 01072009 AMI  00010013)
ACPI BIOS Warning (bug): Optional FADT field Pm2ControlBlock has valid Length but zero Address: 0x0000000000000000/0x1 (20160422/tbfadt-684)
ACPI: DSDT 0x00000000AB383180 005165 (v02 HPQOEM SLIC-CPC 00000000 INTL 20051117)
ACPI: FACS 0x00000000AB632C80 000040
ACPI: APIC 0x00000000AB3883E0 000072 (v03 HPQOEM SLIC-CPC 01072009 AMI  00010013)
ACPI: MCFG 0x00000000AB388458 00003C (v01 HPQOEM SLIC-CPC 01072009 MSFT 00010013)
ACPI: SLIC 0x00000000AB388498 000176 (v01 HPQOEM SLIC-CPC 01072009 AMI  00010013)
ACPI: HPET 0x00000000AB388610 000038 (v01 HPQOEM SLIC-CPC 01072009 AMI  00000005)
ACPI: IFEU 0x00000000AB388648 000042 (v01 HPQOEM SLIC-CPC 01072009      00000000)
ACPI: SSDT 0x00000000AB388690 000C04 (v01 AMD    POWERNOW 00000001 AMD  00000001)
ACPI: SSDT 0x00000000AB389298 00051F (v02 AMD    ALIB     00000001 MSFT 04000000)
ACPI: CRAT 0x00000000AB3897B8 0002D0 (v01 AMD    AGESA    00000001 AMD  00000001)
ACPI: DBGP 0x00000000AB389A88 000034 (v01 HPQOEM SLIC-CPC 01072009 AMI  00010013)
ACPI: Executed 1 blocks of module-level executable AML code
ACPI: 3 ACPI AML tables successfully acquired and loaded

ioapic0 at mainbus0 apid 5: pa 0xfec00000, version 0x21, 24 pins
cpu0 at mainbus0 apid 16
cpu0: AMD A10-5700 APU with Radeon(tm) HD Graphics   , id 0x610f01
cpu1 at mainbus0 apid 17
cpu1: AMD A10-5700 APU with Radeon(tm) HD Graphics   , id 0x610f01
cpu2 at mainbus0 apid 18
cpu2: AMD A10-5700 APU with Radeon(tm) HD Graphics   , id 0x610f01
cpu3 at mainbus0 apid 19
cpu3: AMD A10-5700 APU with Radeon(tm) HD Graphics   , id 0x610f01
acpi0 at mainbus0: Intel ACPICA 20160422
acpi0: X/RSDT: OemId <HPQOEM,SLIC-CPC,01072009>, AslId <AMI ,00010013>
acpi0: MCFG: segment 0, bus 0-255, address 0x00000000e0000000
acpi0: SCI interrupting at int 9
timecounter: Timecounter "ACPI-Fast" frequency 3579545 Hz quality 1000
hpet0 at acpi0: high precision event timer (mem 0xfed00000-0xfed00400)
timecounter: Timecounter "hpet0" frequency 14318180 Hz quality 2000
AMDN (PNP0C01) at acpi0 not configured
S900 (PNP0C02) at acpi0 not configured
SIO1 (PNP0C02) at acpi0 not configured
attimer1 at acpi0 (TMR, PNP0100): io 0x40-0x43 irq 0
pcppi1 at acpi0 (SPKR, PNP0800): io 0x61
midi0 at pcppi1: PC speaker
sysbeep0 at pcppi1
RMSC (PNP0C02) at acpi0 not configured
NBRM (PNP0C02) at acpi0 not configured
BROD (PNP0C02) at acpi0 not configured
acpibut0 at acpi0 (PWRB, PNP0C0C-170): ACPI Power Button
RMEM (PNP0C01) at acpi0 not configured
OMSC (PNP0C02) at acpi0 not configured
attimer1: attached to pcppi1
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0: vendor 1022 product 1410 (rev. 0x00)
radeon0 at pci0 dev 1 function 0: vendor 1002 product 9901 (rev. 0x00)
ppb0 at pci0 dev 7 function 0: vendor 1022 product 1417 (rev. 0x00)
ppb0: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x1 @ 5.0GT/s
ppb0: link is x1 @ 2.5GT/s
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled, rd/line, wr/inv ok
alc0 at pci1 dev 0 function 0: Atheros AR8161 PCIe Gigabit Ethernet
alc0: interrupting at ioapic0 pin 19
alc0: Ethernet address 78:e3:b5:b0:65:fb
atphy0 at alc0 phy 0: Atheros AR8035 10/100/1000 PHY, rev. 8
atphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto
xhci0 at pci0 dev 16 function 0: vendor 1022 product 7812 (rev. 0x03)
xhci0: interrupting at msi0 vec 0
xhci0: xHCI version 0.96
usb0 at xhci0: USB revision 3.0
xhci1 at pci0 dev 16 function 1: vendor 1022 product 7812 (rev. 0x03)
xhci1: interrupting at msi1 vec 0
xhci1: xHCI version 0.96
usb1 at xhci1: USB revision 3.0
ahcisata0 at pci0 dev 17 function 0: vendor 1022 product 7801 (rev. 0x40)
ahcisata0: interrupting at ioapic0 pin 19
ahcisata0: 64-bit DMA
ahcisata0: AHCI revision 1.30, 4 ports, 32 slots, CAP 0xf732ff03<PSC,SSC,PMD,SPM,ISS=0x3=Gen3,SCLO,SAL,SALP,SMPS,SSNTF,SNCQ,S64A>
atabus0 at ahcisata0 channel 0
atabus1 at ahcisata0 channel 1
atabus2 at ahcisata0 channel 2
atabus3 at ahcisata0 channel 3
ohci0 at pci0 dev 18 function 0: vendor 1022 product 7807 (rev. 0x11)
ohci0: interrupting at ioapic0 pin 18
ohci0: OHCI version 1.0, legacy support
usb2 at ohci0: USB revision 1.0
ehci0 at pci0 dev 18 function 2: vendor 1022 product 7808 (rev. 0x11)
ehci0: interrupting at ioapic0 pin 17
ehci0: EHCI version 1.0
ehci0: companion controller, 5 ports each: ohci0
usb3 at ehci0: USB revision 2.0
ohci1 at pci0 dev 19 function 0: vendor 1022 product 7807 (rev. 0x11)
ohci1: interrupting at ioapic0 pin 18
ohci1: OHCI version 1.0, legacy support
usb4 at ohci1: USB revision 1.0
ehci1 at pci0 dev 19 function 2: vendor 1022 product 7808 (rev. 0x11)
ehci1: interrupting at ioapic0 pin 17
ehci1: EHCI version 1.0
ehci1: companion controller, 5 ports each: ohci1
usb5 at ehci1: USB revision 2.0
vendor 1022 product 780b (SMBus serial bus, revision 0x14) at pci0 dev 20 function 0 not configured
hdaudio0 at pci0 dev 20 function 2: HD Audio Controller
hdaudio0: interrupting at ioapic0 pin 16
hdafg0 at hdaudio0: vendor 111d product 7676
hdafg0: DAC00 8ch: Speaker [Jack], HP Out [Jack]
hdafg0: ADC01 2ch: Mic In [Jack]
hdafg0: ADC02 2ch: Line In [Jack]
hdafg0: DIG03 2ch: SPDIF Out [Jack]
hdafg0: 8ch/2ch 44100Hz 48000Hz 88200Hz 96000Hz 192000Hz PCM16 PCM20 PCM24 AC3
audio0 at hdafg0: full duplex, playback, capture, mmap, independent
pcib0 at pci0 dev 20 function 3: vendor 1022 product 780e (rev. 0x11)
ppb1 at pci0 dev 20 function 4: vendor 1022 product 780f (rev. 0x40)
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled
ohci2 at pci0 dev 20 function 5: vendor 1022 product 7809 (rev. 0x11)
ohci2: interrupting at ioapic0 pin 18
ohci2: OHCI version 1.0, legacy support
usb6 at ohci2: USB revision 1.0
pchb1 at pci0 dev 24 function 0: vendor 1022 product 1400 (rev. 0x00)
pchb2 at pci0 dev 24 function 1: vendor 1022 product 1401 (rev. 0x00)
pchb3 at pci0 dev 24 function 2: vendor 1022 product 1402 (rev. 0x00)
pchb4 at pci0 dev 24 function 3: vendor 1022 product 1403 (rev. 0x00)
pchb5 at pci0 dev 24 function 4: vendor 1022 product 1404 (rev. 0x00)
pchb6 at pci0 dev 24 function 5: vendor 1022 product 1405 (rev. 0x00)
isa0 at pcib0
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
acpicpu0 at cpu0: ACPI CPU
acpicpu0: C1: HLT, lat   0 us, pow     0 mW
acpicpu0: P0: FFH, lat   4 us, pow 14332 mW, 3400 MHz
acpicpu0: P1: FFH, lat   4 us, pow 10695 mW, 3000 MHz
acpicpu0: P2: FFH, lat   4 us, pow  7245 mW, 2600 MHz
acpicpu0: P3: FFH, lat   4 us, pow  5628 mW, 2300 MHz
acpicpu0: P4: FFH, lat   4 us, pow  4312 mW, 1900 MHz
acpicpu0: P5: FFH, lat   4 us, pow  3150 mW, 1400 MHz
acpicpu0: T0: I/O, lat   1 us, pow     0 mW, 100 %
acpicpu0: T1: I/O, lat   1 us, pow     0 mW,  88 %
acpicpu0: T2: I/O, lat   1 us, pow     0 mW,  76 %
acpicpu0: T3: I/O, lat   1 us, pow     0 mW,  64 %
acpicpu0: T4: I/O, lat   1 us, pow     0 mW,  52 %
acpicpu0: T5: I/O, lat   1 us, pow     0 mW,  40 %
acpicpu0: T6: I/O, lat   1 us, pow     0 mW,  28 %
acpicpu0: T7: I/O, lat   1 us, pow     0 mW,  16 %
acpicpu1 at cpu1: ACPI CPU
acpicpu2 at cpu2: ACPI CPU
acpicpu3 at cpu3: ACPI CPU
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
ERROR: 4596 cycle TSC drift observed
uhub0 at usb0: vendor 1022 xHCI Root Hub, class 9/0, rev 1.00/1.00, addr 0
uhub0: 4 ports with 4 removable, self powered
uhub1 at usb1: vendor 1022 xHCI Root Hub, class 9/0, rev 1.00/1.00, addr 0
uhub1: 4 ports with 4 removable, self powered
IPsec: Initialized Security Association Processing.
uhub2 at usb2: vendor 1022 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 5 ports with 5 removable, self powered
uhub3 at usb3: vendor 1022 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub3: 5 ports with 5 removable, self powered
uhub4 at usb4: vendor 1022 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub4: 5 ports with 5 removable, self powered
uhub5 at usb5: vendor 1022 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub5: 5 ports with 5 removable, self powered
uhub6 at usb6: vendor 1022 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub6: 2 ports with 2 removable, self powered
ahcisata0 port 0: device present, speed: 6.0Gb/s
ahcisata0 port 1: device present, speed: 3.0Gb/s
ahcisata0 port 2: device present, speed: 6.0Gb/s
ahcisata0 port 3: device present, speed: 1.5Gb/s
ehci0: handing over low speed device on port 2 to ohci0
ehci1: handing over low speed device on port 1 to ohci1
wd0 at atabus0 drive 0
wd0: <Hitachi HDS721050CLA660>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 465 GB, 969021 cyl, 16 head, 63 sec, 512 bytes/sect x 976773168 sectors
wd0: GPT GUID: 2fd07786-ffc8-4cbe-af4d-e32f449b8d19
dk0 at wd0: "Basic data partition", 921600 blocks at 2048, type: <unknown>
dk1 at wd0: "EFI system partition", 204800 blocks at 923648, type: msdos
dk2 at wd0: "Microsoft reserved partition", 32768 blocks at 1128448, type: <unknown>
dk3 at wd0: "07935d3f-b6a0-427a-9eb3-9073b522efc7", 975609856 blocks at 1161216, type: <unknown>
wd0: wedge named 'Basic data partition' already existed, using '07935d3f-b6a0-427a-9eb3-9073b522efc7'
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd0(ahcisata0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA)
wd1 at atabus1 drive 0
wd1: <SiliconHardDisk>
wd1: drive supports 1-sector PIO transfers, LBA addressing
wd1: 61136 MB, 124212 cyl, 16 head, 63 sec, 512 bytes/sect x 125206528 sectors
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd1(ahcisata0:1:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100) (using DMA)
wd2 at atabus2 drive 0
wd2: <LITEON IT SCS-128L9S>
wd2: drive supports 16-sector PIO transfers, LBA48 addressing
wd2: 119 GB, 248085 cyl, 16 head, 63 sec, 512 bytes/sect x 250069680 sectors
wd2: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd2(ahcisata0:2:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA)
atapibus0 at atabus3: 1 targets
cd0 at atapibus0 drive 0: <hp      DVD A  DH16ACSH, 248231904450, JHD6> cdrom removable
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
cd0(ahcisata0:3:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100) (using DMA)
umass0 at uhub5 port 2 configuration 1 interface 0
umass0: Generic Mass Storage Device, rev 2.00/1.00, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <Multiple, Card  Reader, 1.00> disk removable
sd0: drive offline
pad0: outputs: 44100Hz, 16-bit, stereo
audio1 at pad0: half duplex, playback, capture
uhidev0 at uhub2 port 2 configuration 1 interface 0
uhidev0: Kensington Kensington Expert Mouse, rev 1.10/1.00, addr 2, iclass 3/1
uhidev1 at uhub4 port 1 configuration 1 interface 0
uhidev1: USB Keyboard USB Keyboard, rev 1.10/1.01, addr 2, iclass 3/1
ums0 at uhidev0: 4 buttons and Z dir
wsmouse0 at ums0 mux 0
ukbd0 at uhidev1: 8 modifier keys, 6 key codes
boot device: wd1
root on wd1a dumps on wd1b
root file system type: ffs
kern.module.path=/stand/amd64/7.99.29/modules
drm: initializing kernel modesetting (ARUBA 0x1002:0x9901 0x103C:0x2AE0).
drm: register mmio base: 0xfeb00000
drm: register mmio size: 262144
drm kern info: ATOM BIOS: 113
radeon0: info: VRAM: 512M 0x0000000000000000 - 0x000000001FFFFFFF (512M used)
radeon0: info: GTT: 1024M 0x0000000020000000 - 0x000000005FFFFFFF
drm: Detected VRAM RAM=200M, BAR=256M
drm: RAM width 64bits DDR
Zone  kernel: Available graphics memory: 2665164 kiB
Zone   dma32: Available graphics memory: 2097152 kiB
drm: radeon: 512M of VRAM memory ready
drm: radeon: 1024M of GTT memory ready.
drm: Loading ARUBA Microcode
drm: Internal thermal controller without fan control
drm: radeon: dpm initialized
drm: GART: num cpu pages 262144, num gpu pages 262144
drm: PCIE GART of 1024M enabled (table at 0x0000000000276000).
radeon0: info: WB enabled
radeon0: info: fence driver on ring 0 use gpu addr 0x0000000020000c00 and cpu addr 0x0xffff8000874acc00
radeon0: info: fence driver on ring 5 use gpu addr 0x0000000000075a18 and cpu addr 0x0xffff8000874f5a18
radeon0: info: fence driver on ring 1 use gpu addr 0x0000000020000c04 and cpu addr 0x0xffff8000874acc04
radeon0: info: fence driver on ring 2 use gpu addr 0x0000000020000c08 and cpu addr 0x0xffff8000874acc08
radeon0: info: fence driver on ring 3 use gpu addr 0x0000000020000c0c and cpu addr 0x0xffff8000874acc0c
radeon0: info: fence driver on ring 4 use gpu addr 0x0000000020000c10 and cpu addr 0x0xffff8000874acc10
drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
drm: Driver supports precise vblank timestamp query.
radeon0: interrupting at ioapic0 pin 17 (radeon)
drm: radeon: irq initialized.
drm: ring test on 0 succeeded in 3 usecs
drm: ring test on 3 succeeded in 2 usecs
drm: ring test on 4 succeeded in 1 usecs
drm: ring test on 5 succeeded in 2 usecs
drm: UVD initialized successfully.
drm: ib test on ring 0 succeeded in 0 usecs
drm: ib test on ring 3 succeeded in 0 usecs
drm: ib test on ring 4 succeeded in 1 usecs
drm: ib test on ring 5 succeeded
drm: Radeon Display Connectors
drm: Connector 0:
drm:   DP-1
drm:   HPD1
drm:   DDC: 0x6530 0x6530 0x6534 0x6534 0x6538 0x6538 0x653c 0x653c
drm:   Encoders:
drm:     DFP1: INTERNAL_UNIPHY2
drm: Connector 1:
drm:   VGA-1
drm:   HPD2
drm:   DDC: 0x6540 0x6540 0x6544 0x6544 0x6548 0x6548 0x654c 0x654c
drm:   Encoders:
drm:     CRT1: INTERNAL_UNIPHY2
drm:     CRT1: NUTMEG
drm: Connector 2:
drm:   DVI-D-1
drm:   HPD3
drm:   DDC: 0x6550 0x6550 0x6554 0x6554 0x6558 0x6558 0x655c 0x655c
drm:   Encoders:
drm:     DFP2: INTERNAL_UNIPHY
radeondrmkmsfb0 at radeon0
radeon0: info: registered panic notifier
radeondrmkmsfb0: framebuffer at 0xffff800087b26000, size 1024x768, depth 32, stride 4096
wsdisplay0 at radeondrmkmsfb0 kbdmux 1: console (default, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
uhidev2 at uhub4 port 1 configuration 1 interface 1
uhidev2: USB Keyboard USB Keyboard, rev 1.10/1.01, addr 2, iclass 3/1
uhidev2: 2 report ids
uhid0 at uhidev2 reportid 1: input=7, output=0, feature=0
uhid1 at uhidev2 reportid 2: input=1, output=0, feature=0
wsdisplay0: screen 1 added (default, vt100 emulation)
wsdisplay0: screen 2 added (default, vt100 emulation)
wsdisplay0: screen 3 added (default, vt100 emulation)
wsdisplay0: screen 4 added (default, vt100 emulation)

あとついでにWin10にも上げといた。設定のUIががっつり変わっててよくわからん…

2013-12-09

[][]binary upgrade 01:37 binary upgrade - steletoの日記 を含むブックマーク binary upgrade - steletoの日記 のブックマークコメント

玄箱HGを今ごろになって6.1.2に更新したので作業手順をメモ。


まずは/netbsdを更新。一応現状のカーネルをバックアップしておく。

# cp /netbsd /netbsd.bak
# tar xzpvf kern-KUROBOX.tgz -C /

この状態で一度再起動。

# reboot

正常に起動できたらetc以外を展開。X関係は入れていないので省略。

# for i in base comp games man misc modules tests text; do tar xzpvf $i.tgz -C /; done

/tmp/tmprootにetc.tgzを展開。

# mkdir /tmp/tmproot
# tar xzpvf etc.tgz -C /tmp/tmproot

postinstall実行。

# postinstall -s /tmp/tmproot check
...(略)...
postinstall checks passed: bluetooth ddbonpanic defaults dhcpcd envsys fontconfig gid gpio hosts iscsi motd named pam periodic pf pwd_mkdb rc ssh wscons x11 xkb uid varrwho tcpdumpchroot atf catpages obsolete ptyfsoldnodes
postinstall checks failed: makedev mtree
To fix, run:
    sh /usr/sbin/postinstall -s '/tmp/tmproot' -d / fix makedev mtree
Note that this may overwrite local changes.

修正するならコレ実行しやがれということなので。

# sh /usr/sbin/postinstall -s '/tmp/tmproot' -d / fix makedev mtree
...(略)...
postinstall fixes passed: makedev mtree
postinstall fixes failed:

etcupdate実行。

# etcupdate -s /tmp/tmproot
...(差異があるファイルを更新していいか確認してくるので適宜答える)...
*** All done

再起動。

# shutdown -r now

完。

2013-06-23

[][] 玄箱HG Update (3) 22:50  玄箱HG Update (3) - steletoの日記 を含むブックマーク  玄箱HG Update (3) - steletoの日記 のブックマークコメント

まずは母艦側の下準備。

/etc/inetd.confを編集してtftpとbootpを有効にする。

(ちなみにはじめてのネットワークブートだったこともありbootpでたいぶハマった)

--- /etc/inetd.conf.orig	2013-06-23 21:38:37.000000000 +0900
+++ /etc/inetd.conf	2013-06-23 21:38:46.000000000 +0900
@@ -20,7 +20,7 @@
 #finger		stream	tcp6	nowait	nobody	/usr/libexec/fingerd	fingerd -lsmu
 #ident		stream	tcp	nowait	nobody	/usr/libexec/identd	identd -l -o OTHER -e -N
 #ident		stream	tcp6	nowait	nobody	/usr/libexec/identd	identd -l -o OTHER -e -N
-#tftp		dgram	udp	wait	root	/usr/libexec/tftpd	tftpd -l -s /tftpboot
+tftp		dgram	udp	wait	root	/usr/libexec/tftpd	tftpd -l -s /tftpboot
 #tftp		dgram	udp6	wait	root	/usr/libexec/tftpd	tftpd -l -s /tftpboot
 #comsat		dgram	udp	wait	root	/usr/libexec/comsat	comsat
 #comsat		dgram	udp6	wait	root	/usr/libexec/comsat	comsat
 #ntalk		dgram	udp	wait	nobody:tty	/usr/libexec/ntalkd	ntalkd
-#bootps		dgram	udp	wait	root	/usr/sbin/bootpd	bootpd
+bootps		dgram	udp	wait	root	/usr/sbin/bootpd	bootpd
 #
 #	Games
 #

続いてbootp用の設定を/etc/bootptabに設定。

kurobox:ht=ethernet:ha=000d0bxxxxxx:ip=192.168.0.254:sa=192.168.0.25:

/tftpbootディレクトリに「altboot.bin」と「netbsd-INSTALL_KURO」を用意し、inetdを再起動。

# /etc/rc.d/inetd restart
Stopping inetd.
Waiting for PIDS: 443.
Starting inetd.

玄箱HGに戻ってきて、まずは自身とTFTPサーバIPアドレスを設定する。

=> setenv ipaddr 192.168.0.254
=> setenv serverip 192.168.0.25
=> saveenv
Saving Environment to Flash...
Un-Protected 1 sectors
Erasing Flash...
Flash erase: first = 54 @ 0xfff60000
             last  = 54 @ 0xfff60000
Flash erase: Done
Erased 1 sectors
Writing to Flash... done
Protected 1 sectors

altboot.binを0x01000000へ読み込む。

=> tftpboot 01000000 altboot.bin
Using RTL8169#0 device
TFTP from server 192.168.0.25; our IP address is 192.168.0.254
Filename 'altboot.bin'.
Load address: 0x1000000
Loading: ###############
done
Bytes transferred = 75924 (12894 hex)

Go。

=> go 1000000 tftp:netbsd-INSTALL_KURO
## Starting application at 0x01000000 ...

>> NetBSD/sandpoint altboot, revision 1.9
>> KuroBox, cpu 262 MHz, bus 131 MHz, 128MB SDRAM
channel 0 present
wd0: <Hitachi HTS545050B9A300> DMA LBA LBA48 476940 MB
wd0: no disklabel
MAC address 00:0d:0b:xx:xx:xx
10Mbps
Hit any key to enter interactive mode: 0
loading "netbsd-INSTALL_KURO" 5370872+134200=0x5404b8
entry=0x90000, ssym=0x5d0030, esym=0x5d04b8
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 6.1 (INSTALL_KURO)
Model: kurobox
total memory = 128 MB
avail memory = 118 MB
... snip ...

なんか聞いてきたので答える。

Terminal type? [vt100]                                                          
Erase is backspace.                                                             
(I)nstall, (S)hell or (H)alt ? i

f:id:steleto:20130623224750p:image

いつものインストール画面に到達。

[][] 玄箱HG Update (2) 17:10  玄箱HG Update (2) - steletoの日記 を含むブックマーク  玄箱HG Update (2) - steletoの日記 のブックマークコメント

基本的に本家ドキュメント「LinkStation Installation」の通り。

シリアル出力改造は既に済ませてあるので、シリアル接続して玄箱HGの電源をON。

******* Product Information *******
---------------------------------- 
Product Name: KURO-BOX/HG(IESHIGE)
          VER: 1.00               
         Date: 2004/10/19 17:18:54
----------------------------------
Firmware check:done.              
                    
>>root=/dev/hda1
Now Loading...done.
Now Booting        
Memory BAT mapping: BAT2=128Mb, BAT3=0Mb, residual: 0Mb
Linux version 2.4.17_mvl21 (root@toda_dev.melcoinc.co.jp) (gcc version 2.95.3 20010315 (release/MontaVista)) #24 2004&#254; 10&#249; 19 &#254;&#254;&#254; 17:17:03 JST
KURO-BOX (C) 2004 KUROUTO-SHIKOU.
... snip ...
hda: Hitachi HTS545050B9A300, ATA DISK drive
... snip ...
Kuroutoshikou KURO-BOX/HG (IESHIGE)

KURO-BOX-EM login:

きちんとHDDを認識できているのを確認して「root/kuroadmin」でログイン。Linuxバージョン表記の列で日付と思わしきものが化けたが知らん。(ぉ

続いて母艦からu-bootイメージを転送。

$ ftp ftp://root:kuroadmin@192.168.0.3/
Connected to 192.168.0.3.
220 KURO-BOX-EM FTP server (Version 6.4/OpenBSD/Linux-ftpd-0.17) ready.
331 Password required for root.
230- Linux 2.4.17 ppc unknown
230 User root logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
200 Type set to I.
ftp> put u-boot-hg.flash.bin 
local: u-boot-hg.flash.bin remote: u-boot-hg.flash.bin
227 Entering Passive Mode (192,168,0,3,4,1)
150 Opening BINARY mode data connection for 'u-boot-hg.flash.bin'.
100% |***********************************|   170 KiB  428.62 KiB/s    00:00 ETA
226 Transfer complete.
174668 bytes sent in 00:00 (350.27 KiB/s)
ftp> bye
221 Goodbye.

どこに転送されたのかと思ってたら/rootだったので、そこに移動して/dev/fl2に(一応バックアップを取ってから)catで流し込む。

# cd /root
# ls -l
-rw-r-----    1 root     root       174668 Jun 24 02:30 u-boot-hg.flash.bin
# cat /dev/fl2 > fl2.old.bin
# cat u-boot-hg.flash.bin > /dev/fl2

書き込みが終わったらもう一度/dev/fl2を読み込んでバイナリが一致しているか比較する。

# cat /dev/fl2 > fl2.bin
# cmp -l fl2.bin u-boot-hg.flash.bin
cmp: No such file or directory

おおっとEMモードだとcmpが無いのか。しからば母艦に転送させて比較。

cmp: EOF on u-boot-hg.flash.bin: char 174669, line 862

u-boot-hg.flash.binファイルは174668バイトなのでこれでOK。

では玄箱HGを再起動。

U-Boot 1.1.4 LiSt 2.1.0 (Sep 21 2006 - 00:14:53) LinkStation HG / KuroBox HG

CPU:   MPC8245 Revision 1.4 at 262.144 MHz: 16 kB I-Cache 16 kB D-Cache
DRAM:  128 MB
FLASH:  4 MB
*** Warning - bad CRC, using default environment

        00  0b  10ec  8169  0200  ff
        00  0c  1095  0680  0101  ff
        00  0e  1033  0035  0c03  ff
        00  0e  1033  0035  0c03  ff
        00  0e  1033  00e0  0c03  ff
Net:   RTL8169#0

初期値がnetcatとかいうものらしく、ここで20秒ほど待ち状態になる。このまま放置してタイムアウトさせると次に進む。

next_cons_choice: Unexpected code: 0x33
stdin :   serial
stdout:   serial
stderr:   serial
IDE:   Bus 0: OK
  Device 0: Model: Hitachi HTS545050B9A300 Firm: PB4OC64G Ser#: 110112PBN400171E
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
Boot in 02 seconds ('s' to stop)...

ここまできたら「s」で停止させ、環境変数を変更して起動時にシリアルモードに落ちるように設定。

=> run ser          
=> setenv bootcmd
=> setenv bootdelay -1
=> saveenv 
Saving Environment to Flash...
Un-Protected 1 sectors
Erasing Flash...
Flash erase: first = 54 @ 0xfff60000
             last  = 54 @ 0xfff60000
Flash erase: Done
Erased 1 sectors        
Writing to Flash... done
Protected 1 sectors

完。