openwrtv3/package
Christian Lamparter 4e3f6dae04 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>
2017-12-08 19:54:16 +01:00
..
base-files base-files: upgrade: make get_partitions() endian agnostic 2017-12-08 19:54:16 +01:00
boot merge: targets: update image generation and targets 2017-12-08 19:41:18 +01:00
devel strace: Update to 4.20 2017-12-07 11:46:37 +08:00
firmware firmware: ath10k-firmware: update QCA4019 firmware to 10.4-3.2.1-00058 2017-12-08 19:54:14 +01:00
kernel merge: ssid: update default ssid 2017-12-08 19:41:18 +01:00
libs openssl: update to 1.0.2n 2017-12-08 10:47:51 +01:00
network merge: uhttpd: update cert generation to match system defaults 2017-12-08 19:41:18 +01:00
system opkg: bump to version 2017-12-07 2017-12-07 18:21:54 +01:00
utils merge: busybox: update CONFIG_NSLOOKUP in busybox config and respective patch 2017-12-08 19:41:18 +01:00
Makefile build: cleanup tmp/ dir of target rootfs 2017-05-02 22:10:50 +08:00