X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=tools%2Fmxsboot.c;h=2e7200957620ca843f4bb78759f86113f0d6bd99;hb=33f0086cb74628080bb4bcb565b25c8ea5299d79;hp=3434c81792cbcb4827849c87a2f83acd22e8330d;hpb=13a3972585af60ec367d209cedbd3601e0c77467;p=oweals%2Fu-boot.git diff --git a/tools/mxsboot.c b/tools/mxsboot.c index 3434c81792..2e72009576 100644 --- a/tools/mxsboot.c +++ b/tools/mxsboot.c @@ -7,7 +7,6 @@ * SPDX-License-Identifier: GPL-2.0+ */ -#include #include #include #include @@ -557,15 +556,15 @@ static int mx28_create_sd_image(int infd, int outfd) cb = (struct mx28_sd_config_block *)buf; - cb->signature = htole32(0x00112233); - cb->primary_boot_tag = htole32(0x1); - cb->secondary_boot_tag = htole32(0x1); - cb->num_copies = htole32(1); - cb->drv_info[0].chip_num = htole32(0x0); - cb->drv_info[0].drive_type = htole32(0x0); - cb->drv_info[0].tag = htole32(0x1); - cb->drv_info[0].first_sector_number = htole32(sd_sector + 4); - cb->drv_info[0].sector_count = htole32((size - 4) / 512); + cb->signature = cpu_to_le32(0x00112233); + cb->primary_boot_tag = cpu_to_le32(0x1); + cb->secondary_boot_tag = cpu_to_le32(0x1); + cb->num_copies = cpu_to_le32(1); + cb->drv_info[0].chip_num = cpu_to_le32(0x0); + cb->drv_info[0].drive_type = cpu_to_le32(0x0); + cb->drv_info[0].tag = cpu_to_le32(0x1); + cb->drv_info[0].first_sector_number = cpu_to_le32(sd_sector + 4); + cb->drv_info[0].sector_count = cpu_to_le32((size - 4) / 512); wr_size = write(outfd, buf, size); if (wr_size != size) {