[Buildroot] [PATCH 26/38] sunxi-mali: systemd support

Maxime Hadjinlian maxime.hadjinlian at gmail.com
Mon Jul 13 18:08:35 UTC 2015


Hi Alex, all

On Sat, May 23, 2015 at 12:07 PM, Alex Suykov <alex.suykov at gmail.com> wrote:
> The startup script too complex to embed it completely into
> the .service file, so it is left as a standalone script.
>
> Since there is really nothing sysv-specific there,
> the actual initscript is used without any changes.
>
> Signed-off-by: Alex Suykov <alex.suykov at gmail.com>
> ---
>  package/sunxi-mali/mali.service  | 11 +++++++++++
>  package/sunxi-mali/sunxi-mali.mk | 10 ++++++++++
>  2 files changed, 21 insertions(+)
>  create mode 100644 package/sunxi-mali/mali.service
>
> diff --git a/package/sunxi-mali/mali.service b/package/sunxi-mali/mali.service
> new file mode 100644
> index 0000000..807989c
> --- /dev/null
> +++ b/package/sunxi-mali/mali.service
> @@ -0,0 +1,11 @@
> +[Unit]
> +Description=Mali graphics driver
> +
> +[Service]
> +Type=oneshot
> +ExecStart=/usr/lib/systemd/scripts/mali start
> +ExecStop=/usr/lib/systemd/scripts/mali stop
> +RemainAfterExit=yes
> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git a/package/sunxi-mali/sunxi-mali.mk b/package/sunxi-mali/sunxi-mali.mk
> index c6900c8..a529e2d 100644
> --- a/package/sunxi-mali/sunxi-mali.mk
> +++ b/package/sunxi-mali/sunxi-mali.mk
> @@ -80,4 +80,14 @@ define SUNXI_MALI_INSTALL_INIT_SYSV
>                 $(TARGET_DIR)/etc/init.d/S80mali
>  endef
>
> +define SUNXI_MALI_INSTALL_INIT_SYSTEMD
> +       $(INSTALL) -D -m 755 package/sunxi-mali/S80mali \
> +               $(TARGET_DIR)/usr/lib/systemd/scripts/mali
I'm not very fond of placing a binary in '/usr/lib/...'.
I think it would be better to install into '/usr/sbin'

You patch will be marked as "Changes Requested" in patchwork.

> +       $(INSTALL) -D -m 644 package/sunxi-mali/mali.service \
> +               $(TARGET_DIR)/usr/lib/systemd/system/mali.service
> +       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
> +       ln -sf /usr/lib/systemd/system/mali.service \
> +               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/mali.service
> +endef
> +
>  $(eval $(generic-package))
> --
> 2.0.3
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot


More information about the buildroot mailing list