mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-30 08:04:10 +00:00
build/json: generate json file for initramfs
The initramfs images are missing from the profiles.json files. Signed-off-by: Moritz Warning <moritzwarning@web.de> [fix code by exporting device variables] Signed-off-by: Paul Spooren <mail@aparcar.org> (cherry picked from commit d3140d05296461deddaaa8ca2ce4a4a97a320eff)
This commit is contained in:
parent
bab7a1120c
commit
4419c3dcd3
@ -472,7 +472,8 @@ endef
|
|||||||
ifndef IB
|
ifndef IB
|
||||||
define Device/Build/initramfs
|
define Device/Build/initramfs
|
||||||
$(call Device/Export,$(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE),$(1))
|
$(call Device/Export,$(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE),$(1))
|
||||||
$$(_TARGET): $$(if $$(KERNEL_INITRAMFS),$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE))
|
$$(_TARGET): $$(if $$(KERNEL_INITRAMFS),$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE)) \
|
||||||
|
$$(if $$(CONFIG_JSON_OVERVIEW_IMAGE_INFO), $(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json,)
|
||||||
|
|
||||||
$(KDIR)/$$(KERNEL_INITRAMFS_NAME):: image_prepare
|
$(KDIR)/$$(KERNEL_INITRAMFS_NAME):: image_prepare
|
||||||
$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE)
|
$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE)
|
||||||
@ -481,6 +482,38 @@ define Device/Build/initramfs
|
|||||||
$(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_INITRAMFS_NAME) $(CURDIR)/Makefile $$(KERNEL_DEPENDS) image_prepare
|
$(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_INITRAMFS_NAME) $(CURDIR)/Makefile $$(KERNEL_DEPENDS) image_prepare
|
||||||
@rm -f $$@
|
@rm -f $$@
|
||||||
$$(call concat_cmd,$$(KERNEL_INITRAMFS))
|
$$(call concat_cmd,$$(KERNEL_INITRAMFS))
|
||||||
|
|
||||||
|
$(call Device/Export,$(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json,$(1))
|
||||||
|
|
||||||
|
$(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json: $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE)
|
||||||
|
@mkdir -p $$(shell dirname $$@)
|
||||||
|
DEVICE_ID="$(1)" \
|
||||||
|
BIN_DIR="$(BIN_DIR)" \
|
||||||
|
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
|
||||||
|
IMAGE_NAME="$$(notdir $$^)" \
|
||||||
|
IMAGE_TYPE="kernel" \
|
||||||
|
IMAGE_FILESYSTEM="initramfs" \
|
||||||
|
IMAGE_PREFIX="$$(IMAGE_PREFIX)" \
|
||||||
|
DEVICE_VENDOR="$$(DEVICE_VENDOR)" \
|
||||||
|
DEVICE_MODEL="$$(DEVICE_MODEL)" \
|
||||||
|
DEVICE_VARIANT="$$(DEVICE_VARIANT)" \
|
||||||
|
DEVICE_ALT0_VENDOR="$$(DEVICE_ALT0_VENDOR)" \
|
||||||
|
DEVICE_ALT0_MODEL="$$(DEVICE_ALT0_MODEL)" \
|
||||||
|
DEVICE_ALT0_VARIANT="$$(DEVICE_ALT0_VARIANT)" \
|
||||||
|
DEVICE_ALT1_VENDOR="$$(DEVICE_ALT1_VENDOR)" \
|
||||||
|
DEVICE_ALT1_MODEL="$$(DEVICE_ALT1_MODEL)" \
|
||||||
|
DEVICE_ALT1_VARIANT="$$(DEVICE_ALT1_VARIANT)" \
|
||||||
|
DEVICE_ALT2_VENDOR="$$(DEVICE_ALT2_VENDOR)" \
|
||||||
|
DEVICE_ALT2_MODEL="$$(DEVICE_ALT2_MODEL)" \
|
||||||
|
DEVICE_ALT2_VARIANT="$$(DEVICE_ALT2_VARIANT)" \
|
||||||
|
DEVICE_TITLE="$$(DEVICE_TITLE)" \
|
||||||
|
DEVICE_PACKAGES="$$(DEVICE_PACKAGES)" \
|
||||||
|
TARGET="$(BOARD)" \
|
||||||
|
SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \
|
||||||
|
VERSION_NUMBER="$(VERSION_NUMBER)" \
|
||||||
|
VERSION_CODE="$(VERSION_CODE)" \
|
||||||
|
SUPPORTED_DEVICES="$$(SUPPORTED_DEVICES)" \
|
||||||
|
$(TOPDIR)/scripts/json_add_image_info.py $$@
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user