Skip to content

JackyCZJ/ubus

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ubus

libubus wrapper

prerequsites

build

  1. libubus and libubox could be found by default flags

    go build

    CGO_ENABLED is set by default for most goarch and goos, in that case, you can check the default configuration by go env, if CGO_ENABLED is not set, you need build with:

    CGO_ENABLED=1 go build

  2. custom location for libubus and libubox

    CGO_ENABLED=1 CGO_CFLAGS=-I/path/to/header/dir CGO_LDFLAGS=-L/path/to/lib/dir go build

  3. if you need cross compile for other architecture:

    CC=/path/to/compiler ...

    e.g.: to cross compile for openwrt running on MIPS:

    CC=mips-openwrt-linux-gcc CGO_ENABLED=1 \
    CGO_LDFLAGS="-L/opt/packages/lede_repo/lede/staging_dir/target-mips_musl/usr/lib" \
    CGO_CFLAGS="-I/opt/packages/lede_repo/lede/staging_dir/target-mips_musl/usr/include"\
    GOARCH=mips go build
    

About

libubus wrapper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%