blob: 04a41e3d75a5c19f7a73504ae572479079aa155e [file] [log] [blame]
Brad Bishop14d0a062019-08-07 21:33:34 -04001SUMMARY = "Two partition MTD image with u-boot and kernel"
2HOMEPAGE = "https://github.com/openbmc/meta-aspeed"
3LICENSE = "MIT"
4
5inherit deploy
6
7UBOOT_SUFFIX ?= "bin"
8ASPEED_IMAGE_KERNEL_OFFSET_KB ?= "512"
9ASPEED_IMAGE_KERNEL_OFFSET_KB_aspeed-g6 ?= "640"
10ASPEED_IMAGE_SIZE_KB ?= "32768"
11ASPEED_IMAGE_KERNEL_IMAGE ?= "fitImage-${INITRAMFS_IMAGE}-${MACHINE}-${MACHINE}"
12ASPEED_IMAGE_NAME ?= "aspeed-norootfs-${MACHINE}.bin"
13
14do_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
24do_deploy() {
25 install -m644 -D ${B}/aspeed-norootfs.bin ${DEPLOYDIR}/${ASPEED_IMAGE_NAME}
26}
27
28do_compile[depends] = "virtual/kernel:do_deploy u-boot:do_deploy"
29do_fetch[noexec] = "1"
30do_unpack[noexec] = "1"
31do_patch[noexec] = "1"
32do_configure[noexec] = "1"
33do_install[noexec] = "1"
34deltask do_populate_sysroot
35do_package[noexec] = "1"
36deltask do_package_qa
37do_packagedata[noexec] = "1"
38deltask do_package_write_ipk
39deltask do_package_write_deb
40deltask do_package_write_rpm
41addtask deploy before do_build after do_compile