diff options
Diffstat (limited to 'meta-netboot/classes/netboot.bbclass')
-rw-r--r-- | meta-netboot/classes/netboot.bbclass | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/meta-netboot/classes/netboot.bbclass b/meta-netboot/classes/netboot.bbclass new file mode 100644 index 000000000..0bb2452ad --- /dev/null +++ b/meta-netboot/classes/netboot.bbclass @@ -0,0 +1,26 @@ +# Enable network bootable image and initrd/initramfs + +# add image classes for uboot +IMAGE_CLASSES += "${@'image_types_uboot' if (d.getVar("KERNEL_IMAGETYPE", True) == "uImage") else ''}" + +python () { + d.appendVar("IMAGE_FSTYPES"," ext4") + + if (bb.utils.contains("IMAGE_FSTYPES","live",True,False,d)): + # typical case for Minnowboard Max + d.setVar("INITRD_IMAGE","initramfs-netboot-image") + d.setVar("INITRD","%s/%s-%s.ext4.gz" % ( + d.getVar("DEPLOY_DIR_IMAGE",True), + d.getVar("INITRD_IMAGE",True), + d.getVar("MACHINE",True) + )) + else: + d.appendVar("INITRAMFS_IMAGE"," initramfs-netboot-image") + if (d.getVar("KERNEL_IMAGETYPE",True) == "uImage"): + # case for "old" u-boot images, like Porter board + d.appendVar("INITRAMFS_FSTYPES"," ext4.gz.u-boot"); + else: + # case for new u-boot images which don't require uImage format + d.appendVar("INITRAMFS_FSTYPES"," ext4.gz"); +} + |