swupdate-image.bb 2.0 KB

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