Modify

Opened 7 years ago

Closed 7 years ago

Last modified 22 months ago

#5143 closed defect (fixed)

CRC error starting from 15801 trunk version

Reported by: desigabri Owned by: florian
Priority: normal Milestone: Barrier Breaker 14.07
Component: kernel Version: Trunk
Keywords: CRC error TRUNK BCM6358 BCM63xx tag image size Cc: desigabri@…

Description

hi all
I started having troubles about firmware images getting a CRC error during the boot:

######

Sizeof Tag Used : 256
One only valid image tag found ...
Trying to boot from FIRST image copy (0x80010000) ...

latest imageSequence found: ... 0

  • Flash Kernel Address: 0xBE020100
  • Tag->KernelLen: 0x000BFF00
  • Flash Kernel Address: 0xBE020100

Linux kernel CRC error. Corrupted image?

-Tag Kernel crc : 0x06527898 - calculated: 0x7D85D24D

####

so I started investigating and found exactly from which trunk version the trouble comes. I found that in 15801 version they changed the "imagetag.c" source file that is into "/trunk/tools/firmware-utils/src" directory.
They introduced a new definition rootfsoffpadlen to change dinamically the size of the firmware on some situations.

This is what I think about the modification but I don't really understand about sources files. Anyway I think that the modification doesn't take care of the CRC calcuation so I can't compile any working firmware because the kernel stops at booting time getting the "Tag kernel crc error".
I tried to use the old "imagetag.c" and firmwares started working again but I get issues compiling firmwares that are greater than some size. This should be the reason for the made modification.

I'm compiling firmware for AGF0 a BCM6358 so may be that the problem is related to it. Can anyone of you take a look to the current "imagetag.c" file and check about it?

thanks to all

Attachments (4)

versioni.txt (978 bytes) - added by desigabri@… 7 years ago.
some memories about the trouble
imagetag.c (14.5 KB) - added by desigabri 7 years ago.
the older imagetag.c file
imagetag.2.c (14.6 KB) - added by desigabri 7 years ago.
the newer imagetag.c file
alicegate-crc-fix.patch (660 bytes) - added by Daniel Dickinson <cshore@…> 7 years ago.
This patch ought to fix things. It is untested as builds are slow on my computer, however

Download all attachments as: .zip

Change History (12)

Changed 7 years ago by desigabri@…

some memories about the trouble

Changed 7 years ago by desigabri

the older imagetag.c file

Changed 7 years ago by desigabri

the newer imagetag.c file

comment:1 Changed 7 years ago by Daniel Dickinson <cshore@…>

You're right, I forgot the CRC calculation on the kernel, and didn't catch it because my board does whole image (for which have the crc). Sorry about that. It'll be a few days before I can work on it, but it's not on my todo list.

comment:2 follow-up: Changed 7 years ago by Daniel Dickinson <cshore@…>

s/not/now/

comment:3 in reply to: ↑ 2 Changed 7 years ago by desigabri <desigabri@…>

Where can I find informations about how to calculate crc?
I tried to look for lines deputated to do this but I don't understand what the variabiles mean or stay for. I don't understand which of them is related to the full image, which is a part of the full image, which comes before or could change every time you compile firmware. Which will stay always the same... What they use for calculation an so on... I'm really out of any ideas, hope you won't forget :))

Changed 7 years ago by Daniel Dickinson <cshore@…>

This patch ought to fix things. It is untested as builds are slow on my computer, however

comment:4 Changed 7 years ago by Daniel Dickinson <cshore@…>

This patch attached should fix the problem, however I am unable to check it because my system is still in middle of another build. If you are able to compile before I am, please post your results here.

comment:5 follow-up: Changed 7 years ago by florian

  • Owner changed from developers to florian
  • Status changed from new to assigned

comment:6 in reply to: ↑ 5 Changed 7 years ago by desigabri

Replying to florian:

I don't know how to patch files so I just modified original imagetag.c file using descriptions from your patch file...

ok, I tried it and it worked at this moment with 15960 trunk version.

Sorry I hadn't time before to do this and I'll let you know anything about it for the next trunk releases to be sure that you solved the problem forever.
I compiled 15960 trunk version firmware for AGF board and it worked: I loaded 64kjffs2, 128jffs2 and squash firmware with no CRC problems so from now I'll be able to test the new releases.
I really think that the problem is solved but I don't know how mutch time they need to close the ticket
THANKS FOR NOW

comment:7 Changed 7 years ago by florian

  • Resolution set to fixed
  • Status changed from assigned to closed

Fix applied in [15977], thanks !

comment:8 Changed 22 months ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.