--- /dev/null
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "brcm,bcm3368";
+
+ aliases {
+ pflash = &pflash;
+ };
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu@0 {
+ compatible = "brcm,bmips4350", "mips,mips4Kc";
+ device_type = "cpu";
+ reg = <0>;
+ };
+
+ cpu@1 {
+ compatible = "brcm,bmips4350", "mips,mips4Kc";
+ device_type = "cpu";
+ reg = <1>;
+ };
+ };
+
+ cpu_intc: interrupt-controller {
+ #address-cells = <0>;
+ compatible = "mti,cpu-interrupt-controller";
+
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+
+ memory { device_type = "memory"; reg = <0 0>; };
+
+ pflash: nor@1e000000 {
+ compatible = "cfi-flash";
+ reg = <0x1e000000 0x2000000>;
+ bank-width = <2>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ status = "disabled";
+ };
+
+ ubus@fff00000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+ compatible = "simple-bus";
+
+ periph_intc: interrupt-controller@fff8c00c {
+ compatible = "brcm,bcm6345-periph-intc";
+ reg = <0xfffe000c 0x8>;
+
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ interrupt-parent = <&cpu_intc>;
+ interrupts = <2>;
+ };
+
+ ext_intc0: interrupt-controller@fff8c014 {
+ compatible = "brcm,bcm6345-ext-intc";
+ reg = <0xfffe0014 0x4>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ interrupt-parent = <&periph_intc>;
+ interrupts = <24>, <25>, <26>, <27>;
+ };
+ };
+};
dd if=$(KDIR)/vmlinux-$(3).bin.gz of=$(BIN_DIR)/openwrt-$(2)-vmlinux.gz bs=65536 conv=sync
endef
-define Image/Build/HCS
- $(STAGING_DIR_HOST)/bin/hcsmakeimage --magic_byte=$(3) \
- --rev_maj=$(4) --rev_min=$(5) --input_file=$(6) \
+define Image/Build/HCSDTB
+ $(STAGING_DIR_HOST)/bin/hcsmakeimage --magic_byte=$(4) \
+ --rev_maj=$(5) --rev_min=$(6) --input_file=$(KDIR)/$(7) \
--output_file=$(BIN_DIR)/openwrt-$(2)-$(1).bin
endef
$(MAKE) -C lzma-loader \
$(LOADER_MAKEOPTS) \
BUILD_DIR="$(KDIR)" \
- TARGET_DIR="$(BIN_DIR)" \
+ TARGET_DIR="$(2)" \
LOADER_DATA="$(KDIR)/vmlinux$(1).lzma" \
- LOADER=$(IMG_PREFIX)-loader$(1).elf \
- compile loader.elf
+ LOADER=$(IMG_PREFIX)-loader$(1) \
+ compile $(3)
rm -f $(KDIR)/vmlinux$(1).lzma
endef
define Image/PrepareLoaderDTB
# append dtb to vmlinux, then build a standard LZMA loader
cat $(KDIR)/vmlinux$(1) $(DTS_DIR)/$(2).dtb > $(KDIR)/vmlinux$(1)-$(2)
- $(call Image/PrepareLoader,$(1)-$(2))
+ $(call Image/PrepareLoader,$(1)-$(2),$(3),$(4))
endef
define Image/PrepareCFELzmaKernel
$(foreach board,$(sort $(TARGET_$(PROFILE)_DTBS)), $(call Image/PrepareCFELzmaKernelDTB,$(board)))
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
- $(call Image/PrepareLoader,-initramfs)
- $(foreach board,$(sort $(TARGET_$(PROFILE)_DTBS)), $(call Image/PrepareLoaderDTB,-initramfs,$(board)))
+ $(call Image/PrepareLoader,-initramfs,$(BIN_DIR),loader.elf)
+ $(foreach board,$(sort $(TARGET_$(PROFILE)_DTBS)), \
+ $(call Image/PrepareLoaderDTB,-initramfs,$(board),$(BIN_DIR),loader.elf))
+ ifneq (,$(findstring cvg834g,$(TARGET_$(PROFILE)_DTBS)))
+ $(call Image/PrepareLoaderDTB,-initramfs,cvg834g,$(KDIR),loader.bin)
+ endif
endif
endef
define Image/Build/Initramfs
# Netgear CVG834G
- $(call Image/Build/HCS,initramfs,cvg834g,a020,0001,0022,$(KDIR)/vmlinux-initramfs)
+ ifneq (,$(findstring cvg834g,$(TARGET_$(PROFILE)_DTBS)))
+ $(call Image/Build/HCSDTB,initramfs,cvg834g,cvg834g,a020,0001,0022,$(IMG_PREFIX)-loader-initramfs-cvg834g.bin)
+ endif
endef
# $(1) = Image build
# $(7) = additional options
define ImageDTB
define Image/Build/$(3)
- $$(call Image/Build/$(1),$$(1),$(3),$(4),$(5),$(6),$(7))
+ $$(call Image/Build/$(1),$$(1),$(3),$(4),$(5),$(6),$(7),$(8))
endef
TARGET_Default_DTBS += $(4)
# RTA1320_16M (numerous routers)
$(call Image/Build/CFE,$(1),RTA1320_16M,6338,RTA1320_16M,,--layoutver 5)
- # Netgear CVG834G
- $(call Image/Build/HCS,$(1),cvg834g,a020,0001,0022,$(KDIR)/vmlinux)
-
# build dtb image list
$(foreach image,$(TARGET_$(PROFILE)_IMAGES),$(call Image/Build/$(image),$(1)))
$(eval $(call ImageDTB,CFEDTB,HG556a_C,HG556a_C,hg556a-c,HW556,6358,--rsa-signature "EchoLife_HG556a" --image-offset 0x20000 --block-size 0x20000 --tag-version 8))
# Inventel Livebox 1
$(eval $(call ImageDTB,RedBootDTB,Livebox,livebox,livebox-blue-5g))
+# Netgear CVG834G
+$(eval $(call ImageDTB,HCSDTB,CVG834G,,cvg834g,a020,0001,0022,vmlinux-cvg834g))
# Netgear DG834GT/PN
$(eval $(call ImageDTB,CFEDTB,DG834GTPN,DG834GT_PN,dg834gtpn,96348GW-10,6348))
# Pirelli Alice Gate VoIP 2 Plus Wi-Fi AGPF-S0