I'm quite a n00b with complex build environments like OpenWrt, and I'm running into quite a few small issues building on Mac OS 10.15.5. I started building in an Ubuntu VM but found the interface is quite clunky, it looks a mess on my MacBook Pro's Retina screen lol, and it seems to have trouble interfacing with my Saitechi USB-C microSD reader, leaving a locked ghost volume mounted after ejecting each time and requiring a restart before it works, which is supposedly a well known Ubuntu "bug".
I'm trying to build a custom image with some UI tweaks for the NanoPi R1. I've followed the recommended build procedure for Mac OS (build on a disk image with case-sensitive HFS+, use homebrew versions of various GNU tools, use a script that sets path, etc.), and am using the tool from https://github.com/djpadz/openwrt-osx-build as well, and I've managed to get menuconfig to build (and have the NanoPi R1 as a target, for some reason when cloning the git on my Mac, this wasn't there, so I moved the buildroot from the Linux VM and ran make defclean and the R1 remained in the target list).
The build issue I'm stuck on now is:
HOSTCC tools/img2srec
HOSTCC tools/mkenvimage.o
HOSTCC tools/os_support.o
WRAP tools/lib/crc32.c
HOSTCC tools/lib/crc32.o
HOSTLD tools/mkenvimage
ld: warning: directory not found for option '-L/Volumes/OpenWrt/openwrt/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/host/lib'
HOSTCC tools/aisimage.o
In file included from tools/aisimage.c:9:
In file included from include/image.h:19:
In file included from ./arch/arm/include/asm/byteorder.h:29:
In file included from include/linux/byteorder/little_endian.h:13:
include/linux/types.h:146:9: error: unknown type name '__u64'; did you mean '__s64'?
typedef __u64 __bitwise __le64;
^
../../../../staging_dir/host/include/asm/types.h:19:44: note: '__s64' declared here
__extension__ typedef __signed__ long long __s64;
I tracked down the types.h referenced, and adding a Mac OS __u64 def from https://github.com/dropbox/goebpf/blob/master/bpf.h
but the types.h file is obviously being generated by some part of the process so any changes I make are overwritten.
Am I even approaching this the right way? Where would be the right place to include Mac OS specific stuff (as that unrelated, but good example, bpf.h file is doing)? Any particular reason these wouldn't just be included in OpenWrt? Perhaps doing so would just be uncovering an even bigger can of worms? Or, perhaps, they are included but since I moved this buildroot from my Linux VM, they're missing. In that case, what should I be doing to "clean" this buildroot but make sure I don't end up unable to select the NanoPi R1?
Should I try cloning the git again and just try to figure out why the NanoPi R1 doesn't show up in the menuconfig? I did update the feeds etc, and followed the same documentation and process as I did on my Linux VM to the best of my knowledge.
Thanks