2 # Copyright (C) 2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/image.mk
14 define Image
/BuildKernel
/olinuxino-bootlet
15 cat
$(LINUX_DIR
)/arch
/arm
/boot
/zImage
$(LINUX_DIR
)/arch
/arm
/boot
/dts
/imx23-olinuxino.dtb
> $(STAGING_DIR
)/zImage_dtb
17 $(STAGING_DIR
)/..
/host
/bin
/elftosb
-z
-c .
/linux_prebuilt.db
-o linux.sb
; \
18 dd if
=/dev
/zero of
=sd_mmc_bootstream.raw bs
=512 count
=4; \
19 dd if
=linux.sb of
=$(BIN_DIR
)/openwrt-imx23-sbImage ibs
=512 seek
=4; \
23 define Image
/BuildKernel
/olinuxino-uboot
24 mkimage
-A arm
-O linux
-T kernel
-C none \
25 -a
0x42000000 -e
0x42000000 \
26 -n
'ARM OpenWrt Linux-$(LINUX_VERSION)' \
27 -d
$(KDIR
)/vmlinux
$(KDIR
)/uImage
28 cp
$(KDIR
)/uImage
$(BIN_DIR
)/$(IMG_PREFIX
)-uImage
31 define Image
/BuildKernel
33 ifeq ($(CONFIG_PACKAGE_imx-bootlets
),y
)
34 $(call Image
/BuildKernel
/olinuxino-bootlet
)
37 ifeq ($(CONFIG_PACKAGE_uboot-imx23-mx23_olinuxino
),y
)
38 $(call Image
/BuildKernel
/olinuxino-uboot
)
41 $(CP
) $(LINUX_DIR
)/arch
/arm
/boot
/zImage
$(BIN_DIR
)/openwrt-
$(BOARD
)-zImage
42 $(foreach board
,$(BOARDS
),
43 $(CP
) $(LINUX_DIR
)/arch
/arm
/boot
/dts
/$(board
).dtb
$(BIN_DIR
)/
47 define Image
/InstallKernel
49 ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_KERNEL
),)
50 mkdir
-p
$(TARGET_DIR
)/boot
51 $(CP
) $(LINUX_DIR
)/arch
/arm
/boot
/zImage
$(TARGET_DIR
)/boot
/
54 ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_DTB
),)
55 mkdir
-p
$(TARGET_DIR
)/boot
56 $(foreach board
,$(BOARDS
),
57 $(CP
) $(LINUX_DIR
)/arch
/arm
/boot
/dts
/$(board
).dtb
$(TARGET_DIR
)/boot
/
64 $(call Image
/Build
/$(1))
65 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/$(IMG_PREFIX
)-root.
$(1) bs
=128k conv
=sync
68 $(eval
$(call BuildImage
))