Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Use official release as the codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
niusmallnan committed Apr 8, 2019
1 parent 9c1c235 commit 4cecb1f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 17 deletions.
8 changes: 4 additions & 4 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ WORKDIR ${DAPPER_SOURCE}
ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH

ARG UBUNTU_KERNEL_VERSION=Ubuntu-5.0.0-8.9-rancher1
ARG KERNEL_SOURCE_URL=https://github.com/niusmallnan/ubuntu-kernel/archive/${UBUNTU_KERNEL_VERSION}.tar.gz
# https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/disco
ARG KERNEL_SOURCE_URL=http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-source-5.0.0_5.0.0-8.9_all.deb

ARG UBUNTU_FIRMWARE_VERSION=Ubuntu-1.178-rancher1
ARG FIRMWARE_URL=https://github.com/niusmallnan/ubuntu-firmware/archive/${UBUNTU_FIRMWARE_VERSION}.tar.gz
# https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux-firmware
ARG FIRMWARE_URL=http://archive.ubuntu.com/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.178_all.deb

ENV KERNEL_SOURCE_URL=${KERNEL_SOURCE_URL} \
FIRMWARE_URL=${FIRMWARE_URL} \
Expand Down
8 changes: 7 additions & 1 deletion scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ set -e
source $(dirname $0)/version
cd $(dirname $0)/..

KERNEL_DIR=build/kernel

# some hacking
mkdir -p ${KERNEL_DIR}/debian/stamps


# kernel
pushd build/kernel/ubuntu-kernel-*/
pushd ${KERNEL_DIR}
fakeroot debian/rules clean
fakeroot debian/rules binary-headers binary-generic do_zfs=false do_dkms_nvidia=false
popd
Expand Down
14 changes: 9 additions & 5 deletions scripts/download
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@ set -e
source $(dirname $0)/version
cd $(dirname $0)/..

mkdir -p ${DOWNLOADS}
mkdir -p ${DOWNLOADS}/kernel ${DOWNLOADS}/firmware

# kernel
mkdir -p build/kernel
curl -fL -o ${DOWNLOADS}/ubuntu-kernel.tar.gz ${KERNEL_SOURCE_URL}
tar xf ${DOWNLOADS}/ubuntu-kernel.tar.gz -C ./build/kernel
curl -fL -o ${DOWNLOADS}/ubuntu-kernel.deb ${KERNEL_SOURCE_URL}
dpkg-deb -x ${DOWNLOADS}/ubuntu-kernel.deb ${DOWNLOADS}/kernel
mv ${DOWNLOADS}/kernel/usr/src/linux-source-*/debian* ./build/kernel
tar xf ${DOWNLOADS}/kernel/usr/src/linux-source-*/linux-source*.tar.bz2 -C /tmp
mv /tmp/linux-source-*/* ./build/kernel

# firmware
mkdir -p build/firmware
curl -fL -o ${DOWNLOADS}/firmware.tar.gz ${FIRMWARE_URL}
tar xf ${DOWNLOADS}/firmware.tar.gz -C ./build/firmware
curl -fL -o ${DOWNLOADS}/ubuntu-firmware.deb ${FIRMWARE_URL}
dpkg-deb -x ${DOWNLOADS}/ubuntu-firmware.deb ${DOWNLOADS}/firmware
mv ${DOWNLOADS}/firmware/lib/firmware/* ./build/firmware

# patches
PATCHES_DIR=$(pwd)/patches
Expand Down
11 changes: 4 additions & 7 deletions scripts/package
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ GENERIC_EXTRA_DIR=dist/generic/modules-extra

mkdir -p ${GENERIC_HEADERS_DIR} ${GENERIC_MAIN_DIR} ${GENERIC_EXTRA_DIR}

KERNEL_BASE_DIR=build/kernel/ubuntu-kernel-*/debian
FIRMWARE_BASE_DIR=build/firmware/ubuntu-firmware-*
KERNEL_BASE_DIR=build/kernel/debian
FIRMWARE_BASE_DIR=build/firmware

# headers
cp -rf ${KERNEL_BASE_DIR}/linux-headers-*-generic/usr ${GENERIC_HEADERS_DIR}
Expand All @@ -25,11 +25,8 @@ cp -rf ${KERNEL_BASE_DIR}/linux-headers-*-generic/lib ${GENERIC_HEADERS_DIR}
cp -rf ${KERNEL_BASE_DIR}/linux-image-unsigned-*-generic/boot ${GENERIC_MAIN_DIR}
cp -rf ${KERNEL_BASE_DIR}/linux-modules-*-generic/boot ${GENERIC_MAIN_DIR}
cp -rf ${KERNEL_BASE_DIR}/linux-modules-*-generic/lib ${GENERIC_MAIN_DIR}
FIRMWARE_DESTDIR=$(pwd)/${GENERIC_MAIN_DIR}
pushd ${FIRMWARE_BASE_DIR}
rm -f *.py
DESTDIR=${FIRMWARE_DESTDIR} make install
popd
mkdir -p ${GENERIC_MAIN_DIR}/lib/firmware
cp -rf ${FIRMWARE_BASE_DIR}/* ${GENERIC_MAIN_DIR}/lib/firmware

# extra modules
cp -rf ${KERNEL_BASE_DIR}/linux-modules-extra-*-generic/lib ${GENERIC_EXTRA_DIR}
Expand Down

0 comments on commit 4cecb1f

Please sign in to comment.