0

I start to cross-compile a kernel for an old ppc64 machine using a fast amd64 machine.

I have installed all deps

 apt -y install bash-completion make build-essential linux-source bc kmod cpio flex libncurses5-dev libelf-dev libssl-dev dwarves bison debhelper-compat libssl-dev gcc-powerpc64-linux-gnu 

This command works

make ARCH=powerpc CROSS_COMPILE=powerpc64-linux-gnu- -j8 

But I want to make also debian packages for my ppc64 machine so..

 make ARCH=powerpc CROSS_COMPILE=powerpc64-linux-gnu- bindeb-pkg GEN debian dpkg-buildpackage --build=binary --no-pre-clean --unsigned-changes -R'make -f debian/rules' -j1 -a$(cat debian/arch) dpkg-buildpackage: info: source package linux-upstream dpkg-buildpackage: info: source version 6.12.48-6 dpkg-buildpackage: info: source distribution trixie dpkg-buildpackage: info: source changed by root <[email protected]> dpkg-buildpackage: info: host architecture ppc64 dpkg-source --before-build . dpkg-checkbuilddeps: error: unmet build dependencies: libssl-dev dpkg-buildpackage: error: build dependencies/conflicts unsatisfied; aborting dpkg-buildpackage: hint: satisfy build dependencies with your package manager frontend make[2]: *** [scripts/Makefile.package:126: bindeb-pkg] Error 3 make[1]: *** [/usr/src/linux-6.12.48/Makefile:1566: bindeb-pkg] Error 2 make: *** [Makefile:224: __sub-make] Error 2 

No way to solve it? Trying to use "multi-arch" don't work

sudo dpkg --add-architecture ppc64el apt -y update apt -y install libssl-dev:ppc64el 

give this error

make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- bindeb-pkg GEN debian dpkg-architecture: warning: specified GNU system type powerpc64-linux-gnu does not match CC system type powerpc64le-linux-gnu, try setting a correct CC environment variable dpkg-buildpackage --build=binary --no-pre-clean --unsigned-changes -R'make -f debian/rules' -j1 -a$(cat debian/arch) dpkg-buildpackage: info: source package linux-upstream dpkg-buildpackage: info: source version 6.12.48-15 dpkg-buildpackage: info: source distribution trixie dpkg-buildpackage: info: source changed by root <[email protected]> dpkg-architecture: warning: specified GNU system type powerpc64-linux-gnu does not match CC system type powerpc64le-linux-gnu, try setting a correct CC environment variable dpkg-buildpackage: info: host architecture ppc64 dpkg-source --before-build . dpkg-checkbuilddeps: error: unmet build dependencies: libssl-dev dpkg-buildpackage: error: build dependencies/conflicts unsatisfied; aborting dpkg-buildpackage: hint: satisfy build dependencies with your package manager frontend make[2]: *** [scripts/Makefile.package:126: bindeb-pkg] Error 3 make[1]: *** [/usr/src/linux-6.12.48/Makefile:1566: bindeb-pkg] Error 2 make: *** [Makefile:224: __sub-make] Error 2 

p.s=i know ppc64 and ppc64el are different archs, is just for testing (Debian don't support ppc64 be (big endian) except for a testing port (sid)

1 Answer 1

1

Solution found.

With dpkg

First enable foreign arch

dpkg --add-architecture ppc64 

then we install package manually with deps

dpkg -i libssl-dev_3.5.3-1_ppc64.deb libssl3t64_3.5.3-1_ppc64.deb libc6_2.41-12_ppc64.deb libzstd1_1.5.7+dfsg-1.1_ppc64.deb zlib1g_1%3a1.3.dfsg+really1.3.1-1+b1_ppc64.deb libgcc-s1_15.2.0-4_ppc64.deb gcc-15-base_15.2.0-4_ppc64.deb 

Solution 2 with apt (must be tested before, can cause problems with some packages)

vim /etc/apt/sources.list 

add

#PPC64 Types: deb URIs: http://debian.inf.tu-dresden.de/debian-ports/ Suites: sid Components: main contrib Signed-By: /usr/share/keyrings/debian-ports-archive-keyring.gpg 

then

 apt -y install libssl-dev:ppc64 

finally

cd /usr/src/linux-6.12.48 make ARCH=powerpc CROSS_COMPILE=powerpc64-linux-gnu- -j8 bindeb-pkg 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.