系统在./scripts/medatata.pl中判断并处理RTC_SUPPORT开关,分析之后,原来是在 target/linux/ramips/mt7620/target.mk中,将原始的内容:FEATURES+=usb修改为:FEATURES+=usb rtc即可打开mt7620对rtc的支持.此时,make kernel_menuconfig进入配置菜单.同时应注意,由于ds1307是i2c接口的模块,因此,在device中需要配置i2c的支持.选中i2c之后,便可以在Device Drivers -> Real Time Clock中看到ds1307 .config - Linux/mips 3.14.28 Kernel Configuration > Device Drivers > Real Time Clock ─────────────────────────────────────┌──── Dallas/Maxim DS1307/37/38/39/40, ST M41T00, EPSON RX-8025 ────┐│ CONFIG_RTC_DRV_DS1307:││ ││ If you say yes here you get support for various compatible RTC││ chips (often with battery backup) connected with I2C. This driver ││ should handle DS1307, DS1337, DS1338, DS1339, DS1340, ST M41T00,││ EPSON RX-8025 and probably other chips. In some cases the RTC ││ must already have been initialized (by manufacturing or a ││ bootloader).││ ││ The first seven registers on these chips hold an RTC, and other ││ registers may add features such as NVRAM, a trickle charger for ││ the RTC/NVRAM backup power, and alarms. NVRAM is visible in ││ sysfs, but other chip features may not be available.││ ││ This driver can also be built as a module. If so, the module││ will be called rtc-ds1307.││ ││ Symbol: RTC_DRV_DS1307 [=y] ││ Type: tristate││ Prompt: Dallas/Maxim DS1307/37/38/39/40, ST M41T00, EPSON RX-8025 ││ Location: ││ -> Device Drivers ││ -> Real Time Clock (RTC_CLASS [=y]) ││ Defined at drivers/rtc/Kconfig:166││ Depends on: RTC_CLASS [=y] && I2C [=y]││ ││ ││ │├───────────────────────────────────────────────────────────(100%)──┤│ < Exit >│└───────────────────────────────────────────────────────────────────┘