Makefile 741 B

123456789101112131415161718192021222324
  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. define Image/Build
  10. $(call Image/Build/$(1))
  11. dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
  12. endef
  13. define Image/BuildKernel
  14. cat $(LINUX_DIR)/arch/arm/boot/zImage $(LINUX_DIR)/arch/arm/boot/dts/imx23-olinuxino.dtb > $(STAGING_DIR)/zImage_dtb
  15. (cd $(STAGING_DIR); \
  16. ../host/bin/elftosb -z -c ./linux_prebuilt.db -o linux.sb \
  17. dd if=/dev/zero of=sd_mmc_bootstream.raw bs=512 count=4; \
  18. dd if=linux.sb of=$(BIN_DIR)/openwrt-imx23-sbImage ibs=512 seek=4; \
  19. )
  20. endef
  21. $(eval $(call BuildImage))