Modify

Opened 10 years ago

Closed 10 years ago

#3716 closed defect (fixed)

sysupgrade magic number test fails on brcm platform

Reported by: b.candler@… Owned by: developers
Priority: normal Milestone:
Component: base system Version:
Keywords: Cc:

Description

This is on an Asus WL500g Deluxe running r11579:

root@OpenWrt:~# /sbin/sysupgrade /tmp/openwrt-brcm-2.4-squashfs.trx 
Invalid image type
Image check 'platform_check_image' failed.

This turns out to be because hexdump gives the bytes in the opposite order expected:

# cat /tmp/openwrt-brcm-2.4-squashfs.trx | dd bs=2 count=1 | hexdump | awk '$2 { print $2 }'
1+0 records in
1+0 records out
4448

whereas /lib/upgrade/platform.sh is checking for 4844. (Note that on an i386 PC I also 4448).

I'm not sure if the output of hexdump -x is platform-specific.

Workaround: change the number in platform.sh.

Maybe better would be to use hexdump -C to get the bytes in byte order, rather than in maybe-swapped order :-)

Attachments (0)

Change History (1)

comment:1 Changed 10 years ago by thepeople

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

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.