[Solved] How to add ramips MT7621 Oolite 8.0.2-Dev 1.1.15 Board profile

https://wiki.openwrt.org/doc/devel/add.new.device.

There is a 15.05 release with profile for Oolite 8.0 board (based ramips MT7621, see http://oolite.cn/oolite-v8-0-specification.html):

http://oolite.cn/wp-content/uploads/2017/03/MT7621-Openwrt-15.05-v20170401.tar.gz

https://forum.openwrt.org/t/solved-how-to-compile-15-05-release-build-dependency-please-install-git-git-core-1-6-5-message

But this profile do not exists in official sources from openwrt.

How I can take over this profile in the snapshots, what is the best and right way?

Perhaps what you're looking for is "MediaTek Ralink MIPS", followed by "MT7621 based boards"?

This combination can build profiles such as "D-Link DIR-860L B1" and "Firefly FireWRT", which closely resemble the architecture tags shown by the various image file names in the Oolite V8 building guide.

If you want to use this target/subtarget as a starting point for adding a new profile, then what you'd do is modify the ./target/linux/ramips/image/mt7621.mk file. That's where you'd add a new profile for Oolite 8.0 board. You could review the source files provided by the Oolite project to determine what settings they use for their custom profile, and what DTS files you'd need to copy over to the ../dts folder.

All in all, I would download the Oolite source code to a new directory, and then run a directory diff between the two ./target/linux/ramips/ folders. This should give you an overview of the differences.

Thank you Antek. In my

~/Oolite-8.0/openwrt-15.05/target/linux/ramips/image$ ls
ex2700-fakeroot.uImage  lzma-loader  Makefile

as you see, no mt7621.mk at all. Any way.

To copy Oolite8 profiles from 15.05 to snapshort:

  1. copy to ./target/linux/ramips/mt7621/profiles/ Oolite8??.mk files.

  2. copy to ./target/linux/ramips/dts/ Oolite8??.dts files. In .dts files change /include/ "mt7621.dtsi" to #include "mt7621.dtsi".

  3. in ./target/linux/ramips/image/Makefile add:

    ifeq ($(SUBTARGET),mt7621)
    TARGET_DEVICES += mt7621 oolite-v8-32MB oolite-v8-16MB oolite-v8-8MB
    endif

    define Device/oolite-v8-8MB
    DTS := Oolite-v8-8MB
    IMAGE_SIZE := $(ralink_default_fw_size_8M)
    endef
    define Device/oolite-v8-16MB
    DTS := Oolite-v8-16MB
    IMAGE_SIZE := $(ralink_default_fw_size_16M)
    endef
    define Device/oolite-v8-32MB
    DTS := Oolite-v8-32MB
    IMAGE_SIZE := $(ralink_default_fw_size_32M)
    endef

  4. in /target/linux/ramips/base-files/lib/ramips.sh add

     *"Oolite-v8 8MB")
     	name="oolite-v8-8mb"
     	;;
     *"Oolite-v8 16MB")
     	name="oolite-v8-16mb"
     	;;
     *"Oolite-v8 32MB")
     	name="oolite-v8-32mb"
     	;;
    
  5. in ./target/linux/ramips/base-files/etc/board.d/O2_network add:

     oolite-v8-8mb)
     	ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
     	ucidef_add_switch "switch0" "1" "1"
     	ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 6t"
     	ucidef_add_switch_vlan "switch0" "2" "4 6t"
     	;;
     oolite-v8-16mb)
     	ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
     	ucidef_add_switch "switch0" "1" "1"
     	ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 6t"
     	ucidef_add_switch_vlan "switch0" "2" "4 6t"
     	;;
     oolite-v8-32mb)
     	ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
     	ucidef_add_switch "switch0" "1" "1"
     	ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 6t"
     	ucidef_add_switch_vlan "switch0" "2" "4 6t"
     	;;
    
  6. ./make menuconfig and select Oolite profile.

  7. make V=s

This is quite normal. In the LEDE trunk, the subtarget-specific configurations were migrated over to their own 'mk' files in the image subdirectory. These files are then included into the "main" Makefile depending on what subtarget is selected.

You do not see the same in the Oolite source code, because it is based on OpenWrt 15.05 which, in turn, has not experienced such re-arrangement.

Because of this, I am somewhat sure that the way you copied the profiles over doesn't work as expected. This may manifest as compilation errors even when there should not be any.

See this github link...

Thank you. What should I pay attention to?

I got it! In .dts files was /include/ "mt7621.dtsi". What it means? I changed it to #include "mt7621.dtsi" and any things fine now!

  • in ./target/linux/ramips/image/mt7621.mk add:

    define Device/oolite-v8-8MB
    DTS := Oolite-v8-8MB
    IMAGE_SIZE := $(ralink_default_fw_size_8M)
    endef
    TARGET_DEVICES += oolite-v8-8MB
    define Device/oolite-v8-16MB
    DTS := Oolite-v8-16MB
    IMAGE_SIZE := $(ralink_default_fw_size_16M)
    endef
    TARGET_DEVICES += oolite-v8-16MB
    define Device/oolite-v8-32MB
    DTS := Oolite-v8-32MB
    IMAGE_SIZE := $(ralink_default_fw_size_32M)
    endef
    TARGET_DEVICES += oolite-v8-32MB

Hi,
Can anybody share MT7621-Openwrt-15.05-v20170401.tar.gz please?

Link:
http://oolite.cn/wp-content/uploads/2017/03/MT7621-Openwrt-15.05-v20170401.tar.gz
is not accessible anymore.

Tnx.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.