Adding serial console to g_mulit

Should be obvious, but I'm saving my notes here...

cd /etc/systemd/system/getty.target.wants
ln -s /lib/systemd/system/serial-getty@.service serial-getty@ttyGS0.service

root@beaglebone:/lib/systemd/system# cat udhcpd.service
[Unit]
Description=DHCP server for USB0 network gadget
After=dev-usb0.device

[Service]
ExecStart=/usr/sbin/udhcpd -f -S /etc/udhcpd.conf
ExecStop=/bin/kill -TERM $MAINPID
KillSignal=SIGINT

[Install]
WantedBy=basic.target

root@beaglebone:/lib/systemd/system# cat storage-gadget-init.service
[Unit]
Description=Start usb mass storage gadget
After=dev-mmcblk0p1.device

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/g-ether-load.sh

[Install]
WantedBy=basic.target

Can you put this in the “standard” Angstrom distribution from beaglebone.org?

It is in there now.

!@#$% SystemD has rendered all my Unix/Linux experience and knowledge useless for issues such as this. Not obvious at all.

Shouldn’t there be a systemctl equivalent to the “cd/ln -s” that you did?

Probably. I don’t know it.

And shouldn’t I be able to get systemd to reread the config and start the getty without having to reboot? I tried “systemctl daemon-reload” and it killed but failed to restart sshd/dropbear so I had to power cycle the beagle to get back in.

I didn’t need to restart, but I probably did do some ‘systemctl restart X’ stuff I don’t recall.

But thank you for providing this as I am now able to connect over the gadget serial interface. Woo Hoo…

Super. It should be there by default now on new images.