60 lines
2.5 KiB
Docker
60 lines
2.5 KiB
Docker
# building a modified Kernel
|
|
FROM lpenz/debian-etch-i386-minbase AS kernel-builder
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
ARG ARCH=i386
|
|
RUN (echo "deb-src http://archive.debian.org/debian etch main" >> /etc/apt/sources.list) && \
|
|
apt-get update && \
|
|
apt-get install -y aptitude build-essential cvs unzip git-core ncurses-dev\
|
|
linux-headers-2.6.24-etchnhalf.1-686 \
|
|
linux-source-2.6.24 && \
|
|
apt-get build-dep -y linux-image-2.6.24-etchnhalf.1-686
|
|
|
|
WORKDIR /usr/src
|
|
COPY unionfs-2.2.3_for_2.6.24.diff.gz ./
|
|
#RUN aptitude download linux-image-2.6.24-etchnhalf.1-686 && \
|
|
# dpkg-deb --extract linux-image-2.6.24-etchnhalf.1-686*.deb ./kernel && \
|
|
# cp kernel/boot/config-2.6.24-etchnhalf.1-686 linux-source-2.6.24/.config && \
|
|
RUN tar xjf linux-source-2.6.24.tar.bz2 && \
|
|
ln -s linux-headers-2.6.24-etchnhalf.1-686/ linux-headers
|
|
|
|
# git clone git clone git://git.fsl.cs.sunysb.edu/unionfs-2.6.24.y.git
|
|
# wget http://sourceforge.net/code-snapshots/cvs/a/au/aufs.zip && \
|
|
# unzip aufs.zip -d aufs-cvs && \
|
|
# cvs -d /usr/src/aufs-cvs/aufs export -D "2008-12-23 00:00:00 UTC" aufs && \
|
|
|
|
WORKDIR /usr/src/linux-source-2.6.24
|
|
COPY config-kernel ./
|
|
RUN (zcat /usr/src/unionfs-2.2.3_for_2.6.24.diff.gz | patch -p1) && \
|
|
(cat config-kernel > .config) && \
|
|
make oldconfig &&\
|
|
make deb-pkg -j4
|
|
|
|
|
|
# Note: we need to use Lenny because of live-helper
|
|
# it does target Etch though...
|
|
FROM lpenz/debian-lenny-i386-minbase
|
|
WORKDIR /root
|
|
COPY --from=kernel-builder /usr/src/linux-2.6.24*.deb .
|
|
RUN apt-get update && \
|
|
apt-get -y --force-yes install live-helper genisoimage syslinux squashfs-tools
|
|
WORKDIR /root/live
|
|
RUN kernel_path="$(basename "$(ls -1 ../linux-*.deb | head -n1)")" &&\
|
|
lh_config \
|
|
-a i386 \
|
|
--binary-images iso \
|
|
--bootloader syslinux \
|
|
--bootstrap debootstrap \
|
|
-f minimal \
|
|
--cache disabled \
|
|
--debconf-frontend noninteractive \
|
|
--debian-installer live \
|
|
--hostname RetroDebian\
|
|
--distribution etch \
|
|
--mirror-bootstrap http://archive.debian.org/debian/ \
|
|
--mirror-binary http://archive.debian.org/debian/ \
|
|
--mirror-binary-security http://archive.debian.org/debian-security/ \
|
|
--mirror-chroot http://archive.debian.org/debian/ \
|
|
--mirror-chroot-security http://archive.debian.org/debian-security/ \
|
|
--union-filesystem unionfs \
|
|
--linux-packages "$kernel_path"
|
|
RUN lh_build |