Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux -> v6.12 #15

Merged
merged 13 commits into from
Dec 30, 2024
Merged

linux -> v6.12 #15

merged 13 commits into from
Dec 30, 2024

Conversation

ninelore
Copy link
Contributor

@ninelore ninelore commented Sep 22, 2024

Might fix #10
Fixes MT8195

Tested:

  • cherry
  • asurada
  • corsola
  • kukui
  • trogdor

@ninelore
Copy link
Contributor Author

ninelore commented Sep 23, 2024

@ellyq could you test on kukui and corsola aswell please?

@ellyq
Copy link
Collaborator

ellyq commented Sep 23, 2024

@ellyq could you test on kukui and corsola aswell please?

Sure, I'll bring KRANE and MAGNETON to work tomorrow

@ellyq
Copy link
Collaborator

ellyq commented Sep 24, 2024

Building for ARM64 doesn't work for me (and CI failed).

❯ amake arm64 -j16
mkdir -p build images
cd u-root; \
  GBB_PATH=u-root GOOS=linux GOARCH=arm64 u-root -o ../build/u-root-a64.cpio -uinitcmd="elvish -c 'sleep 3; boot'" core cmds/boot/boot
19:49:38 INFO Build environment: GOARCH=arm64 GOOS=linux GOPATH=/home/elly/go CGO_ENABLED=0 GO111MODULE= GOROOT=/usr/lib/golang PATH=/usr/lib/golang/bin
19:49:45 ERROR mkuimage error: could not create symlink from "bin/uinit" to "elvish": command or path "elvish" not included in u-root build: specify -uinitcmd="" to ignore this error and build without a uinit
make: *** [Makefile:99: u-root-a64.cpio] Error 1

Dropped specifying elvish shell, it builds now.... but fails at depthchargectl.

❯ amake arm64 -j16
depthchargectl build -v \
	--board arm64-generic \
	--kernel build/bzImage.a64 \
	--fdtdir build/dtbs \
	--root none \
	--kernel-cmdline "console=tty0" \
	--output build/submarine-a64.kpart
Assuming board 'Unnamed arm64-generic board' ('arm64-generic') by codename argument or config.
Using kernel cmdline from given options: console=tty0
Ignoring kernel '6.10.6-200.fc40.x86_64' incompatible with board arch.
Ignoring kernel '6.10.10-200.fc40.x86_64' incompatible with board arch.
Ignoring kernel '6.10.9-200.fc40.x86_64' incompatible with board arch.
Ignoring kernel '0-rescue-9e519a080ddb4278bda744d2bd1f1cf3' incompatible with board arch.
Could not find any installed kernel.
No initramfs file found.
Searching 'build/dtbs' for dtbs compatible with pattern 'google,.*'.
[Errno 2] No such file or directory: 'fdtget'
make: *** [Makefile:76: submarine-a64.kpart] Error 1

I see commits from @jensdrenhaus deprecating elvish, we should follow and move to a new shell.

We should also switch to using mkdepthcharge instead.

$(KPART_A64): $(BZIMAGE_A64)
	mkdepthcharge -o $(WORKDIR)/$(KPART_A64) \
		--dtbs $(WORKDIR)/dtbs/*/*.dtb \
		--cmdline "console=tty0" \
		--vmlinuz $(WORKDIR)/$(BZIMAGE_A64) \
		--compress lz4 
	mkdir -p $(OUTPUTDIR)
	cp $(WORKDIR)/$(KPART_A64) $(OUTPUTDIR)/$(KPART_A64)
	@echo 'Kernel partition binary saved as "$(KPART_A64)" in "images" directory.'

Build log:

❯ amake arm64 -j16
mkdir -p build images
cd u-root; \
  GBB_PATH=u-root GOOS=linux GOARCH=arm64 u-root -o ../build/u-root-a64.cpio -uinitcmd="sleep 3; boot" core cmds/boot/boot
20:27:56 INFO Build environment: GOARCH=arm64 GOOS=linux GOPATH=/home/elly/go CGO_ENABLED=0 GO111MODULE= GOROOT=/usr/lib/golang PATH=/usr/lib/golang/bin
20:28:04 INFO Successfully built "../build/u-root-a64.cpio" (size 13059352 bytes -- 12 MiB).
xz -kf -9 --check=crc32 build/u-root-a64.cpio
cp configs/kernel.a64 kernel/.config
CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make -C kernel olddefconfig
make[1]: Entering directory '/home/elly/Projects/personal/submarine/kernel'
.config:722:warning: symbol value '0' invalid for BASE_SMALL
#
# configuration written to .config
#
make[1]: Leaving directory '/home/elly/Projects/personal/submarine/kernel'
CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make -C kernel
make[1]: Entering directory '/home/elly/Projects/personal/submarine/kernel'
  SYNC    include/config/auto.conf
  CALL    scripts/checksyscalls.sh
  COPY    usr/initramfs_inc_data
  AS      usr/initramfs_data.o
  AR      usr/built-in.a
  AR      built-in.a
  AR      vmlinux.a
  LD      vmlinux.o
  OBJCOPY modules.builtin.modinfo
  GEN     modules.builtin
  MODPOST vmlinux.symvers
  UPD     include/generated/utsversion.h
  CC      init/version-timestamp.o
  KSYMS   .tmp_vmlinux0.kallsyms.S
  AS      .tmp_vmlinux0.kallsyms.o
  LD      .tmp_vmlinux1
  NM      .tmp_vmlinux1.syms
  KSYMS   .tmp_vmlinux1.kallsyms.S
  AS      .tmp_vmlinux1.kallsyms.o
  LD      .tmp_vmlinux2
  NM      .tmp_vmlinux2.syms
  KSYMS   .tmp_vmlinux2.kallsyms.S
  AS      .tmp_vmlinux2.kallsyms.o
  LD      vmlinux
  NM      System.map
  SORTTAB vmlinux
  OBJCOPY arch/arm64/boot/Image
  GZIP    arch/arm64/boot/Image.gz
make[1]: Leaving directory '/home/elly/Projects/personal/submarine/kernel'
CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make -C kernel dtbs_install INSTALL_DTBS_PATH=../build/dtbs
make[1]: Entering directory '/home/elly/Projects/personal/submarine/kernel'
[...]
  INSTALL ../build/dtbs/mediatek/mt8167-pumpkin.dtb
  INSTALL ../build/dtbs/mediatek/mt8173-elm.dtb
  INSTALL ../build/dtbs/mediatek/mt8173-elm-hana.dtb
  INSTALL ../build/dtbs/mediatek/mt8173-elm-hana-rev7.dtb
  INSTALL ../build/dtbs/mediatek/mt8173-evb.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-evb.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-jacuzzi-burnet.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-jacuzzi-cozmo.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-jacuzzi-damu.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-jacuzzi-fennel-sku1.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-jacuzzi-fennel-sku6.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-jacuzzi-fennel-sku7.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-jacuzzi-fennel14.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-jacuzzi-fennel14-sku2.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-jacuzzi-juniper-sku16.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-jacuzzi-kappa.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-jacuzzi-kenzo.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-jacuzzi-makomo-sku0.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-jacuzzi-makomo-sku1.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-jacuzzi-pico.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-jacuzzi-pico6.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-jacuzzi-willow-sku0.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-jacuzzi-willow-sku1.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-kakadu.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-kakadu-sku22.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-katsu-sku32.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-katsu-sku38.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-kodama-sku16.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-kodama-sku272.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-kodama-sku288.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-kodama-sku32.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-krane-sku0.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-kukui-krane-sku176.dtb
  INSTALL ../build/dtbs/mediatek/mt8183-pumpkin.dtb
  INSTALL ../build/dtbs/mediatek/mt8186-corsola-magneton-sku393216.dtb
  INSTALL ../build/dtbs/mediatek/mt8186-corsola-magneton-sku393217.dtb
  INSTALL ../build/dtbs/mediatek/mt8186-corsola-magneton-sku393218.dtb
  INSTALL ../build/dtbs/mediatek/mt8186-corsola-steelix-sku131072.dtb
  INSTALL ../build/dtbs/mediatek/mt8186-corsola-rusty-sku196608.dtb
  INSTALL ../build/dtbs/mediatek/mt8186-corsola-steelix-sku131073.dtb
  INSTALL ../build/dtbs/mediatek/mt8186-corsola-tentacool-sku327681.dtb
  INSTALL ../build/dtbs/mediatek/mt8186-corsola-tentacool-sku327683.dtb
  INSTALL ../build/dtbs/mediatek/mt8186-corsola-tentacruel-sku262144.dtb
  INSTALL ../build/dtbs/mediatek/mt8186-corsola-tentacruel-sku262148.dtb
  INSTALL ../build/dtbs/mediatek/mt8186-corsola-voltorb-sku589824.dtb
  INSTALL ../build/dtbs/mediatek/mt8186-corsola-voltorb-sku589825.dtb
  INSTALL ../build/dtbs/mediatek/mt8186-evb.dtb
  INSTALL ../build/dtbs/mediatek/mt8188-evb.dtb
  INSTALL ../build/dtbs/mediatek/mt8192-asurada-hayato-r1.dtb
  INSTALL ../build/dtbs/mediatek/mt8192-asurada-hayato-r5-sku2.dtb
  INSTALL ../build/dtbs/mediatek/mt8192-asurada-spherion-r0.dtb
  INSTALL ../build/dtbs/mediatek/mt8192-asurada-spherion-r4.dtb
  INSTALL ../build/dtbs/mediatek/mt8192-evb.dtb
  INSTALL ../build/dtbs/mediatek/mt8195-cherry-dojo-r1.dtb
  INSTALL ../build/dtbs/mediatek/mt8195-cherry-tomato-r1.dtb
  INSTALL ../build/dtbs/mediatek/mt8195-cherry-tomato-r2.dtb
  INSTALL ../build/dtbs/mediatek/mt8195-cherry-tomato-r3.dtb
[...]
make[1]: Leaving directory '/home/elly/Projects/personal/submarine/kernel'
cp kernel/arch/arm64/boot/Image.gz build/bzImage.a64
mkdepthcharge -o build/submarine-a64.kpart \
	--dtbs build/dtbs/*/*.dtb \
	--cmdline "console=tty0" \
	--vmlinuz build/bzImage.a64 \
	--compress lz4 
/home/elly/Projects/personal/submarine/build/submarine-a64.kpart
mkdir -p images
cp build/submarine-a64.kpart images/submarine-a64.kpart
Kernel partition binary saved as "submarine-a64.kpart" in "images" directory.
fallocate -l 69M build/submarine-a64.bin
parted build/submarine-a64.bin mklabel gpt --script
cgpt add -i 1 -t kernel -b 2048 -s 131068 -P 15 -T 1 -S 1 build/submarine-a64.bin
dd if=build/submarine-a64.kpart of=build/submarine-a64.bin bs=512 seek=2048 conv=notrunc
93240+0 records in
93240+0 records out
47738880 bytes (48 MB, 46 MiB) copied, 0.115525 s, 413 MB/s
cp build/submarine-a64.bin images/submarine-a64.bin
Build complete! Resulting file saved as "submarine-a64.bin" in "images" directory.

@ninelore
Copy link
Contributor Author

ninelore commented Sep 24, 2024

CI issue is just CI being whacky (@Owen-sz told aswell)

I dont think you're supposed or need to explicitly use a cross-compiler

@ellyq
Copy link
Collaborator

ellyq commented Sep 24, 2024

Cross-compile flag passed by shell doesn't matter, makefile would append it automatically IF HOST == X86_64

@ninelore
Copy link
Contributor Author

I've built arm64 in a fresh container to substitute a CI success
submarine-clean-container.txt

@ninelore
Copy link
Contributor Author

ninelore commented Oct 19, 2024

bumped to 6.11.4

built both arch successfully in a fresh fedora container in case CI fails again

@ninelore
Copy link
Contributor Author

Rebased. CI looks good aswell.

@ninelore ninelore changed the title linux -> v6.11 linux -> v6.12 Nov 19, 2024
@logan2611
Copy link

logan2611 commented Nov 26, 2024

I have a google-kappa (kukui), screen stays black even when booted into the final OS.

Not sure why though, kernel config options look fine to me.

EDIT: Probably related dmesg entry: mediatek-dpi 14015000.dpi: error -ENODEV: Failed to get bridge

@logan2611
Copy link

mediatek-dpi 14015000.dpi: error -ENODEV: Failed to get bridge

Seems to be a regression in upstream 6.12's DTS sadly

@alpernebbi
Copy link
Collaborator

I have a google-kappa (kukui), screen stays black even when booted into the final OS.

https://lore.kernel.org/lkml/[email protected]/ might solve that. It's now in the stable queue, likely will go into v6.12.2.

@ninelore
Copy link
Contributor Author

ninelore commented Dec 5, 2024

kukui should be fixed with latest commit

@logan2611
Copy link

kukui should be fixed with latest commit

Confirmed 👍

@logan2611
Copy link

logan2611 commented Dec 17, 2024

Technically boots on asurada (hayata-rev5-sku0), but mainline support is bad so no screen output. Adding DTS for device didn't seem to improve anything.

Only tested automated boot from eMMC.

@logan2611
Copy link

It seems I was mistaken, mainline support on this laptop is actually not too bad, certainly good enough for submarine. I got it working by forking @ninelore's repo and adding a few extra options to the defconfig.

If you want, I can clean it up and make a PR, but if not, I believe the important options are:

CONFIG_MTK_LVTS_THERMAL=y
CONFIG_COMMON_CLK_MT8192_MMSYS=y

I did enable some others, but I suspect at least a few of them aren't necessary. Will test further, but I'm busy until next week.

@ninelore
Copy link
Contributor Author

Personally tested on kukui, corsola, cherry and trogdor rn successfully

@ninelore
Copy link
Contributor Author

please merge, asurada fix will be PR'ed afterwards

@ninelore ninelore mentioned this pull request Dec 30, 2024
@lleyton lleyton merged commit cd72464 into FyraLabs:main Dec 30, 2024
2 checks passed
@ninelore ninelore deleted the latest-kernel branch December 30, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Screen doesn't initialize on mt8192
5 participants