blob: 54c095bede32481d5d67c3d5f0f0b51df1a7a9a4 [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"
Brad Bishop14d0a062019-08-07 21:33:34 -04009ASPEED_IMAGE_SIZE_KB ?= "32768"
10ASPEED_IMAGE_KERNEL_IMAGE ?= "fitImage-${INITRAMFS_IMAGE}-${MACHINE}-${MACHINE}"
11ASPEED_IMAGE_NAME ?= "aspeed-norootfs-${MACHINE}.bin"
12
13do_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
23do_deploy() {
24 install -m644 -D ${B}/aspeed-norootfs.bin ${DEPLOYDIR}/${ASPEED_IMAGE_NAME}
25}
26
27do_compile[depends] = "virtual/kernel:do_deploy u-boot:do_deploy"
28do_fetch[noexec] = "1"
29do_unpack[noexec] = "1"
30do_patch[noexec] = "1"
31do_configure[noexec] = "1"
32do_install[noexec] = "1"
33deltask do_populate_sysroot
34do_package[noexec] = "1"
35deltask do_package_qa
36do_packagedata[noexec] = "1"
37deltask do_package_write_ipk
38deltask do_package_write_deb
39deltask do_package_write_rpm
40addtask deploy before do_build after do_compile