Advertisement
Guest User

Untitled

a guest
Oct 6th, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. SUMMARY = "USB Mass Storage Device related systemd services"
  2. SECTION = "services"
  3. LICENSE = "CLOSED"
  4.  
  5. inherit systemd image_types
  6.  
  7. S = "${WORKDIR}"
  8.  
  9. FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
  10.  
  11. SRC_URI = "file://mass-storage-start.sh \
  12. file://mass-storage-stop.sh \
  13. file://mass-storage.service \
  14. "
  15.  
  16. FILES_${PN} = " ${bindir}/mass-storage-start.sh \
  17. ${bindir}/mass-storage-stop.sh \
  18. ${systemd_unitdir}/system/mass-storage.service \
  19. /mnt/user_data.bin \
  20. "
  21.  
  22. SYSTEMD_SERVICE_${PN} = "mass-storage.service"
  23.  
  24. do_install_append () {
  25. install -d ${D}${systemd_unitdir}/system
  26. install -m 644 ${S}/mass-storage.service ${D}${systemd_unitdir}/system
  27.  
  28. install -d ${D}${bindir}
  29. install -m 755 ${S}/mass-storage-start.sh ${D}${bindir}
  30. install -m 755 ${S}/mass-storage-stop.sh ${D}${bindir}
  31.  
  32. install -d ${D}/mnt/user_data
  33.  
  34. dd if=/dev/zero of=${D}/mnt/user_data.bin bs=512 count=1048576
  35. mkfs.vfat -n "OTDR" -S 512 -F 32 -C ${D}/mnt/user_data.bin
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement