Acer Chromebook CB5-311 mainline

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

Re: Acer Chromebook CB5-311 mainline

Postby haagch » Sat Dec 22, 2018 12:31 am

$this->bbcode_second_pass_quote('mrala', 'h')ttps://github.com/RaumZeit/LinuxOnAcerCB5-311
Isn't this installing the 3.10 ChromeOS kernel ?

At least a very old one. This script is installing the proprietary nvidia driver for arm and that is only available for pretty old X.org and kernel versions.

$this->bbcode_second_pass_quote('mrala', 'I')f something that used to work is broken in later kernel it is regression why you don't report it here:
http://lists.infradead.org/mailman/list ... arm-kernel ?
Or comment on the two patches ?

At least some upstream developers are aware already. Of course you can post a message to the list, maybe something comes of it?

In related news, I heard some people here at Collabora have hooked up a nyan-big chromebook for automated testing: https://www.collabora.com/news-and-blog ... -kernelci/
and I heard the hardware does even allow to report if the display turned on so it can be automatically tested. Maybe I should ask if they know something by now.

$this->bbcode_second_pass_quote('mrala', 'I')f such patch is merged - what is stoping ArchLinuxArm from (officialy) supporting this device ?

A while ago the unmodified mainline linux kernel from the archlinux arm repositories actually worked pretty well, the current trouble is a regression.
So nothing is really stopping Archlinux ARM from officially supporting it. Just someone from the project needs to go through the effort of setting it up (creating an image, testing, ...)

$this->bbcode_second_pass_quote('mrala', 'S')orry for the dumb question but what are the files listed here:
https://github.com/reey/PKGBUILDs/releases/
And how are they used to make a working system ?

linux-nyan-rc-4.20.rc7-1-armv7h.pkg.tar.xz
linux-nyan-rc-chromebook-4.20.rc7-1-armv7h.pkg.tar.xz
are two packages that contain the kernel and a specially packed kernel image for chromebooks and reey presumably applied the patch before building them.

You just download them and install them with
sudo pacman -U linux-nyan-rc-4.20.rc7-1-armv7h.pkg.tar.xz linux-nyan-rc-chromebook-4.20.rc7-1-armv7h.pkg.tar.xz
or even modify the install script to install these packages instead of the old kernel for the nvidia driver.

The catch is that the current kernel troubles make it hard to install them just so.

Fortunately there are still a few ways around it: For example from a chromeos debug root shell you can chroot into the arch installation and run pacman -U, probably it's necessary to first mount some directories into the arch system, something like
mount -o bind /sys /mnt/arch/sys
mount -o bind /proc /mnt/arch/proc
mount -o bind /dev /mnt/arch/dev

After installing the kernel image and after every update, the specially packed kernel image needs to be flashed to the boot partition, afaik the chromebook bootloader directly loads this linux kernel, that's why there is no boot menu or anything.
Also important to note: When installing the arch package it will run a script that asks to install the bootloader thingy, but it will most likely show the wrong partition for it, so you probably should reply no and do it manually (/boot/vmlinux.kpart is installed by the linux-chromebook package. It's part of the kernel build but it is put into a separate package because not every device needs it):
dd if=/boot/vmlinux.kpart of=/dev/mmcblk0p6
^ since I resized my internal storage, the script added a kernel partition 6 and a data partition 7, so I need to flash to mmclb0p6.
haagch
 
Posts: 60
Joined: Thu Apr 02, 2015 5:36 pm
Top

Re: Acer Chromebook CB5-311 mainline

Postby reey » Sat Dec 22, 2018 2:09 pm

@mrala you can try this script: https://github.com/reey/LinuxOnAcerCB5- ... chlinux.sh
you can run it on your chromebook by executing: sudo bash archlinux.sh /dev/xxx
Replace xxx with the device you would like to install to.
For an SD card xxx should be mmcblk1

It will install linux-nyan Kernel 4.19.10 from my github.
After installation you should be able to boot by pressing [CTRL] + [U]
reey
 
Posts: 75
Joined: Mon Oct 23, 2017 4:01 pm

Re: Acer Chromebook CB5-311 mainline

Postby mrala » Sat Dec 29, 2018 2:47 pm

@all Thank you so much.
Here it is:
https://kernelci.org/boot/tegra124-nyan-big/

I'm not developer. But I'll try to post on the mailing list:
Which kernels have display working and which not? (4.15 and 4.18)
Which karnels have 2GB and which 4GB?

https://github.com/reey/PKGBUILDs/releases/tag/v4.19.9
Is this a typo here: 4GB vs 2GB ?

https://github.com/reey/LinuxOnAcerCB5- ... chlinux.sh
400 LoC is better than 2000+ LoC :)
Can it be run on x86 box just to prepare the UBS stick/SD card ?

Can it use 4.18 instead of 4.19 to have 4GB (it's not that important) ?

So (pacman) update will always break the system? (until support is properly settled).
I mean can it be used daily and install packages?

Again Thank you so much.I appriciate a lot. You are awesome
mrala
 
Posts: 26
Joined: Thu Feb 16, 2017 7:30 pm

Re: Acer Chromebook CB5-311 mainline

Postby reey » Sat Dec 29, 2018 3:33 pm

@mrala
Kernel 4.15 was working fine, both LPAE and Display..
The display problem was caused by: https://github.com/torvalds/linux/commi ... 80bdd24315
which was merged in 4.16..
The problems with LPAE came with 4.19..

It was a typo, I meant 2GB..

basically my script does not include the audio stuff, which causes all these lines..

As far as I know, you can't run this on x86 because you can't chroot and execute binarys compiled for another platform, but maybe I'm wrong..

You just need to change the download links in my script and the filenames to install with pacman.

If you use the linux-nyan packages, these will not be replaced by pacman on an update..
But since my older releases are all based on the linux-armv7 package, these will be replaced with a pacman update..
Maybe I will compile a new 4.18 linux-nyan package..
But you should also be able to configure pacman, that it will not update the kernel packages..
reey
 
Posts: 75
Joined: Mon Oct 23, 2017 4:01 pm

Re: Acer Chromebook CB5-311 mainline / Using U-Boot

Postby vman » Mon Dec 31, 2018 2:05 pm

Recently I found this piece about using the u-boot bootloader on our CB5-311:

https://wiki.netbsd.org/ports/evbarm/tegra-chromebook/

There is also talk about the LPAE. I'd think that using U-Boot one might not even need LPAE in the kernel, as is the case with my cubox-i server. That one also is a 32bit ARM processor and also has 4 GByte of RAM, but no LPAE. I noticed that 4 GByte were only usable with the right version of U-Boot.

I gave U-Boot (from git/master) a try today: I compiled it (on the Chromebook running Arch, so no need to cross-compile), and wrote it to a boot partition, as described in U-Boots README.chromium. Unfortunately I only got a blank screen - with the backlight on, though! ;-)

Since in my first attempt I had used a different partition layout, with another kernel partition after the first kernel, instead of a boot partition, I tried once again, creating the SD card's layout exactly as suggested in the README.chromium. I did the partitioning and copying on an AMD64 notebook, though, because the SD card slot is occupied on my arch chromebook. This time the U-Boot would not even turn the screen blank: I'm only getting a beep sound when pressing ctrl+u to boot from the SD card.

Anyway U-Boot could make updating the kernel easier. But looking at the U-Boot documentation it seems obvious to me that this is not a simple thing to understand. Maybe someone else has time and energy to continue along this road? To me using U-Boot, which should be able to read different file systems, seems like an improvement of the kernel update process, compared to writing more or less customized kernels directly to partitions.

Happy new year everyone!
vman
 
Posts: 63
Joined: Sat Oct 15, 2016 6:00 pm

Re: Acer Chromebook CB5-311 mainline

Postby reey » Tue Jan 01, 2019 8:24 pm

@vman

I've been able to compile and bootup u-boot.
you need to edit the doc/chromium/nyan-big.its file before compiling:
I've added 4 spaces to the description string.
It now looks like this: description = "U-Boot mainline "; <-- four spaces after mainline

I've then followed the instructions from README.chromium

If you execute 'hexdump -C u-boot-chromium.fit |head -20' after compiling you should get the results mentioned under 'Notes' in the README. If not, you might need to add more/less spaces..

I can provide my u-boot.kpart, that only needs to be written to a disk, if needed..

But I don't know what to do next..
Maybe you could point me to the next step after a successfull boot of u-boot
reey
 
Posts: 75
Joined: Mon Oct 23, 2017 4:01 pm

Re: Acer Chromebook CB5-311 mainline

Postby vman » Wed Jan 02, 2019 10:22 am

@reey

Wow, with your hint I could indeed boot into U-Boot:

u-boot_cb5-311.jpg
screenshot
u-boot_cb5-311.jpg (73.89 KiB) Viewed 4560 times


But at that stage U-Boot does not accept any input. I tried pressing ctrl+c immediately after ctrl+u, as suggested in some wiki on U-Boot, but that did not help either.

Most sources on U-Boot are so very low-level... too low-level for me, I'm afraid. Yes, more knowledge in that field could be useful, since I'm already running three, soon four computers with U-Boot support... but most cases, like with the RaspberryPi2, I'm just using defaults, and not looking much at how to configure the boot loader.

Maybe U-Boot itself has to be configured differently? Apparently it can (for some targets) read configuration files (extlinux.conf or uEnv.txt). It would be nice of more info on our Chromebook was available in some Wiki, maybe the the Embedded Linux Wiki... I'm giving up for now.
vman
 
Posts: 63
Joined: Sat Oct 15, 2016 6:00 pm

Re: Acer Chromebook CB5-311 mainline

Postby reey » Wed Jan 02, 2019 2:05 pm

@vman

I think that the internal keyboard is not working in u-boot..
Maybe uboot accepts input from an external USB keyboard or via serial..
I will check that, if I'm back home..
At least the screenshot I took doesn't look like it is waiting for a key to be pressed when booting..
IMG_20190102_115901.jpg
IMG_20190102_115901.jpg (200.91 KiB) Viewed 4277 times


I didn't press any button for that output, it must have come from somewhere else, like serial..

In the defconfig file it looks like the internal keyboard is activated: 'CONFIG_CROS_EC_KEYB=y'
Maybe we need to disable 'CONFIG_DEBUG_UART=y' and/or activate 'CONFIG_USB_KEYBOARD=y'

But since i'm not used to uboot, I don't think I'm able to solve this..

Edit:
I've connected an usb keyboard which is working fine :)
So we will need to get the internal keyboard working somehow..
What can we do now with uboot?
I've enabled CONFIG_USB_KEYBOARD=y for this.. I'm not sure if this is needed..
IMG_20190102_160354.jpg
IMG_20190102_160354.jpg (81.7 KiB) Viewed 4274 times
reey
 
Posts: 75
Joined: Mon Oct 23, 2017 4:01 pm

Re: Acer Chromebook CB5-311 mainline

Postby reey » Thu Jan 03, 2019 1:27 pm

It seems like there is some sort of a bug in uboot..
I've got the internal keyboard working with uboot, there is no need to change anything in the uboot config..
The internal keyboard is only recognized, when "cold" booting..
I tested that, when executing "crosec reboot cold" in uboot from an external keyboard, when reentering uboot, the internal keyboard was working..
To make sure that you are cold booting, you need to press refresh/reload and the power button.
This will force a reboot and the internal keyboard is working in uboot..
I'm not sure if some changes in uboot would enable the internal keyboard without a cold boot..
I might create an issue for that..

IMG_20190103_141850.jpg
IMG_20190103_141850.jpg (187.48 KiB) Viewed 4264 times
reey
 
Posts: 75
Joined: Mon Oct 23, 2017 4:01 pm

Re: Acer Chromebook CB5-311 mainline / U-Boot

Postby vman » Thu Jan 03, 2019 2:14 pm

Hey reey, that's quite some progress you've made there!

But on the other hand it looks like there might still be some work ahead...

I just tried an external keyboard in U-Boot, but it does not do anything for me. You said you enabled CONFIG_USB_KEYBOARD - that's probably what makes the difference. Actually I can't even use my external keyboard to press ctrl+u in the white first screen when starting the Chromebook. Does that work for you? Did you then quickly change keyboards to halt autoboot, or is it just not booting, and giving you the prompt?

Now I tried CONFIG_USB_KEYBOARD=y in nyan-big_defconfig, and it increased the size of u-boot.bin by 2 kbyte... but again I just got a blank screen when trying to boot into this. The hexdump check still seem ok, though. Maybe I should have used a clean build directory?

I'd like to try out/ help more, but for the next week or so I probably should be doing something else with the computer time I have...

Please do create a U-Boot issue for the keyboard problem!
vman
 
Posts: 63
Joined: Sat Oct 15, 2016 6:00 pm

PreviousNext

Return to nVidia

Who is online

Users browsing this forum: No registered users and 5 guests