2016-10-28 16:14:32 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2016 Jiang Yutang <jiangyutang1978@gmail.com>
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/image.mk
|
|
|
|
|
2018-07-18 06:14:40 +00:00
|
|
|
LS_SD_ROOTFSPART_OFFSET = 64
|
|
|
|
LS_SD_IMAGE_SIZE = $(shell echo $$((($(LS_SD_ROOTFSPART_OFFSET) + \
|
|
|
|
$(CONFIG_TARGET_ROOTFS_PARTSIZE)) * 1024 * 1024)))
|
|
|
|
|
2018-07-09 10:38:10 +00:00
|
|
|
define Build/ls-clean
|
2016-10-28 16:14:32 +00:00
|
|
|
rm -f $@
|
|
|
|
endef
|
|
|
|
|
2018-07-09 10:38:10 +00:00
|
|
|
define Build/ls-append
|
|
|
|
dd if=$(STAGING_DIR_IMAGE)/$(1) >> $@
|
2016-10-28 16:14:32 +00:00
|
|
|
endef
|
|
|
|
|
2018-07-09 10:38:10 +00:00
|
|
|
define Build/ls-append-dtb
|
2016-10-28 16:14:32 +00:00
|
|
|
$(call Image/BuildDTB,$(DTS_DIR)/$(1).dts,$(DTS_DIR)/$(1).dtb)
|
|
|
|
dd if=$(DTS_DIR)/$(1).dtb >> $@
|
|
|
|
endef
|
|
|
|
|
2018-07-18 06:14:40 +00:00
|
|
|
define Build/ls-append-sdhead
|
|
|
|
./gen_sdcard_head_img.sh $(STAGING_DIR_IMAGE)/$(1)-sdcard-head.img \
|
|
|
|
$(LS_SD_ROOTFSPART_OFFSET) $(CONFIG_TARGET_ROOTFS_PARTSIZE)
|
|
|
|
dd if=$(STAGING_DIR_IMAGE)/$(1)-sdcard-head.img >> $@
|
|
|
|
endef
|
|
|
|
|
2018-04-30 12:42:39 +00:00
|
|
|
define Build/traverse-fit
|
2018-08-15 08:41:41 +00:00
|
|
|
./mkits-multiple-config.sh -o $@.its -A $(LINUX_KARCH) \
|
|
|
|
-v $(LINUX_VERSION) -k $@ -a $(KERNEL_LOADADDR) \
|
|
|
|
-e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
|
2018-04-30 12:42:39 +00:00
|
|
|
-C gzip -c 1 -c 2 \
|
2018-08-15 08:41:41 +00:00
|
|
|
-d $(DEVICE_DTS_DIR)/freescale/traverse-ls1043s.dtb \
|
|
|
|
-D "Traverse_LS1043S" -n "ls1043s" -a $(FDT_LOADADDR) -c 1 \
|
|
|
|
-d $(DEVICE_DTS_DIR)/freescale/traverse-ls1043v.dtb \
|
|
|
|
-D "Traverse_LS1043V" -n "ls1043v" -a $(FDT_LOADADDR) -c 2
|
2018-04-30 12:42:39 +00:00
|
|
|
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
|
|
|
|
@mv -f $@.new $@
|
|
|
|
endef
|
|
|
|
|
2017-06-29 03:19:07 +00:00
|
|
|
ifeq ($(SUBTARGET),armv8_64b)
|
2018-08-15 08:41:41 +00:00
|
|
|
include armv8_64b.mk
|
2016-10-28 16:14:32 +00:00
|
|
|
endif
|
2016-10-28 16:18:23 +00:00
|
|
|
|
2018-07-10 03:58:59 +00:00
|
|
|
ifeq ($(SUBTARGET),armv7)
|
|
|
|
include armv7.mk
|
|
|
|
endif
|
|
|
|
|
2016-10-28 16:14:32 +00:00
|
|
|
$(eval $(call BuildImage))
|