Now after a break of almost a year I'm back on using my CB5 for most of my home web activity... and I'm glad to see quite some progress.
Especially Firefox "Quantum" (58) is quite a show!
Once again I started off with
raumzeit's installer script - thank you very much for providing and maintaining this project! (Actually I remember having had some problem using it, which I could resolve by downgrading ChromeOS from Beta or Developer back to Stable - but unfortunately I neither took notes nor reported it before forgetting the details.)
Now things were running well with XFCE, but I also wanted to start KDE, at least occasionally, and that did not work. Anyway I was keen on getting to a 'mainline' kernel, which is what this thread is about.
In retrospect I believe my boot failures last year may have been caused by me not going through all the steps for preparing the kernel for booting the Chromebook. So here is what I figured out, and now tried several times successfully with different Linux 4.15 revisions:
I downloaded the Kernel from kernel.org, no patches or anything.
$this->bbcode_second_pass_code('', 'make tegra_defconfig')
Then I probably did a (found in the
nice manual for a Samsung Chromebook):
$this->bbcode_second_pass_code('', './scripts/config --module CONFIG_MWIFIEX')
Now this kernel compiles relatively fast, on the Chromebook itself, since it is quite minimal (especially with regard to modules). But some important capabilities are still missing, notably the Touchpad *and* USB support. I fiddled around with the configuration and came up with this config:
Then I compiled kernel, modules, and dtbs (!):
$this->bbcode_second_pass_code('', 'make prepare
make modules_prepare
make -j4 bzImage modules dtbs
')
Installing the modules is simple:
$this->bbcode_second_pass_code('', 'make modules_install')
Now the important part, two more steps to get the kernel ready!
$this->bbcode_second_pass_code('', 'mkimage -f nyan-big-fit.cfg nyan-big-kernel
vbutil_kernel --version 1 --arch arm --keyblock kernel.keyblock --signprivate kernel_data_key.vbprivk --vmlinuz nyan-big-kernel --bootloader dummy.txt --pack kernel.kpart --config cmdline')
The nyan-big-fit.cfg has to point to both the Kernel zImage, and to the right dtbs for this kernel. I copied both to the directory arch-arm-boot, which I created in a working directory containing the nyan-big-fit.cfg file itself (and some of the following files).
vbutil_kernel needs the keyblock and signature files (both are either from Arch or from ChromeOS). You also need the empty dummy.txt, and a correct cmdline file! Mine looks like this:
$this->bbcode_second_pass_code('', 'root=/dev/mmcblk0p7 rootwait rw noinitrd')
There are several places describing how to change the boot order with cgpt for a Chromebook. The beforementioned Samsung Chromebook manual is giving quite some detail. I'm booting Linux from SDCard (ctrl+u), and have to flash my kernel with e.g.
dd if=kernel.kpart of=mmcblk2p1. So by booting from internal memory instead (ctrl+d), I can still get ChromeOS (although I'm also considering two alternative 'real' Linux setups instead, one with the NVidia drivers on an old kernel).
The main thing I'm missing now is the battery indicator! Having read
tincman's post I though configuring bq24735-charger, sbs-charger etc would solve it, but it didn't. Can anyone help me on this?
WiFi is a little unstable, when connecting to new networks, but after having picked up my home network it is working well enough for me.
Graphics performance is good for the desktop, after having disabled window trasparency in certain cases. Switching workspaces with a "sliede" animation works really well. I'd like to get more 3D working (DRI), though, and especially video playback support. MPlayer and VLC are complaining there was no XVideo support, xvinfo says "no adaptors present". Does anyone have more success there, and if so how?
I'm not even sure my Arch system is not using part of the Nvidia drivers still, since renaming e.g. /lib/libEGL.so, which apparently belongs to no package, rendered X unusable. But I did install Debian testing on an extra SD card (with debootstrap from Arch), and graphics performance and log information was very similar. This is a snippet from my Xorg.0.log (from "clean" Debian):
$this->bbcode_second_pass_code('', '
[ 15.226] (II) glamor: EGL version 1.4 (DRI2):
[ 15.289] (II) modeset(G0): glamor initialized
[ 15.290] (==) modeset(G0): Using gamma correction (1.0, 1.0, 1.0)
[ 15.290] (==) modeset(G0): DPI set to (96, 96)
[ 15.290] (II) Loading sub module "fb"
[ 15.290] (II) LoadModule: "fb"
[ 15.290] (II) Loading /usr/lib/xorg/modules/libfb.so
[ 15.290] (II) Module fb: vendor="X.Org Foundation"
[ 15.290] compiled for 1.19.6, module version = 1.0.0
[ 15.290] ABI class: X.Org ANSI C Emulation, version 0.4
[ 15.290] (II) UnloadModule: "fbdev"
[ 15.290] (II) Unloading fbdev
[ 15.290] (II) UnloadSubModule: "fbdevhw"
[ 15.290] (II) Unloading fbdevhw
[ 15.290] (==) Depth 24 pixmap format is 32 bpp
[ 15.360] (==) modeset(G0): Backing store enabled
[ 15.360] (==) modeset(G0): Silken mouse enabled
[ 15.365] (II) modeset(G0): RandR 1.2 enabled, ignore the following RandR disabled message.
[ 15.365] (==) modeset(G0): DPMS enabled
[ 15.365] (II) modeset(G0): [DRI2] Setup complete
[ 15.365] (II) modeset(G0): [DRI2] DRI driver: nouveau
[ 15.365] (II) modeset(G0): [DRI2] VDPAU driver: nouveau
[ 15.375] (==) modeset(0): Backing store enabled
[ 15.375] (==) modeset(0): Silken mouse enabled
[ 15.375] (II) modeset(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[ 15.386] (==) modeset(0): DPMS enabled
[ 15.386] (--) RandR disabled
[ 15.394] (II) SELinux: Disabled on system
[ 15.395] (II) AIGLX: Screen 0 is not DRI2 capable
[ 15.395] (EE) AIGLX: reverting to software rendering
')