azul
February 19, 2019, 3:44pm
1
Hello all,
WARNING: I am a newbie.
I want to run a C program in a openwrt router (ZBT826-T2).
The manufacturer sent me the firmware file (mt7620-WE826-T2.bin).
How do I use this file to setup my SDK so I can cross-compile and build a new firmware that includes my C program?
Also what options should I put in "make menuconfig"?
I checked this (https://openwrt.org/toh/hwdata/zbt/zbt_we826_32m ) but can't find in make menuconfig the options mentioned in this webpage!
Thank you for your help.
azul
February 19, 2019, 5:20pm
3
Thanks for your reply...
Is there a way to easily find the menuconfig options of a specific img?
I mean, I installed OpenWrt in Virtualbox for testing and I will use it as my primary target for development. But I installed a pre-compiled img (openwrt-x86-generic-combined-ext4.img).
If I wanted to recompile it to include my helloworld C program, what would be the options in the make menuconfig be?
Thanks again.
jeff
February 19, 2019, 5:22pm
4
It is perhaps easiest to define a package for your executable and how it should be installed on the device.
https://openwrt.org/docs/guide-developer/helloworld/start
is one place to start to understand the process.
azul
February 20, 2019, 1:11am
5
That is exactly the tutorial I am following. But I think the options of the menuconfig should be adapted to the target.
When I try to install my package in the virtualbox with openwrt it fails saying it was not built for that system.
That is why I ask what should be the options of menuconfig to compile/build for that target.
B
jeff
February 20, 2019, 1:19am
6
You're not building anything. You're installing a pre-built, closed-source binary executable.
azul
February 20, 2019, 7:08am
7
But my question is still valid. Can you help me to know the menuconfig options?
doxigin
February 20, 2019, 7:22am
8
You have to download sdk from ramips target as your device based on openwrt toh is ramips. Run make menuconfig. Target is mediatek mips. Sub target mt7620. Model we826
azul
February 20, 2019, 9:28am
9
Many thanks. Will do.
And for the img I am running on virtualbox? What are the correct settings?
openwrt-x86-generic-combined-ext4.img
azul
February 20, 2019, 9:36am
10
Found the options for the image that I am running in virtualbox:
Target System -> user mode linux
Target profile -> Default
Target Images -> included ext4
for the helloworld I included it also in the Examples as per the tutorial
Thank you all.