您的位置:首页 > 其它

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

2016-09-27 18:26 429 查看
/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>;
};
};
};
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: