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" |
Brad Bishop | 14d0a06 | 2019-08-07 21:33:34 -0400 | [diff] [blame] | 9 | ASPEED_IMAGE_SIZE_KB ?= "32768" |
| 10 | ASPEED_IMAGE_KERNEL_IMAGE ?= "fitImage-${INITRAMFS_IMAGE}-${MACHINE}-${MACHINE}" |
| 11 | ASPEED_IMAGE_NAME ?= "aspeed-norootfs-${MACHINE}.bin" |
| 12 | |
| 13 | do_compile() { |
| 14 | dd if=/dev/zero bs=1k count=${ASPEED_IMAGE_SIZE_KB} | \ |
| 15 | tr '\000' '\377' > ${B}/aspeed-norootfs.bin |
| 16 | dd if=${DEPLOY_DIR_IMAGE}/u-boot.${UBOOT_SUFFIX} of=${B}/aspeed-norootfs.bin \ |
| 17 | conv=notrunc |
| 18 | dd if=${DEPLOY_DIR_IMAGE}/${ASPEED_IMAGE_KERNEL_IMAGE} \ |
| 19 | of=${B}/aspeed-norootfs.bin conv=notrunc \ |
| 20 | seek=${ASPEED_IMAGE_KERNEL_OFFSET_KB} bs=1k |
| 21 | } |
| 22 | |
| 23 | do_deploy() { |
| 24 | install -m644 -D ${B}/aspeed-norootfs.bin ${DEPLOYDIR}/${ASPEED_IMAGE_NAME} |
| 25 | } |
| 26 | |
| 27 | do_compile[depends] = "virtual/kernel:do_deploy u-boot:do_deploy" |
| 28 | do_fetch[noexec] = "1" |
| 29 | do_unpack[noexec] = "1" |
| 30 | do_patch[noexec] = "1" |
| 31 | do_configure[noexec] = "1" |
| 32 | do_install[noexec] = "1" |
| 33 | deltask do_populate_sysroot |
| 34 | do_package[noexec] = "1" |
| 35 | deltask do_package_qa |
| 36 | do_packagedata[noexec] = "1" |
| 37 | deltask do_package_write_ipk |
| 38 | deltask do_package_write_deb |
| 39 | deltask do_package_write_rpm |
| 40 | addtask deploy before do_build after do_compile |