[Kernel] Stock Android Pie kernel with KVM - Google Pixel Questions & Answers

I have been trying for some time now to enable KVM on the Pixel XL, by compiling the stock Google kernel and adding the KVM switches to "marlin_defconfig".
Unfortunately, while the kernel with KVM compiles properly and could be flashed, /dev/kvm doesn't show up.
Analyzing the output of "dmesg" would show this offending line:
Code:
[ 1.039716] c3 1 kvm [1]: HYP mode not available
I know, however, that the SoC definitely supports KVM (it's based on the ARMv8-A architecture, which means that it has virtualization support, according to this page: https://www.linux-kvm.org/page/Processor_support).
I'm stumped. Can anybody tell me what to do? It would be greatly appreciated!
My marlin_defconfig is attached below.

WaseemAlkurdi said:
I have been trying for some time now to enable KVM on the Pixel XL, by compiling the stock Google kernel and adding the KVM switches to "marlin_defconfig".
Unfortunately, while the kernel with KVM compiles properly and could be flashed, /dev/kvm doesn't show up.
Analyzing the output of "dmesg" would show this offending line:
I know, however, that the SoC definitely supports KVM (it's based on the ARMv8-A architecture, which means that it has virtualization support, according to this page: https://www.linux-kvm.org/page/Processor_support).
I'm stumped. Can anybody tell me what to do? It would be greatly appreciated!
My marlin_defconfig is attached below.
Click to expand...
Click to collapse
This should have been posted in Q&A..

stebomurkn420 said:
This should have been posted in Q&A..
Click to expand...
Click to collapse
Was going to post it under Q&A, but changed my mind, since (a) it's a dev-related question warranting dev attention, and (b) I expect that this thread is going to become the "official" thread of the kernel once it's done.
Thanks for your concern though!

how does kvm affect the kernel? are you trying to add it just for the hell of it? or wanting to work on something bigger?

ztotherad said:
how does kvm affect the kernel? are you trying to add it just for the hell of it? or wanting to work on something bigger?
Click to expand...
Click to collapse
@ztotherad
It's already built-in the kernel sources, but I'm trying to enable it. I am actually attempting to run QEMU in KVM mode as to emulate both Linux and (most importantly) Windows 10 ARM. at native speeds.
I have QEMU built (Limbo's is too old, so I built it myself from source), I just need KVM.

WaseemAlkurdi said:
@ztotherad
It's already built-in the kernel sources, but I'm trying to enable it. I am actually attempting to run QEMU in KVM mode as to emulate both Linux and (most importantly) Windows 10 ARM. at native speeds.
I have QEMU built (Limbo's is too old, so I built it myself from source), I just need KVM.
Click to expand...
Click to collapse
You can't use kvm even If you enable it in kernel.KVM on ARM is based on the ARM virtualization support, i.e. you'll need ARM EL2 permission (on ARMv8) or HYP (on ARMv7).Just like on x86 , you'll have to enable VT-X or AMD-V in BIOS or so.
However sadly, on Qualcomm devices, EL2 isn't designed to be in our reach, even If you unlock bootloader ,all you'll get is full control of EL1.EL2 is instead running QHEE,which is basically for security.So if you still want to run kvm on a Qualcomm device you'll at least either need a prototype device(unfused) to custom qualcomm bootloaders and underlying stuffs, and let your kernel running in EL2, or need a really really powerful exploit like trustzone exploit, to take the control of EL2, EL3, breaking chain-of-trust etc.
Android phones are mostly designed for security concerns and mostly shipped without hypervisor permission.However there are some exceptions like Samsung Exynos that allows you to switch to EL2 with some specific ways.

fxsheep said:
You can't use kvm even If you enable it in kernel.KVM on ARM is based on the ARM virtualization support, i.e. you'll need ARM EL2 permission (on ARMv8) or HYP (on ARMv7).Just like on x86 , you'll have to enable VT-X or AMD-V in BIOS or so.
However sadly, on Qualcomm devices, EL2 isn't designed to be in our reach, even If you unlock bootloader ,all you'll get is full control of EL1.EL2 is instead running QHEE,which is basically for security.So if you still want to run kvm on a Qualcomm device you'll at least either need a prototype device(unfused) to custom qualcomm bootloaders and underlying stuffs, and let your kernel running in EL2, or need a really really powerful exploit like trustzone exploit, to take the control of EL2, EL3, breaking chain-of-trust etc.
Android phones are mostly designed for security concerns and mostly shipped without hypervisor permission.However there are some exceptions like Samsung Exynos that allows you to switch to EL2 with some specific ways.
Click to expand...
Click to collapse
Thanks for the reply! (Apologies for the extreme delay)
You said:
.However there are some exceptions like Samsung Exynos that allows you to switch to EL2 with some specific ways.
Click to expand...
Click to collapse
Can you provide any examples?

WaseemAlkurdi said:
Thanks for the reply! (Apologies for the extreme delay)
You said:
Can you provide any examples?
Click to expand...
Click to collapse
https://github.com/limboemu/limbo/wiki/KVM
I dunno if this works.(Samsung S8 example)Afaik on Exynos you need a special SMC call to the secure monitor (ARM EL3)

fxsheep said:
https://github.com/limboemu/limbo/wiki/KVM
I dunno if this works.(Samsung S8 example)Afaik on Exynos you need a special SMC call to the secure monitor (ARM EL3)
Click to expand...
Click to collapse
I've seen that link. It's basically a kernel compilation guide.
It also makes a serious mistake: that an x86 VM would be able to make use of arm64 KVM. This is impossible.
But what I haven't seen anywhere is this:
a special SMC call to the secure monitor (ARM EL3)
Click to expand...
Click to collapse
Any pointers?

WaseemAlkurdi said:
I've seen that link. It's basically a kernel compilation guide.
It also makes a serious mistake: that an x86 VM would be able to make use of arm64 KVM. This is impossible.
But what I haven't seen anywhere is this:
Any pointers?
Click to expand...
Click to collapse
https://t.me/raspberrypiwoa/34623
https://t.me/raspberrypiwoa/34624
https://t.me/raspberrypiwoa/34625
---------- Post added at 10:56 AM ---------- Previous post was at 10:54 AM ----------
WaseemAlkurdi said:
I've seen that link. It's basically a kernel compilation guide.
It also makes a serious mistake: that an x86 VM would be able to make use of arm64 KVM. This is impossible.
But what I haven't seen anywhere is this:
Any pointers?
Click to expand...
Click to collapse
btw,
https://t.me/c/1160371980/102118

Arm el2 patch
I was searching about KVM and I found that to linux/Android must be boot in EL2 mode for KVM to be work
And I found arm64 el2 patch :
https://patchwork.kernel.org/patch/6749811/
So I would say that try this patch,compile kernel again and install it and paste result here.
If it doesn't work,then try xen virtualiztion but first try this patch
Thank you, waiting for result

Ever get this to work?
WaseemAlkurdi said:
I have been trying for some time now to enable KVM on the Pixel XL, by compiling the stock Google kernel and adding the KVM switches to "marlin_defconfig".
Unfortunately, while the kernel with KVM compiles properly and could be flashed, /dev/kvm doesn't show up.
Analyzing the output of "dmesg" would show this offending line:
Code:
[ 1.039716] c3 1 kvm [1]: HYP mode not available
I know, however, that the SoC definitely supports KVM (it's based on the ARMv8-A architecture, which means that it has virtualization support, according to this page: https://www.linux-kvm.org/page/Processor_support).
I'm stumped. Can anybody tell me what to do? It would be greatly appreciated!
My marlin_defconfig is attached below.
Click to expand...
Click to collapse
I was wondering if you ever got this to work, since I have an exynos device and am trying to get kvm to work too. Also you ever try this: https://patchwork.kernel.org/[email protected]/ patch? Cause if not I might give it a ago.

Same here, enabled the necessary kernel flags, flashed, but still dmesg informs me my cores are at EL1.
Seems @fxsheep has a clear point, but, who knows.
*I'm using the sdm 845 SoC on oneplus6
Any progress on your side?

Sleirsgoevy could get into EL2 and could use kvm.
See it here

raspiduino said:
Sleirsgoevy could get into EL2 and could use kvm.
See it here
Click to expand...
Click to collapse
This just uses Exynos-specific exploit, and as such useless for Snapdragon devices.

Related

[Q] Haipad M701 and fingerprint reader

Hi ,
I have a Haipad M701 with me,
It is having this config:
4G Memory
Telechips 89xx board
Android 2.1-update1
MID-1.1
Kernel 2.6.29
I am trying to make a external USB fingerprint reader work with it.
The fingerprint device driver source was obtained from the vendor.
To enable the device i need to cross compile the fingerprint drivers.
But before i cud do that, i upgraded the firmware to Android 2.3(gingerbread) which is available in haipad.net(*w/o taking a backup*)(that is kernel 2.6.35).
Now, i am not able to cross-compile driver cos i took the kernel source (for 2.6.29) which telechips publicly opened to public.
So, Right now, i need the old Eclair(2.1,2.6.29) firmware, can anyone provide me that?
If not, is there any other way to achieve the cross-compilation?
In the meantime, i downloaded kernel source from android.com and branched to 2.6.35 which is the kernel version on device.
I compile the kernel and then cross compiled the fingerprint driver.
It compiled w/o any issues.
But when do a 'insmod', i get error:
Code:
mod_usbdpfp: version magic '2.6.35.7+ mod_unload modversions ARMv5 ' should be '2.6.35.7-tcc mod_unload ARMv6 '
What could be the issue here?
You have two problems:
First on the tablet, copy the file /proc/config.gz out on your build pc.
Extract and copy file to .config in the 2.3.35.7 source.
Now you are ready to configure the kernel sources that you compile the vendor driver against.
do make menuconfig;
Fix problems:
1: wrong name of kernel.
Insert "-tcc" in general setup --> Local version.
You seem to have a "+" now. I do not know how you got that. If it is not in the kernel config, look in the Makefile in the root folder. The version is in the top. Make sure the 4th version line just says ".7" - no more.
2. Wrong system type.
You are compiling the modules for an Armv5 instead of Armv6. Go to Arm system type and choose Samsun S3C64XX. That is an Armv6.
The selector might look really strange. If that is the case, scroll to the bottom and scroll back up (now names appear one at a time), until you see the ()amsung S3C64XX.
Configure Makefile for crosscompile.
Now do a make dep; make modules.
Now you can compile the vendor driver against this source and get the correct module. Use modinfo modulename.ko; to see that the name and type corresponds to "'2.6.35.7-tcc mod_unload ARMv6".
I have just done this (for an usb net driver), and the resulting driver crashes the tablet So even if you can get a module build and loaded, it might not work because the system architecture (S3C64XX) is not really correct. In that case we really need the telechips 2.6.35.7 sources to build correct module.
But try it out, and good luck!
Thanks for the suggestion, xdamala.
I will try it out today itself and let you know
@xdamala,
I had to do 'make s3c6400_defconfig'
But, Now i get this error.
Code:
mod_usbdpfp: version magic '2.6.35.7-tcc-g67bb0cf-dirty mod_unload
ARMv6 ' should be '2.6.35.7-tcc mod_unload ARMv6 '
I dont know how the 'g67bb0cf-dirty' gets added.
Each time i edit 'include/config/kernel.release' which contained that text, it automatically is updated on running 'make'.
Any idea??
I am not 100% on how the version string is constructed. But I think it is created from the top 4 lines in Makefile and the string you set in configuration.
I should not be necessary to do that s3c6400_defconfig. It is probaly what changes the string. I might have told you the wrong order of things in my other answer. It is important to set up Makefile first.
Do the steps (in order):
Start with clean 2.6.35.7 kernel code
edit Makefile in kernel root folder
Check version number in top
edit cross compile section to:
ARCH ?= arm
CROSS_COMPILE ?= ../../arm-eabi-4.4.3/bin/arm-eabi-
#or whatever fits your compiler. Note that this android tree gcc 4.4.3 is the one running M701 kernel is compiled with, so I prefer to use the same.
extract tablets /proc/config.gz to .config in root of kernel source (to remove unnecessary modules)
make menuconfig;
set -tcc in local version
choose S3C64XX system type
Exit (Save)
make dep ; make clean ; make modules; #Note you do not actually build the kernel, only modules.
In the Makefile from your driver there probably is a section something like this:
KDIR = /lib/modules/$(CURRENT)/build
edit to point to the folder of your kernel source.
make;
transfer fingerprintdriver.ko to tablet
Cross fingers, throw salt over your shoulder, pray, etc. etc.
insmod fingerprintdriver.ko;
@Xdamala
Code:
mod_usbdpfp: version magic '2.6.35.7-tcc+ mod_unload ARMv6 ' should be '2.6.35.7-tcc mod_unload ARMv6 '
Still the plus seems to be issue.
I checked in the main Makefile there is no '+'.
But in include/generated/utsrelease.h, there is
Code:
#define UTS_RELEASE "2.6.35.7-tcc+"
Well I use a kernel from kernel.org, not from the android tree.
Might be the reason for the "+".
I do not think that it makes any difference in this case.
Try with the kernel.org one. If it works it works, if not we might try to look at that "+"
By the way if all fails you can reinstall 2.1 on the tablet and build against the 2.6.29 kernel released by telechips. It should work.
The downside: 2.1 sucks, and usb in general sucks a lot on M701 2.1.
See my posts here:
http://www.androidtablets.net/forum/groups/11-haipad-m701-m701-r-d129-just-ordered-g10-haipad-m701.html.
In that case go to telechips kernel source:
make tcc8900_defconfig
make menuconfig. Exit + save.
make modules.
Then compile your driver against these sources.
Your driver should then work (this time we use the correct system type), but usb is quite bad on 2.1. So if I was you I would try a lot to make 2.3 work first.
Links:
Telechips kernel. Use Internet explorer to download (FF not working):
https://www.telechips.com/technical_support/kor/opensource/opensource_list.asp
Latest 2.1 firmware from Haipad:
http://u.115.com/file/c4rgup4f
xdamala said:
Latest 2.1 firmware from Haipad:
http://u.115.com/file/c4rgup4f
Click to expand...
Click to collapse
Thanks xdamala, thats what i needed, will check it out and let you know of the result tomm.
I will warn you that 2.1 comes with its own problems when it comes to usb.
Attach the device directly. Do not use a hub.
xdamala,
Method 1: Compile kernel source of 2.6.35.7 from kernel.org - Success
insmod driver.ko installed w/o any errors.
But, it seems i would need a power source for the fingerprint reader.
i dont think currently the Haipad support that mode.
Method 2: Flash(downgrade) m701 to 2.1 and try with the public kernel source which telechips have released - Failure
The FWDN program gives CRC check error while loading tcc8900_mtd.img.
Maybe bcos of corrupt download or the Haipad i have is a 4G memory one.
Which u think wud be?
Even if i accomplish providing power to the fingerprint device, i would need the C++ sample provided by the fingerprint vendor to be cross-compiled.
Otherwise, how can i test if the device works?
How to do that??
Hi
I did not see your post because it now came as page 2.
The tablet should provide some level of power to the reader. If you use the white converter cable that came with the tablet, it should tell the tablet to provide power (USB On The Go, see Wikipedia). It works with memory sticks and even hard drives. But I do not know if it is enough for that reader.
With 2.3 firmware you could use a power hub to give power to reader (still use white converter cable between tablet and hub). Do not use hubs on 2.1.
To check if tablet recognizes reader do this:
adb shell:
#dmesg -c
#insmod driver.ko
#dmesg
--Insert reader in usb
#dmesg
The output of dmesg should tell you how the kernel reacts when driver is loaded and reader inserted.
You can cross compile c++ code using same compiler as for the kernel. But you will have to compile program/libs statically, since android does not have the C++ libraries.
You can probably achieve this by putting a static keyword in a Makefile.
Also you need to direct the gcc to point at the cross compiler.
An other approach is to install Debian on the tablet inside an file image. I have done this. It is very nice. It gives you a complete (non graphical) Linux system. Compiler, libs and all. Also lsusb and other useful tools.
It is much easier to make Linux programs work like that.
But this Debian will run inside chroot, and cannot see the android system.
I used this tutorial:
http://www.saurik.com/id/10
However I used a bit different approach for starting up Debian system (using Debian own rc scripts).
If you can make the Debian Image, I will be happy to provide you with my scripts to manage it.
I do not know why you cannot install 2.1. It was the one you got fro my URL?
I just see now that Haipad has released a brand new 2.3 this night.
Do not attempt to load it. Last one did not work unless you had the very new tablet. I will try this new one tonight.
What is this project with the fingerprint reader? Tell me more.
Thanks xdamala,
Ya if it is possible, i would surely like to have a Debian on the pad.
I am just exploring things on it, so that we can have a external device work on the pads.
Let me check this url and will let you know
http://www.saurik.com/id/10
Click to expand...
Click to collapse
Ya, if you can help through the process, i will gladly accept it
Also, i didnt get any cable with my pad.
That was the first of issues. Had to buy it separately.
I had done the dmesg check as you told, but it didnt give any noticeable output.
The 2.1 firmware link that you gave, throwed a CRC error. what to do?
if you get a crc error on firmware it is probably because its the wrong firmware.
There are several different versions of this tablet so it can be a bit tricky.
This firmware is for a M701-R 4GB HY
There is 2 GB and 4GB versions. You have a 4 GB right.
There is HY and non HY versions (type of nand memory).
There a re with and without remote control. That is not so important.
I think any mix of the above is possible.
How to figure out if you have a HY version:
Insert usb to pc and enable usb storage.
If nan memory is shown as 3,08 GB (I think) it is an HY.
If it shows less (2,7 GB Ithink) it is a non-HY.
Determine your version and we can see if we can find a FirmWare for it.
Anyway I think you should keep your 2.3 for now. It just is better for USB.
What is the filename of the rar file with 2.3 rom you installed, and where did you get it from? (this might help me identify your tablet).
About usb cable. I now understand why you have no power on reader. If you read the wikipedia article about USB OTG (wikipedia) you will understand that the tablet is in slave mode and will not provide power and probably not talk to devices.
Also see here: http://www.maxim-ic.com/app-notes/index.mvp/id/1822
Can you get a memory stick to work?
You need something like this:
http://www.amazon.co.uk/Host-Cable-ARCHOS-Internet-Tablet/dp/B004TJC1IM/ref=sr_1_3?ie=UTF8.
It will short the correct pins in the mini usb plug, telling the tablet to be master and provide power.
It is possible to fix a cable yourself but I will not recommend it:
http://www.youtube.com/watch?v=COkLEJGo6vo&feature=youtu.be
I am a bit surprised that loading the driver produces no output in dmesg.
But if the tablet is not in host mode, it is not surprising that no output comes from inserting the reader. The tablet is not responding to it since it is in slave mode (like connection two usb sticks. Nothing happens).
I can not help you through the Debian. I used the tutorial I already linked.
If you do the same and add my scripts you should be able to make it work.
Alternatively you can get my Debian Image, but it is 1 GB file, and I need to clean out personal stuff and passwords.
Hi xdamala,
Ya, it seems to be a non-HY, cause i have around 1.4G space in nand
The file i downloaded was M701_2.3.rar, which i downloaded from haipad.net
I did buy the cable like u showed in amazon.com link, using that only am connecting the reader to pad.
And No, a memory stick also is not getting detected on that cable.
Attached that cable image.
Hi xdamala,
I have started creating the debian image, can you tell how you use the rc scripts?
Also, were you able to find the 2.1 image for M701 non-HY?
PS: I got the clockword mod recovery image from here http://androtab.info/telechips/firmwares
I used the one marked "Haipad M701 GB ROM 4K"
It worked for me.
Hi
Several things:
1: I think you have an 2GB version (non HY), not a 4G version.
2. It seems like the cable you bought is not correct. It has to be a HOST adapter/cable. Since nothing works with it I think what you have is just a male min-usb to female usb. It is not enough.
3. About Debian image. Which version of Debian are you using?
By the way I found out how to get rid of the "+" when using the Android kernel source. Move the folder .git to git. This will break git usage (unless you move it back). But it removes the "+" in version string.
Using Android kernel source might be better than stock kernel source.
Hi again,
1. Its a 2GB?? Oh but when i followed this link (translated it english)
Code:
http://www.inzipad.com/thread-334-1-1.html
My result was 4096, so i thought its a 4G one.
2. Oh. Then i will try to buy then one u have recommended.
3. I have dropped the step of building a Debian, cause i have a android application running and the input from the usb reader has to be sent to that application. So, I have to make it work natively on Android.
xdamala said:
You have two problems:
First on the tablet, copy the file /proc/config.gz out on your build pc.
Extract and copy file to .config in the 2.3.35.7 source.
Now you are ready to configure the kernel sources that you compile the vendor driver against.
do make menuconfig;
Fix problems:
1: wrong name of kernel.
Insert "-tcc" in general setup --> Local version.
You seem to have a "+" now. I do not know how you got that. If it is not in the kernel config, look in the Makefile in the root folder. The version is in the top. Make sure the 4th version line just says ".7" - no more.
2. Wrong system type.
You are compiling the modules for an Armv5 instead of Armv6. Go to Arm system type and choose Samsun S3C64XX. That is an Armv6.
The selector might look really strange. If that is the case, scroll to the bottom and scroll back up (now names appear one at a time), until you see the ()amsung S3C64XX.
Configure Makefile for crosscompile.
Now do a make dep; make modules.
Now you can compile the vendor driver against this source and get the correct module. Use modinfo modulename.ko; to see that the name and type corresponds to "'2.6.35.7-tcc mod_unload ARMv6".
I have just done this (for an usb net driver), and the resulting driver crashes the tablet So even if you can get a module build and loaded, it might not work because the system architecture (S3C64XX) is not really correct. In that case we really need the telechips 2.6.35.7 sources to build correct module.
But try it out, and good luck!
Click to expand...
Click to collapse
Thsi really works thanks for that

Exynos BootROM exploit question

Hi all,
I see that unsigned "raw binary aarch64 executables" can be run using the recently developed tool here:
https://github.com/frederic/exynos-usbdl
My question is - does this open up the possibility to get a mainline u-boot.bin (and using that, mainline linux kernel) running on the Exynos S7? That would be exciting...
Thanks all,
Jack K
no, because it only bypasses FLASH signature checking, but exynos bootrom always checks on boot if it is oem signed bootloader or some other custom bootloader. mainline linux MAYBE could be possible for just one boot, because it will stay in memory of course, but don't think that there will be some super new and super cool technology that will allow to change bootrom, because that won't happen, bootrom is placed directly in cpu memory, only way to change bootrom is to change the cpu
On the contrary all you need is the bootROM as uboot. If you were to want the phone running on a linux environment you could always port a linux build into a gsi or create a multiboot script. Or even more crafier yet you could make an OTA with an alternate fstab?

[NON-ANDROID]Native Linux thread for A8/A8+ (Arch Linux ARM, postmarketOS, ect.)

This thread is for native Linux development on Galaxy A8/A8+. This means no Halium here. It's also aimed at people who know how to compile their stuff, ect., so don't complain to me about no fancy zip installer.
I have made some fixes in our DECON framebuffer driver, ect that makes TTY, and Xorg, and anything that uses the framebuffer work! (Based on @prashantp01's Quantum Quack kernel because that's what I had at the time and it's a good kernel).
I have tested this using Arch Linux ARM (ALARM), and it boots just fine!
A postmarketOS tree for the regular A8 is in the way of being merged, and I need someone to try the A8+ version.
Please provide a photo of the phone running PostmarketOS with weston on A8+!
Prebuilt zip for A8+ and A8 with postmarketOS weston (not really useful, but good for screenshot) here:
A8: https://drive.google.com/file/d/1cVamhYGmBrDVrzzcIVyCmhLHJIQ3u3Xq/view?usp=sharing
A8+: https://drive.google.com/file/d/1xe9rFu4TRzxmM9yV4lINOHOHsEQ2TD0O/view?usp=sharing
This may also be useful for other 7885 and 7885 based (7884 variants, 7904) devices as well!
What currently works on Arch (and probably on any other native linux distro):
Booting (Arch Linux sometimes hangs on "Triggering uevents" for a few minutes, sometimes boots instantly)
Screen (inc. brightness and turning on/off (due to a hacky workaround in kernel, the screen may show a corrupted screen for a split second when turning on)
Framebuffer console (TTY)
Xorg (unaccelerated)
Touchscreen
Hardware buttons
Battery indicator (detects some other stuff as batteries/charging ports too ATM)
USB OTG (Mouse, keyboard, ect)
(After adding some configs)USB SSH, and web access from PC using USB
Basically anything using Xorg (LightDM, Xfce, GNOME, KDE Plasma, Firefox, Chromium, GIMP, VLC, ect ect ect)
Anything that can use framebuffer (weston's framebuffer backend)
NOTE: This is a guide assumes you know how to do some stuff. For some help you can also reference this
Rough instructions for Arch Linux (Using prebuilt boot.img):
Partition your SD card (using PC or something) so that your second partition will contain your rootfs (the boot.imgs provided use the 2nd SD card partition as root! Change in defconfig if you are building your kernel.)
Install the generic version of ARMv8 Arch Linux ARM to the second partition of your SD card.
Install additional packages by chrooting from Android, or using USB networking
(For dual-boot) back up boot.img
Install the correct boot.img.
To boot back into Android, restore your boot.img
Prebuilt Arch Linux boot.imgs
Source code
VDavid003 said:
This thread is for native Linux development on Galaxy A8/A8+. This means no Halium here. It's also aimed at people who know how to compile their stuff, ect., so don't complain to me about no fancy zip installer.
I have made some fixes in our DECON framebuffer driver, ect that makes TTY, and Xorg, and anything that uses the framebuffer work! (Based on @prashantp01's Quantum Quack kernel because that's what I had at the time and it's a good kernel).
I have tested this using Arch Linux ARM (ALARM), and it boots just fine! A postmarketOS port will follow soon!
This may also be useful for other 7885 and 7885 based (7884 variants, 7904) devices as well!
What currently works on Arch (and probably on any other native linux distro):
Booting (Arch Linux sometimes hangs on "Triggering uevents" for a few minutes, sometimes boots instantly)
Screen (inc. brightness and turning on/off (due to a hacky workaround in kernel, the screen may show a corrupted screen for a split second when turning on)
Framebuffer console (TTY)
Xorg (unaccelerated)
Touchscreen
Hardware buttons
Battery indicator (detects some other stuff as batteries/charging ports too ATM)
USB OTG (Mouse, keyboard, ect)
(After adding some configs)USB SSH, and web access from PC using USB
Basically anything using Xorg (LightDM, Xfce, GNOME, KDE Plasma, Firefox, Chromium, GIMP, VLC, ect ect ect)
Anything that can use framebuffer (weston's framebuffer backend)
NOTE: This is a guide assumes you know how to do some stuff. For some help you can also reference this
Rough instructions for Arch Linux (Using prebuilt boot.img):
Partition your SD card (using PC or something) so that your second partition will contain your rootfs (the boot.imgs provided use the 2nd SD card partition as root! Change in defconfig if you are building your kernel.)
Install the generic version of ARMv8 Arch Linux ARM to the second partition of your SD card.
Install additional packages by chrooting from Android, or using USB networking
(For dual-boot) back up boot.img
Install the correct boot.img.
To boot back into Android, restore your boot.img
Prebuilt Arch Linux boot.imgs
Source code
Click to expand...
Click to collapse
Thanks david
VDavid003 said:
This thread is for native Linux development on Galaxy A8/A8+. This means no Halium here. It's also aimed at people who know how to compile their stuff, ect., so don't complain to me about no fancy zip installer.
I have made some fixes in our DECON framebuffer driver, ect that makes TTY, and Xorg, and anything that uses the framebuffer work! (Based on @prashantp01's Quantum Quack kernel because that's what I had at the time and it's a good kernel).
I have tested this using Arch Linux ARM (ALARM), and it boots just fine! A postmarketOS port will follow soon!
This may also be useful for other 7885 and 7885 based (7884 variants, 7904) devices as well!
What currently works on Arch (and probably on any other native linux distro):
Booting (Arch Linux sometimes hangs on "Triggering uevents" for a few minutes, sometimes boots instantly)
Screen (inc. brightness and turning on/off (due to a hacky workaround in kernel, the screen may show a corrupted screen for a split second when turning on)
Framebuffer console (TTY)
Xorg (unaccelerated)
Touchscreen
Hardware buttons
Battery indicator (detects some other stuff as batteries/charging ports too ATM)
USB OTG (Mouse, keyboard, ect)
(After adding some configs)USB SSH, and web access from PC using USB
Basically anything using Xorg (LightDM, Xfce, GNOME, KDE Plasma, Firefox, Chromium, GIMP, VLC, ect ect ect)
Anything that can use framebuffer (weston's framebuffer backend)
NOTE: This is a guide assumes you know how to do some stuff. For some help you can also reference this
Rough instructions for Arch Linux (Using prebuilt boot.img):
Partition your SD card (using PC or something) so that your second partition will contain your rootfs (the boot.imgs provided use the 2nd SD card partition as root! Change in defconfig if you are building your kernel.)
Install the generic version of ARMv8 Arch Linux ARM to the second partition of your SD card.
Install additional packages by chrooting from Android, or using USB networking
(For dual-boot) back up boot.img
Install the correct boot.img.
To boot back into Android, restore your boot.img
Prebuilt Arch Linux boot.imgs
Source code
Click to expand...
Click to collapse
So one can boot Armbian on A8+ as we do with Android box? Where is dtb for this?
p5uresh said:
So one can boot Armbian on A8+ as we do with Android box? Where is dtb for this?
Click to expand...
Click to collapse
Yes you could probably boot it. The dtb is inside the boot.img
Try installing it to an sd card, chrooting into it from android, generating an initramfs, then replacing the initramfs in the boot.img with the one you generated. (Maybe it could even work without that, wiht arch's initramfs?)
VDavid003 said:
Yes you could probably boot it. The dtb is inside the boot.img
Try installing it to an sd card, chrooting into it from android, generating an initramfs, then replacing the initramfs in the boot.img with the one you generated. (Maybe it could even work without that, wiht arch's initramfs?)
Click to expand...
Click to collapse
OK
Thanks.
postmarketOS tree on the way! Please someone send photo of A8+ running it! Info in first post!
this is absolutely amazing, thank you for the work
im very happy with gentoo linux on my phone haha
saraphiem said:
this is absolutely amazing, thank you for the work
im very happy with gentoo linux on my phone haha
Click to expand...
Click to collapse
You got gentoo to boot? How did the drivers and compatability work out? I am asking this quite seriously as I do want to port it to my own device in the future.
Please update download links
Fandroid Tech said:
You got gentoo to boot? How did the drivers and compatability work out? I am asking this quite seriously as I do want to port it to my own device in the future.
Click to expand...
Click to collapse
well, it boots, tty works as expected with a phsyical keyboard lmao
the power button interestingly triggers a reboot, openrc & sysvinit goes through the "proper" shutdown process
i wasn't able to get much more than that working, unfortunately :c
saraphiem said:
well, it boots, tty works as expected with a phsyical keyboard lmao
the power button interestingly triggers a reboot, openrc & sysvinit goes through the "proper" shutdown process
i wasn't able to get much more than that working, unfortunately :c
Click to expand...
Click to collapse
I tried running it in a chroot, running gentoo on an 10 year old armhf cpu was hell in itself. The bigger problem was trying to update an old system. The closest anybody has gotten to gentoo mobile is sharkbait os, but that was just a chroot I think.
Fandroid Tech said:
I tried running it in a chroot, running gentoo on an 10 year old armhf cpu was hell in itself. The bigger problem was trying to update an old system. The closest anybody has gotten to gentoo mobile is sharkbait os, but that was just a chroot I think.
Click to expand...
Click to collapse
haha sure does take a while to compile things

Booting in EL2, for KVM use.

Hey guys,
Been working on a personal project, and came to this question, which also happens to be the first Im having to post about online..
Is it even possible to boot the kernel in EL2 mode with the sdm845 SoC ?
My end goal here being running qemu - which I'm already are - under KVM ( The tough part )
I Already tried enabling the necessary options in the kernel build, flashing them, with no success.
What I've been reading around is that since the system uses the TrustZone environment, this may not be possible.
[Kernel] Stock Android Pie kernel with KVM
I have been trying for some time now to enable KVM on the Pixel XL, by compiling the stock Google kernel and adding the KVM switches to "marlin_defconfig". Unfortunately, while the kernel with KVM compiles properly and could be flashed, /dev/kvm...
forum.xda-developers.com
On the other hand, under the chipset specifications I've been seen that only EL3 is really protected by the security implementations.
Documentation – Arm Developer
developer.arm.com
I know some exynos chipsets support booting in EL2 out of the box, but I see not much development for Qualcomm based ones.
ARM KVM (Kernel Virtual Machine) enabled Kernel for Samsung Galaxy S8
Hi. Can someone that compiles kernels for this phone compile one with KVM enabled and make it available to download? It should not be too hard. This would really make these machines appealing if you could spin up VMs on them especially...
forum.xda-developers.com
KVM
Limbo is a QEMU-based emulator for Android. It currently supports x86, ARM, PowerPC, and Sparc emulation for Intel x86 and ARM android devices. See wiki https://virtualmachinery.weebly.com for APK...
github.com
So, summing up, is it possible, and if so through what actions, to boot a kernel under LE2 mode on a snapdragon processor?
Also, side note, I'm willing to brick my device, if its worth the try, and adds to any progress of future development.
Edit1: Added links- sources
Cheers!
Sadly, with SDM845 it is impossible to enable KVM in android Linux kernels. As the kernel is booted under EL1 by the firmware. But with this firmware https://github.com/msm8916-mainline/qhypstub, msm8916/msm8935 can.
Is there a way to enable KVM for SM8450 (Snapdragon 8 gen 1) ? I would like to use Qemu on Galaxy Tab S8
linlin3309 said:
Sadly, with SDM845 it is impossible to enable KVM in android Linux kernels. As the kernel is booted under EL1 by the firmware. But with this firmware https://github.com/msm8916-mainline/qhypstub, msm8916/msm8935 can.
Click to expand...
Click to collapse
How i check my device booting with EL1 or EL2 ?
Via `dmesg` ?

How to reflash Galaxy A02s with 64bit Android

Hello forum guys, I've registered now to see if any enlightened souls could help me.
So straight to the problem...As stated in the title I have a Galaxy A02s and I am having problems with its Android.
I did a lot of research but I'm just getting more doubts, I read things like custom mod, kernel 64, treble info, and so on.
I will specify my device with the Aida64 information for better understanding:
Chipset: Qualcomm Snapdragon 450
Core Architecture: 8x ARM CORTEX-A53 @ 1804MHz
Manufacturing Process: 14nm
Instruction Set: 64-bit ARMv8-A (32-bit Mode)
And Treble Info says:
In the Architecture part: "Your device is ARM32 but uses a 64-bit binder. This usually indicates that the hardware supports 64-bits but the software does not. In this case, a 'binder64' or 'a64' image should be used. "
And in the Image Requested part: "Your device needs an image file called 'system-arm32_binder64-ab.img.xz.'"
I don't know if this Treble has anything to do with leaving Android in 64-bit, but I was researching and researching and that's what I got, however, I have little knowledge about these things and I didn't find any tutorial teaching how to install/update to 64-bit
That's it, I hope you can help me, thank you in advance
What's your real problem?
Any 64-bit SoC flawlessly runs 32-bit Android OS and 32-bit apps
jwoegerbauer said:
What's your real problem?
Click to expand...
Click to collapse
sorry, stopping to read again what i wrote i realized i didn't specify what i needed help lol
So I just don't want this 32-bit mode, I googled to see if my processor had architecture to run in 64-bit, and apparently yes, so I wanted to put android in 64-bit, but I have no idea of how to do this
thanks again
Replace this thread's title by your real problem: How to reflash Galaxy A20s with 64bit Android
Certainly, you flashed a 32bits system.
Just flash a 64bits system.
VD171 said:
Certainly, you flashed a 32bits system.
Just flash a 64bits system.
Click to expand...
Click to collapse
I bought the phone and it came like this, but how do I do it ? To a 64bits system
I'm also with the same problem, I would need some ROM for the 64-bit system, but I realized that there is none so far, is there any other way to change it to 64-bit without changing the ROM?
Short answer: NO
Short answer: NEVER
I'd like to ask how is the 32bit system with the 64bit system?
Releases · EnesSastim/Downloads
Contribute to EnesSastim/Downloads development by creating an account on GitHub.
github.com
Bump thread
Bumped thread, again.

Categories

Resources