Root/target/linux/sibyte/image/Makefile

1#
2# Copyright (C) 2007-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    cp $(LINUX_DIR)/vmlinux $(BIN_DIR)/$(IMG_PREFIX)-vmlinux
12# uImage
13    dd if=$(KDIR)/vmlinux of=$(KDIR)/$(IMG_PREFIX)-vmlinux bs=64k conv=sync
14    mkimage -A mips -O linux -T kernel -a 0x80100000 -C none -e \
15        0x80100000 \
16        -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
17        -d $(KDIR)/$(IMG_PREFIX)-vmlinux $(BIN_DIR)/$(IMG_PREFIX)-uImage
18endef
19
20define Image/Build
21    $(call Image/Build/$(1),$(1))
22endef
23
24define Image/Build/jffs2-64k
25    dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=65536 conv=sync
26endef
27
28define Image/Build/jffs2-128k
29    dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=131072 conv=sync
30    $(call Image/Build/slug,$(1))
31endef
32
33define Image/Build/squashfs
34    $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
35    dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=131072 conv=sync
36endef
37
38$(eval $(call BuildImage))
39

Archive Download this file



interactive