Skip to contentSkip to conversation

: linux-2.5.46-uc0 (MMU-less fixups)

PATCH In review [email protected] 2 participants 3 messages Nov 5, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : linux-2.5.46-uc0 (MMU-less fixups)

Hi All,

Here is a much reduced set of MMU-less fixups for 2.5.46 :-) Now that the majority of the code is in there is just a few little things missing and some clean ups.

http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.46-uc0.patch.gz

Change log:
1. patch against 2.5.46
2. add MAC setting support to fec driver
3. clean up ColdFire entry.S (more to come)

You can get smaller patches here:

. FEC (5272) patch
http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.46-uc0-fec.patch.gz

. 68k/ColdFire/v850 serial drivers
http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.46-uc0-serial.patch.gz

. 68328 frame buffer driver
http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.46-uc0-fb.patch.gz

. m68knommu patches
http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.46-uc0-m68knommu.patch.gz

. v850 patches
http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.46-uc0-v850.patch.gz

. missing no MM peices (some mm/, /kernel and /fs/proc files)
http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.46-uc0-mm.patch.gz

Regards
Greg

------------------------------------------------------------------------
Greg Ungerer -- Chief Software Wizard EMAIL: [email protected]
SnapGear Pty Ltd PHONE: +61 7 3435 2888
825 Stanley St, FAX: +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia WEB: www.SnapGear.com

#1 lore raw

Here's a v850 update for 2.5.46-uc0.

Thanks,

-Miles

Patch:

v850/Makefile renamed from orig/linux-2.5.46-uc0/arch/v850/Makefile +3 -3
diff -ruN -X../cludes ../orig/linux-2.5.46-uc0/arch/v850/Makefile arch/v850/Makefile
@@ -22,6 +22,8 @@
 CFLAGS += -fno-builtin
 CFLAGS += -D__linux__ -DUTS_SYSNAME=\"uClinux\"
 
+ARCHBLOBLFLAGS := -I binary -O elf32-little -B v850e
+
 
 HEAD := $(arch_dir)/kernel/head.o $(arch_dir)/kernel/init_task.o
 core-y += $(arch_dir)/kernel/
@@ -40,10 +42,8 @@
 # This results in it being built anew each time, but that's alright.
 root_fs_image.o: root_fs_image_force
 
-# Note that we use the build-system's objcopy, as the v850 tools are fairly
-# old, and don't have the --rename-section option.
 root_fs_image_force: $(ROOT_FS_IMAGE)
-	objcopy -I binary -O elf32-little -B i386 --rename-section .data=.root,alloc,load,readonly,data,contents $< root_fs_image.o
+	$(OBJCOPY) $(ARCHBLOBLFLAGS) --rename-section .data=.root,alloc,load,readonly,data,contents $< root_fs_image.o
 endif
 
 
v850/anna-rom.ld renamed from orig/linux-2.5.46-uc0/arch/v850/anna-rom.ld +5 -0
diff -ruN -X../cludes ../orig/linux-2.5.46-uc0/arch/v850/anna-rom.ld arch/v850/anna-rom.ld
@@ -80,6 +80,11 @@
 		__root_fs_image_start = . ;
 		*(.root)
 		__root_fs_image_end = . ;
+
+		. = ALIGN (4096) ;
+		___initramfs_start = . ;
+			*(.init.initramfs)
+		___initramfs_end = . ;
 	} > ROM
 
 	__rom_copy_src_start = . ;
v850/anna.ld renamed from orig/linux-2.5.46-uc0/arch/v850/anna.ld +6 -0
diff -ruN -X../cludes ../orig/linux-2.5.46-uc0/arch/v850/anna.ld arch/v850/anna.ld
@@ -103,6 +103,12 @@
 			*(.initcall7.init)
 		. = ALIGN (4) ;
 		___initcall_end = . ;
+
+		. = ALIGN (4096) ;
+		___initramfs_start = . ;
+			*(.init.initramfs)
+		___initramfs_end = . ;
+
 		__init_end = . ;
 
 		__kram_end = . ;
v850/kernel/irq.c renamed from orig/linux-2.5.46-uc0/arch/v850/kernel/irq.c +1 -1
diff -ruN -X../cludes ../orig/linux-2.5.46-uc0/arch/v850/kernel/irq.c arch/v850/kernel/irq.c
@@ -252,7 +252,7 @@
 	unsigned int status;
 
 	irq_enter();
-	kstat.irqs[cpu][irq]++;
+	kstat_cpu(cpu).irqs[irq]++;
 	spin_lock(&desc->lock);
 	desc->handler->ack(irq);
 	/*
v850/rte_ma1_cb-ksram.ld renamed from orig/linux-2.5.46-uc0/arch/v850/rte_ma1_cb-ksram.ld +5 -0
diff -ruN -X../cludes ../orig/linux-2.5.46-uc0/arch/v850/rte_ma1_cb-ksram.ld arch/v850/rte_ma1_cb-ksram.ld
@@ -93,6 +93,11 @@
 			*(.initcall7.init)
 		. = ALIGN (4) ;
 		___initcall_end = . ;
+
+		. = ALIGN (4096) ;
+		___initramfs_start = . ;
+			*(.init.initramfs)
+		___initramfs_end = . ;
 	} > SRAM
 
 	/* This provides address at which the interrupt vectors are
v850/rte_ma1_cb-rom.ld renamed from orig/linux-2.5.46-uc0/arch/v850/rte_ma1_cb-rom.ld +6 -1
diff -ruN -X../cludes ../orig/linux-2.5.46-uc0/arch/v850/rte_ma1_cb-rom.ld arch/v850/rte_ma1_cb-rom.ld
@@ -45,9 +45,14 @@
 		___stop___ksymtab = . ;
 		. = ALIGN (4) ;
 		__etext = . ;
+
+		. = ALIGN (4096) ;
+		___initramfs_start = . ;
+			*(.init.initramfs)
+		___initramfs_end = . ;
 	} > ROM
 
-	__data_load_start = . ;
+	__rom_copy_src_start = . ;
 
 	.data : {
 	        __kram_start = . ;
v850/rte_ma1_cb.ld renamed from orig/linux-2.5.46-uc0/arch/v850/rte_ma1_cb.ld +5 -0
diff -ruN -X../cludes ../orig/linux-2.5.46-uc0/arch/v850/rte_ma1_cb.ld arch/v850/rte_ma1_cb.ld
@@ -98,6 +98,11 @@
 			*(.initcall7.init)
 		. = ALIGN (4) ;
 		___initcall_end = . ;
+
+		. = ALIGN (4096) ;
+		___initramfs_start = . ;
+			*(.init.initramfs)
+		___initramfs_end = . ;
 	} > SDRAM
 
 	/* This provides address at which the interrupt vectors are
v850/sim.ld renamed from orig/linux-2.5.46-uc0/arch/v850/sim.ld +6 -0
diff -ruN -X../cludes ../orig/linux-2.5.46-uc0/arch/v850/sim.ld arch/v850/sim.ld
@@ -96,6 +96,12 @@
 			*(.initcall7.init)
 		. = ALIGN (4) ;
 		___initcall_end = . ;
+
+		. = ALIGN (4096) ;
+		___initramfs_start = . ;
+			*(.init.initramfs)
+		___initramfs_end = . ;
+
 		__init_end = . ;
 
 		__kram_end = . ;
v850/sim85e2c.ld renamed from orig/linux-2.5.46-uc0/arch/v850/sim85e2c.ld +6 -0
diff -ruN -X../cludes ../orig/linux-2.5.46-uc0/arch/v850/sim85e2c.ld arch/v850/sim85e2c.ld
@@ -86,6 +86,12 @@
 			*(.initcall7.init)
 		. = ALIGN (4) ;
 		___initcall_end = . ;
+
+		. = ALIGN (4096) ;
+		___initramfs_start = . ;
+			*(.init.initramfs)
+		___initramfs_end = . ;
+
 		__init_end = . ;
 	} > IRAM
 
serial/nb85e_uart.c renamed from orig/linux-2.5.46-uc0/drivers/serial/nb85e_uart.c +1 -1
diff -ruN -X../cludes ../orig/linux-2.5.46-uc0/drivers/serial/nb85e_uart.c drivers/serial/nb85e_uart.c
@@ -304,7 +304,7 @@
 		port->icount.tx++;
 
 		if (uart_circ_chars_pending (xmit) < WAKEUP_CHARS)
-			uart_event (port, EVT_WRITE_WAKEUP);
+			uart_write_wakeup (port);
 	}
 
  no_xmit:
asm-v850/percpu.h renamed from orig/linux-2.5.46-uc0/include/asm-v850/percpu.h +8 -0
diff -ruN -X../cludes ../orig/linux-2.5.46-uc0/include/asm-v850/percpu.h include/asm-v850/percpu.h
@@ -3,4 +3,12 @@
 
 #include <asm-generic/percpu.h>
 
+/* This is a stupid hack to satisfy some grotty implicit include-file
+   dependency; basically, <linux/smp.h> uses BUG_ON, which calls BUG, but
+   doesn't include the necessary headers to define it.  In the twisted
+   festering mess of includes this must all be resolved somehow on other
+   platforms, but I haven't the faintest idea how, and don't care; here will
+   do, even though doesn't actually make any sense.  */
+#include <asm/page.h>
+
 #endif /* __V850_PERCPU_H__ */
Signature · 3 lines
-- 
"Most attacks seem to take place at night, during a rainstorm, uphill,
 where four map sheets join."   -- Anon. British Officer in WW I
#2 lore raw

Hi Miles,

Quoted 1 line · Miles Bader

Here's a v850 update for 2.5.46-uc0.

Got it.

Thanks
Greg

------------------------------------------------------------------------
Greg Ungerer -- Chief Software Wizard EMAIL: [email protected]
Snapgear Pty Ltd PHONE: +61 7 3279 1822
825 Stanley St, FAX: +61 7 3279 1820
Woolloongabba, QLD, 4102, Australia WEB: www.SnapGear.com