swupdate-image.bb 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. USE_DEVFS = "1"
  20. #IMAGE_DEVICE_TABLES = "files/device_table-minimal.txt"
  21. LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
  22. file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \
  23. "
  24. # This variable is triggered to check if sysvinit must be overwritten by a single rcS
  25. export SYSVINIT = "no"
  26. LICENSE = "MIT"
  27. IMAGE_CLASSES += " image_types_uboot"
  28. IMAGE_FSTYPES = "ext3.gz.u-boot"
  29. IMAGE_ROOTFS_SIZE = "8192"
  30. inherit image
  31. remove_locale_data_files() {
  32. printf "Post processing local %s\n" ${IMAGE_ROOTFS}${libdir}/locale
  33. rm -rf ${IMAGE_ROOTFS}${libdir}/locale
  34. }
  35. fix_inittab_swupdate () {
  36. sed -e 's/1\:2345.*/1\:2345:respawn:\/bin\/sh/' \
  37. "${IMAGE_ROOTFS}${sysconfdir}/inittab" | \
  38. sed -e 's/^z6/#&/' | \
  39. sed -e 's/.*getty.*//' \
  40. > "${IMAGE_ROOTFS}${sysconfdir}/inittab.swupdate"
  41. rm ${IMAGE_ROOTFS}${sysconfdir}/inittab
  42. mv ${IMAGE_ROOTFS}${sysconfdir}/inittab.swupdate ${IMAGE_ROOTFS}${sysconfdir}/inittab
  43. }
  44. exchange_rcs () {
  45. rm ${IMAGE_ROOTFS}${sysconfdir}/init.d/rcS
  46. mv ${IMAGE_ROOTFS}${sysconfdir}/init.d/rcS.swupdate \
  47. ${IMAGE_ROOTFS}${sysconfdir}/init.d/rcS
  48. }
  49. # remove not needed ipkg informations
  50. ROOTFS_POSTPROCESS_COMMAND += "remove_locale_data_files ; "
  51. ROOTFS_POSTPROCESS_COMMAND += "fix_inittab_swupdate ; "
  52. ROOTFS_POSTPROCESS_COMMAND += "exchange_rcs ; "