Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

This forum is for supported devices using an ARMv7 nVidia SoC.

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby mrala » Tue May 02, 2017 2:17 pm

Thanks, congrats! I'm jealous of you. I'm on the chrome kernel:
$this->bbcode_second_pass_code('', '$ uname -a
Linux chromebook 3.10.18-37-ARCH #1 SMP Sun Nov 20 16:29:56 CET 2016 armv7l GNU/Linux ')
I got the laptop with Arch. Do you think it enabling "dev_boot_usb" will work from ChromeOS ? (I don't know how to revert back to it).

Another issue: most of you run the same kernel like me. Did you update your system recently ? And encounter this:
$this->bbcode_second_pass_code('', '# sudo pacman -Syu
:: Synchronizing package databases...
core 217.1 KiB 140K/s 00:02 [####################################################################] 100%
extra 2.3 MiB 462K/s 00:05 [####################################################################] 100%
community 4.1 MiB 556K/s 00:08 [####################################################################] 100%
alarm 113.7 KiB 758K/s 00:00 [####################################################################] 100%
aur 29.3 KiB 1467K/s 00:00 [####################################################################] 100%
archlinuxfr is up to date
:: Starting full system upgrade...
warning: packer: local (20160325-1) is newer than aur (20150808-1)
warning: xf86-input-evdev: ignoring package upgrade (2.9.2-1 => 2.10.5-1)
warning: xf86-input-synaptics: ignoring package upgrade (1.8.2-2 => 1.9.0-1)
warning: xorg-server: ignoring package upgrade (1.17.2-4 => 1.19.3-2)
warning: xorg-server-common: ignoring package upgrade (1.17.2-4 => 1.19.3-2)
resolving dependencies...
looking for conflicting packages...
:: libglvnd and gpu-nvidia-tegra-k1-x11 are in conflict (libgl). Remove gpu-nvidia-tegra-k1-x11? [y/N] ')
What will happen if I press "Y" ? Or how to proceed ?

I wish I move to mainline so much.
mrala
 
Posts: 26
Joined: Thu Feb 16, 2017 7:30 pm

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby haagch » Wed May 03, 2017 12:01 pm

If it already has archlinuxarm on it, then it probably already has the two options set up correctly. And yes, I had to set them from chromeos debug mode.

There is no boot manager where you can boot from other partitions, you always have to set from which partition to boot with cgpt.

First,
$this->bbcode_second_pass_code('', 'sudo cgpt show /dev/mmcblk0')
to see what's there.

The default chromeos setup is something like
$this->bbcode_second_pass_code('', ' 20480 32768 2 Label: "KERN-A"
Type: ChromeOS kernel
UUID: 34689828-F93B-5B4F-AC29-B0E352C683F5
Attr: priority=2 tries=0 successful=1
4476928 4194304 3 Label: "ROOT-A"
Type: ChromeOS rootfs
UUID: 22C14705-496E-2546-B06E-1E73D099A31D
53248 32768 4 Label: "KERN-B"
Type: ChromeOS kernel
UUID: C7CC1DC4-5F41-014D-A37B-2441D3D57D3C
Attr: priority=1 tries=0 successful=0
282624 4194304 5 Label: "ROOT-B"
Type: ChromeOS rootfs
UUID: D50371B5-3A82-2646-9F52-4605BB3EB151')
that's one partition that contains the kernel and one partition that contains the rest of the system.

The script I used to set it up, shrunk partition 5 and added two more for archlinux:
$this->bbcode_second_pass_code('', ' 21168128 32768 6 Label: "KERN-C"
Type: ChromeOS kernel
UUID: AC88214E-BD14-7546-AD04-95A0272045B0
Attr: priority=5 tries=3 successful=0
21200896 39845888 7 Label: "ROOT-C"
Type: ChromeOS rootfs
UUID: B1FCD495-E2DA-294C-AD39-3FBF4D391C22')

So to set up that the next 5 boot attempts will be made from the archlinux kernel partition number 6, I run
$this->bbcode_second_pass_code('', 'sudo cgpt add -i 6 -P 5 -T 5 -S 0 /dev/mmcblk0')
"-S 0" says that it's not set as the default boot partition. After the 5 boots it will boot chromeos again.

If you don't have as many partitions, chromeos may have been removed completely. That should be possible, I think.

Anyway, I can't really recommend recent mainline kernels yet. You only get 2 Gigabyte of RAM, suspend is very unreliable and the wifi is not stable at all, will randomly drop and require a reboot to get it working again.


As for your trouble, libglvnd is nvidia's recent invention that is supposed to enable several libGL implementations to be installable at once. I have no idea if their ARM/tegra driver supports this yet, but probably not. I'm also not sure if anything else on an updated archlinuxarm system depends on glvnd. If you want to experiment, you could probably just
$this->bbcode_second_pass_code('', 'pacman -Syu --ignore libglvnd')
and see what happens.
haagch
 
Posts: 60
Joined: Thu Apr 02, 2015 5:36 pm

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby mrala » Wed May 03, 2017 4:44 pm

3.10 Chromebook Kernel problem:
"Liglvnd" probably doesn't care about the 2 people (me & you) in the world
who are trying to run (mainline) Linux on (this) chromebook instead of ChromesOS.

Arch is currently unusable - every package I install doesn't run due to some library.
There is a few people here with the same setup - I wonder how they do ?
I feel that "pacman -Syu" with OR without "--ignore libglvnd" will break the system.
I will wait for a reply from someone who already did this.

USB/SD boot problem:
Unfortunately dev_boot_usb has not been enabled.
"CTRL + U" at bootscreen:
$this->bbcode_second_pass_code('', 'WARNING: Booting from external media (USB/SD) has not been enabled. Refer to the developer-mode documentation for details.
read-only firmware id: Google_Nyan_Big.5771.44.0
active firmware id: Google_Nyan_Big.5771.63.0')
(crosstytem/vboot-utils in Arch doesn't work properly as you know.)

$this->bbcode_second_pass_code('', '
# sudo cgpt show /dev/mmcblk0
start size part contents
0 1 PMBR (Boot GUID: 651D691A-87F6-1940-B52D-15C1D5C8AF15)
1 1 Pri GPT header
2 32 Pri GPT table
8671232 18788352 1 Label: "STATE"
Type: Linux data
UUID: 0F5C7365-61EE-DB42-AC62-F7F7BD9BED66
20480 32768 2 Label: "KERN-A"
Type: ChromeOS kernel
UUID: BF1CE308-4080-4148-B872-CCC1DBE051EB
Attr: priority=2 tries=0 successful=1
4476928 4194304 3 Label: "ROOT-A"
Type: ChromeOS rootfs
UUID: 7C60FFD7-6002-F04F-BA2E-2FE422691CF2
53248 32768 4 Label: "KERN-B"
Type: ChromeOS kernel
UUID: DADF865D-324E-BC43-A8FC-5F9B891FB129
Attr: priority=1 tries=0 successful=1
282624 4194304 5 Label: "ROOT-B"
Type: ChromeOS rootfs
UUID: 51ABFBF5-8287-BC41-AFCC-AEF13A6D67EF
27459584 32768 6 Label: "KERN-C"
Type: ChromeOS kernel
UUID: 7960D4F9-B201-C84A-8254-FE8DE8E78924
Attr: priority=5 tries=1 successful=1
27492352 33554432 7 Label: "ROOT-C"
Type: ChromeOS rootfs
UUID: E697EEEA-303F-7540-A908-127A46B8AABE
86016 32768 8 Label: "OEM"
Type: Linux data
UUID: B4819B19-96F7-D145-AF27-4C3FA38D8196
16450 1 9 Label: "reserved"
Type: ChromeOS reserved
UUID: 59BB8098-7B60-8242-A1D2-D5F6E59D7F2E
16451 1 10 Label: "reserved"
Type: ChromeOS reserved
UUID: F5F4B8DD-9BA6-A242-9FCA-574ACDB9CC76
64 16384 11 Label: "RWFW"
Type: ChromeOS firmware
UUID: 87151430-6E12-1247-AAAE-7E94F1AE7C4F
249856 32768 12 Label: "EFI-SYSTEM"
Type: EFI System Partition
UUID: 651D691A-87F6-1940-B52D-15C1D5C8AF15
61079519 32 Sec GPT table
61079551 1 Sec GPT header')

Got it A and B are ChromeOS , C is Arch.
"Attr: priority=" Bigger number means higher boot pritority?

So my goal is to boot ChromeOS one time to set dev_boot_usb , but make sure I don't brick it.
Thank you very much for your help.
mrala
 
Posts: 26
Joined: Thu Feb 16, 2017 7:30 pm

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby mrala » Thu May 04, 2017 9:11 pm

Mr. raumzeit you are the author of the great script, which made _every_ installation of Arch on this device.
Much appriciation. Can you tell how to deal with this:
$this->bbcode_second_pass_code('', 'resolving dependencies...
looking for conflicting packages...
:: libglvnd and gpu-nvidia-tegra-k1-x11 are in conflict (libgl). Remove gpu-nvidia-tegra-k1-x11? [y/N] ')

haagch I enabled the boot usb. Can you share where you getting your kernel and rootfs from ?
Wonder when 4.11 will get down to http://archlinuxarm.org/os/.
The filenames don't contain the kernel version :(
mrala
 
Posts: 26
Joined: Thu Feb 16, 2017 7:30 pm

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby mrala » Fri May 05, 2017 4:18 pm

Oh no I failed to boot mainline from usb with this steps:
$this->bbcode_second_pass_code('', 'umount /dev/sda*

fdisk /dev/sda
g
w

cgpt create /dev/sda
cgpt add -i 1 -t kernel -b 8192 -s 32768 -l Kernel -S 1 -T 5 -P 10 /dev/sda

cgpt add -i 2 -t data -b 40960 -s `expr 15633375 - 40960` -l Root /dev/sda

partx -a /dev/sda
mkfs.ext4 /dev/sda2

cd /tmp
wget http://os.archlinuxarm.org/os/ArchLinuxARM-armv7-chromebook-latest.tar.gz
mkdir root
mount /dev/sda2 root
tar -xf ArchLinuxARM-armv7-chromebook-latest.tar.gz -C root

dd if=root/boot/vmlinux.kpart of=/dev/sda1

umount root
sync
')
Notes I do this on x86_64 intel machine And get the fallowing warnings :
$this->bbcode_second_pass_code('', 'partx -a /dev/sda
partx /dev/sda: error adding partitions 1-2

tar -xf ArchLinuxARM-veyron-latest.tar.gz -C root
tar: Ignoring unknown extended header keyword 'SCHILY.fflags'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.security.capability'')
It looks simple 2 partitions are created one gets the kernel the other the rootfs which both come ready in the tarball. I tried an older one 4.9 and the latest one 4.10. And nothing just black screen. Here is how the USB look:
$this->bbcode_second_pass_code('', '$ sudo cgpt show /dev/sda
start size part contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
8192 32768 1 Label: "Kernel"
Type: ChromeOS kernel
UUID: C5EA403E-7545-E24E-937A-6061944EC6F9
Attr: priority=10 tries=5 successful=1
40960 30474207 2 Label: "Root"
Type: Linux data
UUID: D80324B5-42CC-AE4E-AD9D-F69B11B2540D
30515167 32 Sec GPT table
30515199 1 Sec GPT header
')

Please people help me!
mrala
 
Posts: 26
Joined: Thu Feb 16, 2017 7:30 pm

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby raumzeit » Fri May 05, 2017 7:33 pm

$this->bbcode_second_pass_quote('mrala', '.')..
Can you tell how to deal with this:
$this->bbcode_second_pass_code('', 'resolving dependencies...
looking for conflicting packages...
:: libglvnd and gpu-nvidia-tegra-k1-x11 are in conflict (libgl). Remove gpu-nvidia-tegra-k1-x11? [y/N] ')
...

The conflict you see is due to the proprietary nvidia drivers providing libgl, as does libglvnd.
This error is already fixed in my latest nvidia driver packages https://github.com/RaumZeit/PKGBUILDs/tree/master/alarm/gpu-nvidia-tegra-k1.

You simply need to update the nvidia packages, then any system upgrade should proceed as expected. For my installer script, I also host pre-compiled/pre-packaged gpu drivers here http://www.tbi.univie.ac.at/~ronny/alarm/. Simply download and install ALL packages that fit the pattern gpu-nvidia-tegra-k1-*-21.5.0-4-armv7h.pkg.tar.xz from that URL...

Cheers,
RaumZeit
Acer CB5-311, Asus Flip, Tinker Board, Samsung ARM Chromebook, NSA 325, ix4-300d, WandBoard Quad, Raspberry Pi B, BeagleBoard ...and a dead Pandaboard :sad:
raumzeit
 
Posts: 73
Joined: Mon Oct 17, 2011 8:37 pm
Location: Vienna AT

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby mrala » Sat May 06, 2017 12:02 pm

Thank you! Thank you so much!
Install this 5 packages with " pacman -U " ? Does the order matter?
$this->bbcode_second_pass_code('', 'gpu-nvidia-tegra-k1-libcuda-21.5.0-4-armv7h.pkg.tar.xz 19-Mar-2017 15:11 3.5
gpu-nvidia-tegra-k1-nvrm-21.5.0-4-armv7h.pkg.tar.xz 19-Mar-2017 15:11 12M
gpu-nvidia-tegra-k1-openmax-21.5.0-4-armv7h.pkg.tar.xz 19-Mar-2017 15:11 179K
gpu-nvidia-tegra-k1-openmax-codecs-21.5.0-4-armv7h.pkg.tar.xz 19-Mar-2017 15:11 52K
gpu-nvidia-tegra-k1-x11-21.5.0-4-armv7h.pkg.tar.xz 19-Mar-2017 15:11 2.0M ')
I noticed that there is two more dated 2017 ?
$this->bbcode_second_pass_code('', 'linux-nyan-3.10.18-18-armv7h.pkg.tar.xz 20-Jan-2017 21:43 131M
linux-nyan-3.10.18-19-armv7h.pkg.tar.xz 19-Mar-2017 14:43 131M
linux-nyan-3.10.18-20-armv7h.pkg.tar.xz 09-Apr-2017 22:35 131M

linux-nyan-headers-3.10.18-18-armv7h.pkg.tar.xz 20-Jan-2017 21:44 5.6M
linux-nyan-headers-3.10.18-19-armv7h.pkg.tar.xz 19-Mar-2017 14:45 5.8M
linux-nyan-headers-3.10.18-20-armv7h.pkg.tar.xz 09-Apr-2017 22:35 5.8M ')
raumzeit Is there a way to install on USB/SD and boot from there with your script? I will need time to
learn bash and Arch.

haagch can you please share how you did the 4.11 install? I will be so gratefull.

All Can someone more experienced try this, if works or not:
http://archlinuxarm.org/os/ArchLinuxARM-armv7-chromebook-latest.tar.gz

Regards.
mrala
 
Posts: 26
Joined: Thu Feb 16, 2017 7:30 pm

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby haagch » Tue May 09, 2017 1:34 pm

linux-armv7 is the generic armv7 mainline kernel.
linux-armv7-chromebook is the kernel image that is prepared to be flashed to the boot partition. This package only contains the file /boot/vmlinux.kpart.

It offers to flash to mmcblk0p7, but I don't do that because that's not the kernel partition. Instead:
sudo dd if=/boot/vmlinux.kpart of=/dev/mmcblk0p6
haagch
 
Posts: 60
Joined: Thu Apr 02, 2015 5:36 pm

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby mrala » Wed May 10, 2017 10:09 am

That is exactly what I'm doing. I take the linux-armv7-CHROMEBOOK, unpack it on the rootfs partition.
then dd the kernel to the kernel partition.
$this->bbcode_second_pass_code('', 'dd if=/boot/vmlinux.kpart of=/dev/sda1 ')
on a properly partitioned USB stick. But I can debug black screen.
You said that you've got 4.11 running.. can you try booting it from USB ?

I'm OK with booting whatever from USB stick, (yes, 3.10) because then i can try upgrade to the latest with:
$this->bbcode_second_pass_code('', 'pacman -S linux-armv7 linux-armv7-chromebook')
mrala
 
Posts: 26
Joined: Thu Feb 16, 2017 7:30 pm

Re: Mainline Kernel on Tegra K1 (Acer Chromebook 13 CB5-311)

Postby mrala » Mon May 15, 2017 11:19 pm

>Successful USB booting!
Although not Arch , but Kali. Now need to find what it is wrong with Arch.

https://github.com/offensive-security/k ... rm-acer.sh
mrala
 
Posts: 26
Joined: Thu Feb 16, 2017 7:30 pm

Previous

Return to nVidia

Who is online

Users browsing this forum: No registered users and 3 guests