Hello.
A lot of years ago I bought the Samsung XE303C12-A01US Chromebook. I would like to install and boot a linux distro through the sd card that has a kernel that supports qemu and kvm. I've found this old tutorial :
https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/virtualization-on-the-chromebook-using-kvm-tool
and I tried to follow it as long as I could. This is what happened :
mario@Z390-AORUS-PRO-DEST:/home/ziomario/Scrivania# git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git Clone in 'linux-stable' in progress... remote: Enumerating objects: 619, done. remote: Counting objects: 100% (619/619), done. remote: Compressing objects: 100% (333/333), done. mario@Z390-AORUS-PRO-DEST:/home/ziomario/Scrivania# cd linux-stable mario@Z390-AORUS-PRO-DEST:/home/ziomario/Scrivania/linux-stable# git checkout origin/linux-3.12.y -b linux-3.12.y Update files in progress: 100% (94051/94051), done. Branch 'linux-3.12.y' configured to track the remote branch 'linux-3.12.y' from 'origin'. We are inside a new branch 'linux-3.12.y' mario@Z390-AORUS-PRO:~/Scrivania/Chromebook/linux-stable$ git apply DMAfix.patch mario@Z390-AORUS-PRO:~/Scrivania/Chromebook/linux-stable$ git apply RTCfix.patch error: patch failed: arch/arm/boot/dts/cros5250-common.dtsi:27 error: arch/arm/boot/dts/cros5250-common.dtsi: patch cant be applied correctly mario@Z390-AORUS-PRO-DEST:/home/ziomario/Scrivania/linux-stable# git remote add kvm-tool git://github.com/penberg/linux-kvm.git mario@Z390-AORUS-PRO-DEST:/home/ziomario/Scrivania/linux-stable# git remote update Retrieval of origin in progress Retrieval of kvm-tool in progress fatal: cant connect to github.com[0: 140.82.121.3]: errno=Connection expired error: cant get kvm-tool mario@Z390-AORUS-PRO-DEST:/home/ziomario/Scrivania/linux-stable# apt install gcc-arm-linux-gnueabihf mario@Z390-AORUS-PRO-DEST:/home/ziomario/Scrivania/linux-stable# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage dtbs CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h make[1]: «include/generated/mach-types.h» è aggiornato. CC kernel/bounds.s GEN include/generated/bounds.h CC arch/arm/kernel/asm-offsets.s GEN include/generated/asm-offsets.h CALL scripts/checksyscalls.sh HOSTCC scripts/dtc/checks.o HOSTCC scripts/dtc/data.o SHIPPED scripts/dtc/dtc-lexer.lex.c SHIPPED scripts/dtc/dtc-parser.tab.h HOSTCC scripts/dtc/dtc-lexer.lex.o SHIPPED scripts/dtc/dtc-parser.tab.c HOSTCC scripts/dtc/dtc-parser.tab.o HOSTCC scripts/dtc/dtc.o HOSTCC scripts/dtc/flattree.o HOSTCC scripts/dtc/fstree.o HOSTCC scripts/dtc/livetree.o HOSTCC scripts/dtc/srcpos.o HOSTCC scripts/dtc/treesource.o HOSTCC scripts/dtc/util.o HOSTLD scripts/dtc/dtc /usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x50): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here collect2: error: ld returned 1 exit status make[2]: *** [scripts/Makefile.host:127: scripts/dtc/dtc] Errore 1 make[1]: *** [scripts/Makefile.build:455: scripts/dtc] Errore 2 make: *** [Makefile:531: scripts] Errore 2
UPDATE :
I've fixed the previous error following these suggestions :
https://github.com/BPI-SINOVOIP/BPI-M4-bsp/issues/4
basically I've edited the files dtc-lexer.lex.c and dtc-parser.tab.c Found the line 'YYLTYPE yylloc' and changed it to 'extern YYLTYPE yylloc;'
Unfortunately later I've got a new error :
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage dtbs
/tmp/ccD0cA08.s: Assembler messages: /tmp/ccD0cA08.s:1115: Error: selected processor does not support `cpsid i' in ARM mode /tmp/ccD0cA08.s:1479: Error: selected processor does not support `cpsid i' in ARM mode /tmp/ccD0cA08.s:1617: Error: selected processor does not support `cpsie i' in ARM mode /tmp/ccD0cA08.s:2415: Error: selected processor does not support `cpsie i' in ARM mode make[1]: *** [scripts/Makefile.build:309: init/main.o] Errore 1 make: *** [Makefile:816: init] Errore 2
as suggested I've installed gcc-9 with : sudo apt install gcc-9 and then : sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9now my gcc is 9 :
gcc --version gcc (Ubuntu 9.4.0-5ubuntu1) 9.4.0
but the error is not gone.
So,I tried installing gcc 7 and 8,adding :
deb [arch=amd64] archive.ubuntu.com/ubuntu focal main universe
to /etc/apt/sources.list
and
ran: apt update; apt install g++-7 g++-8
apt update; apt install g++-7 g++-8
and then :
update-alternatives --config gcc Sono disponibili 2 scelte per l'alternativa gcc (che fornisce /usr/bin/gcc). Selezione Percorso Priorità Stato ------------------------------------------------------------ 0 /usr/bin/gcc-9 9 modalità automatica * 1 /usr/bin/gcc-8 8 modalità manuale 2 /usr/bin/gcc-9 9 modalità manuale
pressing 1 and : make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage dtbs
but :
/tmp/cc24rqCN.s: Assembler messages: /tmp/cc24rqCN.s:1115: Error: selected processor does not support `cpsid i' in ARM mode /tmp/cc24rqCN.s:1479: Error: selected processor does not support `cpsid i' in ARM mode /tmp/cc24rqCN.s:1617: Error: selected processor does not support `cpsie i' in ARM mode /tmp/cc24rqCN.s:2415: Error: selected processor does not support `cpsie i' in ARM mode make[1]: *** [scripts/Makefile.build:309: init/main.o] Errore 1
the error is still there.
update-alternatives --config gcc
I have even installed gcc-7 with the command : apt install gcc-7,but it does not show as a choice :
Sono disponibili 2 scelte per l'alternativa gcc (che fornisce /usr/bin/gcc). Selezione Percorso Priorità Stato ------------------------------------------------------------ 0 /usr/bin/gcc-9 9 modalità automatica * 1 /usr/bin/gcc-8 8 modalità manuale 2 /usr/bin/gcc-9 9 modalità manuale
find /usr -name gcc-7 /usr/bin/gcc-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 7
update-alternatives --config gcc Sono disponibili 4 scelte per l'alternativa gcc (che fornisce /usr/bin/gcc). Selezione Percorso Priorità Stato ------------------------------------------------------------ 0 /usr/bin/gcc-11 11 modalità automatica 1 /usr/bin/gcc-11 11 modalità manuale * 2 /usr/bin/gcc-7 7 modalità manuale 3 /usr/bin/gcc-8 8 modalità manuale 4 /usr/bin/gcc-9 9 modalità manuale
chosen 2 and tried again : make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage dtbs
same error.