Difference between revisions of "ECE497 Notes on systemd"
From eLinux.org
m (Initial page) |
m (→Gadgets) |
||
| (8 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
| − | [[Category:ECE497]] | + | [[Category:ECE497 |Notes sys]] |
{{YoderHead}} | {{YoderHead}} | ||
| Line 5: | Line 5: | ||
[https://www.linux.com/learn/tutorials/524577-here-we-go-again-another-linux-init-intro-to-systemd/ Here], [https://www.linux.com/learn/tutorials/527639-managing-services-on-linux-with-systemd/ here] and [https://www.linux.com/learn/tutorials/539856-more-systemd-fun-the-blame-game-and-stopping-services-with-prejudice/ here] are some tutorials that look good. | [https://www.linux.com/learn/tutorials/524577-here-we-go-again-another-linux-init-intro-to-systemd/ Here], [https://www.linux.com/learn/tutorials/527639-managing-services-on-linux-with-systemd/ here] and [https://www.linux.com/learn/tutorials/539856-more-systemd-fun-the-blame-game-and-stopping-services-with-prejudice/ here] are some tutorials that look good. | ||
| + | |||
| + | [http://www.freedesktop.org/wiki/Software/systemd/FrequentlyAskedQuestions Here] is information on runlevels. | ||
| + | |||
| + | [http://crashmag.net/useful-systemd-commands Here] is a nice list of useful commands. | ||
| + | |||
| + | [http://www.freedesktop.org/wiki/Software/systemd/TipsAndTricks Tips and Tricks] | ||
| + | |||
| + | === Gadgets === | ||
| + | I found these gadgets | ||
| + | network-gadget-init.service storage-gadget-init.service | ||
| + | |||
| + | in | ||
| + | |||
| + | /lib/systemd/system | ||
| + | |||
| + | /usr/bin/update-image-info-on-mmcblk0p1.sh | ||
| + | |||
| + | is what creates the info.txt file. | ||
| + | |||
| + | beagle$ '''mount /dev/mmcblk0p1 /mnt''' | ||
| + | |||
| + | Here's a way to see what gadgets are out there | ||
| + | |||
| + | beagle$ '''systemctl --all | grep gadget''' | ||
| + | sys-devi...et-usb0.device loaded active plugged /sys/devices/platform/omap/musb-ti81xx/musb-hdrc.0/gadget/net/usb0 | ||
| + | network-...t-init.service loaded active exited Start USB Ethernet gadget | ||
| + | storage-...t-init.service loaded inactive dead Start usb mass storage gadget | ||
| + | udhcpd.service loaded active running DHCP server for USB0 network gadget | ||
| + | |||
| + | or | ||
| + | |||
| + | systemctl --all '''--full''' | grep gadget | ||
| + | sys-devices-platform-omap-musb\x2dti81xx-musb\x2dhdrc.0-gadget-net-usb0.device loaded active plugged /sys/devices/platform/omap/musb-ti81xx/musb-hdrc.0/gadget/net/usb0 | ||
| + | network-gadget-init.service loaded active exited Start USB Ethernet gadget | ||
| + | storage-gadget-init.service loaded inactive dead Start usb mass storage gadget | ||
| + | udhcpd.service loaded active running DHCP server for USB0 network gadget | ||
| + | |||
| + | Where | ||
| + | '''network-...t-init.service''' = '''network-gadget-init.service''' | ||
| + | '''storage-...t-init.service''' = '''storage-gadget-init.service''' | ||
| + | |||
| + | '''/etc/udhcpd.conf''' is what assigned 192.168.7.1 to the host computer. | ||
| + | |||
| + | To stop the ethernet over USB and start the storage over USB for the current session | ||
| + | |||
| + | beagle$ '''/bin/systemctl stop storage-gadget-init.service''' | ||
| + | beagle$ '''/bin/systemctl start network-gadget-init.service''' | ||
| + | |||
| + | To go the other way: | ||
| + | |||
| + | beagle$ '''g-ether-start-service.sh''' | ||
| + | |||
| + | To keep the storage gadget from running on boot up. (I'm still checking this.) | ||
| + | |||
| + | beagle$ '''systemctl disable storage-gadget-init.service''' | ||
{{YoderFoot}} | {{YoderFoot}} | ||
Revision as of 13:11, 19 September 2012
Embedded Linux Class by Mark A. Yoder
The new BeagleImages use systemd for user space initialization.
Here, here and here are some tutorials that look good.
Here is information on runlevels.
Here is a nice list of useful commands.
Gadgets
I found these gadgets
network-gadget-init.service storage-gadget-init.service
in
/lib/systemd/system
/usr/bin/update-image-info-on-mmcblk0p1.sh
is what creates the info.txt file.
beagle$ mount /dev/mmcblk0p1 /mnt
Here's a way to see what gadgets are out there
beagle$ systemctl --all | grep gadget sys-devi...et-usb0.device loaded active plugged /sys/devices/platform/omap/musb-ti81xx/musb-hdrc.0/gadget/net/usb0 network-...t-init.service loaded active exited Start USB Ethernet gadget storage-...t-init.service loaded inactive dead Start usb mass storage gadget udhcpd.service loaded active running DHCP server for USB0 network gadget
or
systemctl --all --full | grep gadget sys-devices-platform-omap-musb\x2dti81xx-musb\x2dhdrc.0-gadget-net-usb0.device loaded active plugged /sys/devices/platform/omap/musb-ti81xx/musb-hdrc.0/gadget/net/usb0 network-gadget-init.service loaded active exited Start USB Ethernet gadget storage-gadget-init.service loaded inactive dead Start usb mass storage gadget udhcpd.service loaded active running DHCP server for USB0 network gadget
Where
network-...t-init.service = network-gadget-init.service storage-...t-init.service = storage-gadget-init.service
/etc/udhcpd.conf is what assigned 192.168.7.1 to the host computer.
To stop the ethernet over USB and start the storage over USB for the current session
beagle$ /bin/systemctl stop storage-gadget-init.service beagle$ /bin/systemctl start network-gadget-init.service
To go the other way:
beagle$ g-ether-start-service.sh
To keep the storage gadget from running on boot up. (I'm still checking this.)
beagle$ systemctl disable storage-gadget-init.service
Embedded Linux Class by Mark A. Yoder