Attention is currently required from: Anastasia Klimchuk, Hsuan-ting Chen, Peter Marheine.
Jakub Czapiga has posted comments on this change by Jakub Czapiga. ( https://review.coreboot.org/c/flashrom/+/83133?usp=email )
Change subject: hwaccess_x86_io: Fix Android compilation with bionic libc ......................................................................
Patch Set 1:
(2 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/83133/comment/50b2ccd7_82c60bc1?usp... : PS1, Line 9: Recently Android Bionic LibC got sys/io.h.
This does imply there will be minimum required version for Android support? As you are saying "recen […]
With the current code flashrom on Android will work only on super-old builds because glibc-syscalls.h was moved to bits/ in [this patch](https://android-review.git.corp.google.com/c/platform/bionic/+/221800). Yet this file still only defines syscall numbers/mappings and does not provide implementation of iopl/ioperm nor anything in sys/io.h. iopl and ioperm were introduced recently in [this patch](https://android-review.git.corp.google.com/c/platform/bionic/+/3135242).
File hwaccess_x86_io.c:
https://review.coreboot.org/c/flashrom/+/83133/comment/4662e030_44540076?usp... : PS1, Line 60: #if defined(__ANDROID__)
How did you build flashrom, with make or meson? […]
For Android you can only build with Android.mk or Android.bp (Soong BluePrint). Building with anything else than these two methods is not really viable on Android, and hacking meson into this build system is not allowed in AOSP. I can provide Android.bp if you want, but it requires pulling some dependencies which are in progress of being accepted, so I wouldn't recommend it TBH.
Ad. 1) I ported pciutils (libpci) to Android. Now it only has to get through 3rd-party review in Android.
Ad. 2) I do not think so. As I mentioned, building with anything other than Kati or Soong is not allowed in Android. Everything has to have Android.{mk,bp} now and it's maintained on the Android side. Examples: [cpuinfo](https://android.googlesource.com/platform/external/cpuinfo/+/refs/heads/main), [curl](https://android.googlesource.com/platform/external/curl/+/refs/heads/main), [elfutils](https://android.googlesource.com/platform/external/elfutils/+/refs/heads/mai...)