[Aboriginal] qemu-system-sh4 sdb mounting broken

John Spencer maillist-aboriginal at barfooze.de
Fri Feb 28 08:16:13 PST 2014


/dev/sdb is not there, and there are a lot of kernel errors...
see below

$ qemu-system-sh4 --version
QEMU emulator version 1.7.0, Copyright (c) 2003-2008 Fabrice Bellard

  $ HDB=hdb.img ./dev-environment.sh
+ source ./run-emulator.sh --norun
++ ARCH=sh4
++ '[' --norun '!=' --norun ']'
+ '[' -z '' ']'
+ QEMU_MEMORY=256
+ QEMU_EXTRA='-m 256 '
+ '[' '' '!=' 0 ']'
+ '[' -z hdb.img ']'
+ '[' '!' -e hdb.img ']'
++ which sh4-cc
++ sed 's@\(.*\)/.*@\1@'
+ DISTCC_PATH=
+ '[' -z '' ']'
++ pwd
++ pwd
++ pwd
++ pwd
+ for i in 
'{"$(pwd)/","$(pwd)/../","$HOME"/}{,simple-}cross-compiler-"$ARCH"/bin'
+ '[' -f /home/rofl/qemu/system-image-sh4/cross-compiler-sh4/bin/sh4-cc ']'
+ for i in 
'{"$(pwd)/","$(pwd)/../","$HOME"/}{,simple-}cross-compiler-"$ARCH"/bin'
+ '[' -f 
/home/rofl/qemu/system-image-sh4/simple-cross-compiler-sh4/bin/sh4-cc ']'
+ for i in 
'{"$(pwd)/","$(pwd)/../","$HOME"/}{,simple-}cross-compiler-"$ARCH"/bin'
+ '[' -f 
/home/rofl/qemu/system-image-sh4/../cross-compiler-sh4/bin/sh4-cc ']'
+ for i in 
'{"$(pwd)/","$(pwd)/../","$HOME"/}{,simple-}cross-compiler-"$ARCH"/bin'
+ '[' -f 
/home/rofl/qemu/system-image-sh4/../simple-cross-compiler-sh4/bin/sh4-cc ']'
+ for i in 
'{"$(pwd)/","$(pwd)/../","$HOME"/}{,simple-}cross-compiler-"$ARCH"/bin'
+ '[' -f /home/rofl/cross-compiler-sh4/bin/sh4-cc ']'
+ for i in 
'{"$(pwd)/","$(pwd)/../","$HOME"/}{,simple-}cross-compiler-"$ARCH"/bin'
+ '[' -f /home/rofl/simple-cross-compiler-sh4/bin/sh4-cc ']'
++ which distccd
+ '[' -z '' ']'
+ '[' -e ../host/distccd ']'
+ '[' -z '' ']'
+ CPUS=1
++ which distccd
+ '[' -z '' ']'
+ echo 'No distccd in $PATH, acceleration disabled.'
No distccd in $PATH, acceleration disabled.
+ KERNEL_EXTRA='CPUS=1 '
+ trap 'pkill -P2547' EXIT
+ '[' '!' -z '' ']'
+ '[' '!' -z hdb.img ']'
+ QEMU_EXTRA='-hdb hdb.img -m 256 '
+ run_emulator
+ '[' '!' -z '' ']'
+ qemu-system-sh4 -M r2d -nographic -no-reboot -kernel zImage -hda 
hda.sqf -append 'root=/dev/sda rw init=/sbin/
init.sh panic=1 PATH=/bin:/sbin console=ttySC1 noiotrap HOST=sh4 CPUS=1 
' -hdb hdb.img -m 256 -monitor null -ser
ial null -serial stdio
long read to SH7750_WCR1_A7 (0x000000001f800008) ignored
long read to SH7750_WCR2_A7 (0x000000001f80000c) ignored
long read to SH7750_WCR3_A7 (0x000000001f800010) ignored
long read to SH7750_MCR_A7 (0x000000001f800014) ignored
long read to SH7750_MCR_A7 (0x000000001f800014) ignored
Linux version 3.12.0 (landley at driftwood) (gcc version 4.2.1) #1 Mon Nov 
18 10:05:39 CST 2013
Boot params:
... MOUNT_ROOT_RDONLY - 00000000
... RAMDISK_FLAGS     - 00000000
... ORIG_ROOT_DEV     - 00000000
... LOADER_TYPE       - 00000000
... INITRD_START      - 00000000
... INITRD_SIZE       - 00000000
Booting machvec: RTS7751R2D
Node 0: start_pfn = 0xc000, low = 0x10000
Zone ranges:
   Normal   [mem 0x0c000000-0x0fffffff]
Movable zone start for each node
Early memory node ranges
   node   0: [mem 0x0c000000-0x0fffffff]
Renesas Technology Sales RTS7751R2D support.
FPGA version:1 (revision:0)
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: root=/dev/sda rw init=/sbin/init.sh panic=1 
PATH=/bin:/sbin console=ttySC1 noiotrap HOST=sh4 CPUS=1
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Sorting __ex_table...
PVR=04050005 CVR=00110000 PRR=00000113
I-cache : n_ways=2 n_sets=64 way_incr=2048
I-cache : entry_mask=0x000007e0 alias_mask=0x00000000 n_aliases=0
D-cache : n_ways=2 n_sets=64 way_incr=2048
D-cache : entry_mask=0x000007e0 alias_mask=0x00000000 n_aliases=0
Memory: 62188K/65536K available (1977K kernel code, 136K rwdata, 264K 
rodata, 96K init, 183K bss, 3344K reserved)
virtual kernel memory layout:
     fixmap  : 0xdfff7000 - 0xdffff000   (  32 kB)
     vmalloc : 0xc0000000 - 0xdfff5000   ( 511 MB)
     lowmem  : 0x8c000000 - 0x90000000   (  64 MB) (cached)
             : 0xa0000000 - 0xc0000000   ( 512 MB) (uncached)
       .init : 0x8c265000 - 0x8c27d000   (  96 kB)
       .data : 0x8c1ff700 - 0x8c2649e0   ( 404 kB)
       .text : 0x8c010000 - 0x8c1ff700   (1981 kB)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:8 nr_irqs:8 0
intc: Registered controller 'sh7750' with 20 IRQs
intc: Registered controller 'sh7750_dma8' with 9 IRQs
intc: Registered controller 'sh7750_tmu34' with 2 IRQs
intc: Registered controller 'sh7750_pci' with 8 IRQs
Using R2D-PLUS interrupt controller.
intc: Registered controller 'r2d-plus' with 13 IRQs
  sh_tmu.0: used for clock events
  sh_tmu.0: used for periodic clock events
  sh_tmu.1: used as clock source
Calibrating delay loop (skipped)... 120.00 BogoMIPS PRESET (lpj=240000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: SH7751R
devtmpfs: initialized
NET: Registered protocol family 16
PCI: Starting initialization.
bio: create slab <bio-0> at 0
SCSI subsystem initialized
sh_tmu sh_tmu.0: kept as earlytimer
sh_tmu sh_tmu.1: kept as earlytimer
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x1000-0x3fffff]
pci_bus 0000:00: root bus resource [mem 0xfd000000-0xfdffffff]
pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
pci 0000:00:02.0: BAR 6: assigned [mem 0xfd000000-0xfd03ffff pref]
pci 0000:00:02.0: BAR 0: assigned [io  0x1000-0x10ff]
pci 0000:00:02.0: BAR 1: assigned [mem 0xfd040000-0xfd0400ff]
Switched to clocksource sh_tmu.1
sh_tmu sh_tmu.0: used for oneshot clock events
NET: Registered protocol family 2
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
squashfs: version 4.0 (2009/01/31) Phillip Lougher
9p: Installing v9fs 9p2000 file system support
msgmni has been set to 121
io scheduler noop registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
SuperH (H)SCI(F) driver initialized
sh-sci.1: ttySC1 at MMIO 0xffe80000 (irq = 40, base_baud = 0) is a scif
console [ttySC1] enabled
loop: module loaded
sm501 sm501: SM501 At b3e00000: Version 050100a0, 8 Mb, IRQ 100
Attribute dbg_regs: write permission without 'store'
------------[ cut here ]------------
WARNING: at 8c1487c0 [verbose debug info unavailable]

CPU: 0 PID: 1 Comm: swapper Not tainted 3.12.0 #1
task: 8fc2c000 ti: 8fc2e000 task.ti: 8fc2e000
PC  : 8c1487c0 SP  : 8fc2fe78 SR  : 40008000 TEA : 00000000
R0  : 00000034 R1  : 00000000 R2  : 40008000 R3  : 00000000
R4  : 00000000 R5  : 8c280e1c R6  : 00000002 R7  : 00001ac4
R8  : 8c25df38 R9  : 8c253280 R10 : 8fd5b480 R11 : 8c147d5c
R12 : 8fd5b4fc R13 : 00000000 R14 : 00000000
MACH: 00000000 MACL: 0000005b GBR : 00000000 PR  : 8c1487c0

Call trace:
  [<8c151468>] 0x8c151468
  [<8c0125e0>] 0x8c0125e0
  [<8c14aefe>] 0x8c14aefe
  [<8c0125e0>] 0x8c0125e0
  [<8c14b254>] 0x8c14b254
  [<8c14b210>] 0x8c14b210
  [<8c149bc0>] 0x8c149bc0
  [<8c14997c>] 0x8c14997c
  [<8c14a5a8>] 0x8c14a5a8
  [<8c14b50e>] 0x8c14b50e
  [<8c270060>] 0x8c270060
  [<8c27006a>] 0x8c27006a
  [<8c26514e>] 0x8c26514e
  [<8c0b0344>] 0x8c0b0344
  [<8c032ea0>] 0x8c032ea0
  [<8c2655a4>] 0x8c2655a4
  [<8c2650c0>] 0x8c2650c0
  [<8c2655b4>] 0x8c2655b4
  [<8c2650c0>] 0x8c2650c0
  [<8c1fa3b2>] 0x8c1fa3b2
  [<8c0125e0>] 0x8c0125e0
  [<8c03b3e8>] 0x8c03b3e8
  [<8c0171e8>] 0x8c0171e8
  [<8c03b3e8>] 0x8c03b3e8
  [<8c1fa3a8>] 0x8c1fa3a8

---[ end trace 1917c4950578b112 ]---
Uniform Multi-Platform E-IDE driver
ide-gd driver 1.18
ide-cd driver 5.00
scsi0 : pata_platform
ata1: PATA max PIO0 mmio cmd 0xb4001000 ctl 0xb400080c irq 107
8139cp: 8139cp: 10/100 PCI Ethernet driver v1.3 (Mar 22, 2004)
8139cp 0000:00:02.0: enabling device (0000 -> 0003)
8139cp 0000:00:02.0 eth0: RTL-8139C+ at 0xfd040000, 52:54:00:12:34:56, 
IRQ 112
rtc-r9701 spi0.0: cannot read RTC register
TCP: cubic registered
NET: Registered protocol family 17
9pnet: Installing 9P2000 support
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
ata1.00: ATA-7: QEMU HARDDISK, 1.7.0, max UDMA/100
ata1.00: 60312 sectors, multi 16: LBA48
ata1.00: configured for PIO
scsi 0:0:0:0: Direct-Access     ATA      QEMU HARDDISK    1.7. PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 60312 512-byte logical blocks: (30.8 MB/29.4 MiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't 
support DPO or FUA
  sda: unknown partition table
sd 0:0:0:0: [sda] Attached SCSI disk
VFS: Mounted root (squashfs filesystem) readonly on device 8:0.
Freeing unused kernel memory: 96K (8c265000 - 8c27d000)
8139cp 0000:00:02.0 eth0: link up, 100Mbps, full-duplex, lpa 0x05E1
Not using distcc.
Type exit when done.
(sh4:1) /home # ls /dev/sd*
/dev/sda
(sh4:1) /home # sd 0:0:0:0: [sda] Synchronizing SCSI cache
reboot: Restarting system
Unauthorized access
qemu: fatal: Trying to execute code outside RAM or ROM at 0xa0000000

pc=0xa0000000 sr=0x700000f0 pr=0x8c013324 fpscr=0x00080000
spc=0x8c01332a ssr=0x10000000 gbr=0x00463448 vbr=0x8c018000
sgr=0x8fe6fe88 dbr=0x00000000 delayed_pc=0x8c013324 fpul=0x00000000
r0=0x400080f1 r1=0x80000001 r2=0x10000000 r3=0x00000000
r4=0x000000f0 r5=0x8c280e1c r6=0x00000006 r7=0x00002c4c
r8=0x01234567 r9=0x00000000 r10=0xfee1dead r11=0x01234567
r12=0x00000000 r13=0x00000000 r14=0x7bab3d04 r15=0x8fe6fe88
r16=0x00000000 r17=0xffffff0f r18=0x40008000 r19=0x40008000
r20=0x8fe6fe30 r21=0x00000000 r22=0x00000000 r23=0x8fe6e000
Killed

btw, after receiving the kill signal, the terminal (xterm) is messed up 
(you dont see what you type, and hitting enter displays the new prompt 
in the same line instead of on a new line).
if otoh you run the qemu command by hand, the terminal stays intact.
putting the qemu command into a script file and calling that, the 
breakage is there as well.
so it seems there's some interaction between the qemu kill and the shell 
running as script processor (both bash and ash are affected).



More information about the Aboriginal mailing list