diff --git a/brcm63xx_ref_nand/Makefile b/brcm63xx_ref_nand/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..43dd757723d29f57da8e0c4a9a0cf2de510acb05 --- /dev/null +++ b/brcm63xx_ref_nand/Makefile @@ -0,0 +1,23 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +ARCH:=mips +BOARD:=brcm63xx_ref_nand +BOARDNAME:=Broadcom BCM63xx_ref_nand +FEATURES:= +LINUX_VERSION:=3.3.8 +MAINTAINER:=Benjamin Larsson <benjamin.larsson@inteno.se> + +include $(INCLUDE_DIR)/target.mk + +define Target/Description + Build firmware images for Broadcom based xDSL/routers + based on the Broadcom 4.14 SDK +endef + +$(eval $(call BuildTarget)) diff --git a/brcm63xx_ref_nand/image/Makefile b/brcm63xx_ref_nand/image/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..71274f857b8a3732fb10130887c4dde322ac9ab5 --- /dev/null +++ b/brcm63xx_ref_nand/image/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/image.mk + +KERNEL_ENTRY:= $(shell readelf -h $(KDIR)/vmlinux.bcm.elf | grep Entry | awk '{print $$4}') + +define Image/Build/REF + # Generate the tagged image + $(STAGING_DIR_HOST)/bin/imagetag_nand -i $(KDIR)/root.$(1) -f $(KDIR)/root.$(1) \ + -o $(BIN_DIR)/IOPSYS-$(4).w \ + -b $(2) \ + -c $(3) \ + -q NANDFS128 +endef + + +define Image/Prepare + $(STAGING_DIR_HOST)/bin/lzma e -d22 -lp2 -lc1 $(KDIR)/vmlinux.bcm $(KDIR)/vmlinux.lzma + $(STAGING_DIR_HOST)/bin/imagetag_nand -K -i $(KDIR)/vmlinux.lzma -o $(KDIR)/vmlinux.lz -e $(KERNEL_ENTRY) + + dd if=/dev/zero of=$(TMP_DIR)/file128k.tmp bs=1k count=128 + + echo -e "/cferam.000" > $(KDIR)/nocomprlist + echo -e "/vmlinux.lz" >> $(KDIR)/nocomprlist + touch $(TARGET_DIR)/cferam.000 +endef + +define Image/Build + dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync + # Various routers + $(call Image/Build/REF,$(1),963268,63268,VG50) +endef + +$(eval $(call BuildImage))