imx23: add new target for i.MX233-based boards
[openwrt/svn-archive/archive.git] / target / linux / imx23 / image / Makefile
1 #
2 # Copyright (C) 2013 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/image.mk
9
10 define Image/Build
11 $(call Image/Build/$(1))
12 dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
13 endef
14
15 define Image/BuildKernel
16 cat $(LINUX_DIR)/arch/arm/boot/zImage $(LINUX_DIR)/arch/arm/boot/dts/imx23-olinuxino.dtb > $(STAGING_DIR)/zImage_dtb
17 (cd $(STAGING_DIR); \
18 ../host/bin/elftosb -z -c ./linux_prebuilt.db -o linux.sb \
19 dd if=/dev/zero of=sd_mmc_bootstream.raw bs=512 count=4; \
20 dd if=linux.sb of=$(BIN_DIR)/openwrt-imx23-sbImage ibs=512 seek=4; \
21 )
22 endef
23
24 $(eval $(call BuildImage))