Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Simon Glass | f9a3c27 | 2015-08-30 16:55:25 -0600 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2015 Google, Inc |
| 4 | * Written by Simon Glass <sjg@chromium.org> |
| 5 | * |
Simon Glass | f9a3c27 | 2015-08-30 16:55:25 -0600 | [diff] [blame] | 6 | * See README.rockchip for details of the rksd format |
| 7 | */ |
| 8 | |
| 9 | #include "imagetool.h" |
| 10 | #include <image.h> |
| 11 | #include <rc4.h> |
| 12 | #include "mkimage.h" |
| 13 | #include "rkcommon.h" |
| 14 | |
Simon Glass | f9a3c27 | 2015-08-30 16:55:25 -0600 | [diff] [blame] | 15 | static int rksd_check_image_type(uint8_t type) |
| 16 | { |
| 17 | if (type == IH_TYPE_RKSD) |
| 18 | return EXIT_SUCCESS; |
| 19 | else |
| 20 | return EXIT_FAILURE; |
| 21 | } |
| 22 | |
Simon Glass | f9a3c27 | 2015-08-30 16:55:25 -0600 | [diff] [blame] | 23 | /* |
| 24 | * rk_sd parameters |
| 25 | */ |
| 26 | U_BOOT_IMAGE_TYPE( |
| 27 | rksd, |
| 28 | "Rockchip SD Boot Image support", |
Philipp Tomsich | 111bcc4 | 2017-03-15 12:08:43 +0100 | [diff] [blame] | 29 | 0, |
| 30 | NULL, |
Jeffy Chen | 7bf274b | 2015-11-27 12:07:17 +0800 | [diff] [blame] | 31 | rkcommon_check_params, |
Philipp Tomsich | 2fb371f | 2017-05-30 23:32:08 +0200 | [diff] [blame] | 32 | rkcommon_verify_header, |
| 33 | rkcommon_print_header, |
Jeffy Chen | eea6cd8 | 2019-12-27 11:24:41 +0800 | [diff] [blame] | 34 | rkcommon_set_header, |
Philipp Tomsich | 2fb371f | 2017-05-30 23:32:08 +0200 | [diff] [blame] | 35 | NULL, |
Simon Glass | f9a3c27 | 2015-08-30 16:55:25 -0600 | [diff] [blame] | 36 | rksd_check_image_type, |
| 37 | NULL, |
Jeffy Chen | eea6cd8 | 2019-12-27 11:24:41 +0800 | [diff] [blame] | 38 | rkcommon_vrec_header |
Simon Glass | f9a3c27 | 2015-08-30 16:55:25 -0600 | [diff] [blame] | 39 | ); |