arm64 kernel config booting
This commit is contained in:
parent
956acee587
commit
75333ea69b
|
@ -23,7 +23,7 @@ ATH9K_EXTRACTED := $(PRAWNOS_ATH9K_BUILD)/.ath9k_extracted
|
||||||
ATH9K_TAR := $(KERNEL_SOURCES)/open-ath9k-htc-firmware.tar.gz
|
ATH9K_TAR := $(KERNEL_SOURCES)/open-ath9k-htc-firmware.tar.gz
|
||||||
ATH9K := open-ath9k-htc-firmware
|
ATH9K := open-ath9k-htc-firmware
|
||||||
ATH9K_9271_FW := $(PRAWNOS_ATH9K_BUILD)/target_firmware/htc_9271.fw
|
ATH9K_9271_FW := $(PRAWNOS_ATH9K_BUILD)/target_firmware/htc_9271.fw
|
||||||
ATH95_7010_FW := $(PRAWNOS_ATH9K_BUILD)/target_firmware/htc_7010.fw
|
ATH9K_7010_FW := $(PRAWNOS_ATH9K_BUILD)/target_firmware/htc_7010.fw
|
||||||
ATH9K_BUILT := $(ATH9K_9271_FW)
|
ATH9K_BUILT := $(ATH9K_9271_FW)
|
||||||
|
|
||||||
KERNEL_ATH9K_FIRMWARES := $(PRAWNOS_KERNEL_BUILD)/open-ath9k-firmware
|
KERNEL_ATH9K_FIRMWARES := $(PRAWNOS_KERNEL_BUILD)/open-ath9k-firmware
|
||||||
|
@ -106,7 +106,8 @@ $(ATH9K_BUILT): $(ATH9K_EXTRACTED)
|
||||||
|
|
||||||
$(KERNEL_ATH9K_INSTALLED): $(KERNEL_PATCHED) $(ATH9K_BUILT)
|
$(KERNEL_ATH9K_INSTALLED): $(KERNEL_PATCHED) $(ATH9K_BUILT)
|
||||||
mkdir -p $(KERNEL_ATH9K_FIRMWARES)
|
mkdir -p $(KERNEL_ATH9K_FIRMWARES)
|
||||||
cp $(ATH9K_9271_FW) $(ATH9K_7010_FW) $(KERNEL_ATH9K_FIRMWARES)/
|
cp $(ATH9K_9271_FW) $(KERNEL_ATH9K_FIRMWARES)/
|
||||||
|
cp $(ATH9K_7010_FW) $(KERNEL_ATH9K_FIRMWARES)/
|
||||||
|
|
||||||
$(PRAWNOS_KERNEL_BUILT): $(KERNEL_ATH9K_INSTALLED)
|
$(PRAWNOS_KERNEL_BUILT): $(KERNEL_ATH9K_INSTALLED)
|
||||||
$(MAKE) -C $(PRAWNOS_INITRAMFS)
|
$(MAKE) -C $(PRAWNOS_INITRAMFS)
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
modules loaded:
|
||||||
|
btusb
|
||||||
|
btrtl
|
||||||
|
btbcm
|
||||||
|
btintel
|
||||||
|
bluetooth
|
||||||
|
ecdh_generic
|
||||||
|
ecc
|
||||||
|
snd_soc_dfmi_codex
|
||||||
|
mwifiex_pcie
|
||||||
|
mwifiex
|
||||||
|
ntc_thermistor
|
||||||
|
snd_soc_rk3399_gru_sound
|
||||||
|
rockchip_rga
|
||||||
|
hantro_vpu
|
||||||
|
videobuf2_dma_sg
|
||||||
|
gpio_keys
|
||||||
|
snd_soc_max98357a
|
||||||
|
dw_mipi_dsi
|
||||||
|
videobus2_vmalloc
|
||||||
|
dw_hdmi
|
||||||
|
rockchip_drm: CONFIG_DRM_ROCKCHIP : yes
|
||||||
|
analogix_dp: CONFIG_ROCKCHIP_ANALOGIX_DP : yes
|
||||||
|
videodev
|
||||||
|
cec
|
||||||
|
rc_core
|
||||||
|
gpu_schedulerdrm_kms_helper
|
||||||
|
mc
|
||||||
|
|
||||||
|
|
||||||
|
PHY_ROCKCHIP_INNO_DSIDPHY
|
||||||
|
VIDEO_HANTRO
|
||||||
|
|
||||||
|
|
||||||
|
mkimage -D "-I dts -O dtb -p 2048" -f kernel.its vmlinux.uimg
|
||||||
|
dd if=/dev/zero of=bootloader.bin bs=512 count=1
|
||||||
|
vbutil_kernel --pack vmlinux.kpart \
|
||||||
|
--version 1 \
|
||||||
|
--vmlinuz vmlinux.uimg \
|
||||||
|
--arch aarch64 \
|
||||||
|
--keyblock kernel.keyblock \
|
||||||
|
--signprivate kernel_data_key.vbprivk \
|
||||||
|
--config cmdline \
|
||||||
|
--bootloader bootloader.bin
|
|
@ -0,0 +1 @@
|
||||||
|
console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd
|
|
@ -0,0 +1 @@
|
||||||
|
root=PARTUUID=%U/PARTNROFF=1 rootfstype=ext4 rootwait ro net.ifnames=0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 console=tty1
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,36 +1,48 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
description = "Linux-libre kernel image with one or more FDT blobs for arm64";
|
description = "Linux-libre kernel image with one or more FDT blobs for arm64";
|
||||||
images {
|
images {
|
||||||
kernel@1 {
|
kernel@1{
|
||||||
description = "vmlinuz";
|
description = "kernel";
|
||||||
data = /incbin/("arch/arm64/boot/zImage");
|
data = /incbin/("arch/arm64/boot/Image");
|
||||||
type = "kernel_noload";
|
type = "kernel_noload";
|
||||||
arch = "arm";
|
arch = "arm64";
|
||||||
os = "linux";
|
os = "linux";
|
||||||
compression = "none";
|
compression = "none";
|
||||||
load = <0>;
|
load = <0>;
|
||||||
entry = <0>;
|
entry = <0>;
|
||||||
hash {
|
};
|
||||||
algo = "sha1";
|
fdt@1{
|
||||||
};
|
description = "rk3399-gru-bob.dtb";
|
||||||
};
|
data = /incbin/("arch/arm64/boot/dts/rockchip/rk3399-gru-bob.dtb");
|
||||||
fdt@1{
|
type = "flat_dt";
|
||||||
description = "rk3399-gru-bob.dtb";
|
arch = "arm64";
|
||||||
data = /incbin/("arch/arm64/boot/dts/rockchip/rk3399-gru-bob.dtb");
|
compression = "none";
|
||||||
type = "flat_dt";
|
hash@1{
|
||||||
arch = "arm64";
|
algo = "sha1";
|
||||||
compression = "none";
|
};
|
||||||
hash@1{
|
};
|
||||||
algo = "sha1";
|
fdt@2{
|
||||||
|
description = "rk3399-gru-kevin.dtb";
|
||||||
|
data = /incbin/("arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dtb");
|
||||||
|
type = "flat_dt";
|
||||||
|
arch = "arm64";
|
||||||
|
compression = "none";
|
||||||
|
hash@1{
|
||||||
|
algo = "sha1";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
configurations {
|
||||||
configurations {
|
default = "conf@1";
|
||||||
default = "conf@1";
|
conf@1{
|
||||||
conf@1{
|
kernel = "kernel@1";
|
||||||
kernel = "kernel@1";
|
fdt = "fdt@1";
|
||||||
fdt = "fdt@1";
|
};
|
||||||
|
conf@2{
|
||||||
|
kernel = "kernel@1";
|
||||||
|
fdt = "fdt@2";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
};
|
|
@ -0,0 +1,6 @@
|
||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
|
||||||
|
iF0EABECAB0WIQRHRALIxYLa++OJxCe8t8+Hfn1HpwUCXxhk5AAKCRC8t8+Hfn1H
|
||||||
|
p2C/AKCF4oEBOtCTm3ZFK+ioVw9uqEb7gwCfe59CymWGQf5I84LvLtT9lor+4Uc=
|
||||||
|
=ijcx
|
||||||
|
-----END PGP SIGNATURE-----
|
3
makefile
3
makefile
|
@ -74,7 +74,8 @@ build_dirs:
|
||||||
|
|
||||||
.PHONY: kernel_install
|
.PHONY: kernel_install
|
||||||
kernel_install: #Targets an already built .img and swaps the old kernel with the newly compiled kernel
|
kernel_install: #Targets an already built .img and swaps the old kernel with the newly compiled kernel
|
||||||
$(MAKE) kernel_image_package
|
#TODO: uncomment when we have an arm64 bit kernel image
|
||||||
|
# $(MAKE) kernel_image_package
|
||||||
$(PRAWNOS_IMAGE_SCRIPTS_INSTALL_KERNEL) $(KVER) $(PRAWNOS_IMAGE) $(TARGET) $(PRAWNOS_BUILD) prawnos-linux-image-$(TARGET)*.deb
|
$(PRAWNOS_IMAGE_SCRIPTS_INSTALL_KERNEL) $(KVER) $(PRAWNOS_IMAGE) $(TARGET) $(PRAWNOS_BUILD) prawnos-linux-image-$(TARGET)*.deb
|
||||||
|
|
||||||
.PHONY: kernel_update
|
.PHONY: kernel_update
|
||||||
|
|
|
@ -47,7 +47,7 @@ PRAWNOS_KERNEL_HEADERS_DEBVER := 1
|
||||||
|
|
||||||
## ARM64 KERNEL VERSIONS
|
## ARM64 KERNEL VERSIONS
|
||||||
else ifeq ($(TARGET),$(PRAWNOS_ARM64))
|
else ifeq ($(TARGET),$(PRAWNOS_ARM64))
|
||||||
KVER := 5.4.29
|
KVER := 5.7.10
|
||||||
PRAWNOS_KERNEL_VER := 1
|
PRAWNOS_KERNEL_VER := 1
|
||||||
PRAWNOS_KERNEL_IMAGE_DEBVER := 1
|
PRAWNOS_KERNEL_IMAGE_DEBVER := 1
|
||||||
PRAWNOS_KERNEL_HEADERS_DEBVER := 1
|
PRAWNOS_KERNEL_HEADERS_DEBVER := 1
|
||||||
|
|
|
@ -68,16 +68,18 @@ kernel_size=65536
|
||||||
#blank the kernel partition first, with 32MiB of zeros
|
#blank the kernel partition first, with 32MiB of zeros
|
||||||
dd if=/dev/zero of=${outdev}p1 conv=notrunc bs=512 count=$kernel_size
|
dd if=/dev/zero of=${outdev}p1 conv=notrunc bs=512 count=$kernel_size
|
||||||
#now write the new kernel
|
#now write the new kernel
|
||||||
dd if=build/linux-$KVER/vmlinux.kpart of=${outdev}p1 conv=notrunc
|
dd if=build/$TARGET/linux-$KVER/vmlinux.kpart of=${outdev}p1 conv=notrunc
|
||||||
make -C build/linux-$KVER ARCH=arm INSTALL_MOD_PATH=$outmnt modules_install
|
# don't install modules for now
|
||||||
|
#make -C build/$TARGET/linux-$KVER ARCH=arm INSTALL_MOD_PATH=$outmnt modules_install
|
||||||
|
|
||||||
#install the kernel image package to the chroot so it can be updated by apt later
|
#install the kernel image package to the chroot so it can be updated by apt later
|
||||||
#need to do funky things to avoid running the postinst script that dds the kernel to the kernel partition
|
#need to do funky things to avoid running the postinst script that dds the kernel to the kernel partition
|
||||||
#maybe it would make more sense to run this on install?
|
#maybe it would make more sense to run this on install, but then a usb booting device couldn't upgrade its kernel
|
||||||
cp $KERNEL_PACKAGE_PATH $outmnt/
|
#TODO uncomment and test once arm64 is done
|
||||||
chroot $outmnt dpkg --unpack $KERNEL_PACKAGE
|
# cp $KERNEL_PACKAGE_PATH $outmnt/
|
||||||
chroot $outmnt rm /var/lib/dpkg/info/$KERNEL_PACKAGE.postinst -f
|
# chroot $outmnt dpkg --unpack $KERNEL_PACKAGE
|
||||||
chroot $outmnt dpkg --configure $KERNEL_PACKAGE
|
# chroot $outmnt rm /var/lib/dpkg/info/$KERNEL_PACKAGE.postinst -f
|
||||||
|
# chroot $outmnt dpkg --configure $KERNEL_PACKAGE
|
||||||
|
|
||||||
# the ath9k firmware and initramfs is built into the kernel image, so nothing else must be done
|
# the ath9k firmware and initramfs is built into the kernel image, so nothing else must be done
|
||||||
|
|
||||||
|
|
|
@ -60,13 +60,20 @@ ARCH_ARM64=arm64
|
||||||
cd $BUILD_DIR
|
cd $BUILD_DIR
|
||||||
make mrproper
|
make mrproper
|
||||||
|
|
||||||
|
#this arch nonsense is obnoxious.
|
||||||
|
# armhf is just "arm" to the kernel and vbutil,
|
||||||
|
# arm64 is what the kernel uses, but aarch64 is what vbutil uses
|
||||||
if [ "$TARGET" == "$ARCH_ARMHF" ]; then
|
if [ "$TARGET" == "$ARCH_ARMHF" ]; then
|
||||||
CROSS_COMPILER=arm-none-eabi-
|
CROSS_COMPILER=arm-none-eabi-
|
||||||
# kernel doesn't differentiate between arm and armhf
|
# kernel doesn't differentiate between arm and armhf
|
||||||
ARCH=arm
|
KERNEL_ARCH=arm
|
||||||
|
VBUTIL_ARCH=$KERNEL_ARCH
|
||||||
|
IMAGE=zImage
|
||||||
elif [ "$TARGET" == "$ARCH_ARM64" ]; then
|
elif [ "$TARGET" == "$ARCH_ARM64" ]; then
|
||||||
CROSS_COMPILER=aarch64-linux-gnu-
|
CROSS_COMPILER=aarch64-linux-gnu-
|
||||||
ARCH=$ARCH_ARM64
|
KERNEL_ARCH=$ARCH_ARM64
|
||||||
|
VBUTIL_ARCH=aarch64
|
||||||
|
IMAGE=Image
|
||||||
else
|
else
|
||||||
echo "no valid target arch specified"
|
echo "no valid target arch specified"
|
||||||
fi
|
fi
|
||||||
|
@ -75,13 +82,14 @@ fi
|
||||||
cp $INITRAMFS .
|
cp $INITRAMFS .
|
||||||
cp $RESOURCES/config .config
|
cp $RESOURCES/config .config
|
||||||
cp $RESOURCES/kernel.its .
|
cp $RESOURCES/kernel.its .
|
||||||
make -j $(($(nproc) +1)) CROSS_COMPILE=$CROSS_COMPILER ARCH=$ARCH zImage modules dtbs
|
make -j $(($(nproc) +1)) CROSS_COMPILE=$CROSS_COMPILER ARCH=$KERNEL_ARCH $IMAGE
|
||||||
|
make -j $(($(nproc) +1)) CROSS_COMPILE=$CROSS_COMPILER ARCH=$KERNEL_ARCH DTC_FLAGS="-@" dtbs
|
||||||
mkimage -D "-I dts -O dtb -p 2048" -f kernel.its vmlinux.uimg
|
mkimage -D "-I dts -O dtb -p 2048" -f kernel.its vmlinux.uimg
|
||||||
dd if=/dev/zero of=bootloader.bin bs=512 count=1
|
dd if=/dev/zero of=bootloader.bin bs=512 count=1
|
||||||
vbutil_kernel --pack vmlinux.kpart \
|
vbutil_kernel --pack vmlinux.kpart \
|
||||||
--version 1 \
|
--version 1 \
|
||||||
--vmlinuz vmlinux.uimg \
|
--vmlinuz vmlinux.uimg \
|
||||||
--arch arm \
|
--arch $VBUTIL_ARCH \
|
||||||
--keyblock /usr/share/vboot/devkeys/kernel.keyblock \
|
--keyblock /usr/share/vboot/devkeys/kernel.keyblock \
|
||||||
--signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk \
|
--signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk \
|
||||||
--config $RESOURCES/cmdline \
|
--config $RESOURCES/cmdline \
|
||||||
|
|
|
@ -41,7 +41,11 @@ if [ "$TARGET" == "$ARCH_ARMHF" ]; then
|
||||||
for i in "$PATCHES"/DTS/*.patch; do echo $i; patch -p1 < $i; done
|
for i in "$PATCHES"/DTS/*.patch; do echo $i; patch -p1 < $i; done
|
||||||
for i in "$PATCHES"/kernel/*.patch; do echo $i; patch -p1 < $i; done
|
for i in "$PATCHES"/kernel/*.patch; do echo $i; patch -p1 < $i; done
|
||||||
elif [ "$TARGET" == "$ARCH_ARM64" ]; then
|
elif [ "$TARGET" == "$ARCH_ARM64" ]; then
|
||||||
for i in "$PATCHES"/kernel/*.patch; do echo $i; patch -p1 < $i; done
|
echo skip for now
|
||||||
|
# for i in "$PATCHES"/kernel/*.patch; do echo $i; patch -p1 < $i; done
|
||||||
|
# for i in "$PATCHES"/drm/*.patch; do echo $i; patch -p1 < $i; done
|
||||||
|
# for i in "$PATCHES"/cros-drm/*.patch; do echo $i; patch -p1 < $i; done
|
||||||
|
# for i in "$PATCHES"/alarm/*.patch; do echo $i; patch -p1 < $i; done
|
||||||
else
|
else
|
||||||
echo "no valid target arch specified"
|
echo "no valid target arch specified"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Reference in New Issue