Brad Bishop | 14d0a06 | 2019-08-07 21:33:34 -0400 | [diff] [blame] | 1 | SUMMARY = "Two partition MTD image with u-boot and kernel" |
| 2 | HOMEPAGE = "https://github.com/openbmc/meta-aspeed" |
| 3 | LICENSE = "MIT" |
| 4 | |
| 5 | inherit deploy |
| 6 | |
| 7 | UBOOT_SUFFIX ?= "bin" |
| 8 | ASPEED_IMAGE_KERNEL_OFFSET_KB ?= "512" |
| 9 | ASPEED_IMAGE_KERNEL_OFFSET_KB_aspeed-g6 ?= "640" |
| 10 | ASPEED_IMAGE_SIZE_KB ?= "32768" |
| 11 | ASPEED_IMAGE_KERNEL_IMAGE ?= "fitImage-${INITRAMFS_IMAGE}-${MACHINE}-${MACHINE}" |
| 12 | ASPEED_IMAGE_NAME ?= "aspeed-norootfs-${MACHINE}.bin" |
| 13 | |
| 14 | do_compile() { |
| 15 | dd if=/dev/zero bs=1k count=${ASPEED_IMAGE_SIZE_KB} | \ |
| 16 | tr '\000' '\377' > ${B}/aspeed-norootfs.bin |
| 17 | dd if=${DEPLOY_DIR_IMAGE}/u-boot.${UBOOT_SUFFIX} of=${B}/aspeed-norootfs.bin \ |
| 18 | conv=notrunc |
| 19 | dd if=${DEPLOY_DIR_IMAGE}/${ASPEED_IMAGE_KERNEL_IMAGE} \ |
| 20 | of=${B}/aspeed-norootfs.bin conv=notrunc \ |
| 21 | seek=${ASPEED_IMAGE_KERNEL_OFFSET_KB} bs=1k |
| 22 | } |
| 23 | |
| 24 | do_deploy() { |
| 25 | install -m644 -D ${B}/aspeed-norootfs.bin ${DEPLOYDIR}/${ASPEED_IMAGE_NAME} |
| 26 | } |
| 27 | |
| 28 | do_compile[depends] = "virtual/kernel:do_deploy u-boot:do_deploy" |
| 29 | do_fetch[noexec] = "1" |
| 30 | do_unpack[noexec] = "1" |
| 31 | do_patch[noexec] = "1" |
| 32 | do_configure[noexec] = "1" |
| 33 | do_install[noexec] = "1" |
| 34 | deltask do_populate_sysroot |
| 35 | do_package[noexec] = "1" |
| 36 | deltask do_package_qa |
| 37 | do_packagedata[noexec] = "1" |
| 38 | deltask do_package_write_ipk |
| 39 | deltask do_package_write_deb |
| 40 | deltask do_package_write_rpm |
| 41 | addtask deploy before do_build after do_compile |