From patchwork Thu Jun 22 08:11:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume GARDET X-Patchwork-Id: 779396 X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3wtZ7c1pVQz9sNv for ; Thu, 22 Jun 2017 18:12:27 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id AFE2AC21C9E; Thu, 22 Jun 2017 08:12:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 39D58C21C55; Thu, 22 Jun 2017 08:12:17 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 119D1C21C55; Thu, 22 Jun 2017 08:12:16 +0000 (UTC) Received: from smtp2-g21.free.fr (smtp2-g21.free.fr [212.27.42.2]) by lists.denx.de (Postfix) with ESMTPS id B0B1BC21C49 for ; Thu, 22 Jun 2017 08:12:15 +0000 (UTC) Received: from linux.local (unknown [82.244.147.214]) by smtp2-g21.free.fr (Postfix) with ESMTP id C8F8F200400; Thu, 22 Jun 2017 10:12:14 +0200 (CEST) From: Guillaume GARDET To: u-boot@lists.denx.de Date: Thu, 22 Jun 2017 10:11:59 +0200 Message-Id: <20170622081159.14025-1-guillaume.gardet@free.fr> X-Mailer: git-send-email 2.12.3 Cc: Tom Rini , Guillaume GARDET Subject: [U-Boot] [PATCH] Revert 'rockchip: mkimage: remove placeholder functions from rkimage' X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Revert commit 253c60a557d6740f15169a1f15772d7e64928d9b as it breaks the return value of 'mkimage -T rkimage' and print the following error: './tools/mkimage: Can't print header for Rockchip Boot Image support: Success' Signed-off-by: Guillaume GARDET Cc: Philipp Tomsich Cc: Simon Glass Cc: Tom Rini --- tools/rkimage.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/tools/rkimage.c b/tools/rkimage.c index 9880b1569f..44d098c775 100644 --- a/tools/rkimage.c +++ b/tools/rkimage.c @@ -13,6 +13,16 @@ static uint32_t header; +static int rkimage_verify_header(unsigned char *buf, int size, + struct image_tool_params *params) +{ + return 0; +} + +static void rkimage_print_header(const void *buf) +{ +} + static void rkimage_set_header(void *buf, struct stat *sbuf, int ifd, struct image_tool_params *params) { @@ -23,6 +33,11 @@ static void rkimage_set_header(void *buf, struct stat *sbuf, int ifd, rkcommon_rc4_encode_spl(buf, 4, params->file_size); } +static int rkimage_extract_subimage(void *buf, struct image_tool_params *params) +{ + return 0; +} + static int rkimage_check_image_type(uint8_t type) { if (type == IH_TYPE_RKIMAGE) @@ -40,10 +55,10 @@ U_BOOT_IMAGE_TYPE( 4, &header, rkcommon_check_params, - NULL, - NULL, + rkimage_verify_header, + rkimage_print_header, rkimage_set_header, - NULL, + rkimage_extract_subimage, rkimage_check_image_type, NULL, NULL