Skip to content

Instantly share code, notes, and snippets.

@mauron85
Last active October 25, 2016 10:37
Show Gist options
  • Select an option

  • Save mauron85/7bc2e1f73e2516f617d280543f7539e5 to your computer and use it in GitHub Desktop.

Select an option

Save mauron85/7bc2e1f73e2516f617d280543f7539e5 to your computer and use it in GitHub Desktop.
Prepare docker container for building openwrt
#/bin/bash
# taken from:
# https://howto.biapy.com/en/debian-gnu-linux/system/software/setup-the-contrib-and-non-free-debian-repositories
command apt-get update && apt-get -y install lsb-release
DEBIAN_VERSION="$(command lsb_release -cs)"
MIRROR=$(command egrep "^deb.*${DEBIAN_VERSION}" '/etc/apt/sources.list' \
| command egrep -v "updates|-src|cdrom" \
| cut --delimiter=" " --fields=2)
command echo "# Debian contrib repository.
deb ${MIRROR} ${DEBIAN_VERSION} contrib
#deb ${MIRROR} ${DEBIAN_VERSION}-updates contrib
deb http://security.debian.org ${DEBIAN_VERSION}/updates contrib" \
> '/etc/apt/sources.list.d/contrib.list'
FROM debian
# Add aditional debian sources (contrib,...) into sources.d
COPY conf_sources.sh /tmp/
RUN /tmp/conf_sources.sh
# Install and set-up the current image - run only when creating the image
RUN apt-get update && apt-get install -y \
build-essential \
libncurses5-dev \
gawk \
git \
subversion \
libssl-dev \
gettext \
unzip \
zlib1g-dev \
file python \
mercurial \
flex \
quilt \
xsltproc \
libxml-parser-perl \
bzr \
ecj \
cvs \
wget \
b43-fwcutter
# Default working directory of all containers from this image
WORKDIR .
# Extract openwrt sources
ADD openwrt.src.tar /openwrt
@mauron85
Copy link
Author

mauron85 commented Oct 24, 2016

Quirks:

  1. adjust kernel to 3.18.20 to allow use of kernel modules from chaos-calmer (https://forum.openwrt.org/viewtopic.php?id=23570)
    vi /openwrt/target/linux/brcm2708/Makefile

    ...
    KERNEL_PATCHVER:=3.18.20
    ...
    
  2. apply rpi-patches (specially dm9601 crash)
    https://forum.openwrt.org/viewtopic.php?id=56846
    https://github.com/kmtaylor/rpi_patches (fix for above)

  3. create openwrt.src.tar from openwrt git repo with patches applied

  4. b43-tools not installed (https://dev.openwrt.org/ticket/15186)
    make tools/b43-tools/{compile,install}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment