[IMX6Q]fastboot下载u-boot.bin失败提示太大原因

本文介绍了在调试过程中遇到的IMX6Q平台fastboot下载u-boot.bin文件时提示文件过大的问题。通过分析u-boot源码,发现错误发生在cmd_fastboot.c中,并探讨了如何确定u-boot分区大小。由于分区表未包含bootloader信息,导致MBR和u-boot的大小在u-boot内部固定。
摘要由CSDN通过智能技术生成

u-boot版本: v2009.08


在调试其他功能时增加了u-boot.bin容量到1M,使用fastboot download时提示:

sending 'bootloader' (1191 KB)...
OKAY [  1.062s]
writing 'bootloader'...
FAILED (remote: image too large for partition)
finished. total time: 1.098s
但是分区的时候是预留蛮大空间的:

# partition size in MB
BOOTLOAD_RESERVE=8

只能先查找出现error log的地方, uboot-imx/common/cmd_fastboot.c

static int rx_handler (const unsigned char *buffer, unsigned int buffer_size)
{
......
				else if ((download_bytes >
					   (ptn->length * MMC_SATA_BLOCK_SIZE)) &&
						!(ptn->flags & FASTBOOT_PTENTRY_FLAGS_WRITE_ENV)) {
					printf("Image too large for the partition\n");
					sprintf(response, "FAILimage too large for partition");
				} else if (ptn->flags & FA
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值