네이티브 데비안 X32 가상 머신?

네이티브 데비안 X32 가상 머신?

기본 Debian X32 가상 머신을 설정하려고 합니다. X32는 X86 및 X64와 다릅니다. 자세한 내용은 다음을 참조하세요.x86, x32 및 x64 아키텍처의 차이점은 무엇입니까?스택 오버플로에. Red Hat과 같은 일부 다른 배포판은 서버용 X32 빌드를 제공합니다.

데비안은 X32 ISO를 제공하지 않습니다. Debian 8.2 amd64가 설치되어 있고 커널이 32비트 구성으로 부팅 중입니다.

$ 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

데비안의X32 포트 위키다음 단계는 QEMU chroot를 설정하는 것이라고 합니다. QEMU chroot를 피하고 이를 기본 X32 설치로 바꾸고 싶습니다.

질문: 이 설치를 기본 X32 설치로 바꾸려면 어떻게 해야 합니까?


X32용으로 구성된 커널을 부팅하고 있지만 사용자 영역 도구는 다음과 같습니다.~ 아니다그렇게 구성했습니다. 예를 들어, 컴파일러는 아마도 나에게 가장 중요하지만 X32용으로 구성되지 않았습니다.

$ 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

ILP32또는 이 표시되지 않습니다 __ILP32__. 이는 X32 모드가 아니라는 의미입니다. -march=native로 변경해 도 -mx32아무런 차이가 없습니다.


기계는 다음과 같습니다.

$ 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

여기 나의sources.list. 하지만 X64 바이너리가 아닌 X32 바이너리를 얻기 위해 무엇을 활성화해야 하는지는 명확하지 않습니다.

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

다음은 작동합니다:

$ sudo dpkg --add-architecture x32

하지만 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.

중요한 경우 상자에 SSH로 연결합니다. 포팅되지 않은 창 관리자 및 기타 GUI 프로그램에는 관심이 없습니다. X32에서 소프트웨어를 테스트하려면 기본적으로 X32 모드에 있는 커널, 기본 설치 및 빌드 도구가 필요합니다.

관련 정보