I have a Makefile that automates imagebuilder. It expects the result will be bin/targets/${TARGET}/${SUBTARGET}/openwrt-${RELEASE}-${TARGET}-${SUBTARGET}-${PLATFORM}-${IMAGE}
as make image PLATFORM=Generic produces openwrt-19.07.4-x86-64-combined-squashfs.img.gz
instead of openwrt-19.07.4-x86-64-Generic-combined-squashfs.img.gz
Is this an error of imagebuilder or in my logic? How to fix it?
You are overestimating the uniformity of the image naming between different targets, calling this an error is a bit far fetched. Yes, there are some (recent) efforts to streamline image generation between targets (and to augment that with JSON meta data), but there are no strict guarantees about the naming (patches harmonizing this further are likely to be accepted for master, but there's nothing to 'fix').