Arch Linux running natively on Pixel C - Pixel C Original Android Development

Hi Guys, i'm there again,
https://www.youtube.com/watch?v=WQMGkCT9yy0&t=6s
On some free time, i could have run Archlinux natively on Pixel C,
Here are my instructions to play a bit with your device in order to have it working on your device too !
First some warnings :
- You have no warrantly it will work on your device, maybe it can break your device
- This is in a prealpha state, reserved for developpers :
- Wifi is not working, you will have to have an OTG adapter and an USB ethernet card in order to be connected
- GPU is not working (so yes the UI is very slow, consequence of the great resolution of the screen)
- DRM drivers of the google kernel are bugged as hell, for example the cursor won't be visible on the screen if you use an USB mouse.
- No sound
Working things :
- boot
- Touchscreen
- Display
- Gnome Desktop (but quite slow due to no harware acceleration)
How to make this work (Developpers only):
- Format your Data partition on your Pixel C in order to disable the default encryption of Data partition.
USE WITH CAUTION !
Code:
fastboot format userdata
- Install a stock kernel on your pixel C that disable forced data encryption, otherwise as soon as you will reboot to android, you will have to format your data partition again ! (you can flash superSu that will modify your stock kernel and will do that for you)
- Download the rootfs here : https://drive.google.com/open?id=0BzWwMqZZvtXSTDhZWTA0RUhrTjg
- Untar the rootfs in your data partition in /data (so that the directories bin,etc... are in /data/Arch). You can use TWRP and a comandline for this (tar -xzpvf Arch.tar.gz )
- Download the kernel here : https://drive.google.com/open?id=0BzWwMqZZvtXScUsyYXBwaXpoRm8
Now enter fastboot mode and run :
Code:
fastboot boot boot_Data.img
if you want to flash it on your boot partition :
DO THIS WITH CAUTION !
Code:
fastboot flash boot boot_Data.img
Your Arch sytem will boot
user : alarm
password :alarm
Note that a sshd deamon is running and accessible on the network !
Good luck !
If you're happy of this work and you want to have more detailed instructions please pay me a beer ! Because developing for Pixel C is time consuming
http://paypal.me/MathieuTournier

Reserved

Download links are now available

Great work Samt434!!!!
Finally a desktop linux distro for our beloved pixel c.

:Q______

Wow, this is amazing! I'm interested in the modifications to 'stock' Arch you did to achieve this. Is it running a modified recent Arch kernel or what? Great work!

Arch linux domining the world! <3
GREAT JOB!!!

clixer said:
Wow, this is amazing! I'm interested in the modifications to 'stock' Arch you did to achieve this. Is it running a modified recent Arch kernel or what? Great work!
Click to expand...
Click to collapse
From the video I can see he runs "alarm" (Arch Linux Arm)

I'm not a Pixel C owner, but as an Arch Linux user, i find this news great
Does bluetooth works?

If they can get ubuntu running natively I'm in

Did you compile the kernel yourself? How did you figure out what modules to include? Do you have a (menu)config file you could share?
This is incredible, wondering how hard it is to repeat on other tablets/devices

This is great
I wish someone could port it for HP Slate 21

@Samt434 interesting, can you go into more detail about how you built the data partition image?

@Samt434 , hi Archlinux friend
Really good job
I have a similar project for Xperia S with working GPU acceleration. Maybe we can share some stuff. I already pushed some package like libhybris into AUR.
https://forum.xda-developers.com/xp...om-archlinux-phone-gnu-linux-android-t3398769

H0lmEd said:
Did you compile the kernel yourself? How did you figure out what modules to include? Do you have a (menu)config file you could share?
This is incredible, wondering how hard it is to repeat on other tablets/devices
Click to expand...
Click to collapse
Yes I will share more details soon !
The current state is not usable yet, but I know it's possible to run a mainline kernel on this device (thanks to Nvidia guys ). There is still a lot of work to do and I am very busy too with other projects I hope my work will give ideas to some Linux kernel developpers so that they can help us to have mainline kernel running on Pixel C more quickly.
Not sure the hybris approach can work here as Pixel C is using nouveau and tegra DRM + Nvidia blob for GPU acceleration.
I will share some code soon so that people can contribute.
Pixel C has great hardware, and we are approaching to run something on it that will be able to benefit of all its capabilities.
Beware that I cannot garranty any improvements as I'm doing this on my free time,
Stay stunned !
Samt434

Bray90820 said:
If they can get ubuntu running natively I'm in
Click to expand...
Click to collapse
Well.... I supposed if we run something like Ubuntu's netinstaller initrd http://ports.ubuntu.com/dists/zesty...urrent/images/netboot/ubuntu-installer/arm64/ on boot.img then we can install it and run it natively with some few more manual modification to boot.img, I've done these on raspberry pi and it worked perfectly well
Just as long as you don't delete all the partition, install / to /system

Teltarif.de a German website about telecommunication published an article: Pixel C: Richtiges Linux statt Android

Guys i have some good news about this project,
I could finally boot and run Arch on a mainline kernel (4.9) on the pixel C. (Yeah !)
Unfortunatly, DRM is not initialising correctly yet... so no display yet with the 4.9 kernel...
[ 3.622872] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 3.629493] [drm] No driver support for vblank timestamp query.
[ 3.635453] drm drm: failed to allocate buffer of size 18432000
[ 3.641375] drm drm: failed to set initial configuration: -12
It seems there is still some work to do to initialise the display correctly,
but I think we will have soon Arch with GPU accelerated UI soon
Samt434

Thanks for your efforts and the time you dedicate to this! I've been dreaming with something like this since I decided to buy this tablet! Keep it up!

Samt434 said:
Guys i have some good news about this project,
I could finally boot and run Arch on a mainline kernel (4.9) on the pixel C. (Yeah !)
Unfortunatly, DRM is not initialising correctly yet... so no display yet with the 4.9 kernel...
[ 3.622872] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 3.629493] [drm] No driver support for vblank timestamp query.
[ 3.635453] drm drm: failed to allocate buffer of size 18432000
[ 3.641375] drm drm: failed to set initial configuration: -12
It seems there is still some work to do to initialise the display correctly,
but I think we will have soon Arch with GPU accelerated UI soon
Samt434
Click to expand...
Click to collapse
Can you provide more instructions on how did you compiled the kernel?

Related

[WIP] Ubuntu on G9 v0.2

Hey guys,
let's try to get Ubuntu working on our tablets.
adbd is included in the images, so you have a root shell over adb
SDE required.
Extract all.
adb push ubu1204.img.ext4 /data/media/
Reboot - SDE - Flash kernel and initrd
Multiboot menu 0.3 - ubu1204.img.ext4 (from the menu to start the ICS, such as "archos.ext4")
Done.
(passwords: ubuntu - ubuntu root - root)
Working:
- Booting on 80G9 and 101G9
- Touchscreen (touchpad mode)
- Keyboard via OTG cable
- Mass storage on rear USB-prt
- SD card automount on plugin
- LCD backlight brightness control via command line, lol
- Networking (incl. WiFi)
Changelog:
0.2:
- Made by szanalmas
- Upgrade to 12.04
- Kernel 3.0.8+
- Working WiFi (try adding a dummy network, then it works), Sound
- Switched from Unity to Gnome Classic
0.1:
- Initial build.
Todo:
- Bluetooth
- Hardware acceleration
- Camera
- Battery
Download v0.2:
Image: Download
SHA: View
Kernel: Download
SHA: View
Download v0.1:
sysroot_ice.img http://hotfile.com/dl/145362762/7e3f710/ubuntu.img.rar.html MD5:2d9dbc775820db5dda281df84ab7db64
initramfs.cpio.gz http://hotfile.com/dl/145366156/8c56f1d/initramfs.cpio.gz.html MD5:150fc53be381ac3247d44226061868af
zImage http://hotfile.com/dl/145366657/34f75c7/zImage.html MD5:4de6efeec193aa5809f2ff871a96ef2d
Thanks to
- szanalmas for upgrade to 12.04, kernel 3.0.8+, WiFi
- letama for provided kernel + initramfs
- trevd for testing on 101G9 and reuploading stuff
- Adam / OPPO
great a1Pha !
but i would like ubuntu and ICE.. (lol)
This can be made. I'll have to check the initramfs tomorrow
Upload done, post edited - have fun @ testing
a1Pha said:
This can be made. I'll have to check the initramfs tomorrow
Click to expand...
Click to collapse
thx , i testing that this morning
wow. I was going to get working on this when my tablet arrives but you beat me to the race.. maybe we can work on it together in the future
Could you post some screenshots of ubuntu on g9?
dual boot
how would you go about dual bopoting i want to get into the whole programming of it just need a pointer to the start of things
TjaXanK said:
wow. I was going to get working on this when my tablet arrives but you beat me to the race.. maybe we can work on it together in the future
Click to expand...
Click to collapse
For sure - just contact me when your tablet has arrived
142857 said:
Could you post some screenshots of ubuntu on g9?
Click to expand...
Click to collapse
Okay, I have edited the first post and added some links to screenshots.
twinnaz said:
how would you go about dual bopoting i want to get into the whole programming of it just need a pointer to the start of things
Click to expand...
Click to collapse
Sorry, I don't understand your question :S
how would i implement a dualboot
You can take the initramfs.cpio.gz posted by letama in another thread (look at the link to Ice Cream Sandwich - the file is inside the archive you download).
Then extract it and have look at the scripts, which are provided there.
Basically you have to get the system to ask you, from which filesystem image you want to boot
yep! you need to install SDE, restart your device, go in the developer menu and flash the initramfs.cpio.gz that letama posted in the ICS post, atleast that's how it was in the Gen8... by the looks of it the SDE menu is the same. Hope I helped
i wait the multi OS install
2.3
4.0
Ubuntu
Nice, I'll give this a go now.
Edit:
Works on the 101G9.
Keyboard Functions through OTG/Host Cable.
USB Mass Storage (Pen Drive) Functions on 3G Stick Port
Not tried anything else yet.
Are you using a lot of the same kernel objects which android is using?
Excellent Work.
alright thanks
trevd said:
Works on the 101G9.
Keyboard Functions through OTG/Host Cable.
USB Mass Storage (Pen Drive) Functions on 3G Stick Port
Are you using a lot of the same kernel objects which android is using?
Click to expand...
Click to collapse
Thank you very much, and also thanks for testing
I am using initramfs + kernel + modules provided by letama for his ICS-build.
By the way - I will upload a new build this night.
I have managed to get basic network functionality via adb + usbcable, so I have upgraded all packages and installed a touchscreen keyboard.
In the new build the LCD backlight brightness is now set to max on boot.
I also have added a user with sudo-permissions, so now settings are saved on reboot (not like in 0.1 where guest sessions were created).
Oh, and I will change the filesystem type from ext3 to ext4.
Still no real progress on WiFi or sound
P.S.: New build will support choosing between booting ICS and Ubuntu
//edit: sry guys, got some problems with my internet provider. i get reconnects every 30 seconds. i hope they get it fixed till tomorrow... sorry for delay, i'm going to upload the stuff tomorrow..
a1Pha said:
Thank you very much, and also thanks for testing
I am using initramfs + kernel + modules provided by letama for his ICS-build.
Click to expand...
Click to collapse
Might be worth giving it a go with a version 3 kernel, you may get some free driver support. although I could be talking nonsense
a1Pha said:
By the way - I will upload a new build this night.
I have managed to get basic network functionality via adb + usbcable, so I have upgraded all packages and installed a touchscreen keyboard.
In the new build the LCD backlight brightness is now set to max on boot.
I also have added a user with sudo-permissions, so now settings are saved on reboot (not like in 0.1 where guest sessions were created).
Oh, and I will change the filesystem type from ext3 to ext4.
Click to expand...
Click to collapse
I activated the root login with my own password from adb and the touchscreen keyboard worked straight away on the 101. It must come with the the drivers preinstalled. I think letma's' done some work into the difference between the 80 and 101.
a1Pha said:
Still no real progress on WiFi or sound
Click to expand...
Click to collapse
I've been playing with this all night. I think the drivers have been integrated in the main linux kernel so you should be able to build your own.
They could some prebuilt binaries out there as the OMAP4 board seems quite a popular board.
Also you might have some joy with this http://dev.omapzoom.org/pub/scm/integration/
It's all Good!
Archos 101 G9, HTC Sensation, HTC Hero
Hi Guys,
A1Pha, sorry, didn't have time to test your build, too much stuff going on...
Here is a quick feedback on wifi that may help you:
In android, here is how it works (from memory, don't have my laptop to check)
1) you need to create a nvs file corresponding to tablet, check android init.rc for the way it's done there...
2) Then when you do need wifi, insmod the tiwlan.ko
3) Then, load firmware (check wlan_loader in android init.rc, you should be able to reuse the command) and nvs. If all goes well up to here, you should be able to do ifconfig tiwlan0 and it should have a mac address.
4) Then start wpa_supplicant. You need the appropriate version of wpa_supplicant, 0.8 I think in android source code. You may want to build source code from android source with the appropriate options to remove android extensions.
Again, this is from memory, I'll try to give you more details tomorrow.
Regarding audio, this is mostly alsa so it shouldn't be impossible, you should be able to re-use the configuration found in archos rootfs in /usr/ sub directories. You have to insmod the proper modules though.
Best,
LeTama
Suggestion for the sound, try running the alsamixer and playing with that... worked in debian...
letama said:
Hi Guys,
A1Pha, sorry, didn't have time to test your build, too much stuff going on...
Here is a quick feedback on wifi that may help you:
In android, here is how it works (from memory, don't have my laptop to check)
.....
Click to expand...
Click to collapse
ahh. Thanks for that letama , You're a fountain of knowledge.
I'll give it a try during the holidays.
I was playing about with wpa_supplicant and android kernel drivers. I didn't have the right magic ) and my kernel knowledge is still in it's early stages (only been on the linux desktop for 1 year).

Ubuntu for tf701t

I tried to boot Ubuntu on tf701t a lot of times. I made something, but i have a lot of problem. I need some help.
So, to boot Ubuntu necessary a few things:
1) Kernel. http://forum.xda-developers.com/showthread.php?t=2520862 I hope it's done.
2) Ramdisk with init. That is the most problematic part. I try to compile initrd same as to tf700 (http://forum.xda-developers.com/showthread.php?t=2026919) but nothing happend.
3) Rootfs. I think the tf700t's one suit. There are not much difference between tf700 and tf701
4) Blobs. I don't know is it necessary. I think, if kernel initialize screen (via framebuffer) and processor, blobs are not needed.
I think, that's all. I'll be glad for any ideas.
Trel725 said:
I tried to boot Ubuntu on tf701t a lot of times. I made something, but i have a lot of problem. I need some help.
So, to boot Ubuntu necessary a few things:
1) Kernel. http://forum.xda-developers.com/showthread.php?t=2520862 I hope it's done.
2) Ramdisk with init. That is the most problematic part. I try to compile initrd same as to tf700 (http://forum.xda-developers.com/showthread.php?t=2026919) but nothing happend.
3) Rootfs. I think the tf700t's one suit. There are not much difference between tf700 and tf701
4) Blobs. I don't know is it necessary. I think, if kernel initialize screen (via framebuffer) and processor, blobs are not needed.
I think, that's all. I'll be glad for any ideas.
Click to expand...
Click to collapse
Someone sent me this. https://developer.nvidia.com/linux-tegra-rel-17 . Says tegra 4 I dunno..Note it says dalmore developer board though.
Is buildroot useful for this? http://buildroot.uclibc.org/
Maybe set up a blog with what you've done step by step etc and someone will fill in the details.
I could not get a buildroot rootfs to boot myself. But I have no clue.
Thanks for your effort.
Have a look here for how they did it on the TF700.
http://forum.xda-developers.com/showthread.php?t=2387133
Thanks, that information useful.
What is "kexec.blob"? Is it kernel with blobs? Are blobs necessary for tf701?
I understood. That is boot.img, kernel+initrd. Initrd from rabits's project and I couldn't build init for tf701. This is main problem.
Trel725 said:
Thanks, that information useful.
What is "kexec.blob"? Is it kernel with blobs? Are blobs necessary for tf701?
I understood. That is boot.img, kernel+initrd. Initrd from rabits's project and I couldn't build init for tf701. This is main problem.
Click to expand...
Click to collapse
I see there in the Dalmore driver package from the first link i showed you there are various .dtb files(including one for macallan). device tree blobs no?
YayYouFixedIt said:
I see there in the Dalmore driver package from the first link i showed you there are various .dtb files(including one for macallan). device tree blobs no?
Click to expand...
Click to collapse
Yep. But that is compiled dtbs and I couldn't use it. Also there are dtbs (including for tf701) in kernel source (I posted link in first msg).
Today I got it! I had ran simple linux on this tablet. I use the fbcon as console output, and dock as keyboard. Keyboard works perfectly. Linux works not bad too. I was testing simple linux features like font changing, seeing images through fbi program, flashing arduino by avrdude, etc. Everything works. Also backlight is controllable. But unfortunately I couldn't run X nevertheless framebuffer output is working. I need help because I don't know how works the Android graphics output and how I can use it in pure linux.
https://source.android.com/devices/graphics/architecture.html
http://keyj.emphy.de/files/linuxgraphics_en.pdf
http://free-electrons.com/doc/training/android/android-slides.pdf
Some links that might offer some ideas to someone idk.

[PATCH] Kexec-hardboot patch

In this post, I would like to explain what kexec-hardboot patch is.
@kernel developers: I would like to ask you to merge this patch to your kernels, because it is essential part of MultiROM - it allows to boot any kernel without changing the boot partition. I realize that it is no small request, but the patch is not big, touches relatively stable parts of kernel and should not cause any problems. Thank you.
What is kexec?
It is syscall of Linux kernel, which allows you to boot another Linux kernel without restarting the device - "Linux boots itself". The functionality is equivalent to fastboot -c *cmdline* boot zImage initrd.img, but without PC and fastboot. It is fairly known thing, so more info at wikipedia and man kexec.
What is the difference between normal and hardboot exec?
Kexec-hardboot patch adds a real device restart to that process, so that all the drivers can be properly reinitialized. It stores new kernel to RAM, reboots the device as usual, and kernel from boot partition immediately jumps to the one which was stored to RAM before reboot.
Unlike grouper's kexec-hardboot patch, this one only requires the host kernel to be patched. This is one of the improvements Tasssadar made, and I think it is pretty significant.
To sumarize the process:
kexec --load-hardboot.... is called and kernel it loaded into RAM.
kexec -e is called. Special info is written to memory (to area which is not overwritten on reboot) and the device is rebooted.
After reboot, very early in the boot process, kernel checks if that special info is present in RAM and if so, it loads new kernel from RAM and jumps to it.
Kexecd' kernel starts and boots.
For more info, read the original thread.
Patches:
Kernel patch: https://gist.github.com/PatrikKT/50faf32e8931d51c0c9a,
This is the kernel patch. Only the host kernel needs to be patched.
Related CONFIG options:
CONFIG_KEXEC=y
CONFIG_KEXEC_HARDBOOT=y
CONFIG_PROC_DEVICETREE=y
CONFIG_ATAGS_PROC=n # This one is turned on automatically, but it is not needed, so you can disable it.
All these options must be enabled.​
Userspace kexec binary: https://github.com/Tasssadar/kexec-tools
I had to change some things in kexec userspace binary because of some kernel bugs, complete description is in that repository. You can get statically built binary at https://github.com/Tasssadar/multirom/blob/master/install_zip/prebuilt-installer/multirom/kexec​
Usage:
Once you have the kernel patches and kexec userspace binary in place, just run following command to boot into new kernel:
Code:
kexec --load-hardboot zImage --initrd=initrd.img --mem-min=0x20000000 --command-line="$(cat /proc/cmdline)" --dtb
kexec -e
Note the command line parameter - cmdline from bootloader is not added automatically, you have to put it there by yourself.
Authors:
This patch was made by Mike Kasick for Samsung Epic 4G. Since that, it was ported to several devices, one of them is Asus Transformer TF201 - he used patch from TF201 and modified it a bit (basically just changed few SoC specific constants). People at #ubuntu-arm helped him out with that, thanks.
For hammerhead, he has improved the patch a bit - only the host needs to be patched now and he has added support for DTB.
This thread was used as a template Credits to @Tasssadar for his Nexus 5 patch
Awesome people helping with our G2's development. Thank YOU!
patrik.KT said:
I would like to ask you to merge this patch to your kernels, because it is essential part of MultiROM - it allows to boot any kernel without changing the boot partition.
Click to expand...
Click to collapse
What benefit would there be to non-MultiROM users? (Just curious.)
blastagator said:
What benefit would there be to non-MultiROM users? (Just curious.)
Click to expand...
Click to collapse
Any. Just any.
Actually I can't think of anything. It's only to bring the device to a full reboot to load a new kernel.
Odoslané z môjho HTC Desire 601
blastagator said:
What benefit would there be to non-MultiROM users? (Just curious.)
Click to expand...
Click to collapse
Not for common user, in epic4g kexec used by kernel devs to test a new kernel build without replace the existing kernel.
They just load a temporary kernel to test. Then that kernel will gone after a reboot.
Hope to see new kernels that support MultiRom! Great work man!
Would this allow a multiboot with AOSP and Stock roms?
AbdulrahmanAmir said:
it doesnt work while i have stock and the secondary is aosp (dU-dirty.unicorn) when i boot the secondary it works sound only but no display just black screen plzz help
Click to expand...
Click to collapse
The patch is not necessary at the moment, because of the locked bootloader. It's just for devs to be prepared with their kernel when we can unlock the bootloader, so that multirom will work as it should.
Odoslané z môjho HTC Desire 601
Thanks for your great thread. But there is no instruction about how we can add that patch to kernel source. Could you write more details about implanting this patch?
No response??
mohamaadhosein said:
No response??
Click to expand...
Click to collapse
Download the patch file from first post and place it in the kernel root directory. Then you should use this command to check if there are any conflicts: git apply --check <path_to>.patch
If there are no errors, use this to apply: git apply <path_to>.patch
Sorry for the late response but I checked xda when I wasn't home and I forgot to reply when I got home
Odoslané z môjho HTC Desire 601
Hey, some changes need to be made to the patch.
On line 353, change the number from 22 to 21. Also, it has some errors when modifying head.S, which I had to fix manually..
But guys, my kernel is building with the latest multirom. This **** is going to maybe work soon!
I'll keep you all posted.
Thank you man
Guys, I think I've done it. Kexec hardboot patched kernel for 5.1.1 and thus multirom compliant, which I am preparing to build with twrp. this is very exciting.
When will it be ready?
Are you kidding me? No ETAs. I literally haven't even announce it yet and somebody asks for an ETA.... It will be ready once I test everything to boot well on my device.
patrik.KT said:
Download the patch file from first post and place it in the kernel root directory. Then you should use this command to check if there are any conflicts: git apply --check <path_to>.patch
If there are no errors, use this to apply: git apply <path_to>.patch
Sorry for the late response but I checked xda when I wasn't home and I forgot to reply when I got home
Odoslané z môjho HTC Desire 601
Click to expand...
Click to collapse
It says the patch is corrupted on the line 375

Linux on Pixel C : Running ubuntu xenial in a LXC container (27 september)

Hi guys,
Today i wanted to share with you some of my work to run linux on the pixel C.
First of all i'm not responsible for anything, so try this but i can't guarantee that it works for you and that you won't break your tablet (even though normally it should work ).
Secondly this thread is for people who know how to use correctly adb, fastboot and linux console, instructions are not very detailed here, so if you're stuck try a bit to search, you will learn a lot !
So first what is LXC ?
LXC (Linux Containers) is an operating-system-level virtualization method for running multiple isolated Linux systems (containers) on a control host using a single Linux kernel. (wikipedia)
We are gonna use this technology to run ubuntu on Pixel C (we will even be able to access to the GPU drivers in the future, i'm currently working on it)
So first, we need a special kernel where cgroups are activated.
Please download and flash my modified stock kernel for nrd90r :
https://drive.google.com/file/d/0BzWwMqZZvtXSZjNzdDB6MVBqd0E/view?usp=sharing
Code:
fastboot flash boot boot.img
Try to see if you can run su in the tablet, otherwise you will have to install supersu.
Now, install busybox so that we have some tools to help us a bit : https://play.google.com/store/apps/details?id=ru.meefik.busybox&hl=fr
Download now lxc compiled with PIE support for Pixel C and the ubuntu rootfs (here is a 32bit version, 64bit is also working fine on my tablet ) :
https://drive.google.com/open?id=0BzWwMqZZvtXSTnJBbS1LbGo0MUE
send it to the pixel C :
Code:
adb push lxc.tar.gz /sdcard/
Now extract the archive in /data
Code:
adb shell
su
tar xvzf /sdcard/lxc.tar.gz -C /data/
Now run ubuntu and enjoy ! :highfive:
Code:
# open a terminal as root on the tablet
# execute :
/data/lxc/startSystem
If everything goes well, you will see ubuntu booting
Welcome to Ubuntu 16.04 LTS!
Set hostname to <u3>.
[ OK ] Reached target Remote File Systems (Pre).
[ OK ] Listening on /dev/initctl Compatibility Named Pipe.
[ OK ] Listening on Journal Socket.
[ OK ] Listening on udev Control Socket.
[ OK ] Reached target Swap.
[ OK ] Listening on Journal Audit Socket.
[ OK ] Reached target Remote File Systems.
[ OK ] Listening on Journal Socket (/dev/log).
[ OK ] Reached target Encrypted Volumes.
[ OK ] Started Forward Password Requests to Wall Directory Watch.
[ OK ] Listening on Syslog Socket.
[ OK ] Listening on udev Kernel Socket.
...
user : ubuntu
password :ubuntu
Internet will work out of box if your tablet has a net access, you can install, remove things using apt
What is going on for this project :
I'm currently trying to use the GPU drivers using libhybris so that in the future we can run wayland on pixel C and have a fully working linux environnement ! (KDE, gnome)
see here for KDE, we need to port this : http://blog.bshah.in/2016/05/02/plasma-mobile-new-base-system/
I need help for this (because it's difficult). For this, we will have to patch bionic so that we can use libhybris. All the devs can contribute here )
If you're happy of this work and you want to have more detailed instructions please pay me a beer ! Because developing for Pixel C is time consuming
paypal.me/MathieuTournier
Reserved
For people that just want to use lxc alone building there own images, here is a lxc version with PIE support enabled :
https://drive.google.com/file/d/0BzWwMqZZvtXSQVR1dGFhZFRyeVU/view?usp=sharing
works perfekt, thanks
Whenever you get around to posting the 6.X kernel, I'd be happy to help test this on Dirty Unicorns 10.3 stable. I've wanted a non-virtualized Ubuntu install on my Pixel C for a while so I can use it to replace my laptop for research, and an LXC seems like a great way to make that happen.
Thanks for taking the time to work on this!
Great work, thank you! It works as described on preview 4. It would be awesome to see a full Linux desktop on the Pixel C. I'd be glad to test - if there's a way back
after flash boot.img the tablet is not boot. i am use last update .
I'm looking forward to using this on my Pixel C once there is a graphical environment.
While you are working on the GPU, is it possible to install XServer/Gnome/etc along with a VNC server and connect to it via a VNC client on Android? If so, could you quickly explain how to do it with this?
Yo OP, wouldn't it be better to use Arch Linux for this project? You know, considering the better documentation for Arch, and bigger cooperation of the community?
Great attempt though, if I get a Pixel C as planned I would like to test this!
---------- Post added at 09:09 AM ---------- Previous post was at 09:06 AM ----------
@Samt434 forgot to quote you lol.
Hi guys, sorry for the late answer. I will update everything so that LXC can run on the lastest android version soon !
There is a great anoucement coming Stay tuned !
Samt434 said:
Hi guys, sorry for the late answer. I will update everything so that LXC can run on the lastest android version soon !
There is a great anoucement coming Stay tuned !
Click to expand...
Click to collapse
Yeah, can't wait.
How does this compare to Linux Deploy? I've got Ubuntu running with Linux Deploy using the android XSDL X server for display and it runs pretty well.
Is google now giving us similar tools?
https://cloud.google.com/compute/docs/containers/vm-image/
I don't know a damn thing about programming but if this if someone figures a way for me put Chrome OS on my Pixel C I'll pick it up.
as a massive linux fan & a Pixel C owner, i'm watching this project closely. Love to hear what's coming in a look ahead. Personally, my preference would be to be able to install a linux OS natively as a sole OS (any live ARM version) but anything that can be done to un-androidify the Pixel C would be awesome.
@DollarUsername : lxc permits for exemple to run systemd correctly, so your distribution is fully running with this solution
New update, new kernel based on stocked for NRD90R (note that this kernel doesn't include dm verity)
And i have a surprise : https://youtu.be/4B8unHrbZK4
Weston and XWayland are now running well on Pixel C ! (using the DRM framebuffer)
I can't say when i will publish it, it still need some more time (there are still some stability issues...), and i have a lot of other things ongoing.
But i will publish it soon
Thanks a lot for your support !
Samt434 said:
New update, new kernel based on stocked for NRD90R (note that this kernel doesn't include dm verity)
And i have a surprise : https://youtu.be/4B8unHrbZK4
Weston and XWayland are now running well on Pixel C ! (using the DRM framebuffer)
I can't say when i will publish it, it still need some more time (there are still some stability issues...), and i have a lot of other things ongoing.
But i will publish it soon
Thanks a lot for your support !
Click to expand...
Click to collapse
Thanks for your work!
The Youtube link is private.
ArangeLTX said:
Thanks for your work!
The Youtube link is private.
Click to expand...
Click to collapse
It's uploading, I can't afford the fiber man
It's available now !
Is it possible to start Linux from the terminal after the initial setup with adb?
Is there a tutorial to setup Wayland or is it ready to go. I would love to use my Pixel C for Java development with eclipse. Would this be possible or would it be a pain in the a**?
TheBready said:
Is it possible to start Linux from the terminal after the initial setup with adb?
Click to expand...
Click to collapse
Yes
"Is there a tutorial to setup Wayland or is it ready to go. I would love to use my Pixel C for Java development with eclipse. Would this be possible or would it be a pain in the a**? "
Yes it would be possible and would even run well !
About Wayland and weston, there is no tutorial and it's not ready to go currently (the demo is not currently based on LXC). The demo is from my lastest developpments, it requires still some dev before being published. But i hope to publish it soon :highfive:
First off, just wanted to say you are a god, keep up the good work. I've wanted linux on my pixel c since I bought it. I was going to install it via the instructions in your first post but I'm a little confused as to whether it has GUI or not? I understand it's Ubuntu Xenial but some of your notes make it seem like it doesn't have a GUI yet? Is this the case?

[MODS DELETE THIS THREAD] exNoShadez-eas

Mod edit: Thread closed on owner's request!
exNoShadez-EAS Kernel
FEATURES
- Current LTS release -> Linux-3.18.114
- Energy Aware Scheduling
- Schedutil (default Cpu Governor)
- RCU infrastructure backport (with expert mode enabled)
- Cpu-Boost / Input Boosting (enabled by default)
- BINFMT_MISC support (NOT mounted on boot).
- Kernel Hardening/Protection (CopperheadOS/Grsec/Pax Marlin kernel hardening features)
- leds-qpnp: Notification LED control - V1.1c (Boeffla) - Adapted for Marlin
- Binder_rt = My own re-implementation of AOSP Binder that uses rt_mutexes; supporting priority inheritance
- Improved scheduling/determinism for high priority threads/tasks
- Backported Scheduling, Locking and Workqueue subsystem code from Newer Linux kernels.
- Audio Driver enhancements / backports (from Wahoo/Pixel 2)
- Sound/Audio driver Tweaks (bug fixes, scheduling improvements)
- forced Interrupt threading enabled
- Wifi Mac Address Randomization
- WireGuard VPN kernel module support (more info soon)
- KCal Advanced Colour control
- Improved ASLR (in kernel)
- USB Fast Charge
- Wake Gestures
- GCC 6/7+ Fixes
- Built with GCC-8.x-dev
- and more
Contains code from everywhere: Code Aurora, Flar2/Marlin, CopperheadOS, AOSP, Project-EAS, Freak7/Kirisakura, Linaro, Pixel 2 kernel sources, mainline linux and elsewhere. Modifications and backports by me, as well.
BACKGROUND
I wanted a kernel for My Pixel that had 'all of the things', it didn't exist... So I'm working on my own kernel. I try to balance Security/hardening, experimental features with high Performance and battery life. <- not an easy task! ... Some of the security features do come with overhead, but if you use apps that are CPU heavy / processing and/or require low latency - they will perform well (at the cost of chewing some battery life, of course).... Battery life and SOT are very reasonable though.
WARNING / VERY IMPORTANT: This kernel isn't compatible with installing TWRP ~> meaning; you must use the fastboot version of TWRP (used in RAM) , flash the kernel and NOT install TWRP to your system (the kernel is too big for TWRP to co-exist).... This may sound inconvenient, but there are a number of valid reasons to avoid reducing a kernel's size in order to support TWRP installation, in the boot partition.
***Fun facts on this subject below => in the 2nd post: PLEASE READ: to understand my motivation***
TWRP REMOVAL
*To remove TWRP from your system; You need the stock boot.img from your running/current firmware (which is inside of the factory image zips) or use the Nov Stock boot.img provided here. Then it's as simple as flashing the boot.img to wipe TWRP;
fastboot flash boot_a /path/to/boot.img
fastboot flash boot_b /path/to/boot.img
Stock 8.1 July 2018 Boot.img => https://github.com/nine7nine/Apps/raw/master/SailfishStockJulyBoot.img
Now you can proceed with using the TWRP fastboot boot.img to flash my kernel, magisk/supersu or whatever else....
Fastboot twrp boot image => https://dl.twrp.me/sailfish/twrp-3.2.2-0-sailfish.img
WARNING: This shouldn't need to be said, but we did have someone who did this, so I'm adding a sticky/warning here; do NOT EVER re-lock your bootloader after flashing any kind of custom software, kernels, etc to your device - *it will brick your phone*. Meaning you are screwed would need an RMA / replacement device ... everyone in the XDA community should know better, but still; worth mentioning....
IMPORTANT:
Before asking questions; Please read through the thread (starting with the last few pages) - I shouldn't need to be repeatedly answering the same questions over and over again. It's good practice to get into the habit of reading through threads before asking questions in any thread on XDA, as more often then not; you're question has probably been answered. Thanks!
EXNS-EAS KERNEL DOWNLOAD:
JULY 2018 OREO 8.1 RELEASE exNoShades-eas Kernel Flashable zip
https://github.com/nine7nine/Apps/raw/master/exNoShadez_eas_v2.8.2_f94351f.zip
It is stable, high performance and very responsive...
Important: You will need root; I don't support non-rooted devices && some features require it. I recommend using Magisk; https://forum.xda-developers.com/apps/magisk/beta-magisk-v13-0-0980cb6-t3618589 ...
NOTE: Make sure to flash the latest Magisk beta *before* flashing the kernel zip. ...
More Background / Important Notes:
Binder_RT:
My own port and re-implementation of the Binder Kernel Driver; a slightly modified version of The AOSP binder.
Binder_RT uses rt_mutexes as opposed to mutexes for locking in Binder, ion, ashmem, etc... rt_mutexes support priority inheritance and should improve determinism in Binder, speed up IPC, Ion and Ashmem => Allowing applications that require low-latency, tight deadlines, low jitter and deterministic behaviour to perform better ~ This re-implementation is proving to be the great for those types of applications. The goal here is to help ensure that the Kernel and Binder's high priority && time critical threads and tasks are properly prioritized... Example; audio buffers arriving on time / no buffer underruns... *Further development work is planned to research, experiment with and improve Binder_RT.
rt_mutex documentation, for those interested;
https://github.com/nine7nine/Marlin_exns-eas/blob/EXNS_EAS/Documentation/locking/rt-mutex.txt
https://github.com/nine7nine/Marlin_exns-eas/blob/EXNS_EAS/Documentation/locking/rt-mutex-design.txt
CPU-Boost / Input Boosting:
Touch inputs boost CPU frequencies (thus improves performance and responsiveness).
# Cpu-boot / Input boost settings
write /sys/module/cpu_boost/parameters/input_boost_enabled 1
write /sys/module/cpu_boost/parameters/input_boost_freq "0:1363200 1:0 2:1900800 3:0"
write /sys/module/cpu_boost/parameters/input_boost_ms 100
IO/ CPU Governors:
This kernel doesn't include a thousand io/cpu governors. IO-wise; CFQ is the default, but we've got a few in there. chose your poison, but know that the majority of my testing is centered around cfq and deadline. CPU Governor-wise the common Linux CPU governors are there; along with Sched and Schedutil....
Stick with Schedutil - on idle, it draws very little power and in most 'peak performance situations, it should do very well..... I'm getting great battery life, sot and performance.
Managing Kernel Settings:
Get EX Kernel Manager - my original code on github was forked from EX kernel, before rebasing it - but EXKM will give you access to 99% of my kernel's settings.
My 8.1 Kernel Sources: https://github.com/nine7nine/Marlin_exns-eas
Donations via PayPal very much appreciated. I do put a significant amount of energy and time into researching, development, testing / QA and also providing support/help to end-users... It's definitely not mandatory to donate; but If you appreciate the effort, see value or benefits from using my kernel on your device and can afford to; Use the "Donate to me" button or the below link... It makes a big difference. thanks!
https://www.paypal.me/jrdnjhnstn
Why TWRP Installations are NOT supported:
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
(and why I'm not using it!)
Most custom/android kernel devs are using the above configuration in kernel compilation, which is arguably very BAD... I understand that boot partitions are small and the desire to install TWRP to them, thus there is a need to reduce the kernel's size....and yes, this will achieve that - However;
1. SUSE, RedHat, etc (Enterprise linux) disable CONFIG_CC_OPTIMIZE_FOR_SIZE -> it's original use case has proven to be invalid. Even Google (in their own documentation) advise against using this; https://source.android.com/devices/tech/perf/boot-times ....
2. It suppresses useful compiler warnings....
3. As SOCs have become more powerful, google has come to the same conclusion that Enterprise Linux did back in 2012.
4. by turning off CONFIG_CC_OPTIMIZE_FOR_SIZE, we achieve better performance, boot time and better cache utilization.
Clark Williams / Redhat Bugzilla said:
* Cause: CONFIG_CC_OPTIMIZE_FOR_SIZE set with assumption that smaller code would yield hot cache lines and good performance
* Consequence: this config caused gcc to generate jump-to-jump code which causes cache line bouncing, hurting performance
* Fix: turn off CONFIG_CC_OPTIMIZE_FOR_SIZE
* Result:slightly larger kernel but better cache utilization
Click to expand...
Click to collapse
(The Above is quoted from Clark Williams, A Senior Software Architect @ RedHat -> https://bugzilla.redhat.com/show_bug.cgi?id=796297)
I know of no other way to significantly reduce kernel size. Disabling some debugging, unneeded features, etc helps - but not enough.... I am focusing on optimization, using newer builds of GCC/Linaro, performance enhancements, fixing compilation errors, etc, etc -> these things are more important than trying to support TWRP installation. Therefore; I do NOT support installing TWRP....
I like it so far, very good kernel.
Awesome! Always nice to have choices
I've seen you post around that you made x change to your own kernel, glad you finally made it public!
Does it have all of franco's wakelocks blocked by default?
グリッチ said:
Awesome! Always nice to have choices
I've seen you post around that you made x change to your own kernel, glad you finally made it public!
Does it have all of franco's wakelocks blocked by default?
Click to expand...
Click to collapse
hey, it includes franco's wakelocks stuff. I don't think all are blocked, I actually don't touch them in my init rc. ... but some are blocked by default, for sure. can be set by user...
yeah, I've got my kernel to a point now, where it is somewhat unique && is drawing in most of the best features from every custom kernel for the pixel (my opinion). very stable too, thus far. so makes sense to make it public.
it's got the RCU (read copy update) infrastructure from linux-4.9... a ton of core, sched, Walt, etc from linux-4.4+ (specifically, from EAS-Project / msm8998 OP5 - which was painful to backport. wish we didn't have a 3.18 kernel. lol) afaik, it's the only Marlin kernel with Dynamic Stune Boost and aside from CopperheadOS; the only marlin kernel with a subset of the PAX/grsec kernel security enhancements and the Mac randomization... also has all of the audio enhancements from the kernel ur running ?
siheals said:
I like it so far, very good kernel.
Click to expand...
Click to collapse
Hey! thanks for testing it out. let me know how things go, your impressions, etc.
I'll be updating this kernel constantly, so if u end up liking it; you can expect that it will always include security patches, linux LTS incremental patches, etc...
it's my daily driver, so i keep on top of it.
Superb! Thanks for clarifying.
I will give it a run when November update releases cuz I'm lazy >.< but am excited and looking forward to it ^_^
グリッチ said:
Superb! Thanks for clarifying.
I will give it a run when November update releases cuz I'm lazy >.< but am excited and looking forward to it ^_^
Click to expand...
Click to collapse
no probz. As soon as the november updates arrive, i will be adding whatever patches are needed... so expect that to be there...
i also pull from Code Aurora msm-3.18 for 8996, so my kernel gets updates to drivers, core, etc that google hasn't picked up yet.
Just Testing 3.18.79 + latest Code Aurura updates for today ....AND;
re-enabling a hardening feature that I thought was draining battery life (Likely not, was probably another removed patch - that isn't in the current release.)
I'll update the link later on and - on my github; where I link to for downloads; there will be older releases labeled - ie:
exNoShadez_eas.zip (current release / link) will become -> exNoShadez_eas_3.18.78_oct.zip,
when it is replaced by 3.18.79 + other updates / patchwork.... The current release will always be -> exNoShadez_eas.zip
UPDATE:
While I haven't updated exNoShadez_eas.zip link/version, * I have posted a zip with the above changes - I'll be testing it for a while before updating the link because it's hard to gauge battery life without a lot of testing / time spent.... So I would say, if anyone is eager - they can test it, but wait at least 12-24hours from testing the current available release - so you can actually make some sort of real-usage comparision.
link: https://github.com/nine7nine/Apps/raw/master/exNoShadez_eas_3.18.79_harden.zip
Glad to see you have posted this man. Setting up a pixel for my friend and as i was browsing the forums noticed you have a lot of good kernel work. Was literally about to PM you a few days ago for your kernel and then happened to see this post today. Can't wait to try it out!
Warrimonk said:
Glad to see you have posted this man. Setting up a pixel for my friend and as i was browsing the forums noticed you have a lot of good kernel work. Was literally about to PM you a few days ago for your kernel and then happened to see this post today. Can't wait to try it out!
Click to expand...
Click to collapse
All good, man.
It only makes sense that I would share my kernel, when I felt it was ready for that - just keep in mind, that for now - I have marked it as Beta / Testing, as it's pretty new (although, aside from the EAS code / Dynamic Stune Boost - the rest has been thoroughly vetted)....
So yeah, give it a run, let me know how things go! thanks
Unsure if I am doing something wrong or not, but when I try to flash your kernel I get an error stating : "New Image larger than boot partition. Aborting...."
EX Kernel flashed fine. Using TWRP 3.1.1-1
Warrimonk said:
Unsure if I am doing something wrong or not, but when I try to flash your kernel I get an error stating : "New Image larger than boot partition. Aborting...."
EX Kernel flashed fine. Using TWRP RC1.
Click to expand...
Click to collapse
Why aren't you using the newest stable version of TWRP?
RC1 = release candidate 1
afaik, latest release is 3.1.1-1 stable for the pixel.... https://dl.twrp.me/sailfish/
Using an old version might be your issue. Update, then try.
nine7nine said:
Why aren't you using the newest stable version of TWRP?
RC1 = release candidate 1
afaik, latest release is 3.1.1-1 stable for the pixel.... https://dl.twrp.me/sailfish/
Using an old version might be your issue. Update, then try.
Click to expand...
Click to collapse
Apparently I am using TWRP3.1.1-1 . The thread was called RC1 So I mistakenly assumes that was still the current version.
Warrimonk said:
Apparently I am using TWRP3.1.1-1 . The thread was called RC1 So I mistakenly assumes that was still the current version.
Click to expand...
Click to collapse
Can confirm this, I'm on 3.1.1-1 too and got this issue.
I'm running 8.0.0 (OPR3.170623.008, Oct 2017) build.
Keasby said:
Can confirm this, I'm on 3.1.1-1 too and got this issue.
I'm running 8.0.0 (OPR3.170623.008, Oct 2017) build.
Click to expand...
Click to collapse
kk. I'll look into this - I (obviously) do not have this problem..... What firmware images do you use?
I'm on Rogers/Canada, maybe the boot partition is a different size on some firmwares (?)....
I can also look at shrinking the boot.img, which could fix it. My boot.img is slightly bigger than the shipped boot.img and I do have an idea on how to shrink it a bit, you'll have to wait until later on for me to look at it though / not home right now.
nine7nine said:
kk. I'll look into this - I (obviously) do not have this problem..... What firmware images do you use?
I'm on Rogers/Canada, maybe the boot partition is a different size on some firmwares (?)....
I can also look at shrinking the boot.img, which could fix it. My boot.img is slightly bigger than the shipped boot.img and I do have an idea on how to shrink it a bit, you'll have to wait until later on for me to look at it though / not home right now.
Click to expand...
Click to collapse
32MB is the boot image max size AFAIK.
nine7nine said:
kk. I'll look into this - I (obviously) do not have this problem..... What firmware images do you use?
I'm on Rogers/Canada, maybe the boot partition is a different size on some firmwares (?)....
I can also look at shrinking the boot.img, which could fix it. My boot.img is slightly bigger than the shipped boot.img and I do have an idea on how to shrink it a bit, you'll have to wait until later on for me to look at it though / not home right now.
Click to expand...
Click to collapse
Maybe it's caused by the image size. Other custom Kernels are sized bout 13mb.
I'm running the Google Stock Build OPR3.170623.008, October 2017.
Hope you can fix it - TIA!
nine7nine said:
kk. I'll look into this - I (obviously) do not have this problem..... What firmware images do you use?
I'm on Rogers/Canada, maybe the boot partition is a different size on some firmwares (?)....
I can also look at shrinking the boot.img, which could fix it. My boot.img is slightly bigger than the shipped boot.img and I do have an idea on how to shrink it a bit, you'll have to wait until later on for me to look at it though / not home right now.
Click to expand...
Click to collapse
Personally I tried on these 2 firmwares:
sailfish-ota-opr3.170623.008
sailfish-ota-opr6.170623.012
The phone was originally a Project Fi device.. if that matters. Dev which firmware and TWRP are you using?
Warrimonk said:
Personally I tried on these 2 firmwares:
sailfish-ota->>>>opr3.170623.008<<<<<
sailfish-ota-opr6.170623.012
The phone was originally a Project Fi device.. if that matters. Dev which firmware and TWRP are you using?
Click to expand...
Click to collapse
I'm using the latest twrp-3.1.1-1 (but and idk if this makes a difference or not), I only use the twrp fastboot img (Ihave ZERO reason to actually install TWRP on my system).... and also, Others have installed and are using my kernel - so it must be a difference in firmwares / boot partition size (or image size)
Keasby said:
Maybe it's caused by the image size. Other custom Kernels are sized bout 13mb.
I'm running the Google Stock Build >>>>>OPR3.170623.008<<<<<, October 2017.
Click to expand...
Click to collapse
So yeah, I'm using a different build **OPR1.170623.027**, Oct 2017, Fi/Canada.... you both are having problems on >>>>>OPR3.170623.008<<<<< ~> Something is different in that build... If you like (and happen to have that image kicking around, you could send me the boot.img and I'll compare it to mine? later on)
I'm thinking it's not the kernel size, although - I do plan on making the kernel smaller on production builds, by reducing a lot of debugging that really isn't needed on a production build (I already have a defconfig for doing so);

Categories

Resources