Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 5b14ad0

Browse files
authored
Merge pull request #341 from gao-feng/arch2
bug fix on aarch64
2 parents deb34a8 + 6dca1d9 commit 5b14ad0

File tree

21 files changed

+58
-41
lines changed

21 files changed

+58
-41
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ build/hyper-initrd.img
1515
data/hyperstart.service
1616
build/cbfs.rom
1717
build/root/*
18-
build/*iso
1918
build/daemon
20-
build/kernel_config.old
19+
build/Dockerfile
20+
build/arch/aarch64/kernel_config.old
21+
build/arch/x86_64/kernel_config.old
2122
build/.*
2223
src/.*
2324
Makefile

build/Dockerfile.aarch64

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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.

build/Makefile.am

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
1+
AUTOMAKE_OPTIONS = -Wno-portability
2+
SHELL=/bin/bash
3+
ARCH=$(shell uname -m)
4+
ARCHPATH=arch/$(ARCH)
5+
16
all-local: initrd
27

38
if WITH_KMODULES
49
export INCLUDE_KMODULES=1
510
endif
611

7-
if WITH_AARCH64
8-
initrd-local:
9-
bash ./make-initrd.sh aarch64
10-
else
1112
initrd-local:
1213
bash ./make-initrd.sh
13-
endif
1414

1515
cbfs-local:
1616
bash ./make-initrd.sh cbfs
1717

1818
kernel-local:
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 kernel
21-
hyperctl run --rm hyperstart-dev:latest cat /root/build/result/modules.tar >modules.tar
22-
mv kernel_config kernel_config.old
23-
hyperctl run --rm hyperstart-dev:latest cat /root/build/result/kernel_config >kernel_config
19+
cp $(ARCHPATH)/kernel_config ./kernel_config
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
24+
mv $(ARCHPATH)/kernel_config $(ARCHPATH)/kernel_config.old
25+
hyperctl run --rm hyperstart-dev-$(ARCH):latest cat /root/build/result/kernel_config > $(ARCHPATH)/kernel_config
26+
rm ./kernel_config

build/arch/aarch64/binary/busybox

1.48 MB
Binary file not shown.

build/arch/aarch64/kernel

3.19 MB
Binary file not shown.

build/kernel_config_aarch64 renamed to build/arch/aarch64/kernel_config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
22
# Automatically generated file; DO NOT EDIT.
3-
# Linux/arm64 4.9.36 Kernel Configuration
3+
# Linux/arm64 4.9.51 Kernel Configuration
44
#
55
CONFIG_ARM64=y
66
CONFIG_64BIT=y
@@ -1755,8 +1755,8 @@ CONFIG_RTC_INTF_DEV=y
17551755
#
17561756
# on-CPU RTC drivers
17571757
#
1758-
# CONFIG_RTC_DRV_PL030 is not set
1759-
# CONFIG_RTC_DRV_PL031 is not set
1758+
CONFIG_RTC_DRV_PL030=y
1759+
CONFIG_RTC_DRV_PL031=y
17601760
# CONFIG_RTC_DRV_SNVS is not set
17611761

17621762
#

build/arch/aarch64/modules.tar

8.43 MB
Binary file not shown.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)