openwrt 文件命名
主要文件:
image.mk、 version.mk
image.mk的文件分析
完整的文件名称:
gerneral-snapshot-r10923-7f2b230-ramips-mt76x8-Junda_P1905B-32m-squashfs-sysupgrade.bin
镜像名称的由来: IMAGE_NAME => IMG_PREFIX 生成, 而VERSION_DIST_SANITIZED、IMG_PREFIX_VERNUM是由version.k 分析来, vesion.mk的内容来自make menuconfig=>Image configuration=>Version configuration options 配置而来
IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(IMG_PREFIX_EXTRA)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
参数说明:
VERSION_DIST_SANITIZED => OpenWrt => general,该选项对应于.config 文件中的CONFIG_VERSION_DIST="OpenWrt ",VERSION_DIST对应于VERSION_DIST_SANITIZED的大写
IMG_PREFIX_VERNUM=>VERSION_NUMBER=>snapshot
IMG_PREFIX_VERCODE=>VERSION_CODE=>r10923-7f2b230
IMG_PREFIX_EXTRA=>
BOARD=>ramips
SUBTARGET=>mt76x8-Junda_P1905B-32m
IMAGE_PREFIX := $(IMG_PREFIX)-$(1)
# IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1)-$$(2)
$(1) squashfs
$(2) sysupgrade.bin