swupdate-image.bb 1.9 KB

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