Acer Chromebook CB5-311 mainline

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

Re: Acer Chromebook CB5-311 mainline

Postby reey » Tue Mar 06, 2018 10:10 am

@vman Why don't you just install the linux-armv7-chromebook package?
The charger for example is available there..
only problem is, that you are just able to use 2GB of your RAM

Some great news:
https://www.phoronix.com/scan.php?page= ... -Mesa-2018
reey
 
Posts: 75
Joined: Mon Oct 23, 2017 4:01 pm

Re: Acer Chromebook CB5-311 mainline

Postby vman » Tue Mar 06, 2018 10:47 am

@reey But how do I get the linux-armv7-chromebook to boot? I just tried it, and failed again:

$this->bbcode_second_pass_code('', '
pacman -S linux-armv7-chromebook
warning: linux-armv7-chromebook-4.15.5-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) linux-armv7-chromebook-4.15.5-1

Total Installed Size: 6.77 MiB
Net Upgrade Size: 0.00 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring [##########################################################] 100%
(1/1) checking package integrity [##########################################################] 100%
(1/1) loading package files [##########################################################] 100%
(1/1) checking for file conflicts [##########################################################] 100%
(1/1) checking available disk space [##########################################################] 100%
:: Processing package changes...
(1/1) reinstalling linux-armv7-chromebook [##########################################################] 100%
A new kernel version needs to be flashed onto /dev/mmcblk0p7.
Do you want to do this now? [y|N]
n
You can do this later by running:
# dd if=/boot/vmlinux.kpart of=/dev/mmcblk0p7
')

Of course I'm not flashing my root partition! But putting this vmlinux.kpart on /dev/mmcblk2p2, from where my self-compiled kernel (see extensive last post) boots just fine, did not do much: just a black screen. So how should this be done?

"you are just able to use 2GB or your RAM"... oh, this made me check, and yes, my kernel also just uses two of the four GB... how can that be changed? :o

The Mesa news you posted, reey, are really good news! :-)
vman
 
Posts: 63
Joined: Sat Oct 15, 2016 6:00 pm

Re: Acer Chromebook CB5-311 mainline

Postby reey » Tue Mar 06, 2018 1:31 pm

@vman you could just try a clean install with the edited script from me: https://github.com/reey/LinuxOnAcerCB5- ... chlinux.sh
At the moment your rootfs is on /dev/mmcblk0p7 and your kernel is where?
You could also try the script from above and install it for testing purposes to another sd card

If you will need to activate LPAE in the Kernel config, see my changes here: https://github.com/reey/PKGBUILDs/tree/ ... inux-armv7
If some more people show interest here: viewtopic.php?f=23&t=12591
we might get a LPAE kernel from arch..
reey
 
Posts: 75
Joined: Mon Oct 23, 2017 4:01 pm

Re: Acer Chromebook CB5-311 mainline

Postby vman » Wed Mar 07, 2018 5:35 pm

@reey Thank you for the hint with LPAE - it works! :D

$this->bbcode_second_pass_code('', '
CONFIG_ARM_LPAE:

Say Y if you have an ARMv7 processor supporting the LPAE page table format and you would like to access memory beyond the 4GB limit. The resulting kernel image will not run on processors without the LPA extension.

If unsure, say N.

Prompt: Support for the Large Physical Address Extension
Location:
-> System Type
')

I wonder why this is required for 4 GB, though?

Anyway I can imagine it not being an option for the general ARMv7 option in case it has to run on processors without LPA... like maybe the RaspberryPi (1 GB only)?

I tried building & booting the kernel from your github repo, but I end up with a black screen again, upon boot. I made some modification, though. Before installing the kernel I looked at src/linux-4.15/cmdline:
$this->bbcode_second_pass_code('', '
console=tty0 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd
')

I thought "this cannot work", or where does this root point to? I tried finding an explanation with Google, but no luck. Anyway I put in my root (/dev/mmcblk2p5) in this case, and manually went through the mkimage and vbutil_kernel steps. This should not make much of a difference anyway, though, because at least I see some output on the screen, even if I boot "my" kernel with the wrong root parameter.

EDIT:
Over night I thought about this some more, and now I think I understand the boot pattern of the Chromebooks: with this 'root' parameter they'd always try to boot the partition next to the kernel partition as root. This does not match well with my current partition layout. But I could confirm in a quick check that the linux-armv7-chromebook (without reey's patches) bootet /dev/mmcblk0p7 when dd'ed into /dev/mmcblk0p6. Maybe I just failed to install linux-armv7-4.15.5-1-armv7h.pkg.tar.xz when I tried the reey's linux-armv7-chromebook-4.15.5-1-armv7h.pkg.tar.xz yesterday.

It is fun getting this Chromebook, which is a lot nicer (lighter, longer battery life, no noise, slightly faster, better resolution, and better sound) than my old AMD E-450 ThinkPad, to work better... but I'm afraid it currently is taking up too much time... I'll have to step back a little. Even compiling the "regular" linux-armv7-chromebook through your PKGBUILD took a lot longer then my minimalistic, considering how many unused modules (even for various PCI sound cards and GamePort joysticks) are built there. So I guess I'll have to live with the missing battery indicator, and I'll keep an eye on Mesa 18.1.
vman
 
Posts: 63
Joined: Sat Oct 15, 2016 6:00 pm

Re: Acer Chromebook CB5-311 mainline

Postby reey » Thu Mar 08, 2018 10:36 am

@vman
great to hear that you've got it working now.
So 4.15 LPAE should also work then..

Does someone know the release cycle of mesa?
So when can we expect to see those changes?
reey
 
Posts: 75
Joined: Mon Oct 23, 2017 4:01 pm

Re: Acer Chromebook CB5-311 mainline

Postby haagch » Sat Mar 10, 2018 7:27 pm

Actually mesa builds in only a few minutes, meson really speed up things. I've modified my usual mesa PKGBUILD a bit, it could probably use some work for dependencies and stuff but it works here:
$this->bbcode_second_pass_code('', 'pkgname=mesa-full-tegra
pkgver=r100838.c9b153fea7
_realver=18.0
pkgrel=1
pkgdesc="Full Mesa 3D graphics library with all its components, built from the git master branch. Compiles tegra"
arch=(armv7h)
url="http://mesa3d.org/"
license=('LGPL')
depends=('libdrm' 'dri2proto' 'glproto' 'libxxf86vm' 'libxdamage' 'expat>=2.0.1' 'libxmu' 'talloc' 'llvm' 'wayland' 'libxvmc' 'python2-mako' 'libxcb')
makedepends=('pkgconfig' 'imake' 'xorg-server-devel' 'meson')
provides=("'mesa-git' 'mesa-dri' 'opencl-mesa' mesa-libgl=${_realver}" "libgl=${_realver}" "mesa=${_realver}" 'libglapi' 'libegl' 'libgles' 'libgbm' 'khrplatform-devel')
conflicts=('libgl' 'mesa' 'mesa-full-i915g' 'libglapi' 'libegl' 'libgles' 'khrplatform-devel')
source=("git+https://github.com/mesa3d/mesa.git")
md5sums=('SKIP')

export LANG=en_US.utf8 # meson sometimes doesn't like other locales

prepare() {
cd mesa
meson --prefix="/usr/" \
--libdir="lib" \
-Dbuildtype=release \
-Dplatforms=x11,drm,wayland \
-Ddri-drivers= \
-Dvulkan-drivers= \
-Dgallium-drivers=nouveau,tegra \
-Dgles1=true \
-Dgles2=true \
-Degl=true \
-Dshared-glapi=true \
-Dgallium-extra-hud=false \
-Dgallium-nine=false \
-Dtexture-float=true \
-Dgallium-vdpau=false \
-Dgallium-va=false \
-Dgallium-omx=disabled \
-Dlibunwind=false \
build
}

build() {
msg "Starting make..."
cd mesa
ninja -C build
}

package() {
cd mesa
DESTDIR="${pkgdir}" ninja -C build install

install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions"
rm -f "$pkgdir"/usr/include/vulkan/vk_platform.h
rm -f "$pkgdir"/usr/include/vulkan/vulkan.h
}

pkgver() {
cd mesa
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}')

I've just updated to the latest mainline kernel from the repository and it seems to work.
If people are attempting it: The mainline rc kernels from the repositories haven't booted for me in a long time, for some reason they only start working after they have been released.
Last edited by haagch on Sun Mar 11, 2018 12:35 pm, edited 2 times in total.
haagch
 
Posts: 60
Joined: Thu Apr 02, 2015 5:36 pm

Re: Acer Chromebook CB5-311 mainline

Postby reey » Sun Mar 11, 2018 9:27 am

I'm getting:
meson.build:469:2: ERROR: Native dependency 'xvmc' not found
But I don't know how to resolve that..

I can confirm your observations abot the rc kernels
reey
 
Posts: 75
Joined: Mon Oct 23, 2017 4:01 pm

Re: Acer Chromebook CB5-311 mainline

Postby haagch » Sun Mar 11, 2018 9:33 am

Probably a dependency I forgot to put into the PKGBUILD. I added libxvmc, hopefully that will be all that's needed.

I think that's one of the older video playback acceleration extensions. I don't know if that even works with tegra, probably not so it can probably be disabled with -Dgallium-xvmc=false without any effect.
haagch
 
Posts: 60
Joined: Thu Apr 02, 2015 5:36 pm

Re: Acer Chromebook CB5-311 mainline

Postby reey » Sun Mar 11, 2018 12:34 pm

So I needed to install libxvmc, python2-mako and libxcb.

I'm now compiling
reey
 
Posts: 75
Joined: Mon Oct 23, 2017 4:01 pm

Re: Acer Chromebook CB5-311 mainline

Postby reey » Sun Mar 11, 2018 1:09 pm

Compiling and installation finished, but how can I verify that everything is working as it should?

Edit:
So it looks like it is working, checked with:
glxinfo | grep "direct rendering"
and with glxgears I'm getting 60 FPS

Edit2:
I don't have much experience with all that..
But with the older Mesa version(17...) I'm getting about 120 FPS and more..
So I don't know what this should have helped? :|
Last edited by reey on Sun Mar 11, 2018 1:35 pm, edited 1 time in total.
reey
 
Posts: 75
Joined: Mon Oct 23, 2017 4:01 pm

PreviousNext

Return to nVidia

Who is online

Users browsing this forum: No registered users and 6 guests