Acer Chromebook CB5-311 mainline

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

Re: Acer Chromebook CB5-311 mainline

Postby NoDiskNoFun » Tue Mar 26, 2019 6:15 am

Welcome cbtech,

I havent used uboot on my CB5 yet but on all other Boards i use with uboot extlinux.conf has to be at /boot/extlinux/extlinux.conf.

As for TUN/TAP support you could use my pre-compiled kernel which has also OC and cpufreq-driver enabled, but is 4.20.1
Also i couldnt remember signing my kernel but maybe this is done by Reeys PKGBUILD which i use as base.


@marla
cpufreq-driver was disabled because it causes trouble with sleep (but standby does not work anyway)
NoDiskNoFun
 
Posts: 31
Joined: Fri Sep 16, 2016 2:34 am

Re: Acer Chromebook CB5-311 mainline

Postby reey » Wed Mar 27, 2019 11:39 am

@fedup
I might try the legacy thing in the future again, if I have time, because it would be the simplest way..
Since I'm not able to boot into chromeos after flashing the SPI, I wasn't able to backup the SPI using the chromeos tools, but I will try to flash the backup I made via the external clip with the chromeos flashrom tool, soon.
I'm not sure how the whole write protection thing works..
And I'm also wondering that I'm seeing these two partitions which seem to be the SPI chip?:
$this->bbcode_second_pass_code('', 'mmcblk0boot0: mmc0:0001 HBG4e partition 1 4.00 MiB
mmcblk0boot1: mmc0:0001 HBG4e partition 2 4.00 MiB')

@mrala
As you can see here the fix for the 4GB of memory is going to get into 4.19 soon:
https://lkml.org/lkml/2019/3/22/992
Edit: Seems like this patch already made it to 4.19.31 :)
If you want to use Kernel 5.0 you can apply this series:
https://github.com/reey/PKGBUILDs/blob/ ... ater.patch
This series is also included in 5.1-rc1

The blank screen is fixed with this patch:
https://github.com/reey/PKGBUILDs/blob/ ... rent.patch
This patch also made it to 5.1-rc1
So Kernel 5.1 should be working without any patches on our nyan devices :)
We might only need a custom kernel for activating cpu freq..
At least 5.1-rc1 was working fine for me :)

@cbtech
You need to change the nyan-big_defconfig to have u-boot support the whole 4GB of memory, but yes it works :)
You can flash the u-boot from me to any partition you want, you just need to set some flags, that it will boot from it..
You can replace coreboot + depthcharge that are currently present on the SPI chip with just u-boot.
From u-boot you can then boot into linux without any other bootloader.
But you might also be able to boot into a bootloader like grub from u-boot if you want to.
The PKGBUILD will do the signing for you, see:
https://github.com/reey/PKGBUILDs/blob/ ... BUILD#L272

What exacly are you doing to manually start the boot process?
You might need to tell u-boot on which partition it should look for the extlinux.conf file..
You can specify that by executing:
$this->bbcode_second_pass_code('', 'seteenv distro_bootpart 7')
If you want to save that setting to let u-boot find the extlinux.conf file on each bootup, you need to run:
$this->bbcode_second_pass_code('', 'saveenv')
After that you should be able to boot via the extlinux.conf file by running just "boot" and on the following boots you won't need to do anything to start from the extlinux.conf file.
/extlinux/extlinux.conf is also fine for the extlinux file.
reey
 
Posts: 75
Joined: Mon Oct 23, 2017 4:01 pm

Re: Acer Chromebook CB5-311 mainline

Postby fedup » Fri Mar 29, 2019 11:00 am

@reey
Looking at the copy of the spi I made with chromeos flashrom the size is 4MB. Neither /dev/mmcblk0boot0 or /dev/mmcblk0boot1 are the same. Also the legacy boot size is 1mb so not sure where that is stored but its an area not protected by the write protection. Not sure what the partitions are but it looks they are often/normally used to store u-boot. Perhaps in the chromebook setup these partiotions are where depthcharge is stored with coreboot on the spi. After dd the partions to a file I did an m5dsum on the files.
$this->bbcode_second_pass_code('', '
b5cfa9d6c8febd618f91ac2843d50a1c copy_mmcblk0boot0.img
93e458d2c4fb6c697f15af463e10f1dc copy_mmcblk0boot1.img
')
Looking at the output fdisk -l /dev/mmcblk0 there is an unknown partition listed as /dev/mmcblk0p11. It's at the start of the disk and is 8MB so which would be the same as these 2 partitions.
I'm not sure if it's worth looking at legacy mode as I think the coreboot would need to be upgraded to get a u-boot payload. Having said that coreboot could use grub2 as a payload but I'm not sure if this works on arm. Also a small linux kernel could be another payload options as it could then run a setup script. Could enterrcm be be run on a small initramfs? The kernel would have to fit on 1MB. Probably too much effort needed.

Just wondering if it's possible to use a dtoverlay to get around the problem with cpufreq and also any others bugs caused to changes to the dtsi.

On fedora as is the case on arch the newer version of mesa is not working and I've reverted to 18.2.2. Hopefully this is going to be fixed so it works with nouveau.
fedup
 
Posts: 32
Joined: Mon Jan 07, 2019 2:02 pm

Re: Acer Chromebook CB5-311 mainline

Postby cbtech » Fri Mar 29, 2019 6:50 pm

@reey

thanks for your suggestions. I already changed the environment with
seteenv distro_bootpart 7 followed by saveenv. I am used to u-boot since Buffalo NAS systems...

To test your u-boot version, I dumped it to /dev/mmcblk0p6 as this is the boot partition since "raumzeits" installscript.
I was wondering that there are no virtual consoles when booting your kernel 4.20.2.

I tested to compile u-boot but it was not successfull (gcc version conflict on debian stretch...)

@all: were can the board documentation be found? My target is: get rid of chromeos and have the full emmc ready for ARCH linux.

rgds

cbtech
cbtech
 
Posts: 4
Joined: Mon Mar 25, 2019 5:53 pm

Re: Acer Chromebook CB5-311 mainline

Postby vman » Fri Mar 29, 2019 7:19 pm

Hello all, and welcome to the club, @cbtech!

Currently I'm mostly using my CB5-311 at home, because it is my best laptop computer, and I'm sick of sitting at the desk after long office hours. It is still quite a nice device, even after all these years.

Lately I have not been experimenting much with it. It's running up-to-date Arch Linux, and still booting the kernel right from a partition on the SD card. So I can still choose between ChromeOS (Ctrl+D) and Linux (Ctrl+U), when the white debug warning screen appears. But I have not been using ChromeOS in weeks now, since video is actually good enough on arch, and everything else is better there (well, almost).

I'm running Linux 4.20.13-1, from reey's PKGBUILD, with a few configuration modifications (and a modified cmdline, so Linux boots from my root partition, /dev/mmcblk0p7). For me virtual consoles are working.

I've been using the "ondemand" cpu frequency governor for several weeks now, without any problems. Battery life is still fantastic on this device, way better than on my work ThinkPad (which admittedly is a lot more powerful). With my normal usage I only have to recharge about twice a week, so it must still be about five to six hours of battery life.

I'm looking forward to a working solution with U-Boot, so that distribution kernels can be used - please keep us updated, everyone who is making progress!
vman
 
Posts: 63
Joined: Sat Oct 15, 2016 6:00 pm

Re: Acer Chromebook CB5-311 mainline

Postby reey » Sat Mar 30, 2019 12:16 pm

@fedup
Since I repartitioned the internal emmc these two partitions shouldn't be from the internal emmc..
If I run:
$this->bbcode_second_pass_code('', 'sudo hexdump -C /dev/mmcblk0boot1')
It looks like the partition is filed with my u-boot environment..

As far as I understood for legacy booting u-boot we would just need to write the u-boot elf and the dtb to the legacy part of the spi.

Mesa 19.0 is working fine again, maybe newer versions of mesa 18.3 are also working.. :)

@cbtech
what do you mean then by manually booting withing u-boot?
as far as I know there is not documentation for the nyan board..
reey
 
Posts: 75
Joined: Mon Oct 23, 2017 4:01 pm

Re: Acer Chromebook CB5-311 mainline

Postby cbtech » Tue Apr 16, 2019 5:52 am

Hi reey,

when i boot the machine, it does not boot automatically as I would like. I guess i need to change the environment variables to let u-boot load my favourite kernel, lets say after a period of 3 seconds.

By the way:
How far is Kernel 5.x now?
Does it fully initialize the whole CB5-311 Hardware?

Just got the USB Flasher with clip, hope some day we will have u-boot alone to boot the hardware and get rid of the Chromeos stuff.

rgds
cbtech
cbtech
 
Posts: 4
Joined: Mon Mar 25, 2019 5:53 pm

Re: Acer Chromebook CB5-311 mainline

Postby vman » Tue Apr 16, 2019 7:40 am

$this->bbcode_second_pass_quote('', 'H')ow far is Kernel 5.x now?


I just switched from 4.20 to 5.1rc4 a couple of days ago, and I don't notice any difference. :) This is mostly good news, since things were quite good already, and this time I'm running pretty much stock 5.1: the only kernel patch I left in reey's/ my PKGBUILD is enable-CPU-freq. Maybe this would also be obsolete, if taken care of by u-boot?

My main trouble now is the slow WiFi connection (about 2 MBit/sec) with the built-in hardware. I tried using a very small USB-WiFi adapter instead, but either I'm missing the right driver in my kernel, or I'm just having trouble configuring it properly in Arch. Really network connectivity is a topic I don't want to dive in too deep, I'd like it to just work...
vman
 
Posts: 63
Joined: Sat Oct 15, 2016 6:00 pm

Re: Acer Chromebook CB5-311 mainline

Postby cbtech » Thu May 02, 2019 7:22 pm

Hi vman,

any news on the 5.x Kernel?

rgds

cbtech
cbtech
 
Posts: 4
Joined: Mon Mar 25, 2019 5:53 pm

Re: Acer Chromebook CB5-311 mainline

Postby reey » Mon May 06, 2019 7:20 am

@cbtech

what kind of news do you expect?

The released kernel version 5.1 should work fine without any patches.
The only patch you might want to add is the mentioned CPU-freq patch..

So you should be able to use the stock kernel by archlinuxarm after their release of 5.1.
but with the stock kernel of archlinuxarm you only will get 2GB of memory.
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 5 guests