forked from Sysdeploy/openwrt
Build a single package with its deps, use builder for images.
This commit is contained in:
parent
fb3dae6197
commit
b527854368
|
@ -10,25 +10,15 @@ RUN DEBIAN_FRONTEND=noninteractive TZ=UTC \
|
||||||
libncurses5-dev unzip gawk zlib1g-dev libncursesw5-dev zlib1g-dev \
|
libncurses5-dev unzip gawk zlib1g-dev libncursesw5-dev zlib1g-dev \
|
||||||
gettext xsltproc wget unzip python python3-distutils rxvt-unicode
|
gettext xsltproc wget unzip python python3-distutils rxvt-unicode
|
||||||
|
|
||||||
RUN git clone https://git.openwrt.org/openwrt/openwrt.git
|
RUN mkdir /Downloads
|
||||||
RUN cd openwrt && git checkout v${OPENWRT_VERSION}
|
|
||||||
|
|
||||||
RUN wget -qP /openwrt \
|
RUN wget -qP /Downloads \
|
||||||
"https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/bcm27xx/bcm2711/config.buildinfo"
|
"https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/bcm27xx/bcm2711/openwrt-imagebuilder-${OPENWRT_VERSION}-bcm27xx-bcm2711.Linux-x86_64.tar.xz"
|
||||||
|
|
||||||
RUN cd /openwrt && cp config.buildinfo .config && make defconfig
|
RUN wget -qP /Downloads \
|
||||||
|
"https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/bcm27xx/bcm2711/openwrt-sdk-${OPENWRT_VERSION}-bcm27xx-bcm2711_gcc-11.2.0_musl.Linux-x86_64.tar.xz"
|
||||||
|
|
||||||
ENV FORCE_UNSAFE_CONFIGURE=1
|
RUN wget -qP /Downloads \
|
||||||
|
"https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/bcm27xx/bcm2711/openwrt-toolchain-${OPENWRT_VERSION}-bcm27xx-bcm2711_gcc-11.2.0_musl.Linux-x86_64.tar.xz"
|
||||||
RUN cd /openwrt && make tools/install
|
|
||||||
RUN cd /openwrt && make toolchain/install
|
|
||||||
|
|
||||||
RUN cd /openwrt && make download
|
|
||||||
RUN cd /openwrt && make world
|
|
||||||
|
|
||||||
RUN useradd -m -U -u 999 buildbot
|
|
||||||
RUN chown -R buildbot.buildbot /openwrt
|
|
||||||
|
|
||||||
USER buildbot
|
|
||||||
|
|
||||||
ADD . .
|
ADD . .
|
||||||
|
|
|
@ -9,45 +9,53 @@
|
||||||
# now I noticed there is actually a Makefile for openwrt in the repo already:
|
# now I noticed there is actually a Makefile for openwrt in the repo already:
|
||||||
# https://github.com/IchthysMaranatha/asterisk-chan-quectel/tree/master/openwrt
|
# https://github.com/IchthysMaranatha/asterisk-chan-quectel/tree/master/openwrt
|
||||||
|
|
||||||
cp -r feed /openwrt/
|
tar -xJf /Downloads/openwrt-sdk-${OPENWRT_VERSION}-*.tar.xz
|
||||||
cp feeds.conf /openwrt/
|
|
||||||
|
cp -r feed openwrt-sdk-*/
|
||||||
|
|
||||||
pwd=$(pwd)
|
pwd=$(pwd)
|
||||||
cd /openwrt
|
cd openwrt-sdk-*/
|
||||||
|
|
||||||
|
cp feeds.conf.default feeds.conf
|
||||||
|
cat ${pwd}/feeds.conf >> feeds.conf
|
||||||
|
|
||||||
./scripts/feeds update -a
|
./scripts/feeds update -a
|
||||||
./scripts/feeds install -a
|
./scripts/feeds install -a
|
||||||
|
|
||||||
cp config.buildinfo /openwrt/.config
|
|
||||||
cat ${pwd}/config.extra >> /openwrt/.config
|
|
||||||
make defconfig
|
make defconfig
|
||||||
|
|
||||||
make -j1 V=s world
|
make package/asterisk-chan-quectel/compile
|
||||||
|
# no signing key
|
||||||
# The full distribution
|
make package/index
|
||||||
ls -lah bin/targets/bcm27xx/bcm2711
|
|
||||||
|
|
||||||
# tar -xJf bin/targets/bcm27xx/bcm2711/openwrt-imagebuilder-${OPENWRT_VERSION}-*.tar.xz
|
|
||||||
# cp bin/targets/bcm27xx/bcm2711/packages/asterisk*.ipk openwrt-imagebuilder-*/packages/
|
|
||||||
|
|
||||||
|
sdkdir=$(pwd)
|
||||||
cd ${pwd}
|
cd ${pwd}
|
||||||
|
|
||||||
# make info
|
tar -xJf /Downloads/openwrt-imagebuilder-${OPENWRT_VERSION}-*.tar.xz
|
||||||
|
|
||||||
# make image \
|
cd openwrt-imagebuilder-*/
|
||||||
# PROFILE=rpi-4 \
|
cp ${sdkdir}/bin/targets/bcm27xx/bcm2711/packages/*.ipk packages/
|
||||||
# PACKAGES="kmod-rtc-ds1307 \
|
cp ${sdkdir}/bin/packages/aarch64_cortex-a72/telephony/*.ipk packages/
|
||||||
# kmod-usb-net-rtl8152 \
|
cp ${sdkdir}/bin/packages/aarch64_cortex-a72/quectel/*.ipk packages/
|
||||||
# pciutils usbutils \
|
|
||||||
# kmod-usb-net-qmi-wwan libqmi qmi-utils uqmi luci-proto-qmi \
|
make info
|
||||||
# asterisk \
|
|
||||||
# asterisk-pjsip asterisk-bridge-simple \
|
make image \
|
||||||
# asterisk-codec-alaw asterisk-codec-ulaw \
|
PROFILE=rpi-4 \
|
||||||
# asterisk-res-rtp-asterisk kmod-nf-nathelper-extra \
|
PACKAGES="kmod-rtc-ds1307 \
|
||||||
# asterisk-chan-quectel"
|
kmod-usb-net-rtl8152 \
|
||||||
|
pciutils usbutils \
|
||||||
|
kmod-usb-net-qmi-wwan libqmi qmi-utils uqmi luci-proto-qmi \
|
||||||
|
asterisk \
|
||||||
|
asterisk-pjsip asterisk-bridge-simple \
|
||||||
|
asterisk-codec-alaw asterisk-codec-ulaw \
|
||||||
|
asterisk-res-rtp-asterisk kmod-nf-nathelper-extra \
|
||||||
|
asterisk-chan-quectel"
|
||||||
|
|
||||||
|
ls -lah packages
|
||||||
|
|
||||||
out=../../out
|
out=../../out
|
||||||
|
|
||||||
mkdir -p ${out}
|
mkdir -p ${out}
|
||||||
mv /openwrt/bin/targets/bcm27xx/bcm2711/*.gz ${out}
|
mv bin/targets/bcm27xx/bcm2711/*.gz ${out}
|
||||||
mv /openwrt/bin/targets/bcm27xx/bcm2711/packages ${out}
|
mv packages ${out}
|
||||||
|
|
15
config.extra
15
config.extra
|
@ -1,15 +0,0 @@
|
||||||
CONFIG_PACKAGE_asterisk=y
|
|
||||||
# Feeds
|
|
||||||
CONFIG_PER_FEED_REPO=y
|
|
||||||
CONFIG_FEED_packages=y
|
|
||||||
CONFIG_FEED_luci=y
|
|
||||||
CONFIG_FEED_telephony=y
|
|
||||||
CONFIG_FEED_quectel=y
|
|
||||||
CONFIG_PACKAGE_asterisk-pjsip=m
|
|
||||||
CONFIG_PACKAGE_asterisk-bridge-simple=m
|
|
||||||
CONFIG_PACKAGE_asterisk-codec-alaw=m
|
|
||||||
CONFIG_PACKAGE_asterisk-codec-ulaw=m
|
|
||||||
CONFIG_PACKAGE_asterisk-res-rtp-asterisk=m
|
|
||||||
CONFIG_PACKAGE_asterisk-chan-quectel=m
|
|
||||||
CONFIG_PACKAGE_kmod-nf-nathelper-extra=m
|
|
||||||
CONFIG_PACKAGE_kmod-rtc-ds1307=m
|
|
|
@ -1,4 +1,2 @@
|
||||||
src-git packages https://github.com/openwrt/packages.git
|
|
||||||
src-git luci https://github.com/openwrt/luci.git
|
|
||||||
src-git telephony https://github.com/openwrt/telephony.git
|
|
||||||
src-link quectel ../feed
|
src-link quectel ../feed
|
||||||
|
|
Loading…
Reference in New Issue
Block a user