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

ramips: add support for 6.6 kernel version #14774

Merged
merged 12 commits into from Apr 5, 2024
Merged

Conversation

namiltd
Copy link
Contributor

@namiltd namiltd commented Mar 2, 2024

Initial support for 6.6 kernel version.

Build system: x86/64
Build-tested: ramips/mt7620/tplink_archer-c5-v4
Run-tested: ramips/mt7620/tplink_archer-c5-v4

obraz

@github-actions github-actions bot added kernel pull request/issue with Linux kernel related changes target/ramips pull request/issue for ramips target labels Mar 2, 2024
@namiltd namiltd marked this pull request as draft March 6, 2024 21:36
@namiltd namiltd marked this pull request as ready for review March 8, 2024 21:53
@msandber
Copy link
Contributor

msandber commented Mar 9, 2024

Building fails with message:

make[2]: Leaving directory '/home/ubuntu/git/openwrt/scripts/config'
/home/ubuntu/git/openwrt/include/kernel-version.mk:11: *** Missing kernel version/hash file for 6.6. Please create /home/ubuntu/git/openwrt/include/kernel-6.6.  Stop.
time: target/linux/prereq#0.01#0.00#0.01
    ERROR: target/linux failed to build.

Rebasing to #14751 fixes it.

@namiltd namiltd changed the title [WIP] ramips: mt7620: add support for 6.6 kernel version ramips: mt7620: add support for 6.6 kernel version Mar 11, 2024
@namiltd namiltd changed the title ramips: mt7620: add support for 6.6 kernel version [WIP] ramips: mt7620: add support for 6.6 kernel version Mar 11, 2024
@namiltd
Copy link
Contributor Author

namiltd commented Mar 11, 2024

Compilation goes smoothly but unfortunately the compiled system does not start and this requires a more detailed investigation.
I only have:

[    0.000000] Linux 6.6.20 (builder@buildhost) (mipsel-openwrt-linux-musl-gcc (OpenWrt GCC 12.3.0 r25430-eb44f39e39) 12.3.0, GNU ld (GNU Binutils) 2.40.0) Mar 6 11:40:57 2024
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7620A ver:2 eco:6
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is TP-Link Archer C5 v4
[    0.000000] detected buffer overflow in memcmp

It's probably a memcmp error when calling detect_memory_region which shouldn't be displayed.

@DragonBluep
Copy link
Contributor

Compilation goes smoothly but unfortunately the compiled system does not start and this requires a more detailed investigation. I only have:

[    0.000000] Linux  6.6.20 (builder@buildhost) (mipsel-openwrt-linux-musl-gcc (OpenWrt GCC 12.3.0 r25430-eb44f39e39) 12.3.0, GNU ld (GNU Binutils) 2.40.0) Mar 6 11:40:57 2024
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7620A ver:2 eco:6
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is TP-Link Archer C5 v4
[    0.000000] detected buffer overflow in memcmp

It's probably a memcmp error when calling detect_memory_region which shouldn't be displayed.

Reverting https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/include/linux/fortify-string.h?h=next-20240312&id=439a1bcac648fe9b59210cde8991fb2acf37bdab can workaround this issue. Not sure if GCC13 has some help.

@msandber
Copy link
Contributor

Compilation goes smoothly but unfortunately the compiled system does not start and this requires a more detailed investigation. I only have:

A mt7621 build , which is based on top of this PR, boots without problems all the way. If that is of any help narrowing down the cause.

[    0.000000] Linux version 6.6.20 (ubuntu@ubuntu) (mipsel-openwrt-linux-musl-gcc (OpenWrt GCC 12.3.0 r25155-35f4442275) 12.3.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP Tue Mar 12 05:27:34 2024
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is DNA Valokuitu Plus EX400
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] VPE topology {2} total 2
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
...

@msandber
Copy link
Contributor

@namiltd And oh yes, kernel 6.6 PR was merged yesterday in the master if you want to rebase to it. :)

@namiltd namiltd force-pushed the linux-v6.6 branch 2 times, most recently from 290fcf3 to 339a7b4 Compare March 12, 2024 22:04
@PolynomialDivision
Copy link
Member

Please bring the PR in a state that allows to review it. Split the commits like its done on all other kernel update PRs. Thanks! :)

@namiltd namiltd marked this pull request as draft March 12, 2024 23:37
@namiltd namiltd marked this pull request as ready for review March 13, 2024 01:27
@timocapa
Copy link

timocapa commented Mar 13, 2024

Compilation goes smoothly but unfortunately the compiled system does not start and this requires a more detailed investigation. I only have:

A mt7621 build , which is based on top of this PR, boots without problems all the way. If that is of any help narrowing down the cause.

Made a mt7621 build, with your changes rebased on top of main, enabling “Strip unnecessary exports from the kernel image” seems to cause a build failure.

Not sure if this was introduced with 6.6 in general, or by one of the changes here.

If you haven’t checked by the time I get home, I’ll attach a build log here. :)

@PolynomialDivision
Copy link
Member

  make[2] -C target/linux compile
    ERROR: target/linux failed to build.
make: *** [/__w/openwrt/openwrt/openwrt/include/toplevel.mk:233: target/compile] Error 1
make -r target/compile: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on
====== Make errors from logs/target/linux/compile.txt ======
      |                  ^~~~~~~~~~~~~~~~~~~~
sound/soc/ralink/ralink-i2s.c:489:18: note: (near initialization for 'ralink_i2s_dai.id')
sound/soc/ralink/ralink-i2s.c:490:10: error: 'struct snd_soc_dai_driver' has no member named 'remove'
  490 |         .remove = ralink_i2s_dai_remove,
      |          ^~~~~~
sound/soc/ralink/ralink-i2s.c:490:19: error: initialization of 'unsigned int' from 'int (*)(struct snd_soc_dai *)' makes integer from pointer without a cast [-Werror=int-conversion]
  490 |         .remove = ralink_i2s_dai_remove,
      |                   ^~~~~~~~~~~~~~~~~~~~~
sound/soc/ralink/ralink-i2s.c:490:19: note: (near initialization for 'ralink_i2s_dai.base')
cc1: all warnings being treated as errors

@PolynomialDivision
Copy link
Member

I guess you should try .remove_new like done here:
3043bd2

@namiltd namiltd force-pushed the linux-v6.6 branch 6 times, most recently from 9794ed8 to fe0ced8 Compare March 15, 2024 08:33
@github-actions github-actions bot removed the core packages pull request/issue for core (in-tree) packages label Apr 1, 2024
@namiltd namiltd force-pushed the linux-v6.6 branch 2 times, most recently from 08ffe78 to 7ad3779 Compare April 1, 2024 14:57
@namiltd
Copy link
Contributor Author

namiltd commented Apr 2, 2024

@DragonBluep All done. I think it's ready to merge now.

@namiltd
Copy link
Contributor Author

namiltd commented Apr 3, 2024

Is there a chance for approval before the kernel is updated to 6.6.24 (released today) and we have to adapt the patches again? Can you help @robimarko?

Copy link
Contributor

@DragonBluep DragonBluep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DragonBluep Is there a chance for approval before the kernel is updated to 6.6.24 (released today) and we have to adapt the patches again?

LGTM. Reviewed-by: Shiji Yang <yangshiji66@outlook.com>.

Thank you for your contribution. I am not a repo maintainer, so I cannot provide further help.

@PolynomialDivision
Copy link
Member

Why is the CI failing?

@namiltd
Copy link
Contributor Author

namiltd commented Apr 4, 2024

@PolynomialDivision Errors are not the result of this PR PR but other commits that have not been adapted to the current code version (bcm53xx and ipq40xx), Patches to them are being prepared (#15042 and #15063)

namiltd and others added 12 commits April 5, 2024 07:58
This is an automatically generated commit.

During a `git bisect` session, `git bisect --skip` is recommended.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
This is an automatically generated commit which aids following Kernel patch history,
as git will see the move and copy as a rename thus defeating the purpose.

See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
for the original discussion.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
This is an automatically generated commit.

During a `git bisect` session, `git bisect --skip` is recommended.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
This is an automatically generated commit which aids following Kernel patch history,
as git will see the move and copy as a rename thus defeating the purpose.

See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
for the original discussion.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Remove patches for old kernel.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Refresh kernel patches.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Fix compatibility of ralink net drivers with kernel 6.6.
It follows the kernel patch: u64_stats: Streamline the implementation (torvalds/linux@44b0c29)

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
This patch fixes the broken detect_memory_region() function on
6.6 kernel.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Fix error: 'struct snd_soc_dai_driver' has no member named 'remove'
It follows the kernel patch: ASoC: soc-dai.h: remove unused call back functions (torvalds/linux@446b31e)

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Compatiblity with kernel 6.6 for Awinic AW9523B i2c pin controller driver.
It follows the kernel patch: i2c: Drop legacy callback .probe_new() (torvalds/linux@5eb1e6e)
and kernel patch: gpiolib: Get rid of not used of_node member (torvalds/linux@70d0fc4)

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Refresh kernel config.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Allow selecting 6.6 as testing kernel on ramips.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
@openwrt-bot openwrt-bot merged commit b7a9007 into openwrt:main Apr 5, 2024
7 checks passed
@PolynomialDivision
Copy link
Member

Thanks. Merged to main! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel pull request/issue with Linux kernel related changes target/ramips pull request/issue for ramips target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet