This repository was archived by the owner on Feb 8, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +39
-7
lines changed Expand file tree Collapse file tree 4 files changed +39
-7
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,10 @@ build/hyper-initrd.img
1515data /hyperstart.service
1616build /cbfs.rom
1717build /root /*
18- build /* iso
1918build /daemon
20- build /kernel_config.old
19+ build /Dockerfile
20+ build /arch /aarch64 /kernel_config.old
21+ build /arch /x86_64 /kernel_config.old
2122build /. *
2223src /. *
2324Makefile
Original file line number Diff line number Diff line change 1+ FROM centos:7
2+ MAINTAINER Hyper Developers <dev@hyper.sh>
3+
4+ RUN yum install -y patch gcc ncurses-devel make openssl-devel bc perl
5+
6+ ENV KERNEL_VERSION 4.9.51
7+ ENV LOCALVERSION -hyper
8+ ENV KERNEL_RELEASE ${KERNEL_VERSION}${LOCALVERSION}
9+
10+ ENV KBUILD_BUILD_USER dev
11+ ENV KBUILD_BUILD_HOST hyper.sh
12+ ENV KBUILD_BUILD_VERSION 1
13+
14+ RUN mkdir /root/build/ && mkdir /root/build/result/
15+ RUN curl -fSL https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${KERNEL_VERSION}.tar.gz | tar -zx -C /root/build
16+
17+ COPY kernel_config /root/build/linux-${KERNEL_VERSION}/.config
18+ COPY kernel_patch/ /root/build/kernel_patch/
19+
20+ RUN cd /root/build/linux-${KERNEL_VERSION}/ && for patch in /root/build/kernel_patch/*.patch; do patch -p1 <$patch || exit 1; done
21+ RUN cd /root/build/linux-${KERNEL_VERSION}/ && make silentoldconfig && make -j 8
22+
23+ # install to /root/build/result/ so that we can get them from it
24+ RUN cp /root/build/linux-${KERNEL_VERSION}/arch/arm64/boot/Image.gz /root/build/result/kernel
25+ RUN mkdir /root/build/result/modules &&\
26+ cd /root/build/linux-${KERNEL_VERSION}/ && make modules_install INSTALL_MOD_PATH="/root/build/result/modules" &&\
27+ cd /root/build/result/modules/lib/modules/ && rm -f ${KERNEL_RELEASE}/{build,source} &&\
28+ tar -cf /root/build/result/modules.tar ${KERNEL_RELEASE}/ && rm -rf /root/build/result/modules
29+ RUN cp /root/build/linux-${KERNEL_VERSION}/.config /root/build/result/kernel_config
File renamed without changes.
Original file line number Diff line number Diff line change 11AUTOMAKE_OPTIONS = -Wno-portability
22SHELL =/bin/bash
3- ARCHPATH =arch/$(shell uname -m)
3+ ARCH =$(shell uname -m)
4+ ARCHPATH =arch/$(ARCH )
45
56all-local : initrd
67
@@ -16,9 +17,10 @@ cbfs-local:
1617
1718kernel-local :
1819 cp $(ARCHPATH ) /kernel_config ./kernel_config
19- hyperctl build -t hyperstart-dev:latest .
20- hyperctl run --rm hyperstart-dev:latest cat /root/build/result/kernel > kernel.new && mv -f kernel.new $(ARCHPATH ) /kernel
21- hyperctl run --rm hyperstart-dev:latest cat /root/build/result/modules.tar > $(ARCHPATH ) /modules.tar
20+ cp Dockerfile.$(ARCH ) Dockerfile
21+ hyperctl build -t hyperstart-dev-$(ARCH ) :latest -f Dockerfile .
22+ hyperctl run --rm hyperstart-dev-$(ARCH ) :latest cat /root/build/result/kernel > kernel.new && mv -f kernel.new $(ARCHPATH ) /kernel
23+ hyperctl run --rm hyperstart-dev-$(ARCH ) :latest cat /root/build/result/modules.tar > $(ARCHPATH ) /modules.tar
2224 mv $(ARCHPATH ) /kernel_config $(ARCHPATH ) /kernel_config.old
23- hyperctl run --rm hyperstart-dev:latest cat /root/build/result/kernel_config > $(ARCHPATH ) /kernel_config
25+ hyperctl run --rm hyperstart-dev- $( ARCH ) :latest cat /root/build/result/kernel_config > $(ARCHPATH ) /kernel_config
2426 rm ./kernel_config
You can’t perform that action at this time.
0 commit comments