mirror of
				https://github.com/lingble/meta-tegra.git
				synced 2025-10-31 04:18:06 +00:00 
			
		
		
		
	tegra-helper-scripts: restore main files after RCM boot signing
The odmsign functions do the same post-processing for RCM boot signing as they do for main signing, so be sure to save and restore the main files after the second call for signing the RCM boot blob. 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
						
							8b776e1eb0
						
					
				
				
					commit
					f4fd64504f
				
			| @@ -703,7 +703,16 @@ if [ $want_signing -eq 1 ]; then | |||||||
|     FBARGS="--cmd \"$tfcmd\"" |     FBARGS="--cmd \"$tfcmd\"" | ||||||
|     . "$here/odmsign.func" |     . "$here/odmsign.func" | ||||||
|     (odmsign_ext_sign_and_flash) || exit 1 |     (odmsign_ext_sign_and_flash) || exit 1 | ||||||
|  |     if [ $bup_blob -eq 0 -a $no_flash -ne 0 ]; then | ||||||
|  |         mv flashcmd.txt secureflash.sh || exit 1 | ||||||
|  |         chmod +x secureflash.sh | ||||||
|  |     fi | ||||||
|     if [ $also_sign_rcmboot -ne 0 ]; then |     if [ $also_sign_rcmboot -ne 0 ]; then | ||||||
|  | 	outfolder="$(odmsign_get_folder)" | ||||||
|  | 	rm -rf ${outfolder}_save | ||||||
|  | 	mv ${outfolder} ${outfolder}_save | ||||||
|  | 	rm -f secureflash.xml.save | ||||||
|  | 	mv secureflash.xml secureflash.xml.save | ||||||
| 	BCTARGS="$bctargs $rcm_overlay_dtb_arg $custinfo_args --bct_backup" | 	BCTARGS="$bctargs $rcm_overlay_dtb_arg $custinfo_args --bct_backup" | ||||||
| 	L4T_CONF_DTBO="$rcm_bootcontrol_overlay" | 	L4T_CONF_DTBO="$rcm_bootcontrol_overlay" | ||||||
| 	BINSARGS="--bins \"$binsargs_params; kernel $RCMBOOT_KERNEL; kernel_dtb $kernel_dtbfile\"" | 	BINSARGS="--bins \"$binsargs_params; kernel $RCMBOOT_KERNEL; kernel_dtb $kernel_dtbfile\"" | ||||||
| @@ -717,20 +726,20 @@ if [ $want_signing -eq 1 ]; then | |||||||
|           --boot_chain A \ |           --boot_chain A \ | ||||||
|           $bctargs $rcm_overlay_dtb_arg $custinfo_args $ramcodeargs $extdevargs $sparseargs $BINSARGS" |           $bctargs $rcm_overlay_dtb_arg $custinfo_args $ramcodeargs $extdevargs $sparseargs $BINSARGS" | ||||||
| 	(rcm_boot=1 odmsign_ext_sign_and_flash) || exit 1 | 	(rcm_boot=1 odmsign_ext_sign_and_flash) || exit 1 | ||||||
|  | 	rm -f flashcmd.txt | ||||||
|  | 	rm -rf ${outfolder} | ||||||
|  | 	mv ${outfolder}_save ${outfolder} | ||||||
|  | 	cp -f ${outfolder}/* . | ||||||
|  | 	rm -f secureflash.xml | ||||||
|  | 	mv secureflash.xml.save secureflash.xml | ||||||
|     fi |     fi | ||||||
|     if [ $bup_blob -eq 0 -a $no_flash -ne 0 ]; then |     if [ $bup_blob -eq 0 -a $no_flash -ne 0 ]; then | ||||||
|         if [ -f flashcmd.txt ]; then |         cp secureflash.sh flashcmd.txt | ||||||
|             chmod +x flashcmd.txt |  | ||||||
|             ln -sf flashcmd.txt ./secureflash.sh |  | ||||||
|         else |  | ||||||
|             echo "WARN: signing completed successfully, but flashcmd.txt missing" >&2 |  | ||||||
|         fi |  | ||||||
|         rm -f APPFILE APPFILE_b DATAFILE |         rm -f APPFILE APPFILE_b DATAFILE | ||||||
|     fi |     fi | ||||||
|     if [ $bup_blob -eq 0 ]; then |     if [ $bup_blob -eq 0 ]; then | ||||||
|         exit 0 |         exit 0 | ||||||
|     fi |     fi | ||||||
|     touch odmsign.func |  | ||||||
|     flashcmd="python3 $flashappname ${inst_args} $FLASHARGS" |     flashcmd="python3 $flashappname ${inst_args} $FLASHARGS" | ||||||
| else | else | ||||||
|     flashcmd="python3 $flashappname ${inst_args} --chip 0x23 --bl uefi_jetson_with_dtb.bin \ |     flashcmd="python3 $flashappname ${inst_args} --chip 0x23 --bl uefi_jetson_with_dtb.bin \ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user