openwrt/package
Christian Lamparter 135aa3ba7e base-files: upgrade: make get_partitions() endian agnostic
This patch fixes two issues with the current get_partitions()
function.

First: "Invalid partition table on $disk" will pop up on
legitimate images on big endian system.

This is because the little-endian representation of "55 AA" is
assumed in the context of little-endian architectures. On these
comparing it to the 16-bit word 0xAA55 does work as intented.
Whereas on big-endian systems, this would have to be 0x55AA.

This patch fixes the issue by replacing the integer conversion
and value match check with just a string comparision.

Second: The extraction of the type, start LBA and LBA num from
the partition table has the same endianness issue. This has been
fixed by using the new hex_le32_to_cpu() function. This function
will translate the stored little-endian data to the correct
byte-order if necessary.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit 4e3f6dae04)
2017-12-13 13:13:51 +01:00
..
base-files base-files: upgrade: make get_partitions() endian agnostic 2017-12-13 13:13:51 +01:00
boot uboot-envtools: add support for ALFA Network AP121F 2017-07-23 00:26:51 +02:00
devel binutils: fix build with host gcc < 4.9 2017-05-24 18:05:18 +02:00
firmware ath10k-firmware: do not select the qca988x by default 2017-05-27 14:22:16 +02:00
kernel mt76: update to the latest version 2017-12-04 10:52:52 +01:00
libs cyassl: update to wolfssl 3.12.2 (1 CVE) 2017-12-13 13:08:38 +01:00
network uqmi: also try newer pin verification 2017-12-11 12:26:39 +01:00
system opkg: bump to version 2017-12-08 2017-12-08 14:17:38 +01:00
utils mdadm: fix parameter quoting 2017-12-13 12:58:38 +01:00
Makefile build: fix triggering opkg/host compilation 2017-04-09 15:42:20 +02:00