compile openwrt/lede under ubuntu 20.04 env
2020-07-04 01:27:23
One-minute read
Preparation
- Install ubuntu 20.04
- Install dependencies
sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext \
git libncurses5-dev libz-dev patch python3.5 unzip zlib1g-dev lib32gcc1 \
libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip \
p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils \
upx libelf-dev autoconf automake libtool autopoint device-tree-compiler \
g++-multilib antlr3 gperf ccache mercurial
download src
git clone https://github.com/coolsnowwolf/lede
make some feed change
vim feeds.conf.default
enable what you want
update feeds and packages:
./scripts/feeds update -a
./scripts/feeds install -a
ready to config and compile
- Generate default config and change
make defconfig
make menuconfig
make download -j8 V=s
- compile
make -j1 V=s
When you compile the src for the first time, please use -j1 (i.e. only one compile thread). After compile src completely, you can change to the number of cpu core if you compile again
- done
The output firmwire should be under the folder:
bin/target/xxxx
clean
make clean # Clean bin folder
make dirclean # Clean bin folder and cross compile and toolchain
make distclean # Clean all staffs,including downloaded packages, config and feeds .etc