Skip to content

Commit

Permalink
feat: upgrade Linux to v5.5.15
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Rynhard <[email protected]>
  • Loading branch information
andrewrynhard committed Apr 7, 2020
1 parent 38c83dd commit 5530775
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 81 deletions.
2 changes: 1 addition & 1 deletion kernel/config-amd64
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.5.9 Kernel Configuration
# Linux/x86 5.5.15 Kernel Configuration
#

#
Expand Down
160 changes: 80 additions & 80 deletions kernel/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,90 +2,90 @@ name: kernel
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- image: "{{ .TOOLS_IMAGE }}"
- image: '{{ .TOOLS_IMAGE }}'
steps:
- sources:
- url: https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.5.9.tar.xz
destination: linux.tar.xz
sha256: a435e16950bbe80362495383c2b5e8b78a4b3879c894e2b3c38ecba6fe7ca878
sha512: 43ec99c2496567753f8945cbdbf131e706ced98132418b80643c9730dab125ca993defda60e0eb64a8242b76127b7550d8bee89cb7d31ae51293344a25344171
prepare:
- |
tar -xJf linux.tar.xz --strip-components=1
- sources:
- url: https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.5.15.tar.xz
destination: linux.tar.xz
sha256: c41fd8052e3e53de5bf0a0d666f92b7a9ea2d5f09b24423ee8c090f1e77ce214
sha512: fc774cee6c2eb87cf3efdb6a71f4b22e82536e7d62d32b8ee28f8001f31e1a2c3029ddd95884a69284685f02f928d3d3eb37b506568fa32d6192b12c9d45adde
prepare:
- |
tar -xJf linux.tar.xz --strip-components=1
mkdir /bin
ln -sv /toolchain/bin/bash /bin/bash
ln -sv /toolchain/bin/bash /bin/sh
ln -sv /toolchain/lib /lib
mkdir -p /usr/bin \
&& ln -sf /toolchain/bin/env /usr/bin/env \
&& ln -sf /toolchain/bin/true /bin/true \
&& ln -sf /toolchain/bin/pwd /bin/pwd
mkdir /bin
ln -sv /toolchain/bin/bash /bin/bash
ln -sv /toolchain/bin/bash /bin/sh
ln -sv /toolchain/lib /lib
mkdir -p /usr/bin \
&& ln -sf /toolchain/bin/env /usr/bin/env \
&& ln -sf /toolchain/bin/true /bin/true \
&& ln -sf /toolchain/bin/pwd /bin/pwd
# Ensure that `make menuconfig` works.
# Ensure that `make menuconfig` works.
mkdir -p /usr/lib/pkgconfig
ln -s /toolchain/include /usr/include
mkdir -p /usr/lib/pkgconfig
ln -s /toolchain/include /usr/include
for lib in ncurses form panel menu ; do
rm -vf /lib/lib${lib}.so
echo "INPUT(-l${lib}w)" > /lib/lib${lib}.so
ln -sfv ${lib}w.pc /lib/pkgconfig/${lib}.pc
done
for lib in ncurses form panel menu ; do
rm -vf /lib/lib${lib}.so
echo "INPUT(-l${lib}w)" > /lib/lib${lib}.so
ln -sfv ${lib}w.pc /lib/pkgconfig/${lib}.pc
done
case $ARCH in
x86_64)
make mrproper
cp -v /pkg/config-amd64 .config
;;
aarch64)
export ARCH=arm64
make mrproper
cp -v /pkg/config-arm64 .config
;;
*)
echo "unsupported arch ${ARCH}"
exit 1
;;
esac
build:
- |
case $ARCH in
x86_64)
;;
aarch64)
export ARCH=arm64
;;
*)
echo "unsupported arch ${ARCH}"
exit 1
;;
esac
make -j $(nproc)
make -j $(nproc) modules
install:
- |
mkdir -p /rootfs/boot
case $ARCH in
x86_64)
mv arch/x86/boot/bzImage /rootfs/boot/vmlinuz
mv vmlinux /rootfs/boot/vmlinux
;;
aarch64)
export ARCH=arm64
mv arch/arm64/boot/Image.gz /rootfs/boot/vmlinuz
mv vmlinux /rootfs/boot/vmlinux
;;
*)
echo "unsupported arch ${ARCH}"
exit 1
;;
esac
export KERNELRELEASE=$(cat include/config/kernel.release)
make -j $(nproc) modules_install DEPMOD=/toolchain/bin/depmod INSTALL_MOD_PATH=/rootfs
depmod -b /rootfs $KERNELRELEASE
unlink /rootfs/lib/modules/$KERNELRELEASE/build
unlink /rootfs/lib/modules/$KERNELRELEASE/source
case $ARCH in
x86_64)
make mrproper
cp -v /pkg/config-amd64 .config
;;
aarch64)
export ARCH=arm64
make mrproper
cp -v /pkg/config-arm64 .config
;;
*)
echo "unsupported arch ${ARCH}"
exit 1
;;
esac
build:
- |
case $ARCH in
x86_64)
;;
aarch64)
export ARCH=arm64
;;
*)
echo "unsupported arch ${ARCH}"
exit 1
;;
esac
make -j $(nproc)
make -j $(nproc) modules
install:
- |
mkdir -p /rootfs/boot
case $ARCH in
x86_64)
mv arch/x86/boot/bzImage /rootfs/boot/vmlinuz
mv vmlinux /rootfs/boot/vmlinux
;;
aarch64)
export ARCH=arm64
mv arch/arm64/boot/Image.gz /rootfs/boot/vmlinuz
mv vmlinux /rootfs/boot/vmlinux
;;
*)
echo "unsupported arch ${ARCH}"
exit 1
;;
esac
export KERNELRELEASE=$(cat include/config/kernel.release)
make -j $(nproc) modules_install DEPMOD=/toolchain/bin/depmod INSTALL_MOD_PATH=/rootfs
depmod -b /rootfs $KERNELRELEASE
unlink /rootfs/lib/modules/$KERNELRELEASE/build
unlink /rootfs/lib/modules/$KERNELRELEASE/source
finalize:
- from: /rootfs
to: /
- from: /rootfs
to: /

0 comments on commit 5530775

Please sign in to comment.