| 1 | # |
| 2 | # Copyright (C) 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 | # DNS-323: mach id 1542 (0x606) |
| 15 | echo -en "\x06\x1c\xa0\xe3\x06\x10\x81\xe3" > $(KDIR)/dns323-zImage |
| 16 | cat $(LINUX_DIR)/arch/arm/boot/zImage >> $(KDIR)/dns323-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)/dns323-zImage $(KDIR)/dns323-uImage |
| 20 | cp $(KDIR)/dns323-uImage $(BIN_DIR)/openwrt-dns323-uImage |
| 21 | endef |
| 22 | |
| 23 | define Image/Build/D-Link |
| 24 | # Orion DNS-323 Images |
| 25 | # mtd image |
| 26 | dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-dns323-rootfs bs=128k |
| 27 | endef |
| 28 | |
| 29 | define Image/Build |
| 30 | $(call Image/Build/$(1),$(1)) |
| 31 | $(call Image/Build/D-Link,$(1),dns323,DNS-323,$(1)) |
| 32 | endef |
| 33 | |
| 34 | define Image/Build/squashfs |
| 35 | $(call prepare_generic_squashfs,$(KDIR)/root.squashfs) |
| 36 | endef |
| 37 | |