432-add-tplink-xdr608x.patch 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934
  1. --- /dev/null
  2. +++ b/configs/mt7986_tplink_tl-xdr4288_defconfig
  3. @@ -0,0 +1,182 @@
  4. +CONFIG_ARM=y
  5. +CONFIG_POSITION_INDEPENDENT=y
  6. +CONFIG_ARCH_MEDIATEK=y
  7. +CONFIG_TARGET_MT7986=y
  8. +CONFIG_TEXT_BASE=0x41e00000
  9. +CONFIG_SYS_MALLOC_F_LEN=0x4000
  10. +CONFIG_SYS_HAS_NONCACHED_MEMORY=y
  11. +CONFIG_NR_DRAM_BANKS=1
  12. +CONFIG_DEFAULT_DEVICE_TREE="mt7986a-tplink-tl-xdr608x"
  13. +CONFIG_DEFAULT_ENV_FILE="tplink_tl-xdr4288_env"
  14. +CONFIG_DEFAULT_FDT_FILE="mediatek/mt7986a-tplink-tl-xdr608x.dtb"
  15. +CONFIG_OF_LIBFDT_OVERLAY=y
  16. +CONFIG_DEBUG_UART_BASE=0x11002000
  17. +CONFIG_DEBUG_UART_CLOCK=40000000
  18. +CONFIG_DEBUG_UART=y
  19. +CONFIG_SYS_LOAD_ADDR=0x46000000
  20. +CONFIG_SMBIOS_PRODUCT_NAME=""
  21. +CONFIG_AUTOBOOT_KEYED=y
  22. +CONFIG_BOOTDELAY=30
  23. +CONFIG_AUTOBOOT_MENU_SHOW=y
  24. +CONFIG_CFB_CONSOLE_ANSI=y
  25. +CONFIG_BOARD_LATE_INIT=y
  26. +CONFIG_BUTTON=y
  27. +CONFIG_BUTTON_GPIO=y
  28. +CONFIG_GPIO_HOG=y
  29. +CONFIG_CMD_ENV_FLAGS=y
  30. +CONFIG_FIT=y
  31. +CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
  32. +CONFIG_LED=y
  33. +CONFIG_LED_BLINK=y
  34. +CONFIG_LED_GPIO=y
  35. +CONFIG_LOGLEVEL=7
  36. +CONFIG_LOG=y
  37. +CONFIG_SYS_PROMPT="MT7986> "
  38. +CONFIG_CMD_BOOTMENU=y
  39. +CONFIG_CMD_BOOTP=y
  40. +CONFIG_CMD_BUTTON=y
  41. +CONFIG_CMD_CACHE=y
  42. +CONFIG_CMD_CDP=y
  43. +CONFIG_CMD_CPU=y
  44. +CONFIG_CMD_DHCP=y
  45. +CONFIG_CMD_DM=y
  46. +CONFIG_CMD_DNS=y
  47. +CONFIG_CMD_ECHO=y
  48. +CONFIG_CMD_ENV_READMEM=y
  49. +CONFIG_CMD_ERASEENV=y
  50. +CONFIG_CMD_EXT4=y
  51. +CONFIG_CMD_FAT=y
  52. +CONFIG_CMD_FDT=y
  53. +CONFIG_CMD_FS_GENERIC=y
  54. +CONFIG_CMD_FS_UUID=y
  55. +CONFIG_CMD_GPIO=y
  56. +CONFIG_CMD_GPT=y
  57. +CONFIG_CMD_HASH=y
  58. +CONFIG_CMD_ITEST=y
  59. +CONFIG_CMD_LED=y
  60. +CONFIG_CMD_LICENSE=y
  61. +CONFIG_CMD_LINK_LOCAL=y
  62. +# CONFIG_CMD_MBR is not set
  63. +CONFIG_CMD_PCI=y
  64. +CONFIG_CMD_PSTORE=y
  65. +CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
  66. +CONFIG_CMD_SF_TEST=y
  67. +CONFIG_CMD_PING=y
  68. +CONFIG_CMD_PXE=y
  69. +CONFIG_CMD_PWM=y
  70. +CONFIG_CMD_SMC=y
  71. +CONFIG_CMD_TFTPBOOT=y
  72. +CONFIG_CMD_TFTPSRV=y
  73. +CONFIG_CMD_UBI=y
  74. +CONFIG_CMD_UBI_RENAME=y
  75. +CONFIG_CMD_UBIFS=y
  76. +CONFIG_CMD_ASKENV=y
  77. +CONFIG_CMD_PART=y
  78. +CONFIG_CMD_RARP=y
  79. +CONFIG_CMD_SETEXPR=y
  80. +CONFIG_CMD_SLEEP=y
  81. +CONFIG_CMD_SNTP=y
  82. +CONFIG_CMD_SOURCE=y
  83. +CONFIG_CMD_STRINGS=y
  84. +CONFIG_CMD_USB=y
  85. +CONFIG_CMD_UUID=y
  86. +CONFIG_DISPLAY_CPUINFO=y
  87. +CONFIG_DM_MTD=y
  88. +CONFIG_DM_REGULATOR=y
  89. +CONFIG_DM_REGULATOR_FIXED=y
  90. +CONFIG_DM_REGULATOR_GPIO=y
  91. +CONFIG_DM_USB=y
  92. +CONFIG_DM_PWM=y
  93. +CONFIG_PWM_MTK=y
  94. +CONFIG_HUSH_PARSER=y
  95. +CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
  96. +CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  97. +CONFIG_VERSION_VARIABLE=y
  98. +CONFIG_PARTITION_UUIDS=y
  99. +CONFIG_NETCONSOLE=y
  100. +CONFIG_REGMAP=y
  101. +CONFIG_SYSCON=y
  102. +CONFIG_CLK=y
  103. +CONFIG_DM_GPIO=y
  104. +CONFIG_DM_SCSI=y
  105. +CONFIG_AHCI=y
  106. +CONFIG_AHCI_PCI=y
  107. +CONFIG_SCSI_AHCI=y
  108. +CONFIG_SCSI=y
  109. +CONFIG_CMD_SCSI=y
  110. +CONFIG_PHY=y
  111. +CONFIG_PHY_MTK_TPHY=y
  112. +CONFIG_PHY_FIXED=y
  113. +CONFIG_MTK_AHCI=y
  114. +CONFIG_DM_ETH=y
  115. +CONFIG_MEDIATEK_ETH=y
  116. +CONFIG_PCI=y
  117. +# CONFIG_MMC is not set
  118. +# CONFIG_DM_MMC is not set
  119. +CONFIG_MTD=y
  120. +CONFIG_MTD_UBI_FASTMAP=y
  121. +CONFIG_DM_PCI=y
  122. +CONFIG_PCIE_MEDIATEK=y
  123. +CONFIG_PINCTRL=y
  124. +CONFIG_PINCONF=y
  125. +CONFIG_PINCTRL_MT7622=y
  126. +CONFIG_POWER_DOMAIN=y
  127. +CONFIG_PRE_CONSOLE_BUFFER=y
  128. +CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
  129. +CONFIG_MTK_POWER_DOMAIN=y
  130. +CONFIG_RAM=y
  131. +CONFIG_DM_SERIAL=y
  132. +CONFIG_MTK_SERIAL=y
  133. +CONFIG_SPI=y
  134. +CONFIG_DM_SPI=y
  135. +CONFIG_MTK_SPI_NAND=y
  136. +CONFIG_MTK_SPI_NAND_MTD=y
  137. +CONFIG_SYSRESET_WATCHDOG=y
  138. +CONFIG_WDT_MTK=y
  139. +CONFIG_LZO=y
  140. +CONFIG_ZSTD=y
  141. +CONFIG_HEXDUMP=y
  142. +CONFIG_RANDOM_UUID=y
  143. +CONFIG_REGEX=y
  144. +CONFIG_USB=y
  145. +CONFIG_USB_HOST=y
  146. +CONFIG_USB_XHCI_HCD=y
  147. +CONFIG_USB_XHCI_MTK=y
  148. +CONFIG_USB_STORAGE=y
  149. +CONFIG_OF_EMBED=y
  150. +CONFIG_ENV_OVERWRITE=y
  151. +CONFIG_ENV_IS_IN_UBI=y
  152. +CONFIG_ENV_UBI_PART="ubi"
  153. +CONFIG_ENV_SIZE=0x1f000
  154. +CONFIG_ENV_SIZE_REDUND=0x1f000
  155. +CONFIG_ENV_UBI_VOLUME="ubootenv"
  156. +CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
  157. +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
  158. +CONFIG_NET_RANDOM_ETHADDR=y
  159. +CONFIG_REGMAP=y
  160. +CONFIG_SYSCON=y
  161. +CONFIG_CLK=y
  162. +CONFIG_PHY_FIXED=y
  163. +CONFIG_DM_ETH=y
  164. +CONFIG_MEDIATEK_ETH=y
  165. +CONFIG_PINCTRL=y
  166. +CONFIG_PINCONF=y
  167. +CONFIG_PINCTRL_MT7986=y
  168. +CONFIG_POWER_DOMAIN=y
  169. +CONFIG_MTK_POWER_DOMAIN=y
  170. +CONFIG_DM_REGULATOR=y
  171. +CONFIG_DM_REGULATOR_FIXED=y
  172. +CONFIG_DM_SERIAL=y
  173. +CONFIG_MTK_SERIAL=y
  174. +CONFIG_HEXDUMP=y
  175. +CONFIG_USE_DEFAULT_ENV_FILE=y
  176. +CONFIG_MTD_SPI_NAND=y
  177. +CONFIG_MTK_SPIM=y
  178. +CONFIG_CMD_MTD=y
  179. +CONFIG_CMD_NAND=y
  180. +CONFIG_CMD_NAND_TRIMFFS=y
  181. +CONFIG_LMB_MAX_REGIONS=64
  182. +CONFIG_USE_IPADDR=y
  183. +CONFIG_IPADDR="192.168.1.1"
  184. +CONFIG_USE_SERVERIP=y
  185. +CONFIG_SERVERIP="192.168.1.254"
  186. --- /dev/null
  187. +++ b/configs/mt7986_tplink_tl-xdr6086_defconfig
  188. @@ -0,0 +1,182 @@
  189. +CONFIG_ARM=y
  190. +CONFIG_POSITION_INDEPENDENT=y
  191. +CONFIG_ARCH_MEDIATEK=y
  192. +CONFIG_TARGET_MT7986=y
  193. +CONFIG_TEXT_BASE=0x41e00000
  194. +CONFIG_SYS_MALLOC_F_LEN=0x4000
  195. +CONFIG_SYS_HAS_NONCACHED_MEMORY=y
  196. +CONFIG_NR_DRAM_BANKS=1
  197. +CONFIG_DEFAULT_DEVICE_TREE="mt7986a-tplink-tl-xdr608x"
  198. +CONFIG_DEFAULT_ENV_FILE="tplink_tl-xdr6086_env"
  199. +CONFIG_DEFAULT_FDT_FILE="mediatek/mt7986a-tplink-tl-xdr608x.dtb"
  200. +CONFIG_OF_LIBFDT_OVERLAY=y
  201. +CONFIG_DEBUG_UART_BASE=0x11002000
  202. +CONFIG_DEBUG_UART_CLOCK=40000000
  203. +CONFIG_DEBUG_UART=y
  204. +CONFIG_SYS_LOAD_ADDR=0x46000000
  205. +CONFIG_SMBIOS_PRODUCT_NAME=""
  206. +CONFIG_AUTOBOOT_KEYED=y
  207. +CONFIG_BOOTDELAY=30
  208. +CONFIG_AUTOBOOT_MENU_SHOW=y
  209. +CONFIG_CFB_CONSOLE_ANSI=y
  210. +CONFIG_BOARD_LATE_INIT=y
  211. +CONFIG_BUTTON=y
  212. +CONFIG_BUTTON_GPIO=y
  213. +CONFIG_GPIO_HOG=y
  214. +CONFIG_CMD_ENV_FLAGS=y
  215. +CONFIG_FIT=y
  216. +CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
  217. +CONFIG_LED=y
  218. +CONFIG_LED_BLINK=y
  219. +CONFIG_LED_GPIO=y
  220. +CONFIG_LOGLEVEL=7
  221. +CONFIG_LOG=y
  222. +CONFIG_SYS_PROMPT="MT7986> "
  223. +CONFIG_CMD_BOOTMENU=y
  224. +CONFIG_CMD_BOOTP=y
  225. +CONFIG_CMD_BUTTON=y
  226. +CONFIG_CMD_CACHE=y
  227. +CONFIG_CMD_CDP=y
  228. +CONFIG_CMD_CPU=y
  229. +CONFIG_CMD_DHCP=y
  230. +CONFIG_CMD_DM=y
  231. +CONFIG_CMD_DNS=y
  232. +CONFIG_CMD_ECHO=y
  233. +CONFIG_CMD_ENV_READMEM=y
  234. +CONFIG_CMD_ERASEENV=y
  235. +CONFIG_CMD_EXT4=y
  236. +CONFIG_CMD_FAT=y
  237. +CONFIG_CMD_FDT=y
  238. +CONFIG_CMD_FS_GENERIC=y
  239. +CONFIG_CMD_FS_UUID=y
  240. +CONFIG_CMD_GPIO=y
  241. +CONFIG_CMD_GPT=y
  242. +CONFIG_CMD_HASH=y
  243. +CONFIG_CMD_ITEST=y
  244. +CONFIG_CMD_LED=y
  245. +CONFIG_CMD_LICENSE=y
  246. +CONFIG_CMD_LINK_LOCAL=y
  247. +# CONFIG_CMD_MBR is not set
  248. +CONFIG_CMD_PCI=y
  249. +CONFIG_CMD_PSTORE=y
  250. +CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
  251. +CONFIG_CMD_SF_TEST=y
  252. +CONFIG_CMD_PING=y
  253. +CONFIG_CMD_PXE=y
  254. +CONFIG_CMD_PWM=y
  255. +CONFIG_CMD_SMC=y
  256. +CONFIG_CMD_TFTPBOOT=y
  257. +CONFIG_CMD_TFTPSRV=y
  258. +CONFIG_CMD_UBI=y
  259. +CONFIG_CMD_UBI_RENAME=y
  260. +CONFIG_CMD_UBIFS=y
  261. +CONFIG_CMD_ASKENV=y
  262. +CONFIG_CMD_PART=y
  263. +CONFIG_CMD_RARP=y
  264. +CONFIG_CMD_SETEXPR=y
  265. +CONFIG_CMD_SLEEP=y
  266. +CONFIG_CMD_SNTP=y
  267. +CONFIG_CMD_SOURCE=y
  268. +CONFIG_CMD_STRINGS=y
  269. +CONFIG_CMD_USB=y
  270. +CONFIG_CMD_UUID=y
  271. +CONFIG_DISPLAY_CPUINFO=y
  272. +CONFIG_DM_MTD=y
  273. +CONFIG_DM_REGULATOR=y
  274. +CONFIG_DM_REGULATOR_FIXED=y
  275. +CONFIG_DM_REGULATOR_GPIO=y
  276. +CONFIG_DM_USB=y
  277. +CONFIG_DM_PWM=y
  278. +CONFIG_PWM_MTK=y
  279. +CONFIG_HUSH_PARSER=y
  280. +CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
  281. +CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  282. +CONFIG_VERSION_VARIABLE=y
  283. +CONFIG_PARTITION_UUIDS=y
  284. +CONFIG_NETCONSOLE=y
  285. +CONFIG_REGMAP=y
  286. +CONFIG_SYSCON=y
  287. +CONFIG_CLK=y
  288. +CONFIG_DM_GPIO=y
  289. +CONFIG_DM_SCSI=y
  290. +CONFIG_AHCI=y
  291. +CONFIG_AHCI_PCI=y
  292. +CONFIG_SCSI_AHCI=y
  293. +CONFIG_SCSI=y
  294. +CONFIG_CMD_SCSI=y
  295. +CONFIG_PHY=y
  296. +CONFIG_PHY_MTK_TPHY=y
  297. +CONFIG_PHY_FIXED=y
  298. +CONFIG_MTK_AHCI=y
  299. +CONFIG_DM_ETH=y
  300. +CONFIG_MEDIATEK_ETH=y
  301. +CONFIG_PCI=y
  302. +# CONFIG_MMC is not set
  303. +# CONFIG_DM_MMC is not set
  304. +CONFIG_MTD=y
  305. +CONFIG_MTD_UBI_FASTMAP=y
  306. +CONFIG_DM_PCI=y
  307. +CONFIG_PCIE_MEDIATEK=y
  308. +CONFIG_PINCTRL=y
  309. +CONFIG_PINCONF=y
  310. +CONFIG_PINCTRL_MT7622=y
  311. +CONFIG_POWER_DOMAIN=y
  312. +CONFIG_PRE_CONSOLE_BUFFER=y
  313. +CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
  314. +CONFIG_MTK_POWER_DOMAIN=y
  315. +CONFIG_RAM=y
  316. +CONFIG_DM_SERIAL=y
  317. +CONFIG_MTK_SERIAL=y
  318. +CONFIG_SPI=y
  319. +CONFIG_DM_SPI=y
  320. +CONFIG_MTK_SPI_NAND=y
  321. +CONFIG_MTK_SPI_NAND_MTD=y
  322. +CONFIG_SYSRESET_WATCHDOG=y
  323. +CONFIG_WDT_MTK=y
  324. +CONFIG_LZO=y
  325. +CONFIG_ZSTD=y
  326. +CONFIG_HEXDUMP=y
  327. +CONFIG_RANDOM_UUID=y
  328. +CONFIG_REGEX=y
  329. +CONFIG_USB=y
  330. +CONFIG_USB_HOST=y
  331. +CONFIG_USB_XHCI_HCD=y
  332. +CONFIG_USB_XHCI_MTK=y
  333. +CONFIG_USB_STORAGE=y
  334. +CONFIG_OF_EMBED=y
  335. +CONFIG_ENV_OVERWRITE=y
  336. +CONFIG_ENV_IS_IN_UBI=y
  337. +CONFIG_ENV_UBI_PART="ubi"
  338. +CONFIG_ENV_SIZE=0x1f000
  339. +CONFIG_ENV_SIZE_REDUND=0x1f000
  340. +CONFIG_ENV_UBI_VOLUME="ubootenv"
  341. +CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
  342. +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
  343. +CONFIG_NET_RANDOM_ETHADDR=y
  344. +CONFIG_REGMAP=y
  345. +CONFIG_SYSCON=y
  346. +CONFIG_CLK=y
  347. +CONFIG_PHY_FIXED=y
  348. +CONFIG_DM_ETH=y
  349. +CONFIG_MEDIATEK_ETH=y
  350. +CONFIG_PINCTRL=y
  351. +CONFIG_PINCONF=y
  352. +CONFIG_PINCTRL_MT7986=y
  353. +CONFIG_POWER_DOMAIN=y
  354. +CONFIG_MTK_POWER_DOMAIN=y
  355. +CONFIG_DM_REGULATOR=y
  356. +CONFIG_DM_REGULATOR_FIXED=y
  357. +CONFIG_DM_SERIAL=y
  358. +CONFIG_MTK_SERIAL=y
  359. +CONFIG_HEXDUMP=y
  360. +CONFIG_USE_DEFAULT_ENV_FILE=y
  361. +CONFIG_MTD_SPI_NAND=y
  362. +CONFIG_MTK_SPIM=y
  363. +CONFIG_CMD_MTD=y
  364. +CONFIG_CMD_NAND=y
  365. +CONFIG_CMD_NAND_TRIMFFS=y
  366. +CONFIG_LMB_MAX_REGIONS=64
  367. +CONFIG_USE_IPADDR=y
  368. +CONFIG_IPADDR="192.168.1.1"
  369. +CONFIG_USE_SERVERIP=y
  370. +CONFIG_SERVERIP="192.168.1.254"
  371. --- /dev/null
  372. +++ b/configs/mt7986_tplink_tl-xdr6088_defconfig
  373. @@ -0,0 +1,182 @@
  374. +CONFIG_ARM=y
  375. +CONFIG_POSITION_INDEPENDENT=y
  376. +CONFIG_ARCH_MEDIATEK=y
  377. +CONFIG_TARGET_MT7986=y
  378. +CONFIG_TEXT_BASE=0x41e00000
  379. +CONFIG_SYS_HAS_NONCACHED_MEMORY=y
  380. +CONFIG_SYS_MALLOC_F_LEN=0x4000
  381. +CONFIG_NR_DRAM_BANKS=1
  382. +CONFIG_DEFAULT_DEVICE_TREE="mt7986a-tplink-tl-xdr608x"
  383. +CONFIG_DEFAULT_ENV_FILE="tplink_tl-xdr6088_env"
  384. +CONFIG_DEFAULT_FDT_FILE="mediatek/mt7986a-tplink-tl-xdr608x.dtb"
  385. +CONFIG_OF_LIBFDT_OVERLAY=y
  386. +CONFIG_DEBUG_UART_BASE=0x11002000
  387. +CONFIG_DEBUG_UART_CLOCK=40000000
  388. +CONFIG_DEBUG_UART=y
  389. +CONFIG_SYS_LOAD_ADDR=0x46000000
  390. +CONFIG_SMBIOS_PRODUCT_NAME=""
  391. +CONFIG_AUTOBOOT_KEYED=y
  392. +CONFIG_BOOTDELAY=30
  393. +CONFIG_AUTOBOOT_MENU_SHOW=y
  394. +CONFIG_CFB_CONSOLE_ANSI=y
  395. +CONFIG_BOARD_LATE_INIT=y
  396. +CONFIG_BUTTON=y
  397. +CONFIG_BUTTON_GPIO=y
  398. +CONFIG_GPIO_HOG=y
  399. +CONFIG_CMD_ENV_FLAGS=y
  400. +CONFIG_FIT=y
  401. +CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
  402. +CONFIG_LED=y
  403. +CONFIG_LED_BLINK=y
  404. +CONFIG_LED_GPIO=y
  405. +CONFIG_LOGLEVEL=7
  406. +CONFIG_LOG=y
  407. +CONFIG_SYS_PROMPT="MT7986> "
  408. +CONFIG_CMD_BOOTMENU=y
  409. +CONFIG_CMD_BOOTP=y
  410. +CONFIG_CMD_BUTTON=y
  411. +CONFIG_CMD_CACHE=y
  412. +CONFIG_CMD_CDP=y
  413. +CONFIG_CMD_CPU=y
  414. +CONFIG_CMD_DHCP=y
  415. +CONFIG_CMD_DM=y
  416. +CONFIG_CMD_DNS=y
  417. +CONFIG_CMD_ECHO=y
  418. +CONFIG_CMD_ENV_READMEM=y
  419. +CONFIG_CMD_ERASEENV=y
  420. +CONFIG_CMD_EXT4=y
  421. +CONFIG_CMD_FAT=y
  422. +CONFIG_CMD_FDT=y
  423. +CONFIG_CMD_FS_GENERIC=y
  424. +CONFIG_CMD_FS_UUID=y
  425. +CONFIG_CMD_GPIO=y
  426. +CONFIG_CMD_GPT=y
  427. +CONFIG_CMD_HASH=y
  428. +CONFIG_CMD_ITEST=y
  429. +CONFIG_CMD_LED=y
  430. +CONFIG_CMD_LICENSE=y
  431. +CONFIG_CMD_LINK_LOCAL=y
  432. +# CONFIG_CMD_MBR is not set
  433. +CONFIG_CMD_PCI=y
  434. +CONFIG_CMD_PSTORE=y
  435. +CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
  436. +CONFIG_CMD_SF_TEST=y
  437. +CONFIG_CMD_PING=y
  438. +CONFIG_CMD_PXE=y
  439. +CONFIG_CMD_PWM=y
  440. +CONFIG_CMD_SMC=y
  441. +CONFIG_CMD_TFTPBOOT=y
  442. +CONFIG_CMD_TFTPSRV=y
  443. +CONFIG_CMD_UBI=y
  444. +CONFIG_CMD_UBI_RENAME=y
  445. +CONFIG_CMD_UBIFS=y
  446. +CONFIG_CMD_ASKENV=y
  447. +CONFIG_CMD_PART=y
  448. +CONFIG_CMD_RARP=y
  449. +CONFIG_CMD_SETEXPR=y
  450. +CONFIG_CMD_SLEEP=y
  451. +CONFIG_CMD_SNTP=y
  452. +CONFIG_CMD_SOURCE=y
  453. +CONFIG_CMD_STRINGS=y
  454. +CONFIG_CMD_USB=y
  455. +CONFIG_CMD_UUID=y
  456. +CONFIG_DISPLAY_CPUINFO=y
  457. +CONFIG_DM_MTD=y
  458. +CONFIG_DM_REGULATOR=y
  459. +CONFIG_DM_REGULATOR_FIXED=y
  460. +CONFIG_DM_REGULATOR_GPIO=y
  461. +CONFIG_DM_USB=y
  462. +CONFIG_DM_PWM=y
  463. +CONFIG_PWM_MTK=y
  464. +CONFIG_HUSH_PARSER=y
  465. +CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
  466. +CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  467. +CONFIG_VERSION_VARIABLE=y
  468. +CONFIG_PARTITION_UUIDS=y
  469. +CONFIG_NETCONSOLE=y
  470. +CONFIG_REGMAP=y
  471. +CONFIG_SYSCON=y
  472. +CONFIG_CLK=y
  473. +CONFIG_DM_GPIO=y
  474. +CONFIG_DM_SCSI=y
  475. +CONFIG_AHCI=y
  476. +CONFIG_AHCI_PCI=y
  477. +CONFIG_SCSI_AHCI=y
  478. +CONFIG_SCSI=y
  479. +CONFIG_CMD_SCSI=y
  480. +CONFIG_PHY=y
  481. +CONFIG_PHY_MTK_TPHY=y
  482. +CONFIG_PHY_FIXED=y
  483. +CONFIG_MTK_AHCI=y
  484. +CONFIG_DM_ETH=y
  485. +CONFIG_MEDIATEK_ETH=y
  486. +CONFIG_PCI=y
  487. +# CONFIG_MMC is not set
  488. +# CONFIG_DM_MMC is not set
  489. +CONFIG_MTD=y
  490. +CONFIG_MTD_UBI_FASTMAP=y
  491. +CONFIG_DM_PCI=y
  492. +CONFIG_PCIE_MEDIATEK=y
  493. +CONFIG_PINCTRL=y
  494. +CONFIG_PINCONF=y
  495. +CONFIG_PINCTRL_MT7622=y
  496. +CONFIG_POWER_DOMAIN=y
  497. +CONFIG_PRE_CONSOLE_BUFFER=y
  498. +CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
  499. +CONFIG_MTK_POWER_DOMAIN=y
  500. +CONFIG_RAM=y
  501. +CONFIG_DM_SERIAL=y
  502. +CONFIG_MTK_SERIAL=y
  503. +CONFIG_SPI=y
  504. +CONFIG_DM_SPI=y
  505. +CONFIG_MTK_SPI_NAND=y
  506. +CONFIG_MTK_SPI_NAND_MTD=y
  507. +CONFIG_SYSRESET_WATCHDOG=y
  508. +CONFIG_WDT_MTK=y
  509. +CONFIG_LZO=y
  510. +CONFIG_ZSTD=y
  511. +CONFIG_HEXDUMP=y
  512. +CONFIG_RANDOM_UUID=y
  513. +CONFIG_REGEX=y
  514. +CONFIG_USB=y
  515. +CONFIG_USB_HOST=y
  516. +CONFIG_USB_XHCI_HCD=y
  517. +CONFIG_USB_XHCI_MTK=y
  518. +CONFIG_USB_STORAGE=y
  519. +CONFIG_OF_EMBED=y
  520. +CONFIG_ENV_OVERWRITE=y
  521. +CONFIG_ENV_IS_IN_UBI=y
  522. +CONFIG_ENV_UBI_PART="ubi"
  523. +CONFIG_ENV_SIZE=0x1f000
  524. +CONFIG_ENV_SIZE_REDUND=0x1f000
  525. +CONFIG_ENV_UBI_VOLUME="ubootenv"
  526. +CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
  527. +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
  528. +CONFIG_NET_RANDOM_ETHADDR=y
  529. +CONFIG_REGMAP=y
  530. +CONFIG_SYSCON=y
  531. +CONFIG_CLK=y
  532. +CONFIG_PHY_FIXED=y
  533. +CONFIG_DM_ETH=y
  534. +CONFIG_MEDIATEK_ETH=y
  535. +CONFIG_PINCTRL=y
  536. +CONFIG_PINCONF=y
  537. +CONFIG_PINCTRL_MT7986=y
  538. +CONFIG_POWER_DOMAIN=y
  539. +CONFIG_MTK_POWER_DOMAIN=y
  540. +CONFIG_DM_REGULATOR=y
  541. +CONFIG_DM_REGULATOR_FIXED=y
  542. +CONFIG_DM_SERIAL=y
  543. +CONFIG_MTK_SERIAL=y
  544. +CONFIG_HEXDUMP=y
  545. +CONFIG_USE_DEFAULT_ENV_FILE=y
  546. +CONFIG_MTD_SPI_NAND=y
  547. +CONFIG_MTK_SPIM=y
  548. +CONFIG_CMD_MTD=y
  549. +CONFIG_CMD_NAND=y
  550. +CONFIG_CMD_NAND_TRIMFFS=y
  551. +CONFIG_LMB_MAX_REGIONS=64
  552. +CONFIG_USE_IPADDR=y
  553. +CONFIG_IPADDR="192.168.1.1"
  554. +CONFIG_USE_SERVERIP=y
  555. +CONFIG_SERVERIP="192.168.1.254"
  556. --- /dev/null
  557. +++ b/arch/arm/dts/mt7986a-tplink-tl-xdr608x.dts
  558. @@ -0,0 +1,196 @@
  559. +// SPDX-License-Identifier: GPL-2.0
  560. +/*
  561. + * Copyright (c) 2021 MediaTek Inc.
  562. + * Author: Sam Shih <[email protected]>
  563. + */
  564. +
  565. +/dts-v1/;
  566. +#include "mt7986.dtsi"
  567. +#include <dt-bindings/gpio/gpio.h>
  568. +#include <dt-bindings/input/linux-event-codes.h>
  569. +
  570. +/ {
  571. + #address-cells = <1>;
  572. + #size-cells = <1>;
  573. + model = "TP-Link TL-XDR608x";
  574. + compatible = "mediatek,mt7986", "mediatek,mt7986-rfb";
  575. +
  576. + chosen {
  577. + stdout-path = &uart0;
  578. + tick-timer = &timer0;
  579. + };
  580. +
  581. + memory@40000000 {
  582. + device_type = "memory";
  583. + reg = <0x40000000 0x20000000>;
  584. + };
  585. +
  586. + keys {
  587. + compatible = "gpio-keys";
  588. +
  589. + factory {
  590. + label = "reset";
  591. + linux,code = <KEY_RESTART>;
  592. + gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
  593. + };
  594. +
  595. + wps {
  596. + label = "wps";
  597. + linux,code = <KEY_WPS_BUTTON>;
  598. + gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
  599. + };
  600. +
  601. + turbo {
  602. + label = "turbo";
  603. + linux,code = <BTN_1>;
  604. + gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
  605. + };
  606. + };
  607. +
  608. + leds {
  609. + compatible = "gpio-leds";
  610. +
  611. + status_red {
  612. + label = "red:status";
  613. + gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
  614. + };
  615. +
  616. + status_green {
  617. + label = "green:status";
  618. + gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
  619. + };
  620. +
  621. + turbo {
  622. + label = "green:turbo";
  623. + gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
  624. + };
  625. + };
  626. +};
  627. +
  628. +&uart0 {
  629. + mediatek,force-highspeed;
  630. + status = "okay";
  631. +};
  632. +
  633. +&uart1 {
  634. + pinctrl-names = "default";
  635. + pinctrl-0 = <&uart1_pins>;
  636. + status = "disabled";
  637. +};
  638. +
  639. +&eth {
  640. + status = "okay";
  641. + mediatek,gmac-id = <0>;
  642. + phy-mode = "2500base-x";
  643. + mediatek,switch = "mt7531";
  644. + reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
  645. +
  646. + fixed-link {
  647. + speed = <2500>;
  648. + full-duplex;
  649. + };
  650. +};
  651. +
  652. +&pinctrl {
  653. + spi_flash_pins: spi0-pins-func-1 {
  654. + mux {
  655. + function = "flash";
  656. + groups = "spi0", "spi0_wp_hold";
  657. + };
  658. +
  659. + conf-pu {
  660. + pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
  661. + drive-strength = <MTK_DRIVE_8mA>;
  662. + bias-pull-up = <MTK_PUPD_SET_R1R0_00>;
  663. + };
  664. +
  665. + conf-pd {
  666. + pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
  667. + drive-strength = <MTK_DRIVE_8mA>;
  668. + bias-pull-down = <MTK_PUPD_SET_R1R0_00>;
  669. + };
  670. + };
  671. +
  672. + spic_pins: spi1-pins-func-1 {
  673. + mux {
  674. + function = "spi";
  675. + groups = "spi1_2";
  676. + };
  677. + };
  678. +
  679. + uart1_pins: spi1-pins-func-3 {
  680. + mux {
  681. + function = "uart";
  682. + groups = "uart1_2";
  683. + };
  684. + };
  685. +
  686. + pwm_pins: pwm0-pins-func-1 {
  687. + mux {
  688. + function = "pwm";
  689. + groups = "pwm0";
  690. + };
  691. + };
  692. +};
  693. +
  694. +&pwm {
  695. + pinctrl-names = "default";
  696. + pinctrl-0 = <&pwm_pins>;
  697. + status = "okay";
  698. +};
  699. +
  700. +&spi0 {
  701. + #address-cells = <1>;
  702. + #size-cells = <0>;
  703. + pinctrl-names = "default";
  704. + pinctrl-0 = <&spi_flash_pins>;
  705. + status = "okay";
  706. + must_tx;
  707. + enhance_timing;
  708. + dma_ext;
  709. + ipm_design;
  710. + support_quad;
  711. + tick_dly = <1>;
  712. + sample_sel = <0>;
  713. +
  714. + spi_nand@1 {
  715. + compatible = "spi-nand";
  716. + reg = <1>;
  717. + spi-max-frequency = <52000000>;
  718. +
  719. + partitions {
  720. + compatible = "fixed-partitions";
  721. + #address-cells = <1>;
  722. + #size-cells = <1>;
  723. +
  724. + partition@0 {
  725. + label = "bl2";
  726. + reg = <0x0 0x80000>;
  727. + };
  728. +
  729. + partition@100000 {
  730. + label = "config";
  731. + reg = <0x100000 0x60000>;
  732. + };
  733. +
  734. + partition@160000 {
  735. + label = "factory";
  736. + reg = <0x160000 0x60000>;
  737. + };
  738. +
  739. + partition@380000 {
  740. + label = "fip";
  741. + reg = <0x380000 0x200000>;
  742. + };
  743. +
  744. + partition@580000 {
  745. + label = "ubi";
  746. + reg = <0x580000 0x7800000>;
  747. + };
  748. + };
  749. + };
  750. +};
  751. +
  752. +&watchdog {
  753. + status = "disabled";
  754. +};
  755. --- /dev/null
  756. +++ b/tplink_tl-xdr4288_env
  757. @@ -0,0 +1,57 @@
  758. +ethaddr_factory=mtd read config 0x40080000 0x0 0x20000 && env readmem -b ethaddr 0x4008001c 0x6 ; setenv ethaddr_factory
  759. +ipaddr=192.168.1.1
  760. +serverip=192.168.1.254
  761. +loadaddr=0x46000000
  762. +console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
  763. +bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
  764. +bootconf=config-1
  765. +bootdelay=0
  766. +bootfile=openwrt-mediatek-filogic-tplink_tl-xdr4288-initramfs-recovery.itb
  767. +bootfile_bl2=openwrt-mediatek-filogic-tplink_tl-xdr4288-preloader.bin
  768. +bootfile_fip=openwrt-mediatek-filogic-tplink_tl-xdr4288-bl31-uboot.fip
  769. +bootfile_upg=openwrt-mediatek-filogic-tplink_tl-xdr4288-squashfs-sysupgrade.itb
  770. +bootled_pwr=green:status
  771. +bootled_rec=red:status
  772. +bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
  773. +bootmenu_default=0
  774. +bootmenu_delay=0
  775. +bootmenu_title= ( ( ( OpenWrt ) ) )
  776. +bootmenu_0=Initialize environment.=run _firstboot
  777. +bootmenu_0d=Run default boot command.=run boot_default
  778. +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
  779. +bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
  780. +bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
  781. +bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
  782. +bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
  783. +bootmenu_6=Load BL31+U-Boot FIP via TFTP then write to NAND.=run boot_tftp_write_fip ; run bootmenu_confirm_return
  784. +bootmenu_7=Load BL2 preloader via TFTP then write to NAND.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
  785. +bootmenu_8=Reboot.=reset
  786. +bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
  787. +boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
  788. +boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
  789. +boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
  790. +boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
  791. +boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
  792. +boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
  793. +boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
  794. +boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
  795. +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
  796. +boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
  797. +boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
  798. +part_default=production
  799. +part_recovery=recovery
  800. +reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
  801. +mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
  802. +mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
  803. +ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic 0 || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic 1 || run ubi_format
  804. +ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
  805. +ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
  806. +ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
  807. +ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
  808. +ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
  809. +ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize
  810. +ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize
  811. +_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
  812. +_firstboot=setenv _firstboot ; run ethaddr_factory ; run _switch_to_menu ; run _init_env ; run boot_first
  813. +_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
  814. +_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver"
  815. --- /dev/null
  816. +++ b/tplink_tl-xdr6086_env
  817. @@ -0,0 +1,57 @@
  818. +ethaddr_factory=mtd read config 0x40080000 0x0 0x20000 && env readmem -b ethaddr 0x4008001c 0x6 ; setenv ethaddr_factory
  819. +ipaddr=192.168.1.1
  820. +serverip=192.168.1.254
  821. +loadaddr=0x46000000
  822. +console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
  823. +bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
  824. +bootconf=config-1
  825. +bootdelay=0
  826. +bootfile=openwrt-mediatek-filogic-tplink_tl-xdr6086-initramfs-recovery.itb
  827. +bootfile_bl2=openwrt-mediatek-filogic-tplink_tl-xdr6086-preloader.bin
  828. +bootfile_fip=openwrt-mediatek-filogic-tplink_tl-xdr6086-bl31-uboot.fip
  829. +bootfile_upg=openwrt-mediatek-filogic-tplink_tl-xdr6086-squashfs-sysupgrade.itb
  830. +bootled_pwr=green:status
  831. +bootled_rec=red:status
  832. +bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
  833. +bootmenu_default=0
  834. +bootmenu_delay=0
  835. +bootmenu_title= ( ( ( OpenWrt ) ) )
  836. +bootmenu_0=Initialize environment.=run _firstboot
  837. +bootmenu_0d=Run default boot command.=run boot_default
  838. +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
  839. +bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
  840. +bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
  841. +bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
  842. +bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
  843. +bootmenu_6=Load BL31+U-Boot FIP via TFTP then write to NAND.=run boot_tftp_write_fip ; run bootmenu_confirm_return
  844. +bootmenu_7=Load BL2 preloader via TFTP then write to NAND.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
  845. +bootmenu_8=Reboot.=reset
  846. +bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
  847. +boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
  848. +boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
  849. +boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
  850. +boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
  851. +boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
  852. +boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
  853. +boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
  854. +boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
  855. +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
  856. +boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
  857. +boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
  858. +part_default=production
  859. +part_recovery=recovery
  860. +reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
  861. +mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
  862. +mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
  863. +ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic 0 || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic 1 || run ubi_format
  864. +ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
  865. +ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
  866. +ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
  867. +ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
  868. +ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
  869. +ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize
  870. +ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize
  871. +_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
  872. +_firstboot=setenv _firstboot ; run ethaddr_factory ; run _switch_to_menu ; run _init_env ; run boot_first
  873. +_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
  874. +_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver"
  875. --- /dev/null
  876. +++ b/tplink_tl-xdr6088_env
  877. @@ -0,0 +1,57 @@
  878. +ethaddr_factory=mtd read config 0x40080000 0x0 0x20000 && env readmem -b ethaddr 0x4008001c 0x6 ; setenv ethaddr_factory
  879. +ipaddr=192.168.1.1
  880. +serverip=192.168.1.254
  881. +loadaddr=0x46000000
  882. +console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
  883. +bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
  884. +bootconf=config-1
  885. +bootdelay=0
  886. +bootfile=openwrt-mediatek-filogic-tplink_tl-xdr6088-initramfs-recovery.itb
  887. +bootfile_bl2=openwrt-mediatek-filogic-tplink_tl-xdr6088-preloader.bin
  888. +bootfile_fip=openwrt-mediatek-filogic-tplink_tl-xdr6088-bl31-uboot.fip
  889. +bootfile_upg=openwrt-mediatek-filogic-tplink_tl-xdr6088-squashfs-sysupgrade.itb
  890. +bootled_pwr=green:status
  891. +bootled_rec=red:status
  892. +bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
  893. +bootmenu_default=0
  894. +bootmenu_delay=0
  895. +bootmenu_title= ( ( ( OpenWrt ) ) )
  896. +bootmenu_0=Initialize environment.=run _firstboot
  897. +bootmenu_0d=Run default boot command.=run boot_default
  898. +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
  899. +bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
  900. +bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
  901. +bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
  902. +bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
  903. +bootmenu_6=Load BL31+U-Boot FIP via TFTP then write to NAND.=run boot_tftp_write_fip ; run bootmenu_confirm_return
  904. +bootmenu_7=Load BL2 preloader via TFTP then write to NAND.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
  905. +bootmenu_8=Reboot.=reset
  906. +bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
  907. +boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
  908. +boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
  909. +boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
  910. +boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
  911. +boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
  912. +boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
  913. +boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
  914. +boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
  915. +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
  916. +boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
  917. +boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
  918. +part_default=production
  919. +part_recovery=recovery
  920. +reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
  921. +mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
  922. +mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
  923. +ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic 0 || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic 1 || run ubi_format
  924. +ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
  925. +ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
  926. +ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
  927. +ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
  928. +ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
  929. +ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize
  930. +ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize
  931. +_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
  932. +_firstboot=setenv _firstboot ; run ethaddr_factory ; run _switch_to_menu ; run _init_env ; run boot_first
  933. +_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
  934. +_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver"