This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/PROCESSOR-SDK-AM335X: Configuration and usage of systemd

Part Number: PROCESSOR-SDK-AM335X


Tool/software: Linux

Hi,

Is it possible to disable systemd, or is it the only way to run the linux system built with this SDK? (processor SDK 03.03)

I tried to optimize the linux boot time by disabling the drivers in kernel config and device tree.

Also disabled all the services on the target in the systemd.

However, when kernel boots I can still see systemd starting things that I dont necessarily want to be started.

Is it possible to disable systemd or at least configure it?

The tutorials and suggestions I find refer to the services which I already disabled.

As an example of what goes wrong I set up the backlight in the device tree to run a PWM with 0% duty cycle as a default.

And this is initialised correctly during the kernel boot.

But after a few seconds systemd does something that changes the duty cycle to 100%:

[  OK  ] Created slice system-systemd\x2dbacklight.slice.

Is it possible to configure what systemd does?

All suggestions or explanations how to properly use systemd are welcome.

Kind regards,

Ugnius

  • Hi Ugnius,

    The linked below articles give some information about how to optimize booting time:
    processors.wiki.ti.com/.../Boot_Time_Optimization
    processors.wiki.ti.com/.../Optimize_Linux_Boot_Time

    You can use "systemctl disable <service>" but you should be careful.

    BR
    Tsvetolin Shulev
  • Hello,

    There are alternatives to systemd (initd etc..), but its recommended to use systemd as most of the systems are now using it.
    Yes you can disable/enable/start/stop services, refer [1] for more detailed explanation.

    [1] fedoraproject.org/.../Systemd

    Cheers,
    --Prabhakar Lad
  • Hi Prabhakar,

    I know I can disable services and I did that.
    But some units are not services:

    [ 5.557075] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 10 bits of entropy available)
    [ 5.625143] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 10 bits of entropy available)
    [ 5.676339] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 10 bits of entropy available)
    [ 5.729751] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 10 bits of entropy available)
    [ 5.851200] random: systemd: uninitialized urandom read (16 bytes read, 10 bits of entropy available)
    [ 5.884846] random: systemd: uninitialized urandom read (16 bytes read, 10 bits of entropy available)
    [ 5.894858] random: systemd: uninitialized urandom read (16 bytes read, 10 bits of entropy available)
    [ 5.905071] random: systemd: uninitialized urandom read (16 bytes read, 10 bits of entropy available)


    [ OK ] Created slice system-systemd\x2dbacklight.slice.
    [ 11.351871] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    Starting Load/Save Screen Backlight...htness of backlight:backlight...

    Can I somehow disable these?


    I actually disabled all of the services:

    root@am335x-evm:~# systemctl list-unit-files | grep enabled
    root@am335x-evm:~#

    But in the kernel boot log it still prints:

    [ OK ] Started matrix-gui-2.0.service.
    [ OK ] Started thttpd.service.
    [ OK ] Started weston.service.
    [ OK ] Started busybox-udhcpd.service.
    Starting rng-tools.service...
    [ OK ] Started rng-tools.service.
    Starting parse-ip.service...
    Starting thermal-zone-init.service...
    [ OK ] Started parse-ip.service.

    Does it go through the init scripts even when services are disabled?

    Kind regards,
    Ugnius
  • Hi Tsvetolin,

    Looking through the links you posted they do the modifications for the old SDK that use kernel config and board .c file. There is no systemd in that SDK build.

    I have services disabled but it is still loading units that are not services.

    Kind regards,
    Ugnius
  • Hello,

    Referring [1] you can disable it by setting systemd.restore_state=0 in kernel command line. Refer [2] if you are interested in disabling any other features aswel.

    [1] www.freedesktop.org/.../systemd-backlight@.service.html
    [2] www.freedesktop.org/.../kernel-command-line.html

    Cheers,
    --Prabhakar Lad