Subject: Illegal instruction

From: Carsten Langgaard <[email-masked]>
Date: Fri, 06 Jul 2001 10:15:52 +0200

Hi Karel,

I have tried the root-images tar-files: mipselroot-rh7-20010606 and
mipsroot-rh7.
The mipsroot-rh7 (bigendian) root image seem to work fine, but when
I use the mipselroot-rh7-20010606 (littleendian) I get an illegal
instruction.
[cat:179] Illegal instruction 7c010001 at 2ac8b20c ra=00000000.

I'm using a 2.4.3 kernel.
Anyone got an idea ?

/Carsten

--
_    _ ____  ___   Carsten Langgaard   Mailto:[email-masked]
|\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
| \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
  TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556
                   Denmark             http://www.mips.com

---

From: "Houten K.H.C. van (Karel)" <[email-masked]>
Date: Fri, 06 Jul 2001 11:27:03 +0200

> I'm using a 2.4.3 kernel.

I'm still using 2.4.0-test9 on mipsel, because I've problems with the
newer kernels too.  I hope to test H.J. Lu's toolchain/glibc, but
currently it is much to hot to switch on extra computers :-)

Regards,
-- 
Karel van Houten

----------------------------------------------------------
The box said "Requires Windows 95 or better."
I can't understand why it won't work on my Linux computer. 
----------------------------------------------------------

---

From: "Maciej W. Rozycki" <[email-masked]>
Date: Fri, 6 Jul 2001 13:42:31 +0200 (MET DST)

> currently it is much to hot to switch on extra computers :-)

 Weird, I'm using 2.4.5 for more than a week now on my /240 and it appears
to work fine.  I've built it with my old tools which I'm still using. 

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: [email-masked], PGP key available        +

---

From: Dan Aizenstros <[email-masked]>
Date: Fri, 06 Jul 2001 09:26:49 -0400

Hello Carsten,

I have seen the same thing on the same kernel version.

Dan Aizenstros
Software Engineer
V3 Semiconductor Corp.

---

From: Jun Sun <[email-masked]>
Date: Fri, 06 Jul 2001 15:04:43 -0700

> I'm using a 2.4.3 kernel.

Is the userland compiled with MIPS I option?  I bet this is the same nasty
MIPS_ATOMIC_SET bug.

Currently, there are three fixes.  One is from Florian, which only takes care
of CPUs with ll/sc.  Another is from Maceij, which introduces a new syscall,
and some changes in glibc.  The thrid is mine, a compromising one.  It takes
care of both ll/sc case and non-llsc case, has minimum change, and practically
makes all programs happy.

Ralf, please take at least one of the fixes.  Even a not-so-good fix is better
than no fix.

Jun

This is a compromising fix for sysmips(MIPS_ATOMIC_SET, ...).  It
forces SIGSYS when the return value is a small negative value.  This
limit is OK for glibc.

Jun

diff -Nru linux/arch/mips/kernel/sysmips.c.orig linux/arch/mips/kernel/sysmips.c
--- linux/arch/mips/kernel/sysmips.c.orig	Mon Apr 23 11:32:54 2001
+++ linux/arch/mips/kernel/sysmips.c	Tue Jun 26 11:50:48 2001
@@ -16,7 +16,7 @@
 #include <linux/sched.h>
 #include <linux/string.h>
 #include <linux/utsname.h>
-
+#include <linux/signal.h>
 #include <asm/cachectl.h>
 #include <asm/pgalloc.h>
 #include <asm/sysmips.h>
@@ -75,53 +75,83 @@
 	}
 
 	case MIPS_ATOMIC_SET: {
-#ifdef CONFIG_CPU_HAS_LLSC
-		unsigned int tmp;
+		int *ptr, val, ret, err, tmp;
+		struct siginfo info;
 
-		p = (int *) arg1;
-		errno = verify_area(VERIFY_WRITE, p, sizeof(*p));
-		if (errno)
-			return errno;
-		errno = 0;
-
-		__asm__(".set\tpush\t\t\t# sysmips(MIPS_ATOMIC, ...)\n\t"
-			".set\tmips2\n\t"
-			".set\tnoat\n\t"
-			"1:\tll\t%0, %4\n\t"
-			"move\t$1, %3\n\t"
-			"2:\tsc\t$1, %1\n\t"
-			"beqz\t$1, 1b\n\t"
-			".set\tpop\n\t"
-			".section\t.fixup,\"ax\"\n"
-			"3:\tli\t%2, 1\t\t\t# error\n\t"
-			".previous\n\t"
-			".section\t__ex_table,\"a\"\n\t"
-			".word\t1b, 3b\n\t"
-			".word\t2b, 3b\n\t"
-			".previous\n\t"
-			: "=&r" (tmp), "=o" (* (u32 *) p), "=r" (errno)
-			: "r" (arg2), "o" (* (u32 *) p), "2" (errno)
-			: "$1");
+		ptr = (int *)arg1;
+		val = (int)arg2;
 
-		if (errno)
-			return -EFAULT;
+		/* Don't emulate unaligned accesses. */
+		if ((int)ptr & 3) {
+			info.si_signo = SIGBUS;
+                        info.si_code = BUS_ADRALN;
+			goto fault;
+		}
+
+		/* A zero here saves us three instructions. */
+		err = verify_area(VERIFY_WRITE, ptr, 0);
+		if (err) {
+                        info.si_signo = SIGSEGV;
+			info.si_code = SEGV_ACCERR;
+			goto fault;
+		}
 
-		/* We're skipping error handling etc.  */
-		if (current->ptrace & PT_TRACESYS)
-			syscall_trace();
-
-		((struct pt_regs *)&cmd)->regs[2] = tmp;
-		((struct pt_regs *)&cmd)->regs[7] = 0;
-
-		__asm__ __volatile__(
-			"move\t$29, %0\n\t"
-			"j\to32_ret_from_sys_call"
-			: /* No outputs */
-			: "r" (&cmd));
-		/* Unreached */
+#ifdef CONFIG_CPU_HAS_LLSC
+		__asm__(".set   mips2\n\t"
+			"1:\n\t"
+			"ll     %0,%5\n\t"
+	                ".set   push\n\t"
+	                ".set   noreorder\n\t"
+	                "beq    %0,%4,3f\n\t"
+	                " move  %3,%4\n"
+	                ".set   pop\n\t"
+	                "2:\n\t"
+	                "sc     %3,%1\n\t"
+	                "beqz   %3,1b\n\t"
+	                "3:\n\t"
+	                ".set   mips0\n\t"
+	                ".section .fixup,\"ax\"\n"
+	                "4:\n\t"
+	                "li     %2,%7\n\t"
+	                "j      3b\n\t"
+	                ".previous\n\t"
+	                ".section __ex_table,\"a\"\n\t"
+	                ".word  1b,4b\n\t"
+	                ".word  2b,4b\n\t"
+	                ".previous"
+	                : "=&r" (ret), "=R" (*ptr), "=r" (err), "=&r" (tmp)
+	                : "r" (val), "1" (*ptr), "2" (0), "i" (-EFAULT));
 #else
-	printk("sys_sysmips(MIPS_ATOMIC_SET, ...) not ready for !CONFIG_CPU_HAS_LLSC\n");
+		save_and_cli(tmp);
+		err = __get_user(ret, ptr);
+		if (ret != val)
+		err |= __put_user(val, ptr);    /* No fault
+                                                   unless unwriteable. */
+		restore_flags(tmp);
 #endif
+
+		if (err) {
+                        info.si_signo = SIGSEGV;
+			info.si_code = SEGV_MAPERR;
+			goto fault;
+		}
+			
+		if ( (ret < 0) && (ret >= -EMAXERRNO) ) {
+                        info.si_signo = SIGSYS;
+			info.si_code = 0;
+			goto fault;
+		}
+			
+		return ret;
+
+fault:
+		/* Go back to SYSCALL. */
+		((struct pt_regs *)&cmd)->cp0_epc -= 4;
+
+		info.si_addr = (void *)((struct pt_regs *)&cmd)->cp0_epc;
+		force_sig_info(info.si_signo, &info, current);
+
+		return 0;
 	}
 
 	case MIPS_FIXADE:
diff -Nur linux.orig/arch/mips/kernel/Makefile linux/arch/mips/kernel/Makefile
--- linux.orig/arch/mips/kernel/Makefile        Mon Apr  9 00:23:08 2001
+++ linux/arch/mips/kernel/Makefile     Mon Apr  9 00:23:34 2001
@@ -20,7 +20,7 @@
 obj-y                          += branch.o process.o signal.o entry.o \
                                   traps.o ptrace.o vm86.o ioport.o reset.o \
                                   semaphore.o setup.o syscall.o sysmips.o \
-                                  ipc.o scall_o32.o unaligned.o
+                                  ipc.o scall_o32.o unaligned.o fast-sysmips.o
 obj-$(CONFIG_MODULES)          += mips_ksyms.o

 ifdef CONFIG_CPU_R3000
@@ -69,5 +69,6 @@

 entry.o: entry.S
 head.o: head.S
+fast-sysmips.o: fast-sysmips.S

 include $(TOPDIR)/Rules.make
diff -Nur linux.orig/arch/mips/kernel/fast-sysmips.S linux/arch/mips/kernel/fast-sysmips.S
--- linux.orig/arch/mips/kernel/fast-sysmips.S  Thu Jan  1 01:00:00 1970
+++ linux/arch/mips/kernel/fast-sysmips.S       Mon Apr  9 00:28:20 2001
@@ -0,0 +1,85 @@
+/*
+ * MIPS_ATOMIC_SET asm implementation for ll/sc capable cpus
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 Florian Lohoff <[email-masked]>
+ *
+ */
+#include <asm/asm.h>
+#include <asm/mipsregs.h>
+#include <asm/regdef.h>
+#include <asm/stackframe.h>
+#include <asm/isadep.h>
+#include <asm/unistd.h>
+#include <asm/sysmips.h>
+#include <asm/offset.h>
+#include <asm/errno.h>
+
+#define PT_TRACESYS     0x00000002
+
+       EXPORT(fast_sysmips)
+
+       .set    noreorder
+
+       li      t0, MIPS_ATOMIC_SET
+       beq     a0, t0, 1f
+        nop
+       j       sys_sysmips
+        nop
+
+1:
+
+       # a0 - MIPS_ATOMIC_SET
+       # a1 - mem ptr
+       # a2 - value
+
+       addiu   sp, sp, -8                      # Reserve space
+       sw      a0, (sp)                        # Save arg0
+
+       addiu   a0, a1, 4                       # addr+size
+       ori     v0, a1, 4                       # addr | size
+       lw      v1, THREAD_CURDS(gp)            # current->thread.current_ds
+       or      v0, v0, a0                      # addr | size | (addr+size)
+       and     v1, v1, v0                      # (mask)&(addr | size | (addr+size)
+       bltz    v1, 5f
+        nop
+
+2:
+       ll      v0, (a1)
+       move    t0, a2
+       sc      t0, (a1)
+       beqz    t0, 2b
+        nop
+
+       sw      v0, PT_R2+8(sp)                 # Result value
+       sw      zero, PT_R7+8(sp)               # Success indicator
+
+       lw      t0, TASK_PTRACE(gp)             # syscall tracing enabled?
+       andi    t0, PT_TRACESYS
+       bnez    t0, 3f
+        nop
+
+4:
+       lw      a0, (sp)                        # Restore arg0
+       addiu   sp, sp, 8                       # Restore sp
+
+       j       o32_ret_from_sys_call
+        nop
+
+3:
+       sw      ra, 4(sp)
+       jal     syscall_trace
+        nop
+       lw      ra, 4(sp)
+       j       4b
+        nop
+
+5:
+       lw      a0, (sp)                        # Restore arg0
+       addiu   sp, sp, 8                       # Restore sp
+       j       ra
+        li     v0, -EFAULT
+
diff -Nur linux.orig/arch/mips/kernel/irix5sys.h linux/arch/mips/kernel/irix5sys.h
--- linux.orig/arch/mips/kernel/irix5sys.h      Mon Apr  9 00:16:29 2001
+++ linux/arch/mips/kernel/irix5sys.h   Sun Apr  8 21:21:16 2001
@@ -69,7 +69,7 @@
 SYS(irix_getgid, 0)                    /* 1047  getgid()              V*/
 SYS(irix_unimp, 0)                     /* 1048  (XXX IRIX 4 ssig)     V*/
 SYS(irix_msgsys, 6)                    /* 1049  sys_msgsys            V*/
-SYS(sys_sysmips, 4)                    /* 1050  sysmips()            HV*/
+SYS(fast_sysmips, 4)                   /* 1050  sysmips()            HV*/
 SYS(irix_unimp, 0)                     /* 1051  XXX sysacct()        IV*/
 SYS(irix_shmsys, 5)                    /* 1052  sys_shmsys            V*/
 SYS(irix_semsys, 0)                    /* 1053  sys_semsys            V*/
diff -Nur linux.orig/arch/mips/kernel/syscalls.h linux/arch/mips/kernel/syscalls.h
--- linux.orig/arch/mips/kernel/syscalls.h      Mon Apr  9 00:16:30 2001
+++ linux/arch/mips/kernel/syscalls.h   Sun Apr  8 21:21:43 2001
@@ -163,7 +163,7 @@
 SYS(sys_writev, 3)
 SYS(sys_cacheflush, 3)
 SYS(sys_cachectl, 3)
-SYS(sys_sysmips, 4)
+SYS(fast_sysmips, 4)
 SYS(sys_ni_syscall, 0)                         /* 4150 */
 SYS(sys_getsid, 1)
 SYS(sys_fdatasync, 0)

---

From: Carsten Langgaard <[email-masked]>
Date: Tue, 10 Jul 2001 13:14:12 +0200

Thanks, that did the trick.
Now I would like to try to install H.J. Lu's RedHat7.1 RPM packages.
If I just do a:
    rpm -Uvh --root /mnt/harddisk *.rpm
then it fails on a lot of dependencies. If I try to force the install like this:
    rpm -Uvh --nodeps --force --root /mnt/harddisk *.rpm
then it actually install a lot of the RPMs, but still some fails, because it actually need
then dependencies.
If I try to redo the above it seems to go better the second time, because a lot of the
dependencies is solved (installed).
Is this really the way to install a set of RPMs like this or is there a better way?

/Carsten

Jun Sun wrote:

>   ------------------------------------------------------------------------
>
>   ------------------------------------------------------------------------

---

From: "H . J . Lu" <[email-masked]>
Date: Tue, 10 Jul 2001 10:31:21 -0700

>     rpm -Uvh --root /mnt/harddisk *.rpm

Those rpms have to be installed in the right order. I have a set up
to do that. I will see what I can do.

H.J.

---

From: Carsten Langgaard <[email-masked]>
Date: Mon, 16 Jul 2001 13:26:32 +0200

> to do that. I will see what I can do.

Thanks, please do.
Another thing, I can see your distribution is lacking kernel header
files, I guess they are needed to do a native compile of the source RPMs.

Are you only cross compiling the RPMs.
It would be great, if you could put together a RPM containing the kernel
header files.

---

From: "H . J . Lu" <[email-masked]>
Date: Mon, 16 Jul 2001 14:28:02 -0700

> > to do that. I will see what I can do.

They are in install.tar.bz2 now.

> files, I guess they are needed to do a native compile of the source RPMs.

I added gdb and kernel-headers. I also updated gcc, glibc and binutils.
The toolchain rpms are updated.

H.J.
------
My mini-port of RedHat 7.1 is at

ftp://oss.sgi.com/pub/linux/mips/redhat/7.1/

you should be able to put a small RedHat 7.1 on the mips/mipsel box and
compile the rest of RedHat 7.1 yourselves.

Here are something you should know:

1. The cross compiler hosted on RedHat 7.1/ia32 is provided as a
toolchain rpm. The binary rpms for the mips and mipsel cross compilers
are included. You will need glibc 2.2.3-11 or above to use those
rpms. The glibc x86 binary rpms under RPMS/i386 should be ok.
2. You have to find a way to put those rpms on your machine. I use
network boot and NFS root to do it.
3. install.tar.bz2 has some scripts to prepare NFS root and install
RedHat 7.1 on a hard drive.

Thanks.

H.J.

---

From: Carsten Langgaard <[email-masked]>
Date: Tue, 17 Jul 2001 21:16:05 +0200

> They are in install.tar.bz2 now.

Thanks a lot, that look like something we have been needing for a long time

> The toolchain rpms are updated.

Now that I'm at it :-)
Could you add a Perl rpm to you distribution, this also seems to be needed to
build the RPMs natively.

I also would like to do a cross build, but how do I do that ?
Do I have to change all the spec files, to set the target arch to MIPS, or is
there a easier and better way to do that ?
I guess if I just install the SRPMs and the cross toolchain, and try to build
out of that I will simply build for the build platform, which is i386.

---

From: "H . J . Lu" <[email-masked]>
Date: Tue, 17 Jul 2001 12:29:02 -0700

> Could you add a Perl rpm to you distribution, this also seems to be needed to

Perl has to be built natively. I uploaded mysql-3.23.36-1.1.src.rpm,
perl-5.6.0-12.1.src.rpm, apache-1.3.19-5.src.rpm,
mod_perl-1.24_01-2.src.rpm, tcsh-6.10-5.src.rpm and
zsh-3.0.8-8.src.rpm. Just installed my RedHat 7.1. Then you can build
perl yourself. You may need to build/install the tcsh rpm first.

> out of that I will simply build for the build platform, which is i386.

You need my patched `rpm' to do cross build. You also need some
specicial set up. I am enclosng a message of mine. I will see if
I can cleanup my cross build environment and upload it.

H.J.
-----
> they work great! Thanks for all your hard work. Now, I would like
> to be able to build some RPMs as well. I have never cross-built
> RPMs before. I took the SRPMS for make and tried:
> 
>    rpm -ba make.spec --target=mipsel
> 
> This did not do anything and built nothing. Is there a FAQ that
> I can read on cross building RPMS in addition to the documentation
> on http://www.rpm.org/ ? Do you have any quick pointers? Thanks
> again.

Although my source rpms do support cross compile, FYI, all my
mips/mipsel rpms are cross compiled from ia32 machines, the
unpatched rpm, that is /bin/rpm, doesn't support cross compile.
In my RedHat 7.1, there are i386 rpm binaries which support
cross compile. I have a setup to cross build rpms to mips/mipsel.
Make sure your rpm sees

%__ar                   %{_target_prefix}-linux-ar
%__as                   %{_target_prefix}-linux-as
%__cc                   %{_target_prefix}-linux-gcc
%__cxx                  %{_target_prefix}-linux-c++
%__ld                   %{_target_prefix}-linux-ld
%__nm                   %{_target_prefix}-linux-nm
%__objcopy              %{_target_prefix}-linux-objcopy
%__objdump              %{_target_prefix}-linux-objdump
%__ranlib               %{_target_prefix}-linux-ranlib
%__strip                %{_target_prefix}-linux-strip

and do

# rpm --target=mips --define '_target_prefix mips'

or

# rpm --target=mipsel --define '_target_prefix mipsel'

BTW, you alao need to rebuild binutils with

# rpm --define 'ENABLE_ALL_TARGETS 1' -ta binutils-2.11.90.0.23.tar.gz

H.J.

---

From: "H . J . Lu" <[email-masked]>
Date: Tue, 17 Jul 2001 12:57:18 -0700

On Tue, Jul 17, 2001 at 12:50:27PM -0700, Daniel Jacobowitz wrote:
> It's not yet available for MIPS (later this week), but MontaVista Journeyman
> contains the patches to cross-compile Perl.  It's not pretty, though.
> 

That is a reason why I didn't bother with cross-compile Perl :-). The
next thing on my todo list is to cross compile XFree86 :-(.

H.J.

---

From: Daniel Jacobowitz <[email-masked]>
Date: Tue, 17 Jul 2001 12:50:27 -0700

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

---

From: Ilya Volynets <[email-masked]>
Date: Tue, 17 Jul 2001 13:09:00 -0700

On Tuesday 17 July 2001 12:57, H . J . Lu wrote:
> > It's not yet available for MIPS (later this week), but MontaVista
> > Journeyman contains the patches to cross-compile Perl.  It's not pretty,
> > though.
>
If you can get cross-compiling full XFree86, you'll be a hero of all times.
It shouldn't be hard to get it with KDriveArchitecture & TinyX enabled.

I was working on it a while ago, and here are few pointers:
Some tools have to be run natively (i.e. xkbcomp), but also need to
be installed on target. I din't find a rule that does both. I think new
rule is needed.

gcc-3.0 crashes when compiling some parts of Xserver and Xlib,
with very obscure bug. Minimal test case I came up with is
~45(!) lines long. Keith filed report to gcc team on my behalf,
but there seems to be no responce. I do not know if your
gcc has same problem, but someone mentioned similar problem
with 2.9x.y series on this list not so long ago.

Hmm... I can't remember any other interesting things at this moment, but if I
will, I'll follow up...

	Ilya.

---

From: "H . J . Lu" <[email-masked]>
Date: Tue, 17 Jul 2001 13:11:46 -0700

> be installed on target. I din't find a rule that does both. I think new

I am aware of those. I want to delay it as much as I can.

> with 2.9x.y series on this list not so long ago.

Don't bother with gcc-3.0. I won't use it myself for building X.

H.J.

---

From: Arnaldo Carvalho de Melo <[email-masked]>
Date: Wed, 18 Jul 2001 00:52:55 -0300

> I am aware of those. I want to delay it as much as I can.

recent messages to the XFree86 mailing lists has the recipe to x-compile
XFree86, IIRC Keith Packard did the work

-- 

                        - Arnaldo

---

From: Ilya Volynets <[email-masked]>
Date: Tue, 17 Jul 2001 21:01:20 -0700

Those messages are about compiling using TinyX and KDrive, which
works with only minor modifications. Thing is, it is not what is really needed.

---

From: Carsten Langgaard <[email-masked]>
Date: Wed, 18 Jul 2001 09:13:20 +0200

> perl yourself. You may need to build/install the tcsh rpm first.

It look like there is a cross dependence, the build of tcsh failed with the
following message:

/var/tmp/rpm-tmp.7250: /usr/bin/perl: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.7250 (%build)

So tcsh is needed to build perl and perl is needed to build tcsh :-(

> %__strip                %{_target_prefix}-linux-strip

How do I do that ?

---

From: "H . J . Lu" <[email-masked]>
Date: Wed, 18 Jul 2001 08:11:22 -0700

> So tcsh is needed to build perl and perl is needed to build tcsh :-(

It is ok since the tcsh binary has been built. Just install it to
/bin/tcsh and build the perl rpm. You may have to

# rpm --nodeps --force --rebuild perl-xxx.src.rpm

You only have to do those the first time.

H.J.

---

From: Carsten Langgaard <[email-masked]>
Date: Wed, 18 Jul 2001 17:23:55 +0200

> You only have to do those the first time.

I got through the tcsh and perl build, but now it fails on glibc.

make -s -j2 -C iconvdata others
make[2]: Entering directory `/usr/src/redhat/BUILD/glibc-2.2.3/iconvdata'
make[2]: warning: -jN forced in submake: disabling jobserver mode.
In file included from 8bit-gap.c:33,
                 from iso8859-15.c:28:
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:260:
numeric constant with no digits
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:260: parse
error before `nan'
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:260:
numeric constant with no digits
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:260: parse
error before `nan'
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:260: `nan'
undeclared here (not in a function)
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:260:
initializer element is not constant
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:260: (near
initialization for `from_idx[1].idx')
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:261: `nan'
undeclared here (not in a function)
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:261:
initializer element is not constant
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:261: (near
initialization for `from_idx[2].idx')
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:262: `nan'
undeclared here (not in a function)
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:262:
initializer element is not constant
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:262: (near
initialization for `from_idx[3].idx')
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:263: `nan'
undeclared here (not in a function)
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:263:
initializer element is not constant
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:263: (near
initialization for `from_idx[4].idx')
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:264: `nan'
undeclared here (not in a function)
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:264:
initializer element is not constant
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:264: (near
initialization for `from_idx[5].idx')
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:265: `nan'
undeclared here (not in a function)
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:265:
initializer element is not constant
/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.h:265: (near
initialization for `from_idx[6].idx')
make[2]: ***
[/usr/src/redhat/BUILD/glibc-2.2.3/build-mipsel-linux/iconvdata/iso8859-15.os] Error 1

make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/usr/src/redhat/BUILD/glibc-2.2.3/iconvdata'
make[1]: *** [iconvdata/others] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/glibc-2.2.3'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.98017 (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.98017 (%build)

---

From: Seth Mos <[email-masked]>
Date: Wed, 18 Jul 2001 22:53:22 +0200 (CEST)

I am having trouble getting the mipsel packages installed using the
installer provided for 7.1.

I have hooked up a second disk to my i386 workstatition that will house
the filesystem for my mipsel box. Once everything is installed I will put
this disk back in my Qube2 for testing. In the worst case scenario I will
need to boot with the 2.0 kernel that came with the cube.

I have the original disk for the Qube2 so it isn't a big problem if it
takes 50 attempts. I have a lot of patience ;-)

Am I correct to assume that I need to use the install.i386.hd on my
workstation to install the mipsel packages on the second harddrive (hdd in
my case)

I have tried this approach using both the Makefile approach and by running
the install.i386.hd script.

Traceback (innermost, last):
  File "./findrpm", line 5, in ?
    import rpm
ImportError: No module named rpm

Does this ring any bells?
The mipsel packages are located in the RPMS directory which is in the same
directory as the installer and I edited the Makefile and changed ROOT and
REDHAT-ROOT

I wonder if anyone can provide a basic root tarbal which I can use to set
up the basics after which i can start adding stuff.

If I get it into a decent state I will probably make a dump of the fs so
other people with a Qube (1 or 2) can easily clone it.

I was working to use a 2.4 kernel on a standard Qube but
that was a big problem since 2.4 does not compile with the compiler that
came with it and the glibc did not have large file support.

A fs that I would like to put on the Qube is XFS which I already use on my
own i386 home machines and production machines at work.
Since XFS is also tested on mip64 Irix (IIRC) ai64 PPC ai32 and alpha
under linux I expect that it will probably more work but it is more
resilient and faster recovering after crashes.

So if anyone can give advice on installing using the toolkit or provide a
bootable dump image or root tarbal I would be most grateful.
The qube2 comes with a boot loader that understands ext2 and loads the
linux kernel it finds on the system it will probably make it easier to
boot afterwards.

Cheers
Seth

---

From: "H . J . Lu" <[email-masked]>
Date: Wed, 18 Jul 2001 17:36:09 -0700

> workstation to install the mipsel packages on the second harddrive (hdd in

No. It should be install.mipsel.nfs. install.mipsel.hd is for the
native mipsel machine install.

> Does this ring any bells?

You need to install the rpm-python rpm.

> directory as the installer and I edited the Makefile and changed ROOT and

Sure.

> up the basics after which i can start adding stuff.

install.mipsel.nfs is used to create a NFS root tree for mipsel. If
you tar it up, you get what you are asking for.

H.J.

---

From: Seth Mos <[email-masked]>
Date: Thu, 19 Jul 2001 23:03:07 +0200

>native mipsel machine install.

Thank you, it worked :-)

>You need to install the rpm-python rpm.

And again, thank you.

>you tar it up, you get what you are asking for.

Will do once it works.
Everythinhg seems to be installed like it should and I copied the 2.0.34 
cobalt kernel to /boot on the Qube2. I have enabled the serial console of 
the Qube2 and see the firmware scroll along.

BOOTLOADER ramcode: selected partition /dev/hda1
Decompressing done
Executing bootloader kernel...
Jump_to_Real_Kernel: disk error, trying BFD again.
BOOTLOADER ramcode: selected partition /dev/hdc1

etc.. Qubes don't have the second IDE controller so this is nonsense ;-)
Does anybody know what's missing? Do I need to format the ext2 root fs in a 
special way? Do I need to pass on other bootoptions and if so. How do I get 
to a command line prompt of the firmware?
I see that the NetBSD people did that to make it boot another kernel.

I thought that the firmware from the Qubes just boot the vmlinux.gz image 
that it finds in the /boot directory on hda1?

Any help appreciated.

Cheers

--
Seth
Every program has two purposes one for which
it was written and another for which it wasn't
I use the last kind.