FROM ubuntu:22.04 LABEL maintainer=admin@licsber.site ENV TARGET_IMAGE_DIRNAME=friendlywrt22.03-docker ENV TARGET_FRIENDLYWRT_CONFIG=rockchip-docker # https://github.com/friendlyarm/Actions-FriendlyWrt/blob/master/.github/workflows/build.yml RUN echo $(nproc) && \ apt update > /dev/null && \ apt install -y -qq wget git clang-13 llvm-13 golang > /dev/null && \ wget https://raw.githubusercontent.com/friendlyarm/build-env-on-ubuntu-bionic/master/install.sh && \ sed -i -e 's/^apt-get -y install openjdk-8-jdk/# apt-get -y install openjdk-8-jdk/g' install.sh && \ sed -i -e 's/^\[ -d fa-toolchain \]/# [ -d fa-toolchain ]/g' install.sh && \ sed -i -e 's/^cat fa-toolchain/# cat fa-toolchain/g' install.sh && \ sed -i -e 's/^tar xf fa-toolchain/# tar xf fa-toolchain/g' install.sh && \ bash install.sh && \ update-alternatives --install $(which python) python /usr/bin/python2.7 20 && \ git clone --depth=1 https://github.com/friendlyarm/repo && \ cp repo/repo /usr/bin/ && \ rm -rf repo/ && \ apt clean && \ rm -rf /var/lib/apt/lists/* RUN adduser --shell /bin/bash licsber && \ usermod -aG sudo licsber && \ echo 'licsber ALL=(ALL) NOPASSWD:ALL' | tee /etc/sudoers.d/licsber USER licsber WORKDIR /home/licsber RUN repo init --depth=1 -u https://github.com/friendlyarm/friendlywrt_manifests -b master-v22.03 \ -m rk3399.xml --repo-url=https://github.com/friendlyarm/repo --no-clone-bundle && \ repo sync -c friendlywrt --no-clone-bundle && \ repo sync -c configs --no-clone-bundle && \ repo sync -c device/common --no-clone-bundle && \ repo sync -c device/friendlyelec --no-clone-bundle && \ repo sync -c scripts --no-clone-bundle && \ repo sync -c scripts/sd-fuse --no-clone-bundle && \ repo sync -c toolchain --no-clone-bundle RUN git clone --depth=1 https://github.com/licsber/Dockerfile.git && \ bash Dockerfile/friendlywrt-scripts/r4se_add_packages.sh && \ bash Dockerfile/friendlywrt-scripts/r4se_custom_config.sh && \ echo '. device/friendlyelec/rk3399/base.mk' >> .current_config.mk && \ echo "TARGET_IMAGE_DIRNAME=$TARGET_IMAGE_DIRNAME" >> .current_config.mk && \ echo "TARGET_FRIENDLYWRT_CONFIG=$TARGET_FRIENDLYWRT_CONFIG" >> .current_config.mk && \ git config --global user.name 'licsber' && \ git config --global user.email 'bot@licsber.site' && \ DEBUG_DOT_CONFIG=1 ./build.sh friendlywrt RUN cd friendlywrt && \ mkdir -p staging_dir/host/llvm-bpf/bin/ && \ ln -s /usr/bin/clang-13 staging_dir/host/llvm-bpf/bin/clang && \ make download -j1 V=s && \ find dl -size -1024c -exec ls -l {} \; && \ find dl -size -1024c -exec rm -f {} \;