Browse Source

linux: add OpenADK startup patch

Waldemar Brodkorb 8 years ago
parent
commit
f9bbea4a12
1 changed files with 34 additions and 0 deletions
  1. 34 0
      target/linux/patches/4.4.6/startup.patch

+ 34 - 0
target/linux/patches/4.4.6/startup.patch

@@ -0,0 +1,34 @@
+diff -Nur linux-4.4.6.orig/init/initramfs.c linux-4.4.6/init/initramfs.c
+--- linux-4.4.6.orig/init/initramfs.c	2016-03-16 16:43:17.000000000 +0100
++++ linux-4.4.6/init/initramfs.c	2016-03-27 14:15:43.931044532 +0200
+@@ -653,6 +653,9 @@
+ 		 */
+ 		load_default_modules();
+ 	}
++#ifdef CONFIG_DEVTMPFS_MOUNT
++	devtmpfs_mount("dev");
++#endif
+ 	return 0;
+ }
+ rootfs_initcall(populate_rootfs);
+diff -Nur linux-4.4.6.orig/init/main.c linux-4.4.6/init/main.c
+--- linux-4.4.6.orig/init/main.c	2016-03-16 16:43:17.000000000 +0100
++++ linux-4.4.6/init/main.c	2016-03-27 14:15:43.935044783 +0200
+@@ -1011,6 +1011,8 @@
+ 	if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
+ 		pr_err("Warning: unable to open an initial console.\n");
+ 
++	printk(KERN_WARNING "Starting Linux (built with OpenADK).\n");
++
+ 	(void) sys_dup(0);
+ 	(void) sys_dup(0);
+ 	/*
+@@ -1019,7 +1021,7 @@
+ 	 */
+ 
+ 	if (!ramdisk_execute_command)
+-		ramdisk_execute_command = "/init";
++		ramdisk_execute_command = "/sbin/init";
+ 
+ 	if (sys_access((const char __user *) ramdisk_execute_command, 0) != 0) {
+ 		ramdisk_execute_command = NULL;