Skip to content

Instantly share code, notes, and snippets.

@tienthanh2509
Created April 21, 2021 05:29
Show Gist options
  • Save tienthanh2509/a02366678797c21471854712297829de to your computer and use it in GitHub Desktop.
Save tienthanh2509/a02366678797c21471854712297829de to your computer and use it in GitHub Desktop.
build padavan rt-n56u
export http_proxy=http://10.10.10.10:8080/
export https_proxy=http://10.10.10.10:8080/
mkdir -p /etc/systemd/system/docker.service.d
cat << EOF > /etc/systemd/system/docker.service.d/https-proxy.conf
[Service]
Environment="HTTP_PROXY=http://10.10.10.10:8080/"
Environment="HTTPS_PROXY=http://10.10.10.10:8080/"
EOF
systemctl daemon-reload
systemctl restart docker
docker run \
-it \
--privileged \
--name padavan \
-v /data:/data \
ubuntu:focal \
/bin/bash
sed -i 's|archive.ubuntu.com|opensource.xtdv.net|' /etc/apt/sources.list
apt update
apt install -y fakeroot p7zip-full libtool-bin gperf texinfo python-docutils autopoint shellcheck cpio libltdl-dev gettext
apt install -y unzip libtool-bin curl cmake gperf gawk flex bison nano xxd \
fakeroot kmod cpio git python3-docutils gettext automake autopoint \
texinfo build-essential help2man pkg-config zlib1g-dev libgmp3-dev \
libmpc-dev libmpfr-dev libncurses5-dev libltdl-dev wget libc-dev-bin
git clone --depth=1 https://github.com/hanwckf/rt-n56u.git /data/rt-n56u
cd /data/rt-n56u/toolchain-mipsel
sh dl_toolchain.sh
cd /data/rt-n56u/
chown 1000:1000 -R /data/rt-n56u/
build_variant=mt7621-usb targets="NEWIFI3"
build_variant=mt7620 targets="MI-3"
cd /opt/rt-n56u/trunk
./build_firmware_ci MI-3
fakeroot ./build_firmware_ci NEWIFI3
fakeroot ./build_firmware_modify NEWIFI3 > build-stdout.log 2> build-stderr.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment