aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/layerscape/image/Makefile
diff options
context:
space:
mode:
authorYangbo Lu <yangbo.lu@nxp.com>2018-07-18 14:14:40 +0800
committerHauke Mehrtens <hauke@hauke-m.de>2018-09-22 21:20:57 +0200
commiteb684205e5e6958ad71cf4a179fa776f6507f7e3 (patch)
treefe6803b86bdfd42e65cbf894854e47c307d992fa /target/linux/layerscape/image/Makefile
parentf0ec7bd27d206ea0eb9587e178ce0d7ddc006bce (diff)
downloadupstream-eb684205e5e6958ad71cf4a179fa776f6507f7e3.tar.gz
upstream-eb684205e5e6958ad71cf4a179fa776f6507f7e3.tar.bz2
upstream-eb684205e5e6958ad71cf4a179fa776f6507f7e3.zip
layerscape: add SD card boot support
NOR/QSPI Flash on Layerscape board only has limited 64MB memory size. Since some boards (ls1043ardb/ls1046ardb/ls1088ardb/ls1021atwr) could support SD card boot, we added SD boot support for them to put all things on SD card to meet large memory requirement. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Diffstat (limited to 'target/linux/layerscape/image/Makefile')
-rw-r--r--target/linux/layerscape/image/Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/target/linux/layerscape/image/Makefile b/target/linux/layerscape/image/Makefile
index b275ef71cc..a08cc2c2cb 100644
--- a/target/linux/layerscape/image/Makefile
+++ b/target/linux/layerscape/image/Makefile
@@ -9,6 +9,10 @@ include $(INCLUDE_DIR)/image.mk
ITB_BOARDS = traverse-five64
+LS_SD_ROOTFSPART_OFFSET = 64
+LS_SD_IMAGE_SIZE = $(shell echo $$((($(LS_SD_ROOTFSPART_OFFSET) + \
+ $(CONFIG_TARGET_ROOTFS_PARTSIZE)) * 1024 * 1024)))
+
define Build/ls-clean
rm -f $@
endef
@@ -22,6 +26,12 @@ define Build/ls-append-dtb
dd if=$(DTS_DIR)/$(1).dtb >> $@
endef
+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
+
define Build/traverse-fit
./mkits-multiple-config.sh -o $@.its -A $(LINUX_KARCH) \
-v $(LINUX_VERSION) -k $@ -a $(KERNEL_LOADADDR) \