Build the root fs.
[openwrt.git] / target / linux / openmoko / image / Makefile
1
2 # Copyright (C) 2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 JFFS2_BLOCKSIZE := 128k
9
10 include $(TOPDIR)/rules.mk
11 include $(INCLUDE_DIR)/image.mk
12
13 define Image/mkfs/jffs2/sub
14         $(STAGING_DIR_HOST)/bin/mkfs.jffs2 --pad --little-endian --pagesize=0x800 --no-cleanmarkers -e $(patsubst %k,%KiB,$(1)) -o $(KDIR)/root.jffs2-$(1) -d $(TARGET_DIR)
15         $(call add_jffs2_mark,$(KDIR)/root.jffs2-$(1))
16         $(call Image/Build,jffs2-$(1))
17 endef
18
19 define Build/Clean
20 endef
21
22 define Build/Compile
23 endef
24
25 define Image/Prepare
26         cp $(LINUX_DIR)/arch/arm/boot/uImage $(KDIR)/uImage
27 endef
28
29 define Image/BuildKernel
30         cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
31 endef
32
33 define Image/Build
34         cp $(KDIR)/root.jffs2-128k $(BIN_DIR)/openwrt-$(BOARD)-rootfs
35 endef
36
37 $(eval $(call BuildImage))