X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=common%2Fcmd_disk.c;h=8a1fda9f68a412a0afa232df5a6e3c0ed7d69890;hb=844a59aa81b2a2ec8161dfe99487ea391994d1c1;hp=ee4e21551b172000b4cdb6c2f191245529163e4e;hpb=cec2655c3b3b86f14a6a5c2cbb01833f7e3974be;p=karo-tx-uboot.git diff --git a/common/cmd_disk.c b/common/cmd_disk.c index ee4e21551b..8a1fda9f68 100644 --- a/common/cmd_disk.c +++ b/common/cmd_disk.c @@ -2,24 +2,7 @@ * (C) Copyright 2000-2011 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - * + * SPDX-License-Identifier: GPL-2.0+ */ #include #include @@ -34,7 +17,9 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, ulong addr = CONFIG_SYS_LOAD_ADDR; ulong cnt; disk_partition_t info; +#if defined(CONFIG_IMAGE_FORMAT_LEGACY) image_header_t *hdr; +#endif block_dev_desc_t *dev_desc; #if defined(CONFIG_FIT) @@ -67,7 +52,8 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, "Name: %.32s Type: %.32s\n", intf, dev, part, info.name, info.type); - debug("First Block: %ld, # of blocks: %ld, Block Size: %ld\n", + debug("First Block: " LBAFU ", # of blocks: " LBAFU + ", Block Size: %ld\n", info.start, info.size, info.blksz); if (dev_desc->block_read(dev, info.start, 1, (ulong *) addr) != 1) { @@ -78,6 +64,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, bootstage_mark(BOOTSTAGE_ID_IDE_PART_READ); switch (genimg_get_format((void *) addr)) { +#if defined(CONFIG_IMAGE_FORMAT_LEGACY) case IMAGE_FORMAT_LEGACY: hdr = (image_header_t *) addr; @@ -94,6 +81,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, cnt = image_get_image_size(hdr); break; +#endif #if defined(CONFIG_FIT) case IMAGE_FORMAT_FIT: fit_hdr = (const void *) addr;