mirror of
				https://source.denx.de/u-boot/u-boot.git
				synced 2025-11-03 18:01:41 +01:00 
			
		
		
		
	Support packing optional second level boot-loader: $ ./tools/mkimage -n rk3399 -T rksd -d \ rk3399_ddr_800MHz_v1.24.bin:rk3399_miniloader_v1.19.bin out -v Adding Image rk3399_ddr_800MHz_v1.24.bin Size 116492(pad to 116736) Adding Image rk3399_miniloader_v1.19.bin Size 88060(pad to 88064) Image Type: Rockchip RK33 (SD/MMC) boot image Init Data Size: 116736 bytes Boot Data Size: 88064 bytes Mainly parse init file and boot file from datafile option, copy them to the image with 2KB alignment. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
		
			
				
	
	
		
			40 lines
		
	
	
		
			673 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			673 B
		
	
	
	
		
			C
		
	
	
	
	
	
// SPDX-License-Identifier: GPL-2.0+
 | 
						|
/*
 | 
						|
 * (C) Copyright 2015 Google,  Inc
 | 
						|
 * Written by Simon Glass <sjg@chromium.org>
 | 
						|
 *
 | 
						|
 * See README.rockchip for details of the rksd format
 | 
						|
 */
 | 
						|
 | 
						|
#include "imagetool.h"
 | 
						|
#include <image.h>
 | 
						|
#include <rc4.h>
 | 
						|
#include "mkimage.h"
 | 
						|
#include "rkcommon.h"
 | 
						|
 | 
						|
static int rksd_check_image_type(uint8_t type)
 | 
						|
{
 | 
						|
	if (type == IH_TYPE_RKSD)
 | 
						|
		return EXIT_SUCCESS;
 | 
						|
	else
 | 
						|
		return EXIT_FAILURE;
 | 
						|
}
 | 
						|
 | 
						|
/*
 | 
						|
 * rk_sd parameters
 | 
						|
 */
 | 
						|
U_BOOT_IMAGE_TYPE(
 | 
						|
	rksd,
 | 
						|
	"Rockchip SD Boot Image support",
 | 
						|
	0,
 | 
						|
	NULL,
 | 
						|
	rkcommon_check_params,
 | 
						|
	rkcommon_verify_header,
 | 
						|
	rkcommon_print_header,
 | 
						|
	rkcommon_set_header,
 | 
						|
	NULL,
 | 
						|
	rksd_check_image_type,
 | 
						|
	NULL,
 | 
						|
	rkcommon_vrec_header
 | 
						|
);
 |