[prev in list] [next in list] [prev in thread] [next in thread] 

List:       user-mode-linux-devel
Subject:    [User-mode-linux-devel] [PATCH] test6
From:       Rusty Russell <rusty () linuxcare ! com ! au>
Date:       2000-08-10 15:26:01
[Download RAW message or body]

These are the changes I needed to make for compilation with 6-9 (and
probably for test6 proper).

It also turns um.a into um.o so ksyms doesn't get dropped by the
linker (which means no export of those symbols, hence modules break).
Adds some more exports.  Result is running now (so `it works for
me!').

I get apt-get to seg fault sometimes (and non-repeatedly); I'm running
without swap in um kernel, so it may well be running out of memory
(given that uml reports dying with NULL access, I suspect this may be
the case on an unchecked malloc).  I *don't* think this is a UML
issue...

I do get crashes on halt frequently (after `Sending KILL Signal...'),
but no biggie (fsck is fast on a 500MB root file).

Cheers!
Rusty.

diff -urN -X /tmp/filele7AXi --minimal linux-2.4.0-test6-9-uml/arch/um/Makefile \
                working-2.4.0-test6-9-uml/arch/um/Makefile
--- linux-2.4.0-test6-9-uml/arch/um/Makefile	Thu Aug 10 03:07:55 2000
+++ working-2.4.0-test6-9-uml/arch/um/Makefile	Thu Aug 10 23:58:42 2000
@@ -27,7 +27,7 @@
 SUBDIRS += $(ARCH_DIR)/drivers $(ARCH_DIR)/kernel $(ARCH_DIR)/sys-$(SUBARCH) \
 	$(ARCH_DIR)/ptproxy
 
-LIBS += $(ARCH_DIR)/kernel/um.a $(ARCH_DIR)/drivers/um_drivers.o \
+LIBS += $(ARCH_DIR)/kernel/um.o $(ARCH_DIR)/drivers/um_drivers.o \
 	$(ARCH_DIR)/sys-$(SUBARCH)/sys.o $(ARCH_DIR)/ptproxy/ptproxy.a
 
 $(ARCH_DIR)/link.ld:
diff -urN -X /tmp/filele7AXi --minimal \
linux-2.4.0-test6-9-uml/arch/um/kernel/Makefile \
                working-2.4.0-test6-9-uml/arch/um/kernel/Makefile
--- linux-2.4.0-test6-9-uml/arch/um/kernel/Makefile	Thu Aug 10 03:07:56 2000
+++ working-2.4.0-test6-9-uml/arch/um/kernel/Makefile	Fri Aug 11 01:07:08 2000
@@ -1,4 +1,4 @@
-LIB = um.a
+OBJ := um.o
 
 OBJS = process.o current.o exec_kern.o exec_user.o init_task.o irq.o \
 	irq_user.o mem.o process_kern.o ptrace.o reboot.o resource.o \
@@ -13,7 +13,7 @@
 USER_CFLAGS = $(patsubst -I%,,$(CFLAGS))
 USER_CFLAGS += -I../include
 
-all: $(LIB) unmap_fin.o
+all: $(OBJ) unmap_fin.o
 
 exec_user.o: exec_user.c
 	gcc -D__KERNEL__ $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
@@ -43,12 +43,12 @@
 unmap_fin.o : unmap.o
 	ld -r -o $@ $< -lc
 
-$(LIB): $(OBJS) $(OX_OBJS)
+$(OBJ): $(OBJS) $(OX_OBJS)
 	rm -f $@
-	ar cr $@ $^
+	$(LD) $(LINKFLAGS) $^ -o $@
 
 clean:
-	rm -f $(OBJS) $(OX_OBJS)
+	rm -f $(OBJ) $(OBJS) $(OX_OBJS)
 
 modules:
 
diff -urN -X /tmp/filele7AXi --minimal linux-2.4.0-test6-9-uml/arch/um/kernel/irq.c \
                working-2.4.0-test6-9-uml/arch/um/kernel/irq.c
--- linux-2.4.0-test6-9-uml/arch/um/kernel/irq.c	Thu Aug 10 03:07:56 2000
+++ working-2.4.0-test6-9-uml/arch/um/kernel/irq.c	Thu Aug 10 03:25:47 2000
@@ -328,7 +328,7 @@
 	desc->handler->end(irq);
 	spin_unlock(&desc->lock);
 
-	if (softirq_state[cpu].active & softirq_state[cpu].mask)
+	if (softirq_active(cpu) & softirq_mask(cpu))
 		do_softirq();
 	return 1;
 }
diff -urN -X /tmp/filele7AXi --minimal linux-2.4.0-test6-9-uml/arch/um/kernel/ksyms.c \
                working-2.4.0-test6-9-uml/arch/um/kernel/ksyms.c
--- linux-2.4.0-test6-9-uml/arch/um/kernel/ksyms.c	Thu Aug 10 03:07:56 2000
+++ working-2.4.0-test6-9-uml/arch/um/kernel/ksyms.c	Fri Aug 11 01:16:44 2000
@@ -1,6 +1,7 @@
 #include "linux/module.h"
 #include "linux/string.h"
 #include "asm/current.h"
+#include "asm/uaccess.h"
 #include "kern_util.h"
 #include "user_util.h"
 
@@ -9,3 +10,5 @@
 EXPORT_SYMBOL(physmem);
 EXPORT_SYMBOL(current_task);
 EXPORT_SYMBOL(set_signals);
+EXPORT_SYMBOL(set_fault_addr);
+EXPORT_SYMBOL(block_signals);
diff -urN -X /tmp/filele7AXi --minimal \
linux-2.4.0-test6-9-uml/arch/um/kernel/process_kern.c \
                working-2.4.0-test6-9-uml/arch/um/kernel/process_kern.c
--- linux-2.4.0-test6-9-uml/arch/um/kernel/process_kern.c	Thu Aug 10 03:07:56 2000
+++ working-2.4.0-test6-9-uml/arch/um/kernel/process_kern.c	Thu Aug 10 03:31:00 2000
@@ -218,7 +218,7 @@
 void do_bh(void)
 {
 #ifndef __SMP__
-	if (softirq_state[0].active&softirq_state[0].mask)
+	if (softirq_active(0) & softirq_mask(0))
 		do_softirq();
 #else
 #error Need to update do_bh
--
Hacking time.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic