Bug 16319 - Checksum validation is not working on big endian targets
Summary: Checksum validation is not working on big endian targets
Status: RESOLVED FIXED
Alias: None
Product: opkg
Classification: Yocto Project Subprojects
Component: opkg (show other bugs)
Version: 0.9.0
Hardware: Other mips64
: Medium+ major
Target Milestone: next-patch
Assignee: Alex Stewart
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2026-06-16 12:57 UTC by Michal Sieron
Modified: 2026-06-16 16:16 UTC (History)
0 users

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Sieron 2026-06-16 12:57:15 UTC
CMake based setup does not configure big-endian builds correctly.

Autoconf based setup used (https://git.yoctoproject.org/opkg/tree/configure.ac?h=v0.8.0#n260):
```
# Checks endianness
AC_C_BIGENDIAN(BIGENDIAN_CFLAGS="-DWORDS_BIGENDIAN=1",)
AC_SUBST(BIGENDIAN_CFLAGS)
```
to define `WORDS_BIGENDIAN`, which is used in md5.c and sha256.c to define `SWAP` macro.
With new CMake based setup this is no longer the case, and checksum validation doesn't work.

We hit this on a mips64 target, but I assume some powerpc targets are affected as well.
Comment 1 Alex Stewart 2026-06-16 16:16:09 UTC
Fixed by Michal's commit a56ca271876c8a6ff6540f8b68d7969357207b05.

https://git.yoctoproject.org/opkg/commit/?id=a56ca271876c8a6ff6540f8b68d7969357207b05