You are not logged in.

#1 2022-06-30 18:48:22

WunderWungiel
Member
Registered: 2021-06-08
Posts: 10

Avoid checking config sha256sum while building kernel

Hi
I try to build my own kernel, that would work with Anbox.
I use Arch Build System.
I modified config file and included

CONFIG_ASHMEM=y
CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_BINDERFS=y
CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"
CONFIG_SW_SYNC=y
CONFIG_UHID=m

options.
However, when I run makepkg -s, it fails when checking config sha256sum.
And says at least one file isn't correct.
How to avoid checking config file sha256sum, to build anyway?

Cheers

Offline

#2 2022-06-30 18:54:24

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,208

Re: Avoid checking config sha256sum while building kernel

https://wiki.archlinux.org/title/Makepk … _checksums or make the corresponding sha256sum entry in the pkgbuild read 'SKIP' https://wiki.archlinux.org/title/PKGBUILD#Integrity

FWIW if you want to test a ready made kernel, the linux-zen package includes these flags.

Last edited by V1del (2022-06-30 18:58:27)

Offline

#3 2022-06-30 19:03:20

loqs
Member
Registered: 2014-03-06
Posts: 18,893

Re: Avoid checking config sha256sum while building kernel

V1del wrote:

FWIW if you want to test a ready made kernel, the linux-zen package includes these flags.

That changed with 5.18 Anbox#Using_Linux-Zen / https://bugs.archlinux.org/task/75017 the kernel developers preferred memfd to ashmem.

Last edited by loqs (2022-06-30 19:05:30)

Offline

#4 2022-06-30 19:13:25

WunderWungiel
Member
Registered: 2021-06-08
Posts: 10

Re: Avoid checking config sha256sum while building kernel

Thank you, that fixed this problem.
However, now it says:

==> Making package: linux-wwtest 5.18.7.arch1-1 (Thu Jun 30 21:12:41 2022)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating archlinux-linux git repo...
  -> Found config
==> Validating source files with sha256sums...
    archlinux-linux ... Skipped
    config ... Passed
==> Verifying source file signatures with gpg...
    archlinux-linux git repo ... FAILED (unknown public key 3B94A80E50A477C7)
==> ERROR: One or more PGP signatures could not be verified!

Offline

#5 2022-06-30 19:18:37

loqs
Member
Registered: 2014-03-06
Posts: 18,893

Re: Avoid checking config sha256sum while building kernel

GnuPG#Searching_and_receiving_keys

The kernel build will drop the CONFIG_ASHMEM=y option as it is no longer supported in 5.18+ as I linked above.  You would need to revert the removal of ashmem from the kernel or use DKMS modules as also mentioned in the link.

Offline

#6 2022-06-30 19:21:14

WunderWungiel
Member
Registered: 2021-06-08
Posts: 10

Re: Avoid checking config sha256sum while building kernel

So I'm trying in vain? sad
I wanted to build this kernel to have Anbox with 5.18.
But it is not possible anymore, right? sad

Offline

#7 2022-06-30 19:25:56

loqs
Member
Registered: 2014-03-06
Posts: 18,893

Re: Avoid checking config sha256sum while building kernel

Offline

#8 2022-07-01 08:21:25

WunderWungiel
Member
Registered: 2021-06-08
Posts: 10

Re: Avoid checking config sha256sum while building kernel

Yes.
But it also works up to 5.15.
However, I installed Linux-LTS + Anbox DKMS modules.
And now I enjoy Anbox!

Offline

#9 2022-07-01 18:14:31

loqs
Member
Registered: 2014-03-06
Posts: 18,893

Re: Avoid checking config sha256sum while building kernel

Please try the PKGBUILD below with 5.18

# Maintainer: Sick Codes <info at sick dot codes>
# Maintainer: Christian Hoff <https://github.com/choff>
# Contributor: Tobias Martin <tm-x at gmx dot net>

pkgname=anbox-modules-dkms
_pkgname=anbox-modules
pkgver=5.15
arch="$(uname -r)"
url='https://github.com/choff/anbox-modules'
pkgrel=1
pkgdesc='Android kernel driver fork by @choff (binder/binderfs & ashmem) in DKMS format'
arch=('x86_64' 'aarch64' 'i386')
license=('GPL3')
provides=("${pkgname}")
depends=('dkms')
makedepends=('git')
source=("git+https://github.com/choff/${_pkgname}.git#commit=8148a162755bf5500a07cf41a65a02c8f3eb0af9"
  "https://github.com/sickcodes/anbox-modules/commit/7c19d3c66758747d854c63e4c34ef127ce201fa6.patch"
  "https://github.com/choff/anbox-modules/pull/2/commits/f06ba5869503f8bc07cede1ed77241438d1fea20.patch")
sha256sums=('SKIP'
            '7589f311fd9a503c30a214b54f1f687c26a2f160d4339098c65f655e9b1e3556'
            'ef170a1b88a83052f5ad38afaf493a9e720a3c2d93316884d40426f32d3ad576')
conflicts=(anbox-modules-dkms-git)

prepare() {
  cd "${srcdir}/${_pkgname}"

  # Patch for 5.10-lts
  patch -p1 -i "${srcdir}"/7c19d3c66758747d854c63e4c34ef127ce201fa6.patch

  patch -p1 -i "${srcdir}"/f06ba5869503f8bc07cede1ed77241438d1fea20.patch
}

package() {
  
  install -dm755 "${pkgdir}/usr/src/binder-1"
  install -dm755 "${pkgdir}/usr/src/ashmem-1"
  
  cp -r "${srcdir}/${_pkgname}/binder/"* "${pkgdir}/usr/src/binder-1/"
  cp -r "${srcdir}/${_pkgname}/ashmem/"* "${pkgdir}/usr/src/ashmem-1/"
}
# vim:set ts=2 sw=2 et:

As a diff

diff --git a/PKGBUILD b/PKGBUILD
index a395dd8..90a1af1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,9 +15,11 @@ provides=("${pkgname}")
 depends=('dkms')
 makedepends=('git')
 source=("git+https://github.com/choff/${_pkgname}.git#commit=8148a162755bf5500a07cf41a65a02c8f3eb0af9"
-  "https://github.com/sickcodes/anbox-modules/commit/7c19d3c66758747d854c63e4c34ef127ce201fa6.patch")
+  "https://github.com/sickcodes/anbox-modules/commit/7c19d3c66758747d854c63e4c34ef127ce201fa6.patch"
+  "https://github.com/choff/anbox-modules/pull/2/commits/f06ba5869503f8bc07cede1ed77241438d1fea20.patch")
 sha256sums=('SKIP'
-  '7589f311fd9a503c30a214b54f1f687c26a2f160d4339098c65f655e9b1e3556')
+            '7589f311fd9a503c30a214b54f1f687c26a2f160d4339098c65f655e9b1e3556'
+            'ef170a1b88a83052f5ad38afaf493a9e720a3c2d93316884d40426f32d3ad576')
 conflicts=(anbox-modules-dkms-git)
 
 prepare() {
@@ -25,6 +27,8 @@ prepare() {
 
   # Patch for 5.10-lts
   patch -p1 -i "${srcdir}"/7c19d3c66758747d854c63e4c34ef127ce201fa6.patch
+
+  patch -p1 -i "${srcdir}"/f06ba5869503f8bc07cede1ed77241438d1fea20.patch
 }
 
 package() {
@@ -34,22 +38,5 @@ package() {
   
   cp -r "${srcdir}/${_pkgname}/binder/"* "${pkgdir}/usr/src/binder-1/"
   cp -r "${srcdir}/${_pkgname}/ashmem/"* "${pkgdir}/usr/src/ashmem-1/"
-  
-  cd "${srcdir}/${_pkgname}/binder"
-  make
-  make DESTDIR="${pkgdir}/usr/src/binder-1" install
-  
-  cd "${srcdir}/${_pkgname}/ashmem"
-  make
-  make DESTDIR="${pkgdir}/usr/src/ashmem-1" install
-  
-  echo '** To activate binder_linux and ashmem_linux **
-# $ sudo modprobe binder_linux devices=binder,hwbinder,vndbinder,anbox-binder,anbox-hwbinder,anbox-vndbinder
-# $ sudo modprobe ashmem_linux'
-
 }
-
-# sudo modprobe binder_linux devices=binder,hwbinder,vndbinder,anbox-binder,anbox-hwbinder,anbox-vndbinder
-# sudo modprobe ashmem_linux
-
 # vim:set ts=2 sw=2 et:

Offline

Board footer

Powered by FluxBB