You are here

build options.

5 posts / 0 new
Last post
N8LBV
build options.

I'm a newbie at this and have never done my first build yet.  
I'm am confused by the example in terms of->

notarget  (blank) vs MAINTARGET vs SUBTARGET options.  

I don't understand what that is doing or what SUBTARGET and MAINTARGET mean and why they are needed for 
the images being built in the example.

Why are "legacy" ubnt and tplink images built without specifying any targets?   

And if you want mikrotik or ath79 you have to specify either MAINTARGET or SUBTARGET for them?  
And how do you know? 
Is there a list and how do I reference that list or know where to find it.  

THANKS!


 

# build default legacy ar71xx target ubnt and tplink images
make  


# build and add legacy ar71xx target mikrotik images
make SUBTARGET=mikrotik

# build and add ath79 target (latest linux kernel) ubnt, tplink, and gl images
make MAINTARGET=ath79
AE6XE
AE6XE's picture
N8LBV,    Targets are
N8LBV,    Targets are terminology commonly used for embedded development.  The process is cross compiling generally on top of x86:Linux for a specific target device, with different cpu or hardware.    OpenWrt has defined the various targets and devices, which AREDN inherits and builds on top.   This reference may be helpful:

https://openwrt.org/docs/techref/targets/ath79

Joe AE6XE
AE6XE
AE6XE's picture
Type all 3 make commands, in
Type all 3 make commands, in succession, to create all the images AREDN supports.  MAINTARGET defaults to "ar71xx" if the option is not specified.    SUBTARGET defaults to "generic" if the option is not specified.
N8LBV
Thanks!!  
Thanks!!  
I'm so new at this.  
And it's been a few years.  
Not used to seeing plus "+" signs or "++" or even "++++"  in code.  
This is something new.  
I'm guessing it's some kind of precompiler code that I am not yet familiar with.  

Target; I sorta understand that you might be building for a specific target (board) or type of hardware etc.  

But the terms maintarget and subtarget really lost me.  
Never seen that before.  

I've also never done cross-compiling where you are building for something different than the machine that is actually doing the compiling  (PC/Linux).  
So this also adds a layer of complication that I have not got my self familiar with yet.  

-Steve 
N8LBV  

 
AE6XE
AE6XE's picture
N8LBV,   the best option is
N8LBV,   the best option is to seek out and soak in the OpenWrt documentation and web site.   AREDN is focused on core ham radio features and usage.  All of the knowledge related to embedded development is inherited upstream from OpenWrt and 100s probably 1000s of other groups that feed into linux open source.   All these groups have documentation to some degree.  This is like getting a college degree to become proficient and connect all the dots.

The  + - and ++ -- notation is 'diff' notation -- or a delta representation of text files.   You're looking for the documentation in openwrt for 'quilt', the tool that creates and applies source code patches (or delta changes from one version to the next).  The AREDN build scripts, copy down the OpenWRT source code, then apply our patches and new files on top to build AREDN images.  You'd need to learn "makefile" format to understand how the build works.  Think months and years each to become proficient in make, quilt, buildroot, and numerous other tools and source code languages common in firmware development.

As volunteers contributing to AREDN firmware, some of us with day-jobs,  training and pointers will be limited to nonexistent in the AREDN forum.  Takes us away from adding new features and improving AREDN firmware.  However, others in the community may have knowledge to share.  

Joe AE6XE

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer