Advertisement
trini

u-boot.inc diff

Sep 4th, 2012
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.59 KB | None | 0 0
  1. 4,6d3
  2. < LICENSE = "GPLv2+"
  3. < LIC_FILES_CHKSUM = "file://COPYING;md5=4c6cde5df68eff615d36789dc18edd3b"
  4. <
  5. 9c6
  6. < DEPENDS = "mtd-utils"
  7. ---
  8. > inherit deploy
  9. 11d7
  10. < PACKAGE_ARCH = "${MACHINE_ARCH}"
  11. 14c10,20
  12. < EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
  13. ---
  14. > # GCC 4.5.1 builds unusable binaries using -Os, remove it from OPTFLAGS
  15. > EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} OPTFLAGS='-O2' CC='${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}'"
  16. >
  17. > python () {
  18. > if not d.getVar("UBOOT_MACHINE", True):
  19. > PN = d.getVar("PN", True)
  20. > FILE = os.path.basename(d.getVar("FILE", True))
  21. > bb.debug(1, "To build %s, see %s for instructions on \
  22. > setting up your machine config" % (PN, FILE))
  23. > raise bb.parse.SkipPackage("because UBOOT_MACHINE is not set")
  24. > }
  25. 16,19c22,27
  26. < UBOOT_MACHINE ?= "${MACHINE}_config"
  27. < UBOOT_BINARY ?= "u-boot.bin"
  28. < UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.bin"
  29. < UBOOT_SYMLINK ?= "u-boot-${MACHINE}.bin"
  30. ---
  31. > # Some versions of u-boot use .bin and others use .img. By default use .bin
  32. > # but enable individual recipes to change this value.
  33. > UBOOT_SUFFIX ?= "bin"
  34. > UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
  35. > UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}"
  36. > UBOOT_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_SUFFIX}"
  37. 22,24c30,36
  38. < do_configure () {
  39. < oe_runmake ${UBOOT_MACHINE}
  40. < }
  41. ---
  42. > # Some versions of u-boot build an SPL (Second Program Loader) image that
  43. > # should be packaged along with the u-boot binary as well as placed in the
  44. > # deploy directory. For those versions they can set the following variables
  45. > # to allow packaging the SPL.
  46. > SPL_BINARY ?= ""
  47. > SPL_IMAGE ?= "${SPL_BINARY}-${MACHINE}-${PV}-${PR}"
  48. > SPL_SYMLINK ?= "${SPL_BINARY}-${MACHINE}"
  49. 29a42
  50. > oe_runmake ${UBOOT_MACHINE}
  51. 34,42c47,55
  52. < install -d ${D}/boot
  53. < install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
  54. < ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
  55. <
  56. < if [ -e ${WORKDIR}/fw_env.config ] ; then
  57. < install -d ${D}${sysconfdir}
  58. < install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
  59. < fi
  60. <
  61. ---
  62. > install -d ${D}/boot
  63. > install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
  64. > ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
  65. >
  66. > if [ "x${SPL_BINARY}" != "x" ]
  67. > then
  68. > install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
  69. > ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY}
  70. > fi
  71. 45,51c58
  72. < FILES_${PN} = "/boot ${sysconfdir}"
  73. < # no gnu_hash in uboot.bin, by design, so skip QA
  74. < INSANE_SKIP_${PN} = "1"
  75. <
  76. < inherit deploy
  77. <
  78. < addtask deploy before do_package after do_compile
  79. ---
  80. > FILES_${PN} = "/boot"
  81. 54,55c61,62
  82. < install -d ${DEPLOY_DIR_IMAGE}
  83. < install ${S}/${UBOOT_BINARY} ${DEPLOY_DIR_IMAGE}/${UBOOT_IMAGE}
  84. ---
  85. > install -d ${DEPLOYDIR}
  86. > install ${S}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
  87. 57,58c64,65
  88. < cd ${DEPLOY_DIR_IMAGE}
  89. < rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK}
  90. ---
  91. > cd ${DEPLOYDIR}
  92. > rm -f ${UBOOT_SYMLINK}
  93. 60d66
  94. < ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}
  95. 62,67c68,74
  96. < if [ -e ${S}/MLO ] ; then
  97. < install ${S}/MLO ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE}-${PV}
  98. < rm -f ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE} ${DEPLOY_DIR_IMAGE}/MLO
  99. < ln -sf MLO-${MACHINE}-${PV} ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE}
  100. < ln -sf MLO-${MACHINE}-${PV} ${DEPLOY_DIR_IMAGE}/MLO
  101. < fi
  102. ---
  103. > if [ "x${SPL_BINARY}" != "x" ]
  104. > then
  105. > install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
  106. > rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}
  107. > ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARY}
  108. > ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK}
  109. > fi
  110. 68a76,77
  111. >
  112. > addtask deploy before do_build after do_compile
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement