[kirkwood] Add Seagate Dockstar support
[openwrt.git] / target / linux / kirkwood / image / Makefile
1 #
2 # Copyright (C) 2009-2010 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 JFFS2OPTS_NAND += --little-endian --pagesize=0x800 --no-cleanmarkers --pad
11
12 define Image/mkfs/jffs2/sub/sub
13 $(STAGING_DIR_HOST)/bin/mkfs.jffs2 $(3) \
14 -e $(patsubst %k,%KiB,$(1)) -o $(KDIR)/root.jffs2-$(1)-$(2) -d $(TARGET_DIR) -v 2>&1 1>/dev/null | awk '/^.+$$$$/'
15 endef
16
17 define Image/mkfs/jffs2/sub
18 # Do not remov this line
19 $(call Image/mkfs/jffs2/sub/sub,$(1),nor,$(JFFS2OPTS))
20 ( \
21 dd if=$(KDIR)/uImage bs=4096k conv=sync; \
22 dd if=$(KDIR)/root.jffs2-$(1)-nor bs=128k conv=sync; \
23 ) > $(BIN_DIR)/$(IMG_PREFIX)-jffs2-$(1)-nor.img
24
25 $(call Image/mkfs/jffs2/sub/sub,$(1),nand,$(JFFS2OPTS) $(JFFS2OPTS_NAND))
26 $(call add_jffs2_mark,$(KDIR)/root.jffs2-$(1)-nand)
27 cp $(KDIR)/root.jffs2-$(1)-nand $(BIN_DIR)/$(IMG_PREFIX)-jffs2-$(1)-nand.img
28 endef
29
30 define Image/Prepare
31 cp $(LINUX_DIR)/arch/arm/boot/uImage $(KDIR)/uImage
32 endef
33
34 define Image/BuildKernel
35 # do mach-id fixup here, if needed
36 cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
37 endef
38
39 define Image/Build
40 $(call Image/Build/$(1),$(1))
41 endef
42
43 define Image/Build/jffs2-128k
44 ( \
45 dd if=$(KDIR)/uImage bs=4096k conv=sync; \
46 dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
47 ) > $(BIN_DIR)/$(IMG_PREFIX)-$(1)-nor.img
48
49 cp $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-nand.img
50 endef
51
52 define Image/Build/squashfs
53 $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
54 ( \
55 dd if=$(KDIR)/uImage bs=4096k conv=sync; \
56 dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
57 ) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).img
58 endef
59
60 $(eval $(call BuildImage))
This page took 0.042812 seconds and 5 git commands to generate.