summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-06-28 16:21:44 +0200
committerKoen Kooi <koen@dominion.thruhere.net>2011-06-28 16:58:20 +0200
commit8a12ecca32766ecdceb72cae76e93f8aadcf3669 (patch)
treedbae3fc8089a5f63e472b8c93c560d1932d3542a /meta-oe
parent15a5642b2a4df41dc0adf9d250cd5085eaf1d69b (diff)
downloadmeta-openembedded-8a12ecca32766ecdceb72cae76e93f8aadcf3669.tar.gz
systemd: move machine specific package out to a new recipe
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-core/systemd/systemd-serialgetty.bb43
-rw-r--r--meta-oe/recipes-core/systemd/systemd-serialgetty/serial-getty@.service (renamed from meta-oe/recipes-core/systemd/systemd/serial-getty@.service)0
-rw-r--r--meta-oe/recipes-core/systemd/systemd_git.bb26
3 files changed, 45 insertions, 24 deletions
diff --git a/meta-oe/recipes-core/systemd/systemd-serialgetty.bb b/meta-oe/recipes-core/systemd/systemd-serialgetty.bb
new file mode 100644
index 000000000..acc676837
--- /dev/null
+++ b/meta-oe/recipes-core/systemd/systemd-serialgetty.bb
@@ -0,0 +1,43 @@
1require systemd_git.bb
2
3SRC_URI = "git://anongit.freedesktop.org/systemd;protocol=git \
4 file://serial-getty@.service \
5 "
6
7DESCRIPTION = "Systemd serial config"
8SERIAL_CONSOLE ?= "115200 /dev/ttyS0"
9
10do_configure() {
11 :
12}
13
14do_compile() {
15 :
16}
17
18def get_baudrate(bb, d):
19 return bb.data.getVar('SERIAL_CONSOLE', d, 1).split()[0]
20
21def get_console(bb, d):
22 return bb.data.getVar('SERIAL_CONSOLE', d, 1).split()[1]
23
24do_install() {
25 if [ ! ${@get_baudrate(bb, d)} = "" ]; then
26 sed -i -e s/\@BAUDRATE\@/${@get_baudrate(bb, d)}/g ${WORKDIR}/serial-getty@.service
27 install -d ${D}${base_libdir}/systemd/system/
28 install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/
29 install ${WORKDIR}/serial-getty@.service ${D}${base_libdir}/systemd/system/
30 ln -sf ${base_libdir}/systemd/system/serial-getty@.service \
31 ${D}${sysconfdir}/systemd/system/getty.target.wants/serial-getty@${@get_console(bb, d)}.service
32 fi
33}
34
35PACKAGES = "{$PN} ${PN}-dbg ${PN}-dev ${PN}-doc"
36
37RRECOMMENDS_${PN} = ""
38RDEPENDS_${PN} = "systemd"
39
40# This is a machine specific file
41FILES_${PN} = "${base_libdir}/systemd/system/serial-getty@.service ${sysconfdir}/systemd/system/getty.target.wants/getty@${@get_console(bb, d)}.service"
42PACKAGE_ARCH = "${MACHINE_ARCH}"
43
diff --git a/meta-oe/recipes-core/systemd/systemd/serial-getty@.service b/meta-oe/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
index daf0dac72..daf0dac72 100644
--- a/meta-oe/recipes-core/systemd/systemd/serial-getty@.service
+++ b/meta-oe/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
diff --git a/meta-oe/recipes-core/systemd/systemd_git.bb b/meta-oe/recipes-core/systemd/systemd_git.bb
index dff299ee0..465a7f6dc 100644
--- a/meta-oe/recipes-core/systemd/systemd_git.bb
+++ b/meta-oe/recipes-core/systemd/systemd_git.bb
@@ -23,7 +23,6 @@ SRCREV = "ae556c210942cb6986c6d77b58505b5daa66bbe2"
23 23
24SRC_URI = "git://anongit.freedesktop.org/systemd;protocol=git \ 24SRC_URI = "git://anongit.freedesktop.org/systemd;protocol=git \
25 file://0001-systemd-disable-xml-file-stuff-and-introspection.patch \ 25 file://0001-systemd-disable-xml-file-stuff-and-introspection.patch \
26 file://serial-getty@.service \
27 " 26 "
28 27
29S = "${WORKDIR}/git" 28S = "${WORKDIR}/git"
@@ -38,37 +37,16 @@ EXTRA_OECONF = " --with-distro=${SYSTEMDDISTRO} \
38 --disable-gtk \ 37 --disable-gtk \
39 " 38 "
40 39
41def get_baudrate(bb, d):
42 return bb.data.getVar('SERIAL_CONSOLE', d, 1).split()[0]
43
44def get_console(bb, d):
45 return bb.data.getVar('SERIAL_CONSOLE', d, 1).split()[1]
46
47do_install() {
48 autotools_do_install
49
50 if [ ! ${@get_baudrate(bb, d)} = "" ]; then
51 sed -i -e s/\@BAUDRATE\@/${@get_baudrate(bb, d)}/g ${WORKDIR}/serial-getty@.service
52 install ${WORKDIR}/serial-getty@.service ${D}${base_libdir}/systemd/system/
53 ln -sf ${base_libdir}/systemd/system/serial-getty@.service \
54 ${D}${sysconfdir}/systemd/system/getty.target.wants/serial-getty@${@get_console(bb, d)}.service
55 fi
56}
57
58# ARM doesn't support hugepages, so don't try to mount them 40# ARM doesn't support hugepages, so don't try to mount them
59do_install_append_arm() { 41do_install_append_arm() {
60 rm -f ${D}${base_libdir}/systemd/system/*hugepages.mount 42 rm -f ${D}${base_libdir}/systemd/system/*hugepages.mount
61 rm -f ${D}${base_libdir}/systemd/system/*/*hugepages.mount 43 rm -f ${D}${base_libdir}/systemd/system/*/*hugepages.mount
62} 44}
63 45
64PACKAGES =+ "${PN}-gui ${PN}-serialgetty" 46PACKAGES =+ "${PN}-gui"
65 47
66FILES_${PN}-gui = "${bindir}/systemadm" 48FILES_${PN}-gui = "${bindir}/systemadm"
67 49
68# This is a machine specific file
69FILES_${PN}-serialgetty = "${base_libdir}/systemd/system/serial-getty@.service ${sysconfdir}/systemd/system/getty.target.wants/getty@${@get_console(bb, d)}.service"
70PACKAGE_ARCH_${PN}-serialgetty = "${MACHINE_ARCH}"
71
72FILES_${PN} = " ${base_bindir}/* \ 50FILES_${PN} = " ${base_bindir}/* \
73 ${datadir}/dbus-1/services \ 51 ${datadir}/dbus-1/services \
74 ${datadir}/dbus-1/system-services \ 52 ${datadir}/dbus-1/system-services \
@@ -94,7 +72,7 @@ RDEPENDS_${PN} += "dbus-systemd udev-systemd"
94# of blacklist support, so use proper modprobe from module-init-tools 72# of blacklist support, so use proper modprobe from module-init-tools
95# And pull in the kernel modules mentioned in INSTALL 73# And pull in the kernel modules mentioned in INSTALL
96RRECOMMENDS_${PN} += "kbd kbd-consolefonts \ 74RRECOMMENDS_${PN} += "kbd kbd-consolefonts \
97 ${PN}-serialgetty \ 75 systemd-serialgetty \
98 util-linux-agetty \ 76 util-linux-agetty \
99 module-init-tools \ 77 module-init-tools \
100 kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \ 78 kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \