diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-16 16:42:58 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-28 11:31:17 +0000 |
commit | 9d5483c37523ff3d334c98cafb848282b54962cd (patch) | |
tree | adb5f8967d92046bbd77d702caf33aeb63d5cccf /meta-poky/recipes-core/tiny-init | |
parent | ab3a71833c7f446aeed7e2aebbd3e20d484c71ff (diff) | |
download | poky-9d5483c37523ff3d334c98cafb848282b54962cd.tar.gz |
meta-yocto: Rename to meta-poky to better match its purpose
"poky" is the reference distribution for the Yocto Project. This renames
the layer within the meta-yocto repository to meta-poky, better matching
what that layer contains.
A layer.conf file is left behind as this is the only way which allows
existing builds to migrate safely to the new name. It will be removed
at some future point.
This change requires the corresponding OE-Core change to handle the
migration and the changes to the infrastructure to support this.
(From meta-yocto rev: d0c88df2e14672fca4ebbde93c5efbcd0e4fa9b6)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-poky/recipes-core/tiny-init')
-rw-r--r-- | meta-poky/recipes-core/tiny-init/files/init | 26 | ||||
-rw-r--r-- | meta-poky/recipes-core/tiny-init/files/rc.local.sample | 23 | ||||
-rw-r--r-- | meta-poky/recipes-core/tiny-init/tiny-init.bb | 30 |
3 files changed, 79 insertions, 0 deletions
diff --git a/meta-poky/recipes-core/tiny-init/files/init b/meta-poky/recipes-core/tiny-init/files/init new file mode 100644 index 0000000000..9140e9558e --- /dev/null +++ b/meta-poky/recipes-core/tiny-init/files/init | |||
@@ -0,0 +1,26 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Mount the Linux kernel virtual filesystems | ||
4 | mount none -t proc /proc | ||
5 | mount none -t sysfs /sys | ||
6 | |||
7 | # Ensure devtmpfs is mounted, it must be done manually with initramfs | ||
8 | mount none -t devtmpfs /dev | ||
9 | |||
10 | # Setup PTY infrastructure | ||
11 | mkdir /dev/pts | ||
12 | mount none -t devpts /dev/pts | ||
13 | |||
14 | ifup lo | ||
15 | |||
16 | # Allow for distro or local customizations | ||
17 | if [ -f /etc/rc.local ] ; then | ||
18 | . /etc/rc.local | ||
19 | fi | ||
20 | |||
21 | # Become session leader and try to find a real tty (e.g. ttyS0) | ||
22 | while true; do | ||
23 | setsid cttyhack sh | ||
24 | echo "Console sh exited with $?, respawning..." | ||
25 | sleep 1 | ||
26 | done | ||
diff --git a/meta-poky/recipes-core/tiny-init/files/rc.local.sample b/meta-poky/recipes-core/tiny-init/files/rc.local.sample new file mode 100644 index 0000000000..d9e198a200 --- /dev/null +++ b/meta-poky/recipes-core/tiny-init/files/rc.local.sample | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Start services and customize the boot process here. | ||
4 | echo "Running /etc/rc.local..." | ||
5 | |||
6 | # Use init scripts included with packages such as dropbear | ||
7 | #/etc/init.d/dropbear start | ||
8 | |||
9 | # Spawn a getty manually | ||
10 | #setsid /sbin/getty 115200 ttyS2 | ||
11 | |||
12 | # Print a banner | ||
13 | #echo "You are running a poky-tiny image brought to you by the Yocto Project." | ||
14 | |||
15 | # Setup a debugging environment | ||
16 | #mkdir /debugfs | ||
17 | #mount none -t debugfs /debugfs | ||
18 | |||
19 | # Load modules (note: linux-yocto-tiny does not have module support by default) | ||
20 | #modprobe yourdriver | ||
21 | |||
22 | # DO NOT run any long running tasks or loops as these will delay | ||
23 | # the /init script and the console shell. | ||
diff --git a/meta-poky/recipes-core/tiny-init/tiny-init.bb b/meta-poky/recipes-core/tiny-init/tiny-init.bb new file mode 100644 index 0000000000..4d4e34dc8b --- /dev/null +++ b/meta-poky/recipes-core/tiny-init/tiny-init.bb | |||
@@ -0,0 +1,30 @@ | |||
1 | SUMMARY = "Poky-tiny init" | ||
2 | DESCRIPTION = "Basic init system for poky-tiny" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
5 | |||
6 | PR = "r2" | ||
7 | |||
8 | RDEPENDS_${PN} = "busybox" | ||
9 | |||
10 | SRC_URI = "file://init \ | ||
11 | file://rc.local.sample \ | ||
12 | " | ||
13 | |||
14 | S = "${WORKDIR}" | ||
15 | |||
16 | do_configure() { | ||
17 | : | ||
18 | } | ||
19 | |||
20 | do_compile() { | ||
21 | : | ||
22 | } | ||
23 | |||
24 | do_install() { | ||
25 | install -d ${D}${sysconfdir} | ||
26 | install -m 0755 ${WORKDIR}/init ${D} | ||
27 | install -m 0755 ${WORKDIR}/rc.local.sample ${D}${sysconfdir} | ||
28 | } | ||
29 | |||
30 | FILES_${PN} = "/init ${sysconfdir}/rc.local.sample" | ||