Merge of mips+mipsel patches against boot-floppies 20010804
Hallo everyone,
I have tried to merge all the patches for mips and mipsel that were
posted on debian-boot and get them to work with today's boot-floppies
cvs. The result is appended to this mail. Guido, could you test the patch
for mips?
Greetings,
Karsten
--
#include <standard_disclaimer>
Nach Paragraph 28 Abs. 3 Bundesdatenschutzgesetz widerspreche ich der Nutzung
oder Uebermittlung meiner Daten fuer Werbezwecke oder fuer die Markt- oder
Meinungsforschung.
diff -Nur boot-floppies-cvs20010804/Makefile boot-floppies-cvs20010804.patched/Makefile
--- boot-floppies-cvs20010804/Makefile Tue Jul 31 16:40:50 2001
+++ boot-floppies-cvs20010804.patched/Makefile Sat Aug 4 17:41:36 2001
@@ -152,7 +152,9 @@
$(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
diff -Nur boot-floppies-cvs20010804/config boot-floppies-cvs20010804.patched/config
--- boot-floppies-cvs20010804/config Sat Aug 4 01:24:35 2001
+++ boot-floppies-cvs20010804.patched/config Sat Aug 4 17:41:36 2001
@@ -38,7 +38,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
diff -Nur boot-floppies-cvs20010804/make/root boot-floppies-cvs20010804.patched/make/root
--- boot-floppies-cvs20010804/make/root Tue Jul 10 07:23:42 2001
+++ boot-floppies-cvs20010804.patched/make/root Sat Aug 4 17:41:36 2001
@@ -48,6 +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:
diff -Nur boot-floppies-cvs20010804/release.sh boot-floppies-cvs20010804.patched/release.sh
--- boot-floppies-cvs20010804/release.sh Wed Jul 25 20:44:55 2001
+++ boot-floppies-cvs20010804.patched/release.sh Sat Aug 4 17:41:37 2001
@@ -1069,8 +1069,12 @@
do_arch_mipsel()
{
- echo "Nothing here yet!"
- exit 1
+ mkdir -p $release
+ cp linux $release/
+
+ gunzip -c $TOP/config.gz > $release/kernel-config
+ gunzip -c $TOP/config.gz > $release/images-1.44/kernel-config
+
}
# main
diff -Nur boot-floppies-cvs20010804/rescue.sh boot-floppies-cvs20010804.patched/rescue.sh
--- boot-floppies-cvs20010804/rescue.sh Wed Jul 18 23:50:35 2001
+++ boot-floppies-cvs20010804.patched/rescue.sh Sat Aug 4 17:41:37 2001
@@ -407,9 +407,11 @@
;;
esac
;;
- mips)
- error "no support for MIPS"
- ;;
+ mips|mipsel)
+ mke2fs -F -q $floppy $blocks
+ fstype=ext2
+ nlfmt='cat -' # UNIX newline convention
+ ;;
powerpc)
case "$subarch" in
apus|chrp)
@@ -507,10 +509,11 @@
relax
-if [ "$arch" = hppa -o "$arch" = powerpc -a "$subarch" = pmac ]; then
+if [ "$arch" = hppa -o "$arch" = powerpc -a "$subarch" = pmac -o "$arch" = "mipsel" ]; then
info "compressing and installing kernel 'linux$subarch'"
- gzip -9f linux$subarch
- cp linux$subarch.gz $mnt/linux.gz
+ # gzip -9f linux$subarch
+ # cp linux$subarch.gz $mnt/linux.gz
+ gzip -9cf linux$subarch > $mnt/linux.gz
else
info "installing kernel 'linux$subarch'"
cp linux$subarch $mnt/linux
@@ -632,6 +635,12 @@
;;
hppa)
write_m68kinfo
+ ;;
+ mips)
+ write_m68kinfo
+ ;;
+ mipsel)
+ write_installsh
;;
esac
diff -Nur boot-floppies-cvs20010804/rootdisk.sh boot-floppies-cvs20010804.patched/rootdisk.sh
--- boot-floppies-cvs20010804/rootdisk.sh Wed Jul 18 23:50:35 2001
+++ boot-floppies-cvs20010804.patched/rootdisk.sh Sat Aug 4 17:41:37 2001
@@ -602,7 +602,7 @@
fi
# do library reduction for platforms where it works
-if [ "$arch" != "ia64" ]; then
+if [ "$arch" != "ia64" -a "$arch" != "mipsel" -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.*
diff -Nur boot-floppies-cvs20010804/utilities/dbootstrap/main.c boot-floppies-cvs20010804.patched/utilities/dbootstrap/main.c
--- boot-floppies-cvs20010804/utilities/dbootstrap/main.c Mon Jul 23 07:34:15 2001
+++ boot-floppies-cvs20010804.patched/utilities/dbootstrap/main.c Sat Aug 4 17:41:37 2001
@@ -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
diff -Nur boot-floppies-cvs20010804/utilities/dbootstrap/main_menu.c boot-floppies-cvs20010804.patched/utilities/dbootstrap/main_menu.c
--- boot-floppies-cvs20010804/utilities/dbootstrap/main_menu.c Tue Jul 31 20:47:01 2001
+++ boot-floppies-cvs20010804.patched/utilities/dbootstrap/main_menu.c Sat Aug 4 17:43:32 2001
@@ -167,7 +167,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) || #cpu(s390))
+#if !(#cpu(alpha) || #cpu(m68k) || #cpu(hppa) || #cpu(s390) || #cpu(mips) || #cpu(mipsel))
{_("Configure PCMCIA Support"), OPT_CONFIGURE_PCMCIA},
#endif
{_("Install Foreign Modules"), OPT_FOREIGN_MODULES},
@@ -178,7 +178,7 @@
{_("Edit Kernel Boot Parameters"), OPT_KERNEL_APPEND},
#endif
{_("Make System Bootable"), OPT_DISK_BOOT},
-#if !(#cpu(hppa) || #cpu(s390))
+#if !(#cpu(hppa) || #cpu(s390) || #cpu(mips) || #cpu(mipsel))
{_("Make a Boot Floppy"), OPT_FLOPPY_BOOT},
#endif
#if 0 /* not working yet */
Reply to: