Root/target/linux/amazon/image/Makefile

1#
2# Copyright (C) 2006-2010 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7include $(TOPDIR)/rules.mk
8include $(INCLUDE_DIR)/image.mk
9
10define Image/BuildKernel
11    $(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux $(KDIR)/vmlinux.lzma
12    mkimage -A mips -O linux -T kernel -C lzma -a 0x80002000 -e \
13        0x80002000 \
14        -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
15        -d $(KDIR)/vmlinux.lzma $(KDIR)/uImage
16
17    cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
18endef
19
20define Image/Build/squashfs
21    $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(1).image)
22endef
23
24define Image/Build
25    cat $(KDIR)/uImage $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).image
26    $(call Image/Build/$(1),$(1))
27endef
28
29
30$(eval $(call BuildImage))
31

Archive Download this file



interactive