u-boot-tools_2018.07.bb 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. require u-boot-common_${PV}.inc
  2. SUMMARY = "U-Boot bootloader tools"
  3. DEPENDS += "openssl"
  4. PROVIDES = "${MLPREFIX}u-boot-mkimage ${MLPREFIX}u-boot-mkenvimage"
  5. PROVIDES_class-native = "u-boot-mkimage-native u-boot-mkenvimage-native"
  6. PACKAGES += "${PN}-mkimage ${PN}-mkenvimage"
  7. # Required for backward compatibility with "u-boot-mkimage-xxx.bb"
  8. RPROVIDES_${PN}-mkimage = "u-boot-mkimage"
  9. RREPLACES_${PN}-mkimage = "u-boot-mkimage"
  10. RCONFLICTS_${PN}-mkimage = "u-boot-mkimage"
  11. EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
  12. EXTRA_OEMAKE_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
  13. EXTRA_OEMAKE_class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
  14. do_compile () {
  15. oe_runmake sandbox_defconfig
  16. # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and
  17. # generating it requires bin2header tool, which for target build
  18. # is built with target tools and thus cannot be executed on host.
  19. sed -i "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" .config
  20. oe_runmake cross_tools NO_SDL=1
  21. }
  22. do_install () {
  23. install -d ${D}${bindir}
  24. # mkimage
  25. install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage
  26. ln -sf uboot-mkimage ${D}${bindir}/mkimage
  27. # mkenvimage
  28. install -m 0755 tools/mkenvimage ${D}${bindir}/uboot-mkenvimage
  29. ln -sf uboot-mkenvimage ${D}${bindir}/mkenvimage
  30. }
  31. ALLOW_EMPTY_${PN} = "1"
  32. FILES_${PN} = ""
  33. FILES_${PN}-mkimage = "${bindir}/uboot-mkimage ${bindir}/mkimage"
  34. FILES_${PN}-mkenvimage = "${bindir}/uboot-mkenvimage ${bindir}/mkenvimage"
  35. RDEPENDS_${PN}-mkimage += "dtc"
  36. RDEPENDS_${PN} += "${PN}-mkimage ${PN}-mkenvimage"
  37. RDEPENDS_${PN}_class-native = ""
  38. BBCLASSEXTEND = "native nativesdk"