$(STAGING_DIR_HOST)/bin/trx \
-o $@ \
-m $(IMAGE_SIZE) \
- -f $(word 1,$^) \
- -a 4 -f $(word 2,$^)
+ -f $(IMAGE_KERNEL) \
+ -a 4 -f $(IMAGE_ROOTFS)
endef
define Build/relocate-kernel
$(call MkImageLzmaDtb,$(2),$(3),$(5))
$(eval output_name=$(IMG_PREFIX)-$(2)-$(1)-sysupgrade.bin)
cat $(KDIR)/vmlinux-$(2).bin.lzma $(KDIR)/root.$(1) > $(KDIR)/img_$(2).$(1).tmp
- if [ `stat -c%s "$(KDIR)/img_$(2).$(1).tmp"` -gt $$$$(($(5) - 64)) ]; then \
+ if [ `stat -c%s "$(KDIR)/img_$(2).$(1).tmp"` -gt $(5) ]; then \
echo "Warning: $(KDIR)/img_$(2).$(1).tmp is too big" >&2; \
else \
dd if=$(KDIR)/vmlinux-$(2).bin.lzma of=$(KDIR)/vmlinux-$(2).bin.lzma.padded bs=64k conv=sync; \
ifeq ($(SUBTARGET),rt305x)
include rt305x.mk
+include rt305x-legacy.mk
endif
ifeq ($(SUBTARGET),rt3883)
include mt7688.mk
endif
-
-ifndef TARGET_DEVICES
+ifdef LEGACY_DEVICES
#
# Generic Targets - only needed for legacy image building code
#
define Image/Build
$(call Image/Build/$(1))
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
- $(call Image/Build/Profile/$(PROFILE),$(1))
endef
+
+define Image/Build/Profile
+ $(call Image/Build/Profile/$(1),$(2))
+endef
+
endif
$(eval $(call BuildImage))