Creating a build target define properly

I've spent the past several months just hacking at the OpenWrt to try and make my device work. Now, I'd like it to work properly within the confines of OpenWrt's build system.

In my target/linux/octeon/image/Makefile

ITUS_CMDLINE:=console=ttyS0,115200, rootfstype=squashfs,ext4 rootwait
define Device/itusrouter
  CMDLINE := $(ITUS_CMDLINE)
  DEVICE_TITLE := Itus Shield Router
endef
TARGET_DEVICES += itusrouter

define Device/itusbridge
  CMDLINE := $(ITUS_CMDLINE)
  DEVICE_TITLE := Itus Shield Bridge
endef
TARGET_DEVICES += itusbridge

Does anyone have the full FLAG reference I can look at? I looked at https://openwrt.org/docs/techref/image.makefile and it shows some, but I suspect more are available.

For example, I know I need to define CPU_TYPE:=octeon3 over the octeonplus defined in the main Makefile. Maybe add DEVICE_VENDOR tags to make it complete.. if possible, be able to subtarget the Router, Bridge, and Gateway modes under a single define, since the .config will be different, but the board/device itself is the same across all three..

Well, maybe I'll ask a question someone knows the answer to :blush: :slight_smile:

Is there a way to define a config file for a specifc build?

example, in my image/Makefile, I have a define for a bridge and a router mode. Is there a way to specify a config file for the define?

Thanks all!