Hi, i am a newbie. According to the openwrt official document, one thing need to add is the .dts file. And on openwrt source repository commit record, dts file is a wholely new file. Is this dts file only be done by the hardware developer? If the chip is supported by openwrt(like mt7621dat), can i add this new device by myself?
i've copied another dts file, modified the flash layout, and finished compiling, when i flash to device, here are pieces of log:
[ 0.689436] printk: console [ttyS0] enabled
[ 0.689436] printk: console [ttyS0] enabled
[ 0.705930] printk: bootconsole [early0] disabled
[ 0.705930] printk: bootconsole [early0] disabled
[ 0.727672] spi-mt7621 1e000b00.spi: sys_freq: 220000000
[ 0.740777] spi-nor spi0.0: s25fl064k (8192 Kbytes)
[ 0.750582] 4 fixed-partitions partitions found on MTD device spi0.0
[ 0.763282] Creating 4 MTD partitions on "spi0.0":
[ 0.772832] 0x000000000000-0x000000030000 : "Bootloader"
[ 0.784524] 0x000000030000-0x000000040000 : "Config"
[ 0.795351] 0x000000040000-0x000000050000 : "Factory"
[ 0.807050] 0x000000050000-0x000000800000 : "firmware"
[ 0.818692] 2 uimage-fw partitions found on MTD device firmware
[ 0.830589] Creating 2 MTD partitions on "firmware":
[ 0.840501] 0x000000000000-0x0000002981db : "kernel"
[ 0.850392] mtd: partition "kernel" doesn't end on an erase/write block -- force read-only
[ 0.867710] 0x0000002981db-0x0000007b0000 : "rootfs"
[ 0.877714] mtd: partition "rootfs" doesn't start on an erase/write block boundary -- force read-only
[ 0.896901] mtd: device 5 (rootfs) set to be root filesystem
[ 0.908463] 1 squashfs-split partitions found on MTD device rootfs
[ 0.920863] 0x000000700000-0x0000007b0000 : "rootfs_data"
[ 0.974417] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[ 0.989016] mtk_soc_eth 1e100000.ethernet: generated random MAC address de:95:d2:a1:e5:cd
[ 1.006135] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 17
[ 1.023630] i2c /dev entries driver
[ 1.033057] mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges:
[ 1.046475] mt7621-pci 1e140000.pcie: No bus range found for /pcie@1e140000, using [bus 00-ff]
[ 1.064059] mt7621-pci 1e140000.pcie: MEM 0x0060000000..0x006fffffff -> 0x0000000000
[ 1.080393] mt7621-pci 1e140000.pcie: IO 0x001e160000..0x001e16ffff -> 0x0000000000
[ 1.096851] mt7621-pci 1e140000.pcie: Parsing DT failed
[ 1.109766] NET: Registered protocol family 10
[ 1.121146] Segment Routing with IPv6
[ 1.128655] NET: Registered protocol family 17
[ 1.137890] 8021q: 802.1Q VLAN Support v1.8
[ 1.149637] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[ 1.182949] mt7530 mdio-bus:1f wan (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7530 PHY] (irq=22)
[ 1.204794] mt7530 mdio-bus:1f lan (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7530 PHY] (irq=23)
[ 1.228436] mt7530 mdio-bus:1f: configuring for fixed/rgmii link mode
[ 1.245295] DSA: tree 0 setup
[ 1.251576] rt2880-pinmux pinctrl: pcie is already enabled
[ 1.262621] mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges:
[ 1.275994] mt7621-pci 1e140000.pcie: No bus range found for /pcie@1e140000, using [bus 00-ff]
[ 1.293522] mt7621-pci 1e140000.pcie: MEM 0x0060000000..0x006fffffff -> 0x0000000000
[ 1.309835] mt7621-pci 1e140000.pcie: IO 0x001e160000..0x001e16ffff -> 0x0000000000
[ 1.326215] mt7621-pci-phy 1e149000.pcie-phy: PHY for 0xbe149000 (dual port = 1)
[ 1.341375] mt7621-pci-phy 1e14a000.pcie-phy: PHY for 0xbe14a000 (dual port = 0)
[ 1.356435] mt7621-pci 1e140000.pcie: failed to parse bus ranges property: -22
[ 1.471143] mt7621-pci-phy 1e149000.pcie-phy: Xtal is 40MHz
[ 1.482259] mt7621-pci-phy 1e14a000.pcie-phy: Xtal is 40MHz
[ 1.593582] mt7621-pci 1e140000.pcie: pcie1 no card, disable it (RST & CLK)
[ 1.607449] mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)
[ 1.621329] mt7621-pci 1e140000.pcie: PCIE0 enabled
[ 1.631052] mt7621-pci 1e140000.pcie: PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
[ 1.649769] mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
[ 1.662483] pci_bus 0000:00: root bus resource [io 0x1e160000-0x1e16ffff]
[ 1.676194] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[ 1.689891] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 1.700828] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff] (bus address [0x00000000-0x0fffffff])
[ 1.721146] pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
[ 1.733143] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[ 1.745635] pci 0000:00:00.0: reg 0x14: initial BAR value 0x00000000 invalid
[ 1.759673] pci 0000:00:00.0: reg 0x14: [mem size 0x00010000]
[ 1.771191] pci 0000:00:00.0: supports D1
[ 1.779180] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[ 1.792180] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 1.808437] pci 0000:01:00.0: [14c3:7615] type 00 class 0x000280
[ 1.820472] pci 0000:01:00.0: reg 0x10: initial BAR value 0x00000000 invalid
[ 1.834529] pci 0000:01:00.0: reg 0x10: [mem size 0x00100000 64bit]
[ 1.847183] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[ 1.878281] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[ 1.888721] pci 0000:00:00.0: bridge window [io 0x0000-0x0fff]
[ 1.900863] pci 0000:00:00.0: bridge window [mem 0x60000000-0x600fffff]
[ 1.914391] pci 0000:00:00.0: bridge window [mem 0x60000000-0x600fffff pref]
[ 1.928788] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[ 1.942011] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[ 1.955193] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[ 1.969070] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[ 1.982599] pci 0000:00:00.0: BAR 9: assigned [mem 0x60100000-0x601fffff pref]
[ 1.997000] pci 0000:00:00.0: BAR 1: assigned [mem 0x60200000-0x6020ffff]
[ 2.010530] pci 0000:00:00.0: BAR 7: assigned [io 0x1e160000-0x1e160fff]
[ 2.024065] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[ 2.038640] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 2.048533] pci 0000:00:00.0: bridge window [io 0x1e160000-0x1e160fff]
[ 2.062068] pci 0000:00:00.0: bridge window [mem 0x60000000-0x600fffff]
[ 2.075594] pci 0000:00:00.0: bridge window [mem 0x60100000-0x601fffff pref]
[ 2.097340] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[ 2.115529] Freeing unused kernel memory: 1244K
[ 2.124617] This architecture does not have kernel memory protection.
[ 2.137464] Run /sbin/init as init process
[ 2.146278] mt7530 mdio-bus:1f: Link is Up - 1Gbps/Full - flow control rx/tx
[ 2.169180] Run /etc/init as init process
[ 2.181336] Run /bin/init as init process
[ 2.191691] Run /bin/sh as init process
BusyBox v1.35.0 (2022-04-20 10:37:37 UTC) built-in shell (ash)
/bin/sh: can't access tty; job control turned off
/ #
[ 59.622595] random: crng init done