mirror of
				https://github.com/lingble/meta-tegra.git
				synced 2025-10-30 03:52:41 +00:00 
			
		
		
		
	image_types_cboot: support UEFI signing
Signed-off-by: Matt Madison <matt@madison.systems>
This commit is contained in:
		 Matt Madison
					Matt Madison
				
			
				
					committed by
					
						 Matt Madison
						Matt Madison
					
				
			
			
				
	
			
			
			 Matt Madison
						Matt Madison
					
				
			
						parent
						
							056797a30f
						
					
				
				
					commit
					a9d1a6847e
				
			| @@ -1,9 +1,20 @@ | |||||||
| CBOOTIMG_KERNEL ?= "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}" | CBOOTIMG_KERNEL ?= "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}" | ||||||
|  |  | ||||||
|  | inherit tegra-uefi-signing | ||||||
|  |  | ||||||
| oe_cbootimg() { | oe_cbootimg() { | ||||||
|     bbfatal "This image type only supported on tegra platforms" |     bbfatal "This image type only supported on tegra platforms" | ||||||
| } | } | ||||||
|  |  | ||||||
|  | # Override this function in a bbappend to | ||||||
|  | # implement other signing mechanisms | ||||||
|  | sign_bootimg() { | ||||||
|  |     if [ -n "${TEGRA_UEFI_DB_KEY}" -a -n "${TEGRA_UEFI_DB_CERT}" ]; then | ||||||
|  |         tegra_uefi_attach_sign "$1" | ||||||
|  | 	rm "$1" | ||||||
|  | 	mv "$1.signed" "$1" | ||||||
|  |     fi | ||||||
|  | } | ||||||
| oe_cbootimg_common() { | oe_cbootimg_common() { | ||||||
|     outfile="$2" |     outfile="$2" | ||||||
|     [ -n "$outfile" ] || outfile="${IMGDEPLOYDIR}/$1.cboot" |     [ -n "$outfile" ] || outfile="${IMGDEPLOYDIR}/$1.cboot" | ||||||
| @@ -12,6 +23,7 @@ oe_cbootimg_common() { | |||||||
|         --ramdisk ${IMGDEPLOYDIR}/$1 \ |         --ramdisk ${IMGDEPLOYDIR}/$1 \ | ||||||
|         --cmdline "${KERNEL_ARGS}" \ |         --cmdline "${KERNEL_ARGS}" \ | ||||||
|         --output "$outfile" |         --output "$outfile" | ||||||
|  |     sign_bootimg "$outfile" | ||||||
|     [ -n "$2" ] || ln -sf $1.cboot ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.cboot |     [ -n "$2" ] || ln -sf $1.cboot ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.cboot | ||||||
| } | } | ||||||
| oe_cbootimg:tegra() { | oe_cbootimg:tegra() { | ||||||
| @@ -27,5 +39,5 @@ make_cboot_image[vardepsexclude] += "DATETIME" | |||||||
| CONVERSIONTYPES =+ "cboot" | CONVERSIONTYPES =+ "cboot" | ||||||
| IMAGE_TYPES += "cpio.gz.cboot" | IMAGE_TYPES += "cpio.gz.cboot" | ||||||
|  |  | ||||||
| CONVERSION_DEPENDS_cboot = "tegra-flashtools-native virtual/kernel:do_deploy" | CONVERSION_DEPENDS_cboot = "tegra-flashtools-native virtual/kernel:do_deploy ${TEGRA_UEFI_SIGNING_TASKDEPS}" | ||||||
| CONVERSION_CMD:cboot = "make_cboot_image ${type}" | CONVERSION_CMD:cboot = "make_cboot_image ${type}" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user