Permalink
Browse files

uboot: able to display bootlogo

  • Loading branch information...
wwd
wwd committed Sep 1, 2016
1 parent 104a288 commit 729784191a2884426a8ff4ab04c885dff6da3a43
@@ -49,39 +49,39 @@ static __s32 check_sum(void *mem_base, __u32 size, __u32 src_sum)
__u32 curlen = 0;
__s32 i = 0;
/* 生成校验和 */
count = size >> 2; // 以 字(4bytes)为单位计数
/* ������ */
count = size >> 2; // �� �֣�4bytes��Ϊ��λ����
//16字节对齐
//16�ֽڶ���
do
{
sum += *buf++; // 依次累加,求得校验和
sum += *buf++; // 依次累加,求得校验和
sum += *buf++; // 依次累加,求得校验和
sum += *buf++; // 依次累加,求得校验和
sum += *buf++; // �����ۼӣ����У���
sum += *buf++; // �����ۼӣ����У���
sum += *buf++; // �����ۼӣ����У���
sum += *buf++; // �����ۼӣ����У���
}while( ( count -= 4 ) > (4-1) );
//4字节对齐
//4�ֽڶ���
for (i = 0; i < count; i++)
{
sum += *buf++;
}
//如果有1 2 3字节的尾巴,则处理尾巴数据,按照lsb的格式
//�����1 2 3�ֽڵ�β�ͣ�����β����ݣ�����lsb�ĸ�ʽ
curlen = size % 4;
if((size & 0x03) != 0)
{
memcpy(&last, mem_base + size - curlen, curlen);
sum += last; //加上尾巴补全的u32数据
sum += last; //����β�Ͳ�ȫ��u32���
}
printf("sum=%x\n", sum);
printf("src_sum=%x\n", src_sum);
if( sum == src_sum )
return 0; // 校验成功
return 0; // У��ɹ�
else
return -1; // 校验失败
return -1; // У��ʧ��
}
/*
@@ -245,7 +245,7 @@ int sunxi_bmp_display(char *name)
strcpy(bmp_name, name);
#ifndef USE_AW_FAT
char *const bmp_argv[6] = { "fatload", "sunxi_flash", "0", "40000000", bmp_name, NULL };
char *const bmp_argv[6] = { "fatload", "mmc", "0", "40000000", bmp_name, NULL };
if(do_fat_fsload(0, 0, 5, bmp_argv))
{
printf("sunxi bmp info error : unable to open logo file %s\n", bmp_argv[4]);
@@ -53,7 +53,7 @@
#define CONFIG_SUNXI_CHIPID
#define CONFIG_CPUS_STANDBY
#define USE_AW_FAT
//#define USE_AW_FAT
#define CONFIG_NO_BOOT_STANDBY
//#define CONFIG_VECTOR_BY_CP15
@@ -332,7 +332,7 @@
"loglevel=8\0" \
"setargs_nand=setenv bootargs console=${console} console=${fbconsole} root=${nand_root}init=${init} loglevel=${loglevel} partitions=${partitions}" \
"init=${init} loglevel=${loglevel} partitions=${partitions}\0" \
"setargs_mmc=setenv bootargs console=${console} console=${fbconsole} root=${mmc_root} rootfstype=ext4 rootwait init=/sbin/init storage_type=${storage_type}\0" \
"setargs_mmc=setenv bootargs console=${console} console=${fbconsole} root=${mmc_root} rootfstype=ext4 rootwait init=/sbin/init storage_type=${storage_type} fb_base=0x40000000\0" \
"init=${init} loglevel=${loglevel} partitions=${partitions}\0" \
"boot_normal=fatload mmc ${boot_mmc}:1 0x43000000 script.bin;fatload mmc ${boot_mmc}:1 40007800 uimage;bootm 40007800\0" \
"boot_recovery=sunxi_flash read 40007800 recovery;boota 40007800\0" \
Binary file not shown.

0 comments on commit 7297841

Please sign in to comment.