swupdate-image.bb 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. SUMMARY = "Root file system image for MCX board"
  2. DESCRIPTION = "Root FS includes the following functionality: \
  3. Busybox: standard for ELDK 5.2 (syslogd removed) \
  4. mtd-utils: standard for ELDK 5.2 \
  5. base-files: standard script for ELDK 5.2 (/var/log placement changed) \
  6. tinylogin: standard for ELDK 5.2 \
  7. sysvinit: standard for ELDK 5.2 (bootlogd removed) \
  8. initscripts: modified standard script for ELDK 5.2 \
  9. "
  10. IMAGE_INSTALL = "base-files \
  11. busybox \
  12. mtd-utils \
  13. libconfig \
  14. swupdate \
  15. swupdate-www \
  16. sysvinit \
  17. initscripts-swupdate \
  18. "
  19. LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
  20. file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \
  21. "
  22. # This variable is triggered to check if sysvinit must be overwritten by a single rcS
  23. export SYSVINIT = "no"
  24. LICENSE = "MIT"
  25. IMAGE_CLASSES += " image_types_uboot"
  26. IMAGE_FSTYPES = "ext3.gz.u-boot"
  27. IMAGE_ROOTFS_SIZE = "8192"
  28. inherit image
  29. remove_locale_data_files() {
  30. printf "Post processing local %s\n" ${IMAGE_ROOTFS}${libdir}/locale
  31. rm -rf ${IMAGE_ROOTFS}${libdir}/locale
  32. }
  33. fix_inittab_swupdate () {
  34. sed -e 's/1\:2345.*/1\:2345:respawn:\/bin\/sh/' \
  35. "${IMAGE_ROOTFS}${sysconfdir}/inittab" | \
  36. sed -e 's/^z6/#&/' | \
  37. sed -e 's/S:2345.*//' \
  38. > "${IMAGE_ROOTFS}${sysconfdir}/inittab.swupdate"
  39. rm ${IMAGE_ROOTFS}${sysconfdir}/inittab
  40. mv ${IMAGE_ROOTFS}${sysconfdir}/inittab.swupdate ${IMAGE_ROOTFS}${sysconfdir}/inittab
  41. }
  42. exchange_rcs () {
  43. rm ${IMAGE_ROOTFS}${sysconfdir}/init.d/rcS
  44. mv ${IMAGE_ROOTFS}${sysconfdir}/init.d/rcS.swupdate \
  45. ${IMAGE_ROOTFS}${sysconfdir}/init.d/rcS
  46. }
  47. # remove not needed ipkg informations
  48. ROOTFS_POSTPROCESS_COMMAND += "remove_locale_data_files ; "
  49. ROOTFS_POSTPROCESS_COMMAND += "fix_inittab_swupdate ; "
  50. ROOTFS_POSTPROCESS_COMMAND += "exchange_rcs ; "