aboutsummaryrefslogtreecommitdiffstats
path: root/meta-netboot/classes/netboot.bbclass
blob: 3440914a5b5e410f7dc398e43a514f617cbe524c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# 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 () {
	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_IMAGE_LIVE",d.getVar("INITRD_IMAGE",True))
		d.setVar("INITRD_LIVE","%s/%s-%s.ext4.gz" % (
			d.getVar("DEPLOY_DIR_IMAGE",True),
			d.getVar("INITRD_IMAGE_LIVE",True),
			d.getVar("MACHINE",True)
		))
	else:
		d.setVar("INITRAMFS_IMAGE","initramfs-netboot-image")
		if (d.getVar("KERNEL_IMAGETYPE",True) == "uImage"):
			# case for "old" u-boot images, like Porter board
			d.setVar("INITRAMFS_FSTYPES_pn-initramfs-netboot-image", "ext4.gz.u-boot");
		else:
			# case for new u-boot images which don't require uImage format 
			d.setVar("INITRAMFS_FSTYPES_pn-initramfs-netboot-image", "ext4.gz");
}