Hellooooooo i try to make a port (downstream) for the Realme C21Y rmx3263 but the compilatioon of the kernel fail with an error who is not explain in the wiki so i was wondering if someone knows something :
`Error: ../arch/arm64/boot/dts/sprd/ums512-w27v1.dts:1044.1-15 Label or path modem_dbg_log not found
FATAL ERROR: Syntax error parsing input tree
make[3]: *** [scripts/Makefile.lib:317: arch/arm64/boot/dts/sprd/ums512-w27v1.dtb] Error 1
make[2]: *** [../scripts/Makefile.build:676: arch/arm64/boot/dts/sprd] Error 2
make[1]: *** [arch/arm64/Makefile:201: dtbs] Error 2
make[1]: *** Waiting for unfinished jobs....
../drivers/gpio/gpio-brcmstb.c: In function 'brcmstb_gpio_irq_bank_handler':
../drivers/gpio/gpio-brcmstb.c:220:49: error: 'struct gpio_chip' has no member named 'irqdomain'
220 | struct irq_domain *irq_domain = bank->gc.irqdomain;
| ^
make[3]: *** [../scripts/Makefile.build:361: drivers/gpio/gpio-brcmstb.o] Error 1
make[2]: *** [../scripts/Makefile.build:676: drivers/gpio] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/home/pmos/build/src/realme_C21Y-AndroidR-kernel-source-3e85eafa35a4915079900d50834fb184a05c65db/Makefile:1163: drivers] Error 2
make: *** [Makefile:146: sub-make] Error 2
>>> ERROR: linux-realme-rmx3263: build failed`
The Device Tree (.dts) references something that is not defined.
Two options:
- Define it
- Comment it out (for now) and continue with the port
Also, gpio-brcmstb.c cannot be compiled. I assume it’s a downstream driver. See if the kernel successfully compiles if you disable the option for it in the kernel config, probably has ‘BRCMSTB’ in it, perhaps something like CONFIG_GPIO_BRCRMSTB (I’m making this up, but should be similar).
You can always try to look for gpio-brcmstb on kernelconfig.io if it is a driver that is upstream. This should give you an explanation what this driver is and what the config option for it is.
Also, as Clippy says: Asking in the Nura chats can help, although chats have the risk of questions getting lost. I prefer using threads like here or a forum. It’s also easier to search than a chat.
https://www.kernelconfig.io/CONFIG_GPIO_BRCMSTB?q=gpio-brcmstb&kernelversion=7.3.1&arch=arm64
Just disable that and get the kernel to build. Then try to fix the issues.
The GPIO is probably used for thermals sensors and physical buttons, perhaps some other sensors, so don’t be suprised when those don’t work.
How do i define it and include in the build ? I dont see the option in the APKBUILD file.
Not the APKBUILD file, that’s the .dts file from the error.
Could also be in one of the files that it includes (see #include something.dtsi at the beginning)
Sorry i’m a bit dumb how do i say to the command
pmbootstrap buildto use my dts file ? if it’s not in the APKBUILD i dont understand. There is my APKBUILD in case that’s useful :`# Reference: <https://nura.eco/vendorkernel> # Kernel config based on: arch/arm64/configs/(CHANGEME!) maintainer="" pkgname=linux-realme-rmx3263 pkgver=4.14.193 pkgrel=0 _commit=3e85eafa35a4915079900d50834fb184a05c65db pkgdesc="Realme C21Y kernel fork" arch="aarch64" url="https://kernel.org/" license="GPL-2.0-only" makedepends=" bash bc bison devicepkg-dev elfutils-dev findutils flex linux-headers openssl-dev pahole perl python3 " source=" $pkgname-$_commit.tar.gz::https://github.com/realme-kernel-opensource/realme_C21Y-AndroidR-kernel-source/archive/$_commit.tar.gz config-${pkgname#linux-}.$arch " builddir="$srcdir/realme_C21Y-AndroidR-kernel-source-$_commit" options=" !check !strip !tracedeps pmb:cross-native " _outdir="out" _carch="arm64" # Used internally by pmbootstrap. Don't touch. # TODO: Remove once minimum default pmbootstrap version supports # kernel packages without '_flavor' and '_config'. _config="config-${pkgname#linux-}.$arch" _flavor="${pkgname#linux-}" prepare() { default_prepare REPLACE_GCCH=0 . downstreamkernel_prepare } build() { unset LDFLAGS make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \ KBUILD_BUILD_VERSION="$((pkgrel + 1 ))"-postmarketOS } package() { downstreamkernel_package "$builddir" "$pkgdir" "$_carch" \ "${pkgname#linux-}" "$_outdir" make dtbs_install O="$_outdir" ARCH="$_carch" \ INSTALL_DTBS_PATH="$pkgdir"/boot/dtbs }'I don’t know how pmbootstrap does it, I always work on the kernel tree directly. Try asking in a Nura chat, they’re on IRC.
You might want to ask in the Matrix room https://matrix.to/#/#porting:postmarketos.org


