Hi, Attached are some more small patches for mips. This is all very r4k-ip22 centric but I tried to make adding other subarches as easy as possible. The patches against dbootstrap are for the upcoming dvhtool support mostly. -- Guido
Index: Makefile =================================================================== RCS file: /cvs/debian-boot/boot-floppies/Makefile,v retrieving revision 1.373 diff -u -u -r1.373 Makefile --- Makefile 2001/07/25 20:44:55 1.373 +++ Makefile 2001/08/01 23:06:34 @@ -152,7 +152,8 @@ $(MAKE) rootia64.bin resc10000ia64.bin driversia64.tgz else ifeq ($(architecture), mips) - $(MAKE) root.bin root.tar.gz + $(MAKE) rootr4k-ip22.bin rootr4k-ip22.tar.gz \ + driversr4k-ip22.tgz resc2880r4k-ip22.bin else ifeq ($(architecture), mipsel) $(MAKE) root.bin root.tar.gz Index: config =================================================================== RCS file: /cvs/debian-boot/boot-floppies/config,v retrieving revision 1.83 diff -u -u -r1.83 config --- config 2001/07/29 19:59:44 1.83 +++ config 2001/08/01 23:06:35 @@ -40,7 +40,7 @@ kver := 2.4.0 endif ifeq "$(architecture)" "mips" - kver := 2.4.3 + kver := 2.4.5 endif ifeq "$(architecture)" "mipsel" kver := 2.4.5 Index: rescue.sh =================================================================== RCS file: /cvs/debian-boot/boot-floppies/rescue.sh,v retrieving revision 1.111 diff -u -u -r1.111 rescue.sh --- rescue.sh 2001/07/18 23:50:35 1.111 +++ rescue.sh 2001/08/01 23:06:36 @@ -408,7 +408,11 @@ esac ;; mips) - error "no support for MIPS" + # mips(ip22 currently) doesn't use this, but we need it to install + # the kernel - other sustems will need more help + mke2fs -F -q $floppy $blocks + fstype=ext2 + nlfmt='cat -' # UNIX newline convention ;; powerpc) case "$subarch" in @@ -630,6 +634,9 @@ arm) write_m68kinfo ;; + mips) + write_m68kinfo + ;; hppa) write_m68kinfo ;; Index: rootdisk.sh =================================================================== RCS file: /cvs/debian-boot/boot-floppies/rootdisk.sh,v retrieving revision 1.228 diff -u -u -r1.228 rootdisk.sh --- rootdisk.sh 2001/07/18 23:50:35 1.228 +++ rootdisk.sh 2001/08/01 23:06:37 @@ -602,7 +602,7 @@ fi # do library reduction for platforms where it works -if [ "$arch" != "ia64" ]; then +if [ "$arch" != "ia64" -a "$arch" != "mips" ] ; then info "doing library reduction" rm -f $R/lib/libc-$libcver.so $R/lib/$libcso rm -f $R/usr/lib/libslang.so.* $R/lib/libslang.so.* Index: make/root =================================================================== RCS file: /cvs/debian-boot/boot-floppies/make/root,v retrieving revision 1.9 diff -u -u -r1.9 root --- make/root 2001/07/10 07:23:42 1.9 +++ make/root 2001/08/01 23:06:38 @@ -48,7 +48,8 @@ root.tar.gz: $(root_for_rescue) nfsroot.sh Makefile $(ROOTCMD) ./nfsroot.sh $(generic_rootdisk_no_wildcard) $(debianversion) "" $(LINGUA) $@ - +root%.tar.gz: $(root_for_rescue) nfsroot.sh Makefile + $(ROOTCMD) ./nfsroot.sh root"$*".bin $(debianversion) "" $(LINGUA) $@ #Local variables: #mode: Makefile Index: utilities/dbootstrap/main.c =================================================================== RCS file: /cvs/debian-boot/boot-floppies/utilities/dbootstrap/main.c,v retrieving revision 1.121 diff -u -u -r1.121 main.c --- utilities/dbootstrap/main.c 2001/07/23 07:34:15 1.121 +++ utilities/dbootstrap/main.c 2001/08/01 23:06:47 @@ -124,7 +124,7 @@ return 0; } -#if #cpu(alpha) || #cpu(sparc) +#if #cpu(alpha) || #cpu(sparc) || #cpu(mips) static int parse_cpuinfo(const char *key, char *val, int len) { @@ -361,6 +361,21 @@ } #endif +#if #cpu(mips) +static char* get_mips_model(void) +{ + char buf[16]; + + if (parse_cpuinfo("system type", buf, sizeof(buf))) { + /* safe enough since all of them use arc firmware */ + if (! strncmp(buf, "SGI",3)) { + return strdup("ip22"); + } + } + return strdup("unknown"); +} +#endif + void get_subarch_name(void) { #if #cpu(m68k) @@ -373,6 +388,8 @@ Arch2 = get_sparc_model(); #elif #cpu(arm) Arch2 = get_arm_model(); +#elif #cpu(mips) + Arch2 = get_mips_model(); #else Arch2 = strdup(""); /* prevent errors */ #endif Index: utilities/dbootstrap/main_menu.c =================================================================== RCS file: /cvs/debian-boot/boot-floppies/utilities/dbootstrap/main_menu.c,v retrieving revision 1.64 diff -u -u -r1.64 main_menu.c --- utilities/dbootstrap/main_menu.c 2001/07/12 14:07:36 1.64 +++ utilities/dbootstrap/main_menu.c 2001/08/01 23:06:48 @@ -163,7 +163,7 @@ {_("Unmount a Partition"), OPT_UMOUNT_LINUX}, {_("Install Kernel and Driver Modules"), OPT_INSTALL_OS}, {_("Configure Device Driver Modules"), OPT_CONFIGURE_MODULES}, -#if !(#cpu(alpha) || #cpu(m68k) || #cpu(hppa)) +#if !(#cpu(alpha) || #cpu(m68k) || #cpu(hppa) || #cpu(mips) || #cpu(mipsel)) {_("Configure PCMCIA Support"), OPT_CONFIGURE_PCMCIA}, #endif {_("Install Foreign Modules"), OPT_FOREIGN_MODULES}, @@ -174,7 +174,7 @@ {_("Edit Kernel Boot Parameters"), OPT_KERNEL_APPEND}, #endif {_("Make System Bootable"), OPT_DISK_BOOT}, -#if !(#cpu (hppa)) +#if !(#cpu (hppa) || #cpu(mips) || #cpu(mipsel)) {_("Make a Boot Floppy"), OPT_FLOPPY_BOOT}, #endif #if 0 /* not working yet */