From: Luca Ceresoli <luca@lucaceresoli.net>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC 6/6] **** DO NOT COMMIT THIS **** ugly stuff to test mdev-only /dev management
Date: Tue, 8 Sep 2015 23:28:54 +0200 [thread overview]
Message-ID: <1441747734-18730-7-git-send-email-luca@lucaceresoli.net> (raw)
In-Reply-To: <1441747734-18730-1-git-send-email-luca@lucaceresoli.net>
2 init systems (busybox, sysvinit) x 5 /dev management = 10 defconfigs.
All based on qemu_arm_versatile_defconfig + external toolchain +
read-only rootfs (to test in the worst possible conditions).
To run-test one:
./run <your_output_dir> (default "output/")
To build- and run-test all:
./test-all build
./test-all run
Not-signed-off-by: anybody
---
.gitignore | 1 +
configs/test_bb_dyn_devtmpfs_defconfig | 12 ++++++++++++
configs/test_bb_dyn_eudev_defconfig | 13 +++++++++++++
configs/test_bb_dyn_mdev_defconfig | 13 +++++++++++++
configs/test_bb_mdev_only_defconfig | 13 +++++++++++++
configs/test_bb_static_defconfig | 13 +++++++++++++
configs/test_sv_dyn_devtmpfs_defconfig | 13 +++++++++++++
configs/test_sv_dyn_eudev_defconfig | 14 ++++++++++++++
configs/test_sv_dyn_mdev_defconfig | 14 ++++++++++++++
configs/test_sv_mdev_only_defconfig | 14 ++++++++++++++
configs/test_sv_static_defconfig | 14 ++++++++++++++
run | 12 ++++++++++++
test-all | 34 ++++++++++++++++++++++++++++++++++
13 files changed, 180 insertions(+)
create mode 100644 configs/test_bb_dyn_devtmpfs_defconfig
create mode 100644 configs/test_bb_dyn_eudev_defconfig
create mode 100644 configs/test_bb_dyn_mdev_defconfig
create mode 100644 configs/test_bb_mdev_only_defconfig
create mode 100644 configs/test_bb_static_defconfig
create mode 100644 configs/test_sv_dyn_devtmpfs_defconfig
create mode 100644 configs/test_sv_dyn_eudev_defconfig
create mode 100644 configs/test_sv_dyn_mdev_defconfig
create mode 100644 configs/test_sv_mdev_only_defconfig
create mode 100644 configs/test_sv_static_defconfig
create mode 100755 run
create mode 100755 test-all
diff --git a/.gitignore b/.gitignore
index bb02d9f..9f335cc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@
*.rej
*~
*.pyc
+bld
diff --git a/configs/test_bb_dyn_devtmpfs_defconfig b/configs/test_bb_dyn_devtmpfs_defconfig
new file mode 100644
index 0000000..fdddb63
--- /dev/null
+++ b/configs/test_bb_dyn_devtmpfs_defconfig
@@ -0,0 +1,12 @@
+BR2_arm=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.2"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux-4.2.config"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_TARGET_ROOTFS_EXT2=y
+# BR2_TARGET_ROOTFS_TAR is not set
diff --git a/configs/test_bb_dyn_eudev_defconfig b/configs/test_bb_dyn_eudev_defconfig
new file mode 100644
index 0000000..bb07e99
--- /dev/null
+++ b/configs/test_bb_dyn_eudev_defconfig
@@ -0,0 +1,13 @@
+BR2_arm=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.2"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux-4.2.config"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_TARGET_ROOTFS_EXT2=y
+# BR2_TARGET_ROOTFS_TAR is not set
diff --git a/configs/test_bb_dyn_mdev_defconfig b/configs/test_bb_dyn_mdev_defconfig
new file mode 100644
index 0000000..5f6a715
--- /dev/null
+++ b/configs/test_bb_dyn_mdev_defconfig
@@ -0,0 +1,13 @@
+BR2_arm=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.2"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux-4.2.config"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_TARGET_ROOTFS_EXT2=y
+# BR2_TARGET_ROOTFS_TAR is not set
diff --git a/configs/test_bb_mdev_only_defconfig b/configs/test_bb_mdev_only_defconfig
new file mode 100644
index 0000000..e2e7ec8
--- /dev/null
+++ b/configs/test_bb_mdev_only_defconfig
@@ -0,0 +1,13 @@
+BR2_arm=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV_ONLY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.2"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux-4.2.config"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_TARGET_ROOTFS_EXT2=y
+# BR2_TARGET_ROOTFS_TAR is not set
diff --git a/configs/test_bb_static_defconfig b/configs/test_bb_static_defconfig
new file mode 100644
index 0000000..9e79fca
--- /dev/null
+++ b/configs/test_bb_static_defconfig
@@ -0,0 +1,13 @@
+BR2_arm=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_ROOTFS_DEVICE_CREATION_STATIC=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.2"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux-4.2.config"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_TARGET_ROOTFS_EXT2=y
+# BR2_TARGET_ROOTFS_TAR is not set
diff --git a/configs/test_sv_dyn_devtmpfs_defconfig b/configs/test_sv_dyn_devtmpfs_defconfig
new file mode 100644
index 0000000..b0d758b
--- /dev/null
+++ b/configs/test_sv_dyn_devtmpfs_defconfig
@@ -0,0 +1,13 @@
+BR2_arm=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_INIT_SYSV=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.2"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux-4.2.config"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_TARGET_ROOTFS_EXT2=y
+# BR2_TARGET_ROOTFS_TAR is not set
diff --git a/configs/test_sv_dyn_eudev_defconfig b/configs/test_sv_dyn_eudev_defconfig
new file mode 100644
index 0000000..a2142be
--- /dev/null
+++ b/configs/test_sv_dyn_eudev_defconfig
@@ -0,0 +1,14 @@
+BR2_arm=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_INIT_SYSV=y
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.2"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux-4.2.config"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_TARGET_ROOTFS_EXT2=y
+# BR2_TARGET_ROOTFS_TAR is not set
diff --git a/configs/test_sv_dyn_mdev_defconfig b/configs/test_sv_dyn_mdev_defconfig
new file mode 100644
index 0000000..02d6ca3
--- /dev/null
+++ b/configs/test_sv_dyn_mdev_defconfig
@@ -0,0 +1,14 @@
+BR2_arm=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_INIT_SYSV=y
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.2"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux-4.2.config"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_TARGET_ROOTFS_EXT2=y
+# BR2_TARGET_ROOTFS_TAR is not set
diff --git a/configs/test_sv_mdev_only_defconfig b/configs/test_sv_mdev_only_defconfig
new file mode 100644
index 0000000..7e7489f
--- /dev/null
+++ b/configs/test_sv_mdev_only_defconfig
@@ -0,0 +1,14 @@
+BR2_arm=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_INIT_SYSV=y
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV_ONLY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.2"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux-4.2.config"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_TARGET_ROOTFS_EXT2=y
+# BR2_TARGET_ROOTFS_TAR is not set
diff --git a/configs/test_sv_static_defconfig b/configs/test_sv_static_defconfig
new file mode 100644
index 0000000..2177aa0
--- /dev/null
+++ b/configs/test_sv_static_defconfig
@@ -0,0 +1,14 @@
+BR2_arm=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_INIT_SYSV=y
+BR2_ROOTFS_DEVICE_CREATION_STATIC=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.2"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux-4.2.config"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_TARGET_ROOTFS_EXT2=y
+# BR2_TARGET_ROOTFS_TAR is not set
diff --git a/run b/run
new file mode 100755
index 0000000..56618a4
--- /dev/null
+++ b/run
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+set -u
+
+OUTDIR=$([ -z "$1" ] && echo output || echo $1)
+
+qemu-system-arm -M versatilepb \
+ -kernel ${OUTDIR}/images/zImage \
+ -drive file=${OUTDIR}/images/rootfs.ext2,if=scsi \
+ -append "root=/dev/sda console=ttyAMA0,115200" \
+ -serial stdio -net nic,model=rtl8139 -net user
diff --git a/test-all b/test-all
new file mode 100755
index 0000000..21fdb2b
--- /dev/null
+++ b/test-all
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+set -e
+set -u
+
+usage()
+{
+ echo "Usage: $0 {build|run}"
+}
+
+if [ -z "$1" ]; then
+ usage
+ exit 1
+fi
+
+for INIT in bb sv; do
+ for DEV in static mdev_only dyn_devtmpfs dyn_eudev dyn_mdev; do
+ TARGET="${INIT}_${DEV}"
+ case "$1" in
+ build)
+ make O=bld/${TARGET} test_${TARGET}_defconfig
+ make O=bld/${TARGET}
+ ;;
+ run)
+ echo "================= running ${TARGET} ==================="
+ ./run bld/${TARGET}
+ echo "----------------- finished ${TARGET} -------------------"
+ ;;
+ *)
+ usage
+ exit 1
+ esac
+ done
+done
--
1.9.1
next prev parent reply other threads:[~2015-09-08 21:28 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-08 21:28 [Buildroot] [RFC 0/6] mdev-only /dev management (without devtmpfs) Luca Ceresoli
2015-09-08 21:28 ` [Buildroot] [RFC 1/6] Move mounting /sys from fstab to inittab Luca Ceresoli
2015-09-09 9:12 ` Arnout Vandecappelle
2015-09-08 21:28 ` [Buildroot] [RFC 2/6] system: clarify /dev management using devtmpfs + {mdev, eudev} Luca Ceresoli
2015-09-09 9:40 ` Arnout Vandecappelle
2015-09-09 10:53 ` Luca Ceresoli
2015-09-09 10:54 ` Arnout Vandecappelle
2015-09-08 21:28 ` [Buildroot] [RFC 3/6] system: add mdev-only /dev management (without devtmpfs) Luca Ceresoli
2015-09-09 9:21 ` Arnout Vandecappelle
2015-09-09 12:29 ` Luca Ceresoli
2015-09-09 12:32 ` Arnout Vandecappelle
2015-09-09 13:54 ` Thomas Petazzoni
2015-09-14 13:47 ` Luca Ceresoli
2015-09-14 22:23 ` Arnout Vandecappelle
2015-09-15 22:35 ` Luca Ceresoli
2015-09-14 20:53 ` Peter Korsgaard
2015-09-14 21:34 ` Thomas Petazzoni
2015-09-14 21:38 ` Peter Korsgaard
2015-09-15 7:30 ` Thomas Petazzoni
2015-09-15 8:09 ` Peter Korsgaard
2015-09-15 9:41 ` Thomas Petazzoni
2015-09-15 12:01 ` Peter Korsgaard
2015-09-15 12:27 ` Arnout Vandecappelle
2015-09-15 12:32 ` Peter Korsgaard
2015-09-18 16:37 ` Luca Ceresoli
2015-09-15 13:03 ` Thomas Petazzoni
2015-09-15 13:14 ` Peter Korsgaard
2015-09-15 22:34 ` Luca Ceresoli
2015-10-01 9:36 ` Luca Ceresoli
2015-10-01 10:03 ` Peter Korsgaard
2015-09-15 22:31 ` Luca Ceresoli
2015-09-16 7:32 ` Peter Korsgaard
2015-09-18 15:47 ` Luca Ceresoli
2015-09-09 9:34 ` Arnout Vandecappelle
2015-09-09 11:23 ` Thomas Petazzoni
2015-09-09 11:29 ` Thomas Petazzoni
2015-09-09 20:33 ` Arnout Vandecappelle
2015-09-14 16:07 ` Luca Ceresoli
2015-09-14 16:05 ` Luca Ceresoli
2015-09-14 19:34 ` Thomas Petazzoni
2015-09-14 20:19 ` Arnout Vandecappelle
2015-09-15 22:07 ` Luca Ceresoli
2015-09-08 21:28 ` [Buildroot] [RFC 4/6] system: strip the initial /dev for mdev-only /dev management Luca Ceresoli
2015-09-08 21:28 ` [Buildroot] [RFC 5/6] docs/manual: document "Dynamic using mdev only" " Luca Ceresoli
2015-09-09 10:39 ` Arnout Vandecappelle
2015-09-08 21:28 ` Luca Ceresoli [this message]
2015-09-09 9:26 ` [Buildroot] [RFC 0/6] mdev-only /dev management (without devtmpfs) Arnout Vandecappelle
2015-09-09 11:30 ` Thomas Petazzoni
2015-09-14 21:03 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1441747734-18730-7-git-send-email-luca@lucaceresoli.net \
--to=luca@lucaceresoli.net \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.