Building for Mediatek Linkit Smart 7688

I'm now building my own Firmware and have questions regarding several problems i whan't to make work.
What id did so far is:

  1. created a VM on my Mac with Ubuntu 18.04
  2. installed dependencies: sudo apt-get install git g++ libncurses5-dev subversion libssl-dev gawk libxml-parser-perl unzip
  3. made a workfolder ~/openwrt/18.06/
  4. cloned openwrt from git: git clone https://git.openwrt.org/openwrt/openwrt.git
  5. changed directory to ~/openwrt/18.06/openwrt/
  6. as described in the developer guide: ./scripts/feeds update && ./scripts/feeds install -a
  7. make make menuconfig see my config file for details here.

This does not work:

  1. Automaticaly activate WLAN: i tried this in '~/openwrt/18.06/openwrt/files/etc/uci-defaults/99_enable_wifi` without success. Wifi does not turn on when first booted.
  2. LuCi is reachable but it splashes a error:
/usr/lib/lua/luci/controller/arduino/index.lua:65: attempt to index field 'authenticator' (a nil value)
stack traceback:
	/usr/lib/lua/luci/controller/arduino/index.lua:65: in function 'v'
	/usr/lib/lua/luci/dispatcher.lua:627: in function 'createtree'
	/usr/lib/lua/luci/dispatcher.lua:279: in function 'dispatch'
	/usr/lib/lua/luci/dispatcher.lua:144: in function </usr/lib/lua/luci/dispatcher.lua:143>

Does some pro Developer here have answers to this two questions?

Please check it the country code (may not be include 00) and the in package/mac80211/files/lib/wifi/mac80211.sh file comment out the line:

# REMOVE THIS LINE TO ENABLE WIFI:
    ## option disabled 1

Thanks @drcyberg for that posible solution. I'm looking for a solution i an commit to the automated buildsystem ans therefore this is not possible as @jeff says here.

Does the option to execute a script like described here not exist anymore?

Scripts in /etc/uci-defaults/ run until they succeed once, then are “deleted”. They should work properly for you, as would a custom ./files/etc/config/wireless in your build system.

what's the better solution to commit back to the automatic build system?

For now, find what solves your problem. I’ll need to reread the threads to find what that problem is.

As OpenWrt doesn't enable wireless or access over WAN to newly flashed devices for security reasons, you might have quite a challenge convincing the lead devs to add anything like this, especially for a dev board with easy serial access.

I would solve the problem by using a preconfigured /etc/config/wireless in my local build.

you wrote once
./files/etc/config/wireless
and once
/etc/config/wireless

how is that ment if my build is here: ~/openwrt/18.06/openwrt/
is it
~/openwrt/18.06/openwrt/files/etc/config/wireless
or
~/openwrt/18.06/openwrt/etc/config/wireless

and where do i reach lead devs?

If you look at

/etc/config/wireless

on your running device and use that as a template to create

./files/etc/config/wireless

in your build system, the content of that file on your build system will appear in your flashed image as

/etc/config/wireless

See https://openwrt.org/docs/guide-developer/build-system/use-buildsystem#custom_files

Lead devs generally follow the mailing list and occasionally can be reached on IRC https://openwrt.org/contact

i figured out how it realy works best:

It's not a folder called files, its a symlink in the buildroot pointing to /env/files/ and if i create the corresponding filestructure inside files, i can place any file in my device.

so for anybody looking how to create such thing as a automatic activation of wireless or any uci-command here you go:

  1. create folder <buildroot>/env/files and symlink with command:
    ln -s <buildroot>/env/files <buildroot>/files
  2. in there you can create the folder as you will later find it in the device:
    <buildroot>/files/etc/uci-default/<your_file>
    subfolders like uci-default/<some_folder>/<your_file> will be ignored.
    so my solution is this file:
    <buildroot>/files/etc/uci-default/wireless
    with this content:
#!/bin/sh
uci set wireless.@wifi-device[0].disabled=0
uci commit wireless
exit 0

_

still have to figure out 3 things:

  • to to get Wifi to not be an bridge AP because my wifi now does not have connection to Internet but gets a ip an is able to route my Laptop over his wifi to internet. (strange)

  • why i get a LUCI error when entering the IP because of a strange path /usr/lib/lua/luci/controller/arduino/index.lua (no idea what Arduino has to do here)

  • set dhcp on LAN interface