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#
7include $(TOPDIR)/rules.mk
8include $(INCLUDE_DIR)/image.mk
9
10JFFS2_BLOCKSIZE=128k
11
12define Image/Prepare
13endef
14
15define Image/BuildKernel
16	$(TARGET_CROSS)objcopy -O binary -R .bss -R .note -R .comment \
17		-R .note.gnu.build-id -S $(LINUX_DIR)/vmlinux $(KDIR)/vmlinux.bin
18	mkimage -A m68k -O linux -T kernel -a 0x00020000 -e 0x00020000 \
19		-C none -n 'M68K OpenWrt Linux-$(LINUX_VERSION)' \
20		-d $(KDIR)/vmlinux.bin $(BIN_DIR)/$(IMG_PREFIX)-uImage
21endef
22
23define Image/Build
24	$(call Image/Build/$(1),$(1))
25endef
26
27define Image/Build/jffs2-128k
28endef
29
30define Image/Build/squashfs
31	$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
32endef
33
34$(eval $(call BuildImage))
35