summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rw-r--r--target/Makefile6
-rw-r--r--target/arm/Makefile6
-rw-r--r--target/arm/sys-available/qemu-armhf2
-rw-r--r--target/config/Config.in33
-rw-r--r--target/config/Config.in.arch.default4
-rw-r--r--target/linux/patches/3.10.33/startup.patch32
-rw-r--r--target/linux/patches/3.11.10/startup.patch32
-rw-r--r--target/linux/patches/3.12.13/startup.patch32
-rw-r--r--target/linux/patches/3.13.6/startup.patch25
-rw-r--r--target/linux/patches/3.4.82/startup.patch30
10 files changed, 157 insertions, 45 deletions
diff --git a/target/Makefile b/target/Makefile
index 1e091d3dc..313a616a1 100644
--- a/target/Makefile
+++ b/target/Makefile
@@ -53,7 +53,7 @@ config-prepare: $(TOPDIR)/.config
while IFS='=' read symbol value; do \
sed -i -e "/^# $$symbol/d" ${BUILD_DIR}/.kernelconfig.board; \
done;)
- @sed -i -e 's#^\(CONFIG_.*CMDLINE="\)\(.*\)"#\1\2 init=/sbin/init"#' \
+ @sed -i -e 's#^\(CONFIG_.*CMDLINE="\)\(.*\)"#\1\2 ro"#' \
${BUILD_DIR}/.kernelconfig.board
@sed -i -e 's#^\(CONFIG_.*CMDLINE="\)\(.*\)"#\1\2 ${FS_CMDLINE}"#' \
${BUILD_DIR}/.kernelconfig.board
@@ -61,6 +61,10 @@ ifneq ($(ADK_TARGET_CMDLINE),)
@sed -i -e 's#^\(CONFIG_.*CMDLINE="\)\(.*\)"#\1\2 ${ADK_TARGET_CMDLINE}"#' \
${BUILD_DIR}/.kernelconfig.board
endif
+ifeq ($(ADK_TARGET_QEMU_WITH_GRAPHIC),y)
+ @sed -i -e 's#^\(CONFIG_.*CMDLINE="\)\(.*\)"#\1\2 console=tty0"#' \
+ ${BUILD_DIR}/.kernelconfig.board
+endif
ifneq ($(ADK_PACKAGE_CRYPTINIT_ROOT),)
@sed -i -e 's#^\(CONFIG_.*CMDLINE="\)\(.*\)"#\1\2 ${ADK_PACKAGE_CMDLINE}"#' \
${BUILD_DIR}/.kernelconfig.board
diff --git a/target/arm/Makefile b/target/arm/Makefile
index e2194f1d3..77148e261 100644
--- a/target/arm/Makefile
+++ b/target/arm/Makefile
@@ -61,7 +61,7 @@ ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
@echo "Use following command to install it on SD card:"
@echo "sudo ./scripts/install-rpi.sh /dev/sdb $(FW_DIR)/$(ROOTFSTARBALL)"
endif
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM),y)
+ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM)$(ADK_TARGET_SYSTEM_QEMU_ARMHF),y)
@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo "Use following command to create a QEMU Image:"
@@ -75,7 +75,7 @@ imageinstall: $(FW_DIR)/$(INITRAMFS)
@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM),y)
+ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM)$(ADK_TARGET_SYSTEM_QEMU_ARMHF),y)
ifeq ($(ADK_TARGET_QEMU_WITH_VIRTIO),y)
@echo 'qemu-system-arm -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -drive file=qemu-${CPU_ARCH}.img,if=virtio,index=0 -net nic,model=virtio -net user'
else
@@ -88,7 +88,7 @@ ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
imageinstall: createinitramfs
@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
@echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM),y)
+ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM)$(ADK_TARGET_SYSTEM_QEMU_ARMHF),y)
@echo "Start qemu with following command line:"
@echo 'qemu-system-arm -M $(MACH) -nographic $(NET) -kernel $(FW_DIR)/$(TARGET_KERNEL)'
endif
diff --git a/target/arm/sys-available/qemu-armhf b/target/arm/sys-available/qemu-armhf
index 798391b8c..85cc9c00f 100644
--- a/target/arm/sys-available/qemu-armhf
+++ b/target/arm/sys-available/qemu-armhf
@@ -1,7 +1,7 @@
config ADK_TARGET_SYSTEM_QEMU_ARMHF
bool "Qemu Emulator (hard-float)"
select ADK_arm
- select ADK_qemu_arm
+ select ADK_qemu_armhf
select ADK_little
select ADK_hard_float
select ADK_eabihf
diff --git a/target/config/Config.in b/target/config/Config.in
index a917f6a3c..d2d5b6671 100644
--- a/target/config/Config.in
+++ b/target/config/Config.in
@@ -561,7 +561,6 @@ config ADK_TARGET_CPU_ARCH
default "mips" if ADK_LINUX_MIPS && ADK_big
default "mipsel" if ADK_LINUX_MIPS && ADK_little
default "arm" if ADK_LINUX_ARM && ADK_little
- default "armeb" if ADK_LINUX_ARM && ADK_big
default "sparc" if ADK_LINUX_SPARC
default "sparc64" if ADK_LINUX_SPARC64
default "sh4" if ADK_LINUX_SH && ADK_little
@@ -615,28 +614,27 @@ config ADK_TARGET_CFLAGS
config ADK_TARGET_CMDLINE
string
default "dwc_otg.fiq_split_enable=1" if ADK_TARGET_SYSTEM_RASPBERRY_PI
- default "console=tty0" if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
default "console=ttymxc0,115200" if ADK_TARGET_SYSTEM_CUBOX_I
+ default "console=tty0" if ADK_TARGET_SYSTEM_LEMOTE_YEELONG
+ default "console=ttyS0,115200 console=tty0" if ADK_TARGET_SYSTEM_IBM_X40
+ default "console=ttyS0,115200 console=tty0 fbcon=rotate:1" if ADK_TARGET_SYSTEM_SHARP_ZAURUS
default "console=ttyS0,9600" if ADK_TARGET_SYSTEM_FON_FON2100
default "console=ttyS0,38400" if ADK_TARGET_SYSTEM_PCENGINES_WRAP
default "console=ttyS0,115200 console=tty0 geodewdt.nowayout=1" if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C
- default "console=ttyS0,115200 console=tty0" if ADK_TARGET_SYSTEM_IBM_X40
- default "console=ttyS0,115200 console=tty0" if ADK_TARGET_SYSTEM_INTEL_ATOM
- default "console=ttyS0,115200 console=tty0" if ADK_TARGET_SYSTEM_QEMU_I686
- default "console=ttyS0,115200 console=tty0" if ADK_TARGET_SYSTEM_QEMU_X86_64
- default "console=ttyS0,115200 console=tty0" if ADK_TARGET_SYSTEM_QEMU_SPARC64
- default "console=ttyS0,9600 console=tty0" if ADK_TARGET_SYSTEM_QEMU_PPC
- default "console=hvc0 console=tty0" if ADK_TARGET_SYSTEM_QEMU_PPC64
- default "console=ttyUL0" if ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800
- default "console=ttyS0,115200" if ADK_TARGET_QEMU_MICROBLAZE_MODEL_ML605
default "console=ttyS0,115200 console=tty0" if ADK_TARGET_SYSTEM_VBOX_I686
- default "console=ttyS0,115200 console=tty0" if ADK_TARGET_QEMU_ARM_MODEL_SPITZ
- default "console=ttyAMA0 console=tty0" if ADK_TARGET_QEMU_ARM_MODEL_VERSATILEPB
- default "console=ttyAMA0 console=tty0" if ADK_TARGET_QEMU_ARM_MODEL_VEXPRESS_A9
- default "console=ttyS0,115200 console=tty0 fbcon=rotate:1" if ADK_TARGET_SYSTEM_SHARP_ZAURUS
- default "console=ttySC1 console=tty0" if ADK_TARGET_SYSTEM_QEMU_SH4
- default "console=ttySC1 console=tty0" if ADK_TARGET_SYSTEM_QEMU_SH4EB
default "console=tty0" if ADK_TARGET_SYSTEM_ARANYM_M68K
+ default "console=ttyS0,115200" if ADK_TARGET_SYSTEM_QEMU_I686
+ default "console=ttyS0,115200" if ADK_TARGET_SYSTEM_QEMU_X86_64
+ default "console=ttyS0,115200" if ADK_TARGET_SYSTEM_QEMU_SPARC64
+ default "console=ttyS0,9600" if ADK_TARGET_SYSTEM_QEMU_PPC
+ default "console=hvc0" if ADK_TARGET_SYSTEM_QEMU_PPC64
+ default "console=ttyUL0" if ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800
+ default "console=ttyS0,115200" if ADK_TARGET_QEMU_MICROBLAZE_MODEL_ML605
+ default "console=ttyS0,115200" if ADK_TARGET_QEMU_ARM_MODEL_SPITZ
+ default "console=ttyAMA0" if ADK_TARGET_QEMU_ARM_MODEL_VERSATILEPB
+ default "console=ttyAMA0" if ADK_TARGET_QEMU_ARM_MODEL_VEXPRESS_A9
+ default "console=ttySC1" if ADK_TARGET_SYSTEM_QEMU_SH4
+ default "console=ttySC1" if ADK_TARGET_SYSTEM_QEMU_SH4EB
default "console=ttyS0,115200" if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D13
default "console=ttyS0,115200" if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D2
default ""
@@ -770,6 +768,7 @@ config ADK_TARGET_ROOTFS_INITRAMFS
ADK_LINUX_NATIVE
depends on !ADK_HARDWARE_VBOX
depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI
+ select ADK_KERNEL_BLK_DEV_INITRD
select ADK_KERNEL_BLK_DEV_RAM if ADK_TARGET_SYSTEM_ARANYM_M68K
help
create an read-only initramfs system.
diff --git a/target/config/Config.in.arch.default b/target/config/Config.in.arch.default
index 43d1e5399..90401de3d 100644
--- a/target/config/Config.in.arch.default
+++ b/target/config/Config.in.arch.default
@@ -1,7 +1,4 @@
# target architectures
-config ADK_native
- bool
-
config ADK_arm
bool
@@ -48,5 +45,4 @@ config ADK_TARGET_ARCH
default "sh" if ADK_sh
default "x86" if ADK_x86
default "x86_64" if ADK_x86_64
- default "native" if ADK_native
diff --git a/target/linux/patches/3.10.33/startup.patch b/target/linux/patches/3.10.33/startup.patch
index 4dccae8c1..3ebc5db1e 100644
--- a/target/linux/patches/3.10.33/startup.patch
+++ b/target/linux/patches/3.10.33/startup.patch
@@ -1,12 +1,34 @@
-diff -Nur linux-3.7.3.orig/init/main.c linux-3.7.3/init/main.c
---- linux-3.7.3.orig/init/main.c 2013-01-17 17:47:40.000000000 +0100
-+++ linux-3.7.3/init/main.c 2013-01-19 15:08:13.000000000 +0100
-@@ -879,6 +880,8 @@
+diff -Nur linux-3.10.33.orig/init/initramfs.c linux-3.10.33/init/initramfs.c
+--- linux-3.10.33.orig/init/initramfs.c 2014-03-07 06:58:45.000000000 +0100
++++ linux-3.10.33/init/initramfs.c 2014-03-15 18:32:07.240436750 +0100
+@@ -622,6 +622,9 @@
+ */
+ load_default_modules();
+ }
++#ifdef CONFIG_DEVTMPFS_MOUNT
++ devtmpfs_mount("dev");
++#endif
+ return 0;
+ }
+ rootfs_initcall(populate_rootfs);
+diff -Nur linux-3.10.33.orig/init/main.c linux-3.10.33/init/main.c
+--- linux-3.10.33.orig/init/main.c 2014-03-07 06:58:45.000000000 +0100
++++ linux-3.10.33/init/main.c 2014-03-15 18:32:07.240436750 +0100
+@@ -885,6 +885,8 @@
if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
- printk(KERN_WARNING "Warning: unable to open an initial console.\n");
+ 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);
/*
+@@ -893,7 +895,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;
diff --git a/target/linux/patches/3.11.10/startup.patch b/target/linux/patches/3.11.10/startup.patch
index 4dccae8c1..e7285873d 100644
--- a/target/linux/patches/3.11.10/startup.patch
+++ b/target/linux/patches/3.11.10/startup.patch
@@ -1,12 +1,34 @@
-diff -Nur linux-3.7.3.orig/init/main.c linux-3.7.3/init/main.c
---- linux-3.7.3.orig/init/main.c 2013-01-17 17:47:40.000000000 +0100
-+++ linux-3.7.3/init/main.c 2013-01-19 15:08:13.000000000 +0100
-@@ -879,6 +880,8 @@
+diff -Nur linux-3.11.10.orig/init/initramfs.c linux-3.11.10/init/initramfs.c
+--- linux-3.11.10.orig/init/initramfs.c 2013-11-29 19:42:37.000000000 +0100
++++ linux-3.11.10/init/initramfs.c 2014-03-15 18:42:01.586249887 +0100
+@@ -622,6 +622,9 @@
+ */
+ load_default_modules();
+ }
++#ifdef CONFIG_DEVTMPFS_MOUNT
++ devtmpfs_mount("dev");
++#endif
+ return 0;
+ }
+ rootfs_initcall(populate_rootfs);
+diff -Nur linux-3.11.10.orig/init/main.c linux-3.11.10/init/main.c
+--- linux-3.11.10.orig/init/main.c 2013-11-29 19:42:37.000000000 +0100
++++ linux-3.11.10/init/main.c 2014-03-15 18:42:01.590249897 +0100
+@@ -886,6 +886,8 @@
if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
- printk(KERN_WARNING "Warning: unable to open an initial console.\n");
+ 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);
/*
+@@ -894,7 +896,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;
diff --git a/target/linux/patches/3.12.13/startup.patch b/target/linux/patches/3.12.13/startup.patch
index 4dccae8c1..4cd477da1 100644
--- a/target/linux/patches/3.12.13/startup.patch
+++ b/target/linux/patches/3.12.13/startup.patch
@@ -1,12 +1,34 @@
-diff -Nur linux-3.7.3.orig/init/main.c linux-3.7.3/init/main.c
---- linux-3.7.3.orig/init/main.c 2013-01-17 17:47:40.000000000 +0100
-+++ linux-3.7.3/init/main.c 2013-01-19 15:08:13.000000000 +0100
-@@ -879,6 +880,8 @@
+diff -Nur linux-3.12.13.orig/init/initramfs.c linux-3.12.13/init/initramfs.c
+--- linux-3.12.13.orig/init/initramfs.c 2014-02-22 22:32:50.000000000 +0100
++++ linux-3.12.13/init/initramfs.c 2014-03-15 18:09:39.040618589 +0100
+@@ -622,6 +622,9 @@
+ */
+ load_default_modules();
+ }
++#ifdef CONFIG_DEVTMPFS_MOUNT
++ devtmpfs_mount("dev");
++#endif
+ return 0;
+ }
+ rootfs_initcall(populate_rootfs);
+diff -Nur linux-3.12.13.orig/init/main.c linux-3.12.13/init/main.c
+--- linux-3.12.13.orig/init/main.c 2014-02-22 22:32:50.000000000 +0100
++++ linux-3.12.13/init/main.c 2014-03-15 18:09:39.044618600 +0100
+@@ -888,6 +888,8 @@
if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
- printk(KERN_WARNING "Warning: unable to open an initial console.\n");
+ 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);
/*
+@@ -896,7 +898,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;
diff --git a/target/linux/patches/3.13.6/startup.patch b/target/linux/patches/3.13.6/startup.patch
index be4ea469d..d396b75e4 100644
--- a/target/linux/patches/3.13.6/startup.patch
+++ b/target/linux/patches/3.13.6/startup.patch
@@ -10,3 +10,28 @@ diff -Nur linux-3.13.3.orig/init/main.c linux-3.13.3/init/main.c
(void) sys_dup(0);
(void) sys_dup(0);
/*
+diff -Nur linux-3.13.6.orig/init/initramfs.c linux-3.13.6/init/initramfs.c
+--- linux-3.13.6.orig/init/initramfs.c 2014-03-07 07:07:02.000000000 +0100
++++ linux-3.13.6/init/initramfs.c 2014-03-15 12:11:31.882731916 +0100
+@@ -622,6 +622,9 @@
+ */
+ load_default_modules();
+ }
++#ifdef CONFIG_DEVTMPFS_MOUNT
++ devtmpfs_mount("dev");
++#endif
+ return 0;
+ }
+ rootfs_initcall(populate_rootfs);
+diff -Nur linux-3.13.6.orig/init/main.c linux-3.13.6/init/main.c
+--- linux-3.13.6.orig/init/main.c 2014-03-07 07:07:02.000000000 +0100
++++ linux-3.13.6/init/main.c 2014-03-15 12:13:16.459024452 +0100
+@@ -924,7 +924,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;
diff --git a/target/linux/patches/3.4.82/startup.patch b/target/linux/patches/3.4.82/startup.patch
index 4f47eddcb..c26430bcb 100644
--- a/target/linux/patches/3.4.82/startup.patch
+++ b/target/linux/patches/3.4.82/startup.patch
@@ -1,7 +1,20 @@
-diff -Nur linux-2.6.34.orig/init/main.c linux-2.6.34/init/main.c
---- linux-2.6.34.orig/init/main.c 2010-05-16 23:17:36.000000000 +0200
-+++ linux-2.6.34/init/main.c 2010-05-20 20:13:26.321613615 +0200
-@@ -889,6 +890,8 @@
+diff -Nur linux-3.4.82.orig/init/initramfs.c linux-3.4.82/init/initramfs.c
+--- linux-3.4.82.orig/init/initramfs.c 2014-02-22 19:33:35.000000000 +0100
++++ linux-3.4.82/init/initramfs.c 2014-03-15 18:46:22.674928245 +0100
+@@ -606,6 +606,9 @@
+ free_initrd();
+ #endif
+ }
++#ifdef CONFIG_DEVTMPFS_MOUNT
++ devtmpfs_mount("dev");
++#endif
+ return 0;
+ }
+ rootfs_initcall(populate_rootfs);
+diff -Nur linux-3.4.82.orig/init/main.c linux-3.4.82/init/main.c
+--- linux-3.4.82.orig/init/main.c 2014-02-22 19:33:35.000000000 +0100
++++ linux-3.4.82/init/main.c 2014-03-15 18:46:22.674928245 +0100
+@@ -873,6 +873,8 @@
if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
printk(KERN_WARNING "Warning: unable to open an initial console.\n");
@@ -10,3 +23,12 @@ diff -Nur linux-2.6.34.orig/init/main.c linux-2.6.34/init/main.c
(void) sys_dup(0);
(void) sys_dup(0);
/*
+@@ -881,7 +883,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;