自己修改dir 615H1 支持usb 修改固件大小

/home/safedebug/openwrt/target/linux/ramips/dts

DIR-615-H1.dts


增加以下兩句

	ehci@101c0000 {
		status = "okay";
	};

	ohci@101c1000 {
		status = "okay";
	};


執行make menuconfig ,添加USB相關支持

Kernel modules —> USB Support —> <*> kmod-usb-core.
Kernel modules —> USB Support —> <*> kmod-usb-ohci.
Kernel modules —> USB Support —> <*> kmod-usb-uhci.
Kernel modules —> USB Support —> <*> kmod-usb-storage.
Kernel modules —> USB Support —> <*> kmod-usb-storage-extras.
Kernel modules —> USB Support —> <*> kmod-usb2.
添加SCSI支持
Kernel modules —> Block Devices —> <*>kmod-scsi-core
添加USB掛載
Base system —> <*>block-mount
添加自動掛載工具
Utilities —> Filesystem —> <*> badblocks
添加文件系統支持
Kernel modules —> Filesystems —> <*> kmod-fs-ext4
Kernel modules —> Filesystems —> <*> kmod-fs-vfat
Kernel modules —> Filesystems —> <*> kmod-fs-ntfs

添加UTF8編碼,CP437編碼,ISO8859-1編碼
Kernel modules —> Native Language Support —> <*> kmod-nls-cp437
Kernel modules —> Native Language Support —> <*> kmod-nls-iso8859-1
Kernel modules —> Native Language Support —> <*> kmod-nls-utf8
Utilities ---> disc ---> <*> fdisk.................................... manipulate disk partition table Utilities ---> <*> usbutils................................... USB devices listing utilities

重新編譯就行了。




完整實例



/dts-v1/;

/include/ "rt3352.dtsi"

/ {
	compatible = "DIR-615-H1", "ralink,rt3352-soc";
	model = "D-Link DIR-615 H1";

	palmbus@10000000 {
		spi@b00 {
			status = "okay";
			m25p80@0 {
				#address-cells = <1>;
				#size-cells = <1>;
				compatible = "mx25l3205d";
				reg = <0 0>;
				linux,modalias = "m25p80", "mx25l3205d";
				spi-max-frequency = <10000000>;

				partition@0 {
					label = "u-boot";
					reg = <0x0 0x30000>;
					read-only;
				};

				partition@30000 {
					label = "u-boot-env";
					reg = <0x30000 0x10000>;
					read-only;
				};

				factory: partition@40000 {
					label = "factory";
					reg = <0x40000 0x10000>;
					read-only;
				};

				partition@50000 {
					label = "firmware";
					reg = <0x50000 0x7b0000>;
				};
			};
		};
	};

	pinctrl {
		state_default: pinctrl0 {
			gpio {
				ralink,group = "i2c", "jtag", "uartf";
				ralink,function = "gpio";
			};
			rgmii {
				ralink,group = "rgmii";
				ralink,function = "rgmii";
			};
			mdio {
				ralink,group = "mdio";
				ralink,function = "mdio";
			};
		};
	};

	ethernet@10100000 {
		mtd-mac-address = <&factory 0x28>;
	};

	esw@10110000 {
		ralink,portmap = <0x2f>;
	};

	wmac@10180000 {
		ralink,mtd-eeprom = <&factory 0>;
	};

	ehci@101c0000 {
		status = "okay";
	};

	ohci@101c1000 {
		status = "okay";
	};

	gpio-leds {
		compatible = "gpio-leds";
		status {
			label = "d-link:amber:status";
			gpios = <&gpio0 7 0>;
		};
		status2 {
			label = "d-link:green:status";
			gpios = <&gpio0 9 0>;
		};
		wan {
			label = "d-link:amber:wan";
			gpios = <&gpio0 12 1>;
		};
		wan2 {
			label = "d-link:green:wan";
			gpios = <&gpio0 13 1>;
		};
		wps {
			label = "d-link:blue:wps";
			gpios = <&gpio0 14 1>;
		};
	};

	gpio-keys-polled {
		compatible = "gpio-keys-polled";
		#address-cells = <1>;
		#size-cells = <0>;
		poll-interval = <20>;
		reset {
			label = "reset";
			gpios = <&gpio0 10 1>;
			linux,code = <0x198>;
		};
		wps {
			label = "wps";
			gpios = <&gpio0 0 1>;
			linux,code = <0x211>;
		};
	};
};

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章