Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | python __anonymous () { |
| 2 | kerneltypes = set((d.getVar("KERNEL_IMAGETYPE") or "").split()) |
| 3 | kerneltypes |= set((d.getVar("KERNEL_IMAGETYPES") or "").split()) |
| 4 | if any(t.startswith("simpleImage.") for t in kerneltypes): |
| 5 | # Enable building of simpleImage |
| 6 | bb.build.addtask('do_prep_simpleimage', 'do_compile', 'do_configure', d) |
| 7 | uarch = d.getVar("UBOOT_ARCH") |
| 8 | if uarch == "microblaze": |
| 9 | d.appendVarFlag('do_prep_simpleimage', 'depends', ' virtual/dtb:do_populate_sysroot') |
| 10 | } |
| 11 | |
| 12 | do_prep_simpleimage[dirs] += "${B}" |
| 13 | do_prep_simpleimage () { |
| 14 | install -d ${B}/arch/${ARCH}/boot/dts |
| 15 | for type in ${KERNEL_IMAGETYPES} ; do |
| 16 | if [[ "${type}" =~ "simpleImage" ]] && [ ${ARCH} = "microblaze" ]; then |
| 17 | ext="${type##*.}" |
| 18 | cp ${RECIPE_SYSROOT}/boot/devicetree/${ext}.dtb ${B}/arch/${ARCH}/boot/dts/ |
| 19 | fi |
| 20 | done |
| 21 | } |
| 22 | |