[ar71xx] tune rtl8366s default config, make vlan 1 cpu port tagged and use eth0.1...
[openwrt.git] / target / linux / orion / image / harddisk.mk
1 #
2 # Copyright (C) 2008-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
8 define Image/Prepare
9 cp $(LINUX_DIR)/arch/arm/boot/uImage $(KDIR)/uImage
10 endef
11
12 define Image/BuildKernel
13 # Orion Kernel uImages
14 # DT2: mach id 1514 (0x5EA)
15 echo -en "\x05\x1c\xa0\xe3\xea\x10\x81\xe3" > $(KDIR)/dt2-zImage
16 cat $(LINUX_DIR)/arch/arm/boot/zImage >> $(KDIR)/dt2-zImage
17 $(STAGING_DIR_HOST)/bin/mkimage -A arm -O linux -T kernel \
18 -C none -a 0x00008000 -e 0x00008000 -n 'Linux-$(LINUX_VERSION)' \
19 -d $(KDIR)/dt2-zImage $(KDIR)/dt2-uImage
20 cp $(KDIR)/dt2-uImage $(BIN_DIR)/openwrt-dt2-uImage
21 endef
22
23 define Image/Build/Freecom
24 # Orion Freecom Images
25 # backup unwanted files
26 rm -rf ${TMP_DIR}/$2_backup
27 mkdir ${TMP_DIR}/$2_backup
28 -mv $(TARGET_DIR)/{var,jffs,rom} ${TMP_DIR}/$2_backup
29 # add extra files
30 $(INSTALL_DIR) $(TARGET_DIR)/boot
31 # TODO: Add special CMDLINE shim for webupgrade image here
32 $(CP) $(KDIR)/dt2-uImage $(TARGET_DIR)/boot/uImage
33 $(INSTALL_DIR) $(TARGET_DIR)/var
34 # create image
35 $(TAR) cfj $(BIN_DIR)/openwrt-$(2)-$(1).img --numeric-owner --owner=0 --group=0 -C $(TARGET_DIR)/ .
36 $(STAGING_DIR_HOST)/bin/encode_crc $(BIN_DIR)/openwrt-$(2)-$(1).img $(BIN_DIR)/openwrt-$(2)-$(1)-webupgrade.img $(3)
37 # remove extra files
38 rm -rf $(TARGET_DIR)/{boot,var}
39 # recover unwanted files
40 -mv ${TMP_DIR}/$2_backup/* $(TARGET_DIR)/
41 rm -rf ${TMP_DIR}/$2_backup
42 endef
43
44 define Image/Build
45 $(call Image/Build/$(1),$(1))
46 $(call Image/Build/Freecom,$(1),dt2,DT,$(1))
47 endef
48
49 define Image/Build/squashfs
50 $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
51 ( \
52 dd if=$(KDIR)/uImage bs=1024k conv=sync; \
53 dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
54 ) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).img
55 endef
This page took 0.061302 seconds and 5 git commands to generate.