scripts: gen_image_generic: allow the partition types to be set
The use case for this is to set the kernel partition as the EFI system partition. Versions of U-Boot with the EFI boot manager (eficonfig and efidebug commands) will store their boot order data on the ESP. Signed-off-by: Mathew McBride <matt@traverse.com.au>
This commit is contained in:
		 Mathew McBride
					Mathew McBride
				
			
				
					committed by
					
						 Petr Štetiar
						Petr Štetiar
					
				
			
			
				
	
			
			
			 Petr Štetiar
						Petr Štetiar
					
				
			
						parent
						
							8f29b1573d
						
					
				
				
					commit
					701d774f54
				
			| @@ -9,8 +9,10 @@ fi | |||||||
| OUTPUT="$1" | OUTPUT="$1" | ||||||
| KERNELSIZE="$2" | KERNELSIZE="$2" | ||||||
| KERNELDIR="$3" | KERNELDIR="$3" | ||||||
|  | KERNELPARTTYPE=${KERNELPARTTYPE:-83} | ||||||
| ROOTFSSIZE="$4" | ROOTFSSIZE="$4" | ||||||
| ROOTFSIMAGE="$5" | ROOTFSIMAGE="$5" | ||||||
|  | ROOTFSPARTTYPE=${ROOTFSPARTTYPE:-83} | ||||||
| ALIGN="$6" | ALIGN="$6" | ||||||
|  |  | ||||||
| rm -f "$OUTPUT" | rm -f "$OUTPUT" | ||||||
| @@ -19,7 +21,7 @@ head=16 | |||||||
| sect=63 | sect=63 | ||||||
|  |  | ||||||
| # create partition table | # create partition table | ||||||
| set $(ptgen -o "$OUTPUT" -h $head -s $sect ${GUID:+-g} -p "${KERNELSIZE}m${PARTOFFSET:+@$PARTOFFSET}" -p "${ROOTFSSIZE}m" ${ALIGN:+-l $ALIGN} ${SIGNATURE:+-S 0x$SIGNATURE} ${GUID:+-G $GUID}) | set $(ptgen -o "$OUTPUT" -h $head -s $sect ${GUID:+-g} -t "${KERNELPARTTYPE}" -p "${KERNELSIZE}m${PARTOFFSET:+@$PARTOFFSET}" -t "${ROOTFSPARTTYPE}" -p "${ROOTFSSIZE}m" ${ALIGN:+-l $ALIGN} ${SIGNATURE:+-S 0x$SIGNATURE} ${GUID:+-G $GUID}) | ||||||
|  |  | ||||||
| KERNELOFFSET="$(($1 / 512))" | KERNELOFFSET="$(($1 / 512))" | ||||||
| KERNELSIZE="$2" | KERNELSIZE="$2" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user