Native Debian X32-virtuelle Maschine?

Native Debian X32-virtuelle Maschine?

Ich versuche, eine native Debian X32-VM einzurichten. Beachten Sie, dass X32 sich von X86 und X64 unterscheidet. Weitere Einzelheiten finden Sie unterUnterschied zwischen x86-, x32- und x64-Architekturen?auf Stack Overflow. Einige andere Distributionen, wie Red Hat, bieten einen X32-Build für Server an.

Debian stellt kein X32-ISO zur Verfügung. Ich habe Debian 8.2 amd64 installiert und der Kernel bootet in die 32-Bit-Konfiguration:

$ dmesg | grep -i x32
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.16.0-4-amd64 root=UUID=69773d98-b9fa-4695-8392-92759d8e6094 ro syscall.x32=y syscall.x32=y quiet
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.16.0-4-amd64 root=UUID=69773d98-b9fa-4695-8392-92759d8e6094 ro syscall.x32=y syscall.x32=y quiet
[    0.316500] Enabled x32 syscalls

DebiansX32-Port-Wikisagt mir, dass der nächste Schritt darin besteht, ein QEMU-Chroot einzurichten. Ich möchte das QEMU-Chroot vermeiden und dies in eine native X32-Installation umwandeln.

Frage: Wie mache ich aus dieser Installation eine native X32-Installation?


Obwohl ich den für X32 konfigurierten Kernel boote, sind die Userland-Toolsnichtso konfiguriert. Beispielsweise ist mir der Compiler wahrscheinlich am wichtigsten, aber er ist nicht für X32 konfiguriert:

$ g++ -march=native -dM -E - </dev/null | egrep "(x86_64|amd64|ilp)"
#define __x86_64 1
#define __amd64 1
#define __x86_64__ 1
#define __amd64__ 1

Ich sehe ILP32oder nicht __ILP32__, was bedeutet, dass ich mich nicht im X32-Modus befinde. Der Wechsel -march=nativezu -mx32macht keinen Unterschied.


Hier ist die Maschine:

$ uname -a
Linux debian8-x32q 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) x86_64 GNU/Linux

Hier ist meinsources.list. Es ist jedoch nicht offensichtlich, was ich aktivieren muss, um die X32-Binärdateien statt der X64-Binärdateien zu erhalten:

deb http://ftp.us.debian.org/debian/ jessie main
deb-src http://ftp.us.debian.org/debian/ jessie main

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

# jessie-updates, previously known as 'volatile'
deb http://ftp.us.debian.org/debian/ jessie-updates main
deb-src http://ftp.us.debian.org/debian/ jessie-updates main

Folgende Werke:

$ sudo dpkg --add-architecture x32

Aber es bricht APT:

$ sudo apt-get update
Ign http://ftp.us.debian.org jessie InRelease
Hit http://ftp.us.debian.org jessie-updates InRelease 
Hit http://ftp.us.debian.org jessie Release.gpg                        
Hit http://ftp.us.debian.org jessie Release                            
Hit http://security.debian.org jessie/updates InRelease              
Hit http://ftp.us.debian.org jessie-updates/main Sources             
Get:1 http://ftp.us.debian.org jessie-updates/main amd64 Packages/DiffIndex [367 B]
Get:2 http://ftp.us.debian.org jessie/main Sources [7,058 kB]
Hit http://security.debian.org jessie/updates/main Sources
Hit http://security.debian.org jessie/updates/main amd64 Packages     
Hit http://ftp.us.debian.org jessie/main amd64 Packages 
Fetched 7,058 kB in 3s (2,066 kB/s)          
W: Failed to fetch http://security.debian.org/dists/jessie/updates/InRelease  Unable to find expected entry 'main/binary-x32/Packages' in Release file (Wrong sources.list entry or malformed file)

W: Failed to fetch http://ftp.us.debian.org/debian/dists/jessie-updates/InRelease  Unable to find expected entry 'main/binary-x32/Packages' in Release file (Wrong sources.list entry or malformed file)

W: Failed to fetch http://ftp.us.debian.org/debian/dists/jessie/Release  Unable to find expected entry 'main/binary-x32/Packages' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead.

Wenn es wichtig ist, greife ich per SSH auf die Box zu. Fenstermanager und andere GUI-Programme, die nicht portiert wurden, interessieren mich nicht. Ich brauche grundsätzlich den Kernel, die Basisinstallation und die Build-Tools im X32-Modus, damit ich meine Software unter X32 testen kann.

verwandte Informationen