On Wed, Feb 17, 2010 at 8:55 PM, Rob Landley <r...@landley.net> wrote: > On Wednesday 17 February 2010 09:45:48 Paolo Bonzini wrote: >> On 02/17/2010 10:24 AM, Artyom Tarasenko wrote: >> >> I've also got a bunch of "sort of working, but not well enough >> >> to run builds natively under" targets on top of that (arm big >> >> endian, sh4, sparc...) >> > >> > What's not well enough on sparc? >> >> From http://permalink.gmane.org/gmane.comp.emulators.qemu/63610: >> >> On Linux, sparc-softmmu can boot Linux (sparc-test) image, but QEMU >> crashes just before command line. On OpenBSD, the same test reaches >> command prompt.
That's status for sparc host. On x86 host, everything should work fine except for a few known issues. > Actually the sparc-test image from http://wiki.qemu.org/download/sparc- > test-0.2.tar.gz boots and gets me a command line just fine, and I've never had > it die with strange errors that look like mismatched system calls and such. > (Under ubuntu 8.04, using qemu-git from a week or so back, but this behavior's > been consistent since I first tried it.0 > > That image is A) built with an unknown compiler, B) running glibc (not > uClibc), c) a crippled toy image. (It's a read-only root filesystem that > hasn't got a mount point for /proc. Obviously never mean to actually be used > for anything but very simple smoke testing.) > > But it does imply that qemu is capable of decently running _something_ on > sparc, so the problems I'm seeing are more likely to be uClibc or toolchain > issues. > > Alas the image has no hint how to reproduce it. Doesn't say what toolchain it > was built with, what kernel .config was used, and so on. (The arm one at > least > had /proc/config.gz...) > > Well, actually if you "mount -t proc proc lost+found" and then cat > lost+found/version it says gcc version 2.95.4 20010319 (prerelease). So it > was built with a random cvs snapshot of egcs from 2001, configured who knows > how, and it's running a 2.6.11 kernel from 5 years ago (again with who knows > what .config). So my problem could be that I'm using a kernel 22 versions > newer, or I'm using gcc 4.2 toolchain, or that either is configured > differently. The compiler was probably Debian gcc 2.95 package as distributed that time, not some random cvs snapshot of egcs. I can't find the original kernel config because I have edited it since, but the attached version should not be too far from it. The kernel itself is straight 2.6.11 plus this patch to fix TCX display. I think the ramdisk contents are from the user emulator test set, I didn't build those. Perhaps we should build a new set of test suites for all architectures from a single known stack of tools and sources.
config.gz
Description: GNU Zip compressed data
--- linux-2.6.11/drivers/video/tcx.c.BAD 2005-03-03 23:30:15.621231203 -0500 +++ linux-2.6.11/drivers/video/tcx.c 2005-03-03 23:34:02.963669899 -0500 @@ -36,6 +36,7 @@ static int tcx_blank(int, struct fb_info static int tcx_mmap(struct fb_info *, struct file *, struct vm_area_struct *); static int tcx_ioctl(struct inode *, struct file *, unsigned int, unsigned long, struct fb_info *); +static int tcx_pan_display(struct fb_var_screeninfo *, struct fb_info *); /* * Frame buffer operations @@ -45,6 +46,7 @@ static struct fb_ops tcx_ops = { .owner = THIS_MODULE, .fb_setcolreg = tcx_setcolreg, .fb_blank = tcx_blank, + .fb_pan_display = tcx_pan_display, .fb_fillrect = cfb_fillrect, .fb_copyarea = cfb_copyarea, .fb_imageblit = cfb_imageblit, @@ -153,6 +155,12 @@ static void tcx_reset (struct fb_info *i spin_unlock_irqrestore(&par->lock, flags); } +static int tcx_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) +{ + tcx_reset(info); + return 0; +} + /** * tcx_setcolreg - Optional function. Sets a color register. * @regno: boolean, 0 copy local, 1 get_user() function @@ -366,6 +374,9 @@ static void tcx_init_one(struct sbus_dev all->par.lowdepth = prom_getbool(sdev->prom_node, "tcx-8-bit"); sbusfb_fill_var(&all->info.var, sdev->prom_node, 8); + all->info.var.red.length = 8; + all->info.var.green.length = 8; + all->info.var.blue.length = 8; linebytes = prom_getintdefault(sdev->prom_node, "linebytes", all->info.var.xres); @@ -439,6 +450,7 @@ static void tcx_init_one(struct sbus_dev return; } + fb_set_cmap(&all->info.cmap, &all->info); tcx_init_fix(&all->info, linebytes); if (register_framebuffer(&all->info) < 0) { @@ -466,7 +478,7 @@ int __init tcx_init(void) return -ENODEV; for_all_sbusdev(sdev, sbus) { - if (!strcmp(sdev->prom_name, "tcx")) + if (!strcmp(sdev->prom_name, "SUNW,tcx")) tcx_init_one(sdev); }