Giter VIP home page Giter VIP logo

gl-infra-builder's Introduction

Under development, please do not use

Requirements

You need the following tools to compile OpenWrt, the package names vary between distributions. A complete list with distribution specific packages is found in the Build System Setup documentation.

sudo apt update -y
sudo apt full-upgrade -y
sudo apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential bzip2 ccache cmake cpio curl device-tree-compiler ecj fastjar flex gawk gettext gcc-multilib g++-multilib git git-core gperf haveged help2man intltool lib32gcc1 libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncurses5-dev libreadline-dev libssl-dev libtool libz-dev lrzsz mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pip python3-ply python-docutils qemu-utils re2c rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev

And This development tools requires Python 3.6 or higher! Please use the following command to check,

python3 --version
Python 3.6.13

ls -l /usr/bin/python3*
 /usr/bin/python3 -> python3.6
 /usr/bin/python3.5
 /usr/bin/python3.5-config -> x86_64-linux-gnu-python3.5-config
 /usr/bin/python3.5m
 /usr/bin/python3.5m-config -> x86_64-linux-gnu-python3.5m-config
 /usr/bin/python3.6
 /usr/bin/python3.6-config -> x86_64-linux-gnu-python3.6-config
 /usr/bin/python3.6m
 /usr/bin/python3.6m-config -> x86_64-linux-gnu-python3.6m-config
 /usr/bin/python3.9
 /usr/bin/python3.9-config -> x86_64-linux-gnu-python3.9-config
 /usr/bin/python3-config -> python3.5-config
 /usr/bin/python3m -> python3.5m
 /usr/bin/python3m-config -> python3.5m-config

Quickstart

Build For GL-SF1200 & GL-SFT1200

  1. Clone repository.
git clone https://github.com/zheshifandian/gl-infra-builder.git
cd gl-infra-builder
  1. Setup, the command will auto download openwrt-19.07.7 by default and auto config, and then patch all the the GL product Patches
python3 setup.py -c config-siflower-18.x.yml
cd openwrt-18.06/siflower/openwrt-18.06
  1. Generate your target configuration. (For the following content, we will continue to take 19.07 as an example)
./scripts/gen_config.py list		# show available profile
./scripts/gen_config.py <target_profile> <function_profile>

Note: excute ./scripts/gen_config.py list command, you can get Target Profiles and Function Profiles. Target Profiles is you want to compile products, don't modify. Function Profiles is you want to add/delete packages, you can modify. Those files in the profiles directory.

For example, If you want to compile GL-SF1200 product you can use command:

./scripts/gen_config.py target_siflower_gl-sf1200

If you want to add some packages, you can excute make menuconfig to other packages. You can load the custom .config file '.config.sf1200' or '.config.sft1200'

.config.sf1200 .config.sft1200 modify by zheshifandian
  1. Build Firmware
Run `make download` to download dl files.
Run `make V=s' or `make V=sc' or `make V=99` to compile your firmware

Note: If you gcc version is 10, you will encounter some error, like this:

/usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
collect2: error:ld returned 1 exit status.

You should execute the following command to reduce the gcc version:

update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100
update-alternatives --config gcc

gl-infra-builder's People

Contributors

gl-tanqi avatar gl-yangpo avatar gl-zhaojianhui avatar hoff-glinet avatar lancersky2017 avatar lincolnzh avatar luochongjun avatar zheshifandian avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.