Sparc platform development envrionment using Qemu

A nice, warm, and cozy place for all third-party developers to congregate.

Sparc platform development envrionment using Qemu

Postby chirpa » Mon Jul 13, 2009 10:12 am

You can now run a fully emulated Sparc platform development environment on any system capable of running Qemu.

Download: readynas_compile_environment.qcow.gz

Code: Select all
# wget -q http://www.readynas.com/download/development/readynas_compile_environment.qcow.gz
# gunzip readynas_compile_environment.qcow.gz
# qemu-system-sparc -hda readynas_compile_environment.qcow -nographic

Default root password for this package is 'a'. The compile environment is all there for most common stuff.
Code: Select all
# qemu-system-sparc -hda readynas_compile_environment.qcow -nographic
(qemu)
Nvram id QEMU_BIOS, version 1, machine id 0x80
CPUs: 1
invalid nvram partition length
nvram error detected, zapping pram
Welcome to OpenBIOS v1.0RC1 built on May 31 2007 23:50
  Type 'help' for detailed information

[sparc] Booting file 'disk' with parameters ''
Not a bootable ELF image
Not a Linux kernel image
Loading a.out image...
Loaded 7680 bytes
entry point is 0x4000
Jumping to entry point...
SILO Version 1.4.13
boot:
Uncompressing image...
Loaded kernel version 2.6.18
Loading initial ramdisk (3210249 bytes at 0x3000000 phys, 0x60000000 virt)...
PROMLIB: obio_ranges 1
Booting Linux...
PROMLIB: Sun Boot Prom Version 3 Revision 2
Linux version 2.6.18-6-sparc32 (Debian 2.6.18.dfsg.1-23etch1) (dannf@debian.org) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 Fri Dec 12 16:29:52 UTC 2008
ARCH: SUN4M
TYPE: SPARCstation 5
Ethernet address: 52:54:0:12:34:56
Boot time fixup v1.6. 4/Mar/98 Jakub Jelinek (jj@ultra.linux.cz). Patching kernel for srmmu[Fujitsu TurboSparc]/iommu
PROM: Built device tree with 21266 bytes of memory.
Power off control detected.
Built 1 zonelists.  Total pages: 31179
Kernel command line: root=/dev/sda2 ro
PID hash table entries: 512 (order: 9, 2048 bytes)
start_kernel(): bug: interrupts were enabled early
Console: colour dummy device 80x25
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 121200k/130232k available (1640k kernel code, 8880k reserved, 404k data, 136k init, 0k highmem)
Mount-cache hash table entries: 512
checking if image is initramfs... it is
Freeing initrd memory: 3135k freed
NET: Registered protocol family 16
IOMMU: impl 0 vers 4 table 0xf3200000[262144 B] map [65536 b]
sbus0: Clock 21.1250 MHz
dma0: Revision 2
dma1: Revision 2
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 4096 bind 2048)
TCP reno registered
ioremap: done with statics, switching to malloc
apc: power management initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 128x48
/iommu@0,10000000/sbus@0,10001000/SUNW,tcx@3,800000: TCX at 0:50800000, 24-bit depth
ffd54490: ttyS0 at MMIO 0x71100000 (irq = 44) is a zs
Console: ttyS0 (SunZilog zs0)
ffd54490: ttyS1 at MMIO 0x71100004 (irq = 44) is a zs
ffd5466c: Keyboard at MMIO 71000000 (irq = 44) is a zs
ffd5466c: Mouse at MMIO 71000004 (irq = 44) is a zs
Floppy drive(s): fd0 is 1.44M
FDC 0 is a S82078B
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
rtc_sun_init: Registered Mostek RTC driver.
mice: PS/2 mouse device common for all mice
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Freeing unused kernel memory: 136k freed
input: Sun Type 5 keyboard as /class/input/input0
Loading, please wait...
Begin: Loading essential drivers... ...
SCSI subsystem initialized
esp0: IRQ 36 SCSI ID 7 Clk 40MHz CCYC=25000 CCF=8 TOut 167 NCR53C90(esp100)
scsi0 : Sparc ESP100 (NCR53C90)
  Vendor: QEMU      Model: QEMU HARDDISK     Rev: 0.8.
  Type:   Direct-Access                      ANSI SCSI revision: 03
  Vendor: QEMU      Model: QEMU CD-ROM       Rev: 0.8.
  Type:   CD-ROM                             ANSI SCSI revision: 03
Done.
Begin: Running /scripts/init-premount ...
SCSI device sda: 20971521 512-byte hdwr sectors (10737 MB)
sda: Write Protect is off
SCSI device sda: drive cache: write back
SCSI device sda: 20971521 512-byte hdwr sectors (10737 MB)
sda: Write Protect is off
SCSI device sda: drive cache: write back
 sda: sda1 sda2 sda3 sda4
sd 0:0:0:0: Attached scsi disk sda
Done.
Begin: Mounting root file system... ...
Begin: Running /scripts/local-top ...
Done.
Begin: Running /scripts/local-premount ...
Done.
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
Begin: Running /scripts/local-bottom ...
Done.
Done.
Begin: Running /scripts/init-bottom ...
Done.
INIT: version 2.84 booting
INIT: Entering runlevel: 3
EXT3 FS on sda2, internal journal
sunlance.c:v2.02 8/24/03 Miguel de Icaza (miguel@nuclecu.unam.mx)
SunLance: using auto-carrier-detection.
eth0: LANCE 52:54:00:12:34:56
Starting LVM...done.
Checking filesystems...done
Setting kernel variables.
Mounting filesystems:
nothing was mounted
Initializing urandom... done.
Starting portmap...done.
Starting log daemons: syslogd klogd.
Starting atd...done
Starting inetd...done
Starting cupsd...done
Starting cron...done

debian-sparc login: root
Password:
Linux debian-sparc 2.6.18-6-sparc32 #1 Fri Dec 12 16:29:52 UTC 2008 sparc GNU/Linux
debian-sparc:~#
(I'm actually running this directly on a ReadyNAS Pro)
Once a member of the Jedi Council Alumni | Tweet Me Get DropBox ReadyDATA? Intentions?
Hot off the press: RNOS6 on x86 boxen | RNOS6 in VM | RAIDiator-x86 in VM | ReadyDATA in VM
User avatar
chirpa
Jedi Council Alumni
 
Posts: 15646
Joined: Mon Sep 24, 2007 11:52 am
Location: San Jose, CA
ReadyNAS: Repertoire

Re: Sparc platform development envrionment using Qemu

Postby scott.alan.kline » Fri Jul 24, 2009 6:01 am

I am trying to use this on Ubuntu so I can compile the full_audit.so for samba but every time I try to start I get the error:

Code: Select all
qemu-system-sparc -hda readynas_compile_environment.qcow -nographic
/usr/share/qemu/openbios-sparc32: No such file or directory
qemu: could not load prom '/usr/share/qemu/openbios-sparc32'


I have looked everywhere trying to find a resolution and I can't find anything. I did look within the /usr/share/qemu and it has symlinks to a folder called openbios from all of the files begining with openbios- (like openbios-sparc32) but the actual folders they are linking to do not exist. I have done an update and reinstall of qemu but it is the same, I also removed and installed from a debian package, still the same thing.

Thanks in advance,
SK
scott.alan.kline
ReadyNAS Newbie
 
Posts: 27
Joined: Wed Apr 22, 2009 5:42 am

Re: Sparc platform development envrionment using Qemu

Postby scott.alan.kline » Fri Jul 24, 2009 6:11 am

I fixed that error now, I had to install the openbios package. But now that I have it installed here is what happens:

Code: Select all
Nvram id QEMU_BIOS, version 3, machine id 0x80
CPUs: 1 x FMI,MB86904
Welcome to OpenBIOS v1.0RC1 built on jan 24 2008 01:56
  Type 'help' for detailed information

[sparc] Booting file 'disk' with parameters ''
Not a bootable ELF image
Not a Linux kernel image
Loading a.out image...
Loaded 7680 bytes
entry point is 0x4000
Jumping to entry point...
SILO Version 1.4.13
boot:
Uncompressing image...
Loaded kernel version 2.6.18
Loading initial ramdisk (3210249 bytes at 0x3000000 phys, 0x60000000 virt)...
PROMLIB: obio_ranges 1
Booting Linux...
PROMLIB: Sun Boot Prom Version 3 Revision 2
Linux version 2.6.18-6-sparc32 (Debian 2.6.18.dfsg.1-23etch1) (dannf@debian.org) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 Fri Dec 12 16:29:52 UTC 2008
ARCH: SUN4M
TYPE: SPARCstation 5
Ethernet address: 52:54:0:12:34:56
Boot time fixup v1.6. 4/Mar/98 Jakub Jelinek (jj@ultra.linux.cz). Patching kernel for srmmu[Fujitsu TurboSparc]/iommu
PROM: Built device tree with 21328 bytes of memory.
Power off control detected.
Built 1 zonelists.  Total pages: 31179
Kernel command line: root=/dev/sda2 ro
PID hash table entries: 512 (order: 9, 2048 bytes)
start_kernel(): bug: interrupts were enabled early
Console: colour dummy device 80x25
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 121200k/130232k available (1640k kernel code, 8880k reserved, 404k data, 136k init, 0k highmem)
Mount-cache hash table entries: 512
checking if image is initramfs... it is
Freeing initrd memory: 3135k freed
NET: Registered protocol family 16
IOMMU: impl 0 vers 5 table 0xf3200000[262144 B] map [65536 b]
sbus0: Clock 21.1250 MHz
dma0: Revision 2
dma1: Revision 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 4096 bind 2048)
TCP reno registered
ioremap: done with statics, switching to malloc
apc: power management initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 128x48
/iommu@0,10000000/sbus@0,10001000/SUNW,tcx@3,800000: TCX at 0:50800000, 8-bit only
ffd54454: ttyS0 at MMIO 0x71100000 (irq = 44) is a zs
Console: ttyS0 (SunZilog zs0)
ffd54454: ttyS1 at MMIO 0x71100004 (irq = 44) is a zs
ffd54630: Keyboard at MMIO 71000000 (irq = 44) is a zs
ffd54630: Mouse at MMIO 71000004 (irq = 44) is a zs
Floppy drive(s): fd0 is 1.44M
Unable to handle kernel paging request at virtual address 7a000000
tsk->{mm,active_mm}->context = ffffffff
tsk->{mm,active_mm}->pgd = fc000000
              \|/ ____ \|/
              "@'/ ,. \`@"
              /_| \__/ |_\
                 \__U_/
swapper(0): Oops [#1]
PSR: 044010c5 PC: f001c770 NPC: f001c774 Y: 00000000    Not tainted
PC: <apc_swift_idle+0x8/0x1c>
%G: 00000010 f022a000  fd013000 f05b0000  04101fe5 00000040  f000e000 00000001
%O: 00000019 00000032  00000010 00000008  f00d941c 00000001  f000fec8 f0014a40
RPC: <cpu_idle+0xc0/0xfc>
%L: 00000190 f7f2d580  f01d49d0 f01d4aac  f022373c 00000066  00000009 00000000
%I: f01d57c0 00000000  00000010 00000008  f00d941c f0235000  f000ff30 f0205f64
Caller[f0205f64]: _etext+0x68754/0x697e8
Caller[f0205790]: _etext+0x67f80/0x697e8
Caller[ffd07fec]: 0xffd07ff4
Instruction DUMP: 90102000  81c3e008  90102000 <033c08a8> c4006220  c2088000  82106001  c2288000  81c3e008
Kernel panic - not syncing: Attempted to kill the idle task!
 <0>Press Stop-A (L1-A) to return to the boot prom
no cont in shutdown!


Any ideas?

Thanks again,
SK
scott.alan.kline
ReadyNAS Newbie
 
Posts: 27
Joined: Wed Apr 22, 2009 5:42 am

Re: Sparc platform development envrionment using Qemu

Postby airwofl » Fri Aug 14, 2009 8:37 am

Like the idea!

I have tried booting this within QEMU (v0.90) on Windows (XP) and a couple of things cropped up:

* with --nographic, it complains it can't open monitor device 'stdio' and doesn't start.
* without --nographic, it states that Hard Disk 0 is not a bootable disk.

Here's the command line (-L . required to point it to the bios file):

qemu.exe -hda readynas_compile_environment.qcow -L .

Any thoughts? Basically am in Windows at the moment can't reboot this second into Ubuntu to test it there.
User avatar
airwofl
Advanced ReadyNAS User
 
Posts: 104
Joined: Sat Apr 21, 2007 8:42 am
ReadyNAS: NV+

Re: Sparc platform development envrionment using Qemu

Postby chirpa » Sun Aug 16, 2009 6:27 pm

Only tested in Linux so far, we haven't tried Windows Qemu.

Scott, try this openbios-sparc32 build instead of the package: http://qemu-forum.ipi.fi/viewtopic.php?p=11539#p11539
Once a member of the Jedi Council Alumni | Tweet Me Get DropBox ReadyDATA? Intentions?
Hot off the press: RNOS6 on x86 boxen | RNOS6 in VM | RAIDiator-x86 in VM | ReadyDATA in VM
User avatar
chirpa
Jedi Council Alumni
 
Posts: 15646
Joined: Mon Sep 24, 2007 11:52 am
Location: San Jose, CA
ReadyNAS: Repertoire

Re: Sparc platform development envrionment using Qemu

Postby airwofl » Tue Aug 18, 2009 10:58 am

Don't worry - got it working on Windows in the end. Needed the openbios-sparc32 compiled for Windows.

You can get it from the QEMU website under the Windows download page - look for the SPARC binary.
User avatar
airwofl
Advanced ReadyNAS User
 
Posts: 104
Joined: Sat Apr 21, 2007 8:42 am
ReadyNAS: NV+

Re: Sparc platform development envrionment using Qemu

Postby msetnarba » Wed Aug 26, 2009 12:22 am

is there in project the same for x86 ?
msetnarba
ReadyNAS Newbie
 
Posts: 8
Joined: Thu Aug 20, 2009 10:23 am
ReadyNAS: NVX

Re: Sparc platform development envrionment using Qemu

Postby chirpa » Wed Aug 26, 2009 12:33 am

1. Debian Live CD
2. apt-get install build-essential

:P
Once a member of the Jedi Council Alumni | Tweet Me Get DropBox ReadyDATA? Intentions?
Hot off the press: RNOS6 on x86 boxen | RNOS6 in VM | RAIDiator-x86 in VM | ReadyDATA in VM
User avatar
chirpa
Jedi Council Alumni
 
Posts: 15646
Joined: Mon Sep 24, 2007 11:52 am
Location: San Jose, CA
ReadyNAS: Repertoire

Re: Sparc platform development envrionment using Qemu

Postby msetnarba » Wed Aug 26, 2009 12:43 am

shame on me........; I thought it was more specific and not so generic :)

thx
msetnarba
ReadyNAS Newbie
 
Posts: 8
Joined: Thu Aug 20, 2009 10:23 am
ReadyNAS: NVX

Re: Sparc platform development envrionment using Qemu

Postby jj69 » Wed Dec 09, 2009 8:52 am

Hello all,
I'm trying to install an efficient compile environment on a Windows XP Box.
What works so far :
- QEmu sparc (from binary package)
- the "readynas_compile_environment.qcow" boots OK
- I can login on the guestOS as root
- Outgoing network from guest works OK on the overall
What doesn't work :
- I can't ping host OS from guest BUT a can ping the computer nextdoor on the physical net
- I tried "-redir" option on qemu command line to get guest OS sftp access to no avail.

I must say my XP box has got weird network settings (3 static IP on the same NIC, vmware virtual network adapters, IPv6 tunneling adapter), it could be the reason why guest OS cannot ping it.

If anyone had a solution that would allow me to put/get files/folder/archives on the guest, I would very much appreciate. Accessing guest file system from host would be prefered as it would be a bit more user friendly.
HW:
  • ReadyNAS Duo (RND2000) - 1GB RAM
  • 1 x WD Caviar Green 2TB (WD20EARS) OK
  • No disk in second bay
SW:
  • RAIDiator 4.1.7 (SMB+AFP+NFS) + NZBGET 0.6.0
  • RAIDar 4.1.5 (Mac OS X 10.6.6)
jj69
ReadyNAS User
 
Posts: 76
Joined: Wed Jun 10, 2009 2:27 am
Location: France - Lyon
ReadyNAS: Duo

Re: Sparc platform development envrionment using Qemu

Postby jj69 » Fri Dec 11, 2009 12:48 am

I answer myself :
smbclient from the guest does the trick if using gateway address.

My problem now is that "sarge" is quite old in the debian tree.
I can't find an apt mirror ...
HW:
  • ReadyNAS Duo (RND2000) - 1GB RAM
  • 1 x WD Caviar Green 2TB (WD20EARS) OK
  • No disk in second bay
SW:
  • RAIDiator 4.1.7 (SMB+AFP+NFS) + NZBGET 0.6.0
  • RAIDar 4.1.5 (Mac OS X 10.6.6)
jj69
ReadyNAS User
 
Posts: 76
Joined: Wed Jun 10, 2009 2:27 am
Location: France - Lyon
ReadyNAS: Duo

Re: Sparc platform development envrionment using Qemu

Postby hno » Mon Jan 18, 2010 7:49 pm

archive.debian.org
User avatar
hno
Advanced ReadyNAS User
 
Posts: 110
Joined: Tue Sep 02, 2008 2:17 am
Location: Sweden
ReadyNAS: Duo

Re: Sparc platform development envrionment using Qemu

Postby jj69 » Wed Jan 20, 2010 1:49 am

hno wrote:archive.debian.org


Well, thanx hno.
It does help but the packages I need are not there (vlc source).
I changed strategy and grabed source archives.
I'll start a new thread as I have some difficulties.
HW:
  • ReadyNAS Duo (RND2000) - 1GB RAM
  • 1 x WD Caviar Green 2TB (WD20EARS) OK
  • No disk in second bay
SW:
  • RAIDiator 4.1.7 (SMB+AFP+NFS) + NZBGET 0.6.0
  • RAIDar 4.1.5 (Mac OS X 10.6.6)
jj69
ReadyNAS User
 
Posts: 76
Joined: Wed Jun 10, 2009 2:27 am
Location: France - Lyon
ReadyNAS: Duo

Re: Sparc platform development envrionment using Qemu

Postby derJan » Thu Mar 11, 2010 3:19 am

I'm having trouble running the qemu-Image on my Mac with "Q", the Mac qemu-Port (http://www.kju-app.org/).

It starts, but I can't log in (there is no prompt for the username).

Does anyone know how I can fix this? Perhaps it is like on some *nix-Systems that I have to switch to another console or something, how do I do this?

Image
derJan
ReadyNAS Newbie
 
Posts: 4
Joined: Fri Mar 05, 2010 9:01 am
ReadyNAS: NV+

Re: Sparc platform development envrionment using Qemu

Postby jj69 » Thu Mar 11, 2010 3:54 am

derJan wrote:Perhaps it is like on some *nix-Systems that I have to switch to another console or something, how do I do this?


Indeed, switch to console 3 (ctrl+alt+3 on the PC, should be Ctrl+Opt+3 on the Mac).
You'll be able to log in.
HW:
  • ReadyNAS Duo (RND2000) - 1GB RAM
  • 1 x WD Caviar Green 2TB (WD20EARS) OK
  • No disk in second bay
SW:
  • RAIDiator 4.1.7 (SMB+AFP+NFS) + NZBGET 0.6.0
  • RAIDar 4.1.5 (Mac OS X 10.6.6)
jj69
ReadyNAS User
 
Posts: 76
Joined: Wed Jun 10, 2009 2:27 am
Location: France - Lyon
ReadyNAS: Duo

Next

Return to ReadyNAS Developers Network



Who is online

Users browsing this forum: No registered users and 2 guests