CONFIG_LANTIQ_WDT=y
CONFIG_LANTIQ_XRX200=y
CONFIG_LEDS_GPIO=y
-# CONFIG_LZO_COMPRESS is not set
-# CONFIG_LZO_DECOMPRESS is not set
CONFIG_MDIO_BOARDINFO=y
CONFIG_MIPS=y
# CONFIG_MIPS_HUGE_TLB_SUPPORT is not set
model = "FRITZ3370 - Fritz!Box WLAN 3370";
chosen {
- bootargs = "console=ttyLTQ0,115200";
+ bootargs = "console=ttyLTQ0,115200 ubi.mtd=1,512 root=/dev/mtdblock9";
};
memory@0 {
#size-cells = <1>;
partition@0 {
- label = "firmware";
- reg = <0x00000 0x3400000>;
+ label = "kernel";
+ reg = <0x0 0x400000>;
+ };
+
+ partition@400000 {
+ label = "rootfs_ubi";
+ reg = <0x400000 0x3000000>;
};
partition@3400000 {
lantiq,groups = "spi", "spi_cs4";
lantiq,function = "gpio";
};
- nand_out {
- lantiq,groups = "nand cle", "nand ale", "nand rd", "ebu a23", "ebu a24";
- lantiq,function = "ebu";
- lantiq,direction = <1>;
- lantiq,pull = <0>;
- };
- nand_in {
- lantiq,groups = "nand rdy";
- lantiq,function = "ebu";
- lantiq,direction = <0>;
- lantiq,open-drain = <1>;
- lantiq,pull = <2>;
- };
mdio {
lantiq,groups = "mdio";
lantiq,function = "mdio";
};
+ nand {
+ lantiq,groups = "nand cle", "nand ale",
+ "nand rd", "nand cs1", "nand rdy";
+ lantiq,function = "ebu";
+ lantiq,pull = <1>;
+ };
phy-rst {
lantiq,pins = "io37", "io44";
lantiq,pull = <0>;
#size-cells = <0>;
reg = <0>;
mac-address = [ 00 11 22 33 44 55 ];
+ lantiq,switch;
ethernet@0 {
compatible = "lantiq,xrx200-pdi-port";
endef
define MkImageEVA
- lzma2eva 0x80002000 0x80002000 $(KDIR)/vmlinux-$(1).lzma $(KDIR)/$(1).eva.prealign
- dd if=$(KDIR)/$(1).eva.prealign of=$(KDIR)/$(1).eva.align.64k bs=64k conv=sync
- dd if=$(KDIR)/$(1).eva.prealign of=$(KDIR)/$(1).eva.align.128k bs=128k conv=sync
- cat ./eva.dummy.squashfs >> $(KDIR)/$(1).eva.align.64k
+ lzma2eva 0x80002000 0x80002000 $(KDIR)/vmlinux$(2)-$(1).lzma $(KDIR)/$(1)$(2).eva.prealign
+ dd if=$(KDIR)/$(1)$(2).eva.prealign of=$(KDIR)/$(1)$(2).eva.align.64k bs=64k conv=sync
+ dd if=$(KDIR)/$(1)$(2).eva.prealign of=$(KDIR)/$(1)$(2).eva.align.128k bs=128k conv=sync
+ cat ./eva.dummy.squashfs >> $(KDIR)/$(1)$(2).eva.align.64k
endef
define CompressGzip
$(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image.eva)
endef
+define Image/BuildEVA/ubifs
+
+ifneq ($($(PROFILE)_UBIFS_OPTS),)
+ $(CP) $(KDIR)/root.ubifs $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubifs
+endif
+endef
+
+define Image/BuildEVA/ubi
+
+ifneq ($($(PROFILE)_UBI_OPTS),)
+ $(CP) $(KDIR)/root.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubi
+ $(CP) $(KDIR)/root-overlay.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs-overlay.ubi
+endif
+endef
+
define Image/BuildLoader/squashfs
dd if=$(KDIR)/loader-$(2).bin of=$(KDIR)/loader-$(2).bin.padded bs=1536k conv=sync
cat $(KDIR)/loader-$(2).bin.padded $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image
$(call MkImageEVA,$(1))
$(CP) $(KDIR)/$(1).eva.align.64k $(BIN_DIR)/$(IMG_PREFIX)-$(1).eva.align.64k
$(CP) $(KDIR)/$(1).eva.align.128k $(BIN_DIR)/$(IMG_PREFIX)-$(1).eva.align.128k
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ $(call PatchKernelLzma,$(1),-initramfs)
+ $(call MkImageEVA,$(1),-initramfs)
+ $(CP) $(KDIR)/$(1)-initramfs.eva.align.64k $(BIN_DIR)/$(IMG_PREFIX)-$(1)-initramfs.eva.align.64k
+ $(CP) $(KDIR)/$(1)-initramfs.eva.align.128k $(BIN_DIR)/$(IMG_PREFIX)-$(1)-initramfs.eva.align.128k
+endif
endef
define Image/BuildKernelGzip/Template
--- /dev/null
+[rootfs]
+# Volume mode (other option is static)
+mode=ubi
+# Source image
+image=root.squashfs
+# Volume ID in UBI image
+vol_id=0
+# Allow for dynamic resize
+vol_type=dynamic
+# Volume name
+vol_name=rootfs
+[rootfs_data]
+# Volume mode (other option is static)
+mode=ubi
+# Volume ID in UBI image
+vol_id=1
+# Allow for dynamic resize
+vol_type=dynamic
+# Volume name
+vol_name=rootfs_data
+vol_size=1MiB
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_BEB_LIMIT=20
# CONFIG_MTD_UBI_FASTMAP is not set
-# CONFIG_MTD_UBI_GLUEBI is not set
+CONFIG_MTD_UBI_GLUEBI=y
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_NLS=y
CONFIG_PCIE_LANTIQ=y
ltq-vdsl-app ppp-mod-pppoa
endef
+FRITZ3370_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
+FRITZ3370_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
+
$(eval $(call Profile,FRITZ3370))
CPU_TYPE:=34kc
CPU_SUBTYPE:=dsp
-DEFAULT_PACKAGES+=kmod-leds-gpio kmod-gpio-button-hotplug
+DEFAULT_PACKAGES+=kmod-leds-gpio kmod-gpio-button-hotplug swconfig
define Target/Description
Lantiq XRX200