Skip to contentSkip to conversation

: make UML working with initramfs updates

PATCH New Nikita Danilov 1 participant 1 message Nov 6, 2002 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : make UML working with initramfs updates

Hello, Jeff,

this patch syncs UML with recent initramfs updates, plus fixes compilation warning, and missed sys_swap{on,off} in arch/um/kernel/sys_call_table.c

I also changed __per_cpu_start to be aligned to 32 bits in arch/um/uml.lds.S (like in i386).

Nikita.
===== arch/um/Makefile 1.14 vs edited =====

arch/um/Makefile +1 -0
@@ -66,6 +66,7 @@
 
 
 LDFLAGS_vmlinux = -r $(ARCH_DIR)/main.o
+LDFLAGS_BLOB	:= --format binary --oformat elf32-i386
 
 vmlinux: $(ARCH_DIR)/main.o 
 

===== arch/um/uml.lds.S 1.8 vs edited =====

arch/um/uml.lds.S +5 -0
@@ -67,6 +67,7 @@
   __setup_start = .;
   .init.setup : { *(.init.setup) }
   __setup_end = .;
+  . = ALIGN(32);
   __per_cpu_start = . ; 
   .data.percpu : { *(.data.percpu) }
   __per_cpu_end = . ; 
@@ -84,6 +85,10 @@
   __uml_initcall_start = .;
   .uml.initcall.init : { *(.uml.initcall.init) }
   __uml_initcall_end = .;
+  . = ALIGN(4096);
+  __initramfs_start = .;
+  .init.ramfs : { *(.init.ramfs) }
+  __initramfs_end = .;
   __init_end = .;
   __exitcall_begin = .;
   .exitcall : { *(.exitcall.exit) }

===== arch/um/drivers/chan_kern.c 1.4 vs edited =====

arch/um/drivers/chan_kern.c +9 -0
@@ -17,6 +17,14 @@
 #include "sigio.h"
 #include "line.h"
 
+#if defined(CONFIG_FD_CHAN) && defined(CONFIG_NULL_CHAN) && defined(CONFIG_PORT_CHAN) && defined(CONFIG_PTY_CHAN) && defined(CONFIG_TTY_CHAN) && defined(CONFIG_XTERM_CHAN)
+
+/* do not define not_configged_* here */
+
+#else
+
+/* something is not configured */
+
 static void *not_configged_init(char *str, int device, struct chan_opts *opts)
 {
 	printk(KERN_ERR "Using a channel type which is configured out of "
@@ -84,6 +92,7 @@
 	free:		not_configged_free,
 	winch:		0,
 };
+#endif
 
 static void tty_receive_char(struct tty_struct *tty, char ch)
 {

===== arch/um/kernel/sys_call_table.c 1.4 vs edited =====

arch/um/kernel/sys_call_table.c +2 -0
@@ -86,6 +86,8 @@
 extern syscall_handler_t sys_lstat;
 extern syscall_handler_t sys_readlink;
 extern syscall_handler_t sys_uselib;
+extern syscall_handler_t sys_swapon;
+extern syscall_handler_t sys_swapoff;
 extern syscall_handler_t sys_reboot;
 extern syscall_handler_t old_readdir;
 extern syscall_handler_t sys_munmap;

===== include/asm-um/unistd.h 1.2 vs edited =====

include/asm-um/unistd.h +1 -1
@@ -23,7 +23,7 @@
 		       struct timeval *tvp);
 extern long sys_lseek(unsigned int fildes, unsigned long offset, int whence);
 extern long sys_read(unsigned int fildes, char *buf, int len);
-extern long sys_write(unsigned int fildes, char *buf, int len);
+extern long sys_write(int fildes, const char *buf, size_t len);
 
 #ifdef __KERNEL_SYSCALLS__