MediaTek-Labs/linkit-smart-7688-feed

Compile fails on libmraa

Opened this issue · 18 comments

abard commented

I tried compiling current trunk by using @Pillar1989 method to go back to kernel 3.18.36 mentioned in:
#32
but now I am stuck on

install: cannot stat '/home/eyl/mt7688/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/libmraa-0.8.0/ipkg-install/usr/lib/node_modules/mraa/*': No such file or directory

EYL

Glad to see I'm not the only one -- Had the same issue you had yesterday, now having this issue as well :). Is it worth trying to go further back in time?

EDIT: This build compiles:
git checkout cefc18905d58d3b58d1886a1aa390f8fd05b61fc

abard commented

Thank you @hex4def6 for your edit, still my compilation failed even when using
git checkout cefc18905d58d3b58d1886a1aa390f8fd05b61fc
After:
$ git clone git://git.openwrt.org/15.05/openwrt.git

EDIT: This build compiles:
git checkout cefc18905d58d3b58d1886a1aa390f8fd05b61fc

Could you please repeat for me what steps are needed for successful compilation?

Did you have any luck? I am having the same issue. The cefc18905d58d3b58d1886a1aa390f8fd05b61fc version does not work for me either...

Odd.. I did "make defconfig" after changing to that commit, not sure if that helped or not. Let me try starting it up on another linux box, see if I get that one to compile as well.

I'm am having an issue with WiFi / ethernet working on this build, but at least I can get to a command prompt.

It apparently compiles fine under Ubuntu 16.04 LTS with
git checkout cefc18905d58d3b58d1886a1aa390f8fd05b61fc

I was trying 14.04 LTS earlier, as was recommended in the manual.

Odd. I'm on a 14.04 LTS 32-bit machine VM image from osboxes.org. Let me know if you get WiFi / ethernet working, and if you try later builds that work.

abard commented

Thanks @hex4def6, did you have a successful compilation on the other Linux box?
BTW about the WiFi problems, you can try using the mt76 driver (from kernel build).
If I am not mistaken @blogic tested them in April and apparently they are usable...
The problem is, that he only mentioned that and did not elaborate about how to build and use them...

Thank you @yhuang2 for sharing, what version did you use? was it 32bit or 64bit ?

I am using 64 bit on physical hardware, without VM.

abard commented

Thank you @yhuang2 :)
Can you please describe in details the steps you needed to do for having a successful compilation?
I would like very much to try and replicate them, who knows maybe I will have better luck...

This is what I did. Pretty much followed the guide, with the addition of checking out an older version.

I have not tried the new firmware yet. I am waiting on parts to get UART working, in case WiFi does not work after update.

In the configuration menu the following were selected, per the install guide:
Target System: Ralink RT288x/RT3xxx
Subtarget: MT7688 based boards
Target Profile: LinkIt7688

git clone git://git.openwrt.org/15.05/openwrt.git
cd openwrt
git checkout cefc18905d58d3b58d1886a1aa390f8fd05b61fc
cp feeds.conf.default feeds.conf
echo src-git linkit https://github.com/MediaTek-Labs/linkit-smart-7688-feed.git >> feeds.conf
./scripts/feeds update
./scripts/feeds install -a
make menuconfig
make V=99

abard commented

Thank you very much @yhuang2 !
Running it now and I hope to update soon with good news :)
Pleas update us if you encounter problems with WiFi / Ethernet functions.
BTW from here: https://labs.mediatek.com/forums/posts/list/3551.page

The built-in bootloader(UBOOT) is able to "Flash" firmware through USB Drive. Put the "lks7688.img" in the root directory of a FAT32 USB drive, attach to the board, and Follow the instruction -> here

@yhuang2 -- If you use @abard's idea, it should be fairly safe to do even if you don't have console output, as you can always use the same method to downgrade to the stock firmware if it doesn't work. Since the USB upgrade function is in uboot, even if the build you make doesn't even boot you should be able to downgrade. Although, it would be nice to see your kernel logs on bootup anyway.

Sounds good. Thank you.
I was able to upload the firmware through the WiFi interface and did not encounter any issues.
I was also able to compile OpenWRT with the SDK using the above instructions under VirtualBox and Ubuntu 14.04.5 desktop, amd64. I installed a fresh copy of Ubuntu under VitualBox using the ubuntu-14.04.5-desktop-amd64.iso from the Ubuntu website. I chose not to do any updates to Ubuntu during or after the installation. I had to manually partition the virtual drive during the install process, otherwise only a 12GB partition was created, which was not large enough.

abard commented

Thank you @yhuang2 and @hex4def6 for your updates, with your help, I successfully compiled the image using Ubuntu 16.04 and with osboxes.org Ubuntu 14.04 image.
I only hope that @blogic will add support for the open-source drivers as he mentioned in this post

I am now trying to do so with no much of success due to many compilation errors... looks like a different release is required and adapting trunk to LINKIT7688 without the know-how is quite hard...

Maybe you can offer some advice on that?

You need to disable libmraa in make menuconfig. It is selected by other packages so you have to disable them first. I deselect:
Global build settings->Compile with support for patented functionality
Libraries->IoT->libupm
Libraries->libmraa
It compiles fine then

Hi @abard ,
Did you find any MT7688 specific code in the trunk?
I am looking through the repository and found this: https://github.com/openwrt/mt76
But it only has mt7603 and mt76x2, and the registers don't seem to match up to the mt7688.

abard commented

mt76x2 is what is needed, mt7628 to be more precise. A good clue for the driver that supports the mt7628 of the LKS is that it includes this file in its Makefile : /lib/firmware/mt7628_e2.bin .
The driver is here
The version in trunk is not the latest one. I have compiled a clean build with those drivers but when I wanted to use the LKS duo setup for having the Arduino compatibility... then I had problems...
It looks that the drivers are yet in development, so they should be considered as beta stage, yet quite usable.

the issue about git submodule. i solved it by intel-iot-devkit/doxygen2jsdoc#2 (comment)