<Eben>
I've got an Asus c100p chromebook flip. I've been trying to build a kernel for gentoo linux on it. Unfortunately I know very little about the hardware and how the boot process works, lilo and grub isn't an option so I'm a little out of my depth...
<Eben>
I've figured out that it's a rockchip SoC, apparenlty it's a veyron-minnie.
<Eben>
What boatloader do I use and how do I install the kernel for it?
<Eben>
if I can figure out how the boatloader -> kernel -> init works everything else should be simple in theory...
<vagrantc>
it's probably either u-boot or depthcharge for a bootloader
<Eben>
how do I figure out which one?
jkstrick has joined #linux-rockchip
<vagrantc>
you *might* be able to determine some information from the partition table ...
* vagrantc
has an asus C201 which might be a bit similar
jkstrick_ has quit [Ping timeout: 248 seconds]
<Eben>
looking at the parition table in fdisk, not much there....
<Eben>
I believe the c201 is a veyron-speedy, this is a veyron-minnie - I'm not sure how that affects things....
afaerber has quit [Quit: Ex-Chat]
<Eben>
I've been a mac user for too long, this hardware thing has moved on a lot since I last needed to know....
<vagrantc>
it does, but they're similar platforms
<vagrantc>
well, time to dive back in, apparently! :)
<Eben>
I've been reverse engineering a fair amount in the last 3 days, but there has to be an easier way....
<Eben>
I figured someone has done it, given that arch linux runs on it....
<vagrantc>
it dumps the kernel+initrd+dtb onto a partition that gets some flags set on the partition and depthcharge boots it
<vagrantc>
if i had more confidence in un-bricking the thing, i'd try to port u-boot to it.
<Eben>
seems like a differnt approach on the c201....
<Eben>
ugh, it seems like the only way to do this would be the hard way....
<Eben>
I might try booting the arch install with the guts ripped out and gentoo in it's place....
<Eben>
that will at least tell me if I can boot gentoo with the kernel that arch builds
<Eben>
if that works I'll build the kernel by hand on the gentoo install....
<vagrantc>
eben: actually, it looks like it's using "vbutil_kernel", which suggests to me it's also depthcharge based
<Eben>
ok that's a hint in the right direction
<Eben>
so depthcharge is the bootloader on it then?
<vagrantc>
possibly
<vagrantc>
unless the "vbutil_kernel" code is un-used ... or maybe it's just creating a FIT image that u-boot is loading ...
<vagrantc>
for what it's worth, depthcharge is kind of annoying
<vagrantc>
not very versatile or easy to debug
<Eben>
so the output from that vbutil_kernel gets dd'd to the first parition
<Eben>
I'm litterally in the dark, when I try to boot my concoction I get a blank screen, last night I managed to at least get a beep
<Eben>
other than that I get no feedback, it's very frustrating
<wltjr>
eben: you do not need a gentoo specific kernel to run gentoo, you can run under any kernel, just need things like devfs, and call the right init and stuff, right kernel options
<Eben>
wltjr: that much I know, I'm just trying to figure out how to actually get a kernel that works with it. documentation seems scattered all over the place and it's not very clear what this little machine does on booting....
<Eben>
of course I could just be too stupid to figure this out....
<wltjr>
eben: chromium being based on gentoo I would assume you can keep most the boot process and just replace the system
<mmind00>
eben: I didn't read the whole backlog, so just some comments as starting point: bootloader is always coreboot+depthcharge on chromebooks; handling actually is the same on all veyron-devices, so a image creation-process on vagrantc 's speedy should also just work on minnie
<wltjr>
eben: been around gentoo for a very long time, chromium not so much but have looked at some of the docs
<vagrantc>
eben: it's not just you, it's almost certainly a convoluted, poorly documented process :/
* vagrantc
waves to mmind00
<vagrantc>
mmind00: did you get my v2 patches with the signed-off bits? :)
* mmind00
waves back :-)
<mmind00>
vagrantc: yep ... will pick that up shortly
<Eben>
ok just reading the libreboot docs with regards to depth charge it makes sense, I do the ctrl d or u thing to boot it
* vagrantc
cheers
<vagrantc>
there's mainline u-boot support for veyron-jerry, fwiw
<vagrantc>
eben: yeah, the whole "boots with nothing but a blank screen" and "beeps" is about the only feedback i got
<mmind00>
eben: nowadays that also works with a mainline kernel and multi_v7_defconfig
<mmind00>
vagrantc: while true, replacing the bootloader on a chromebook is most likely pretty out of scope for a beginner :-)
jkstrick has quit [Remote host closed the connection]
<vagrantc>
mmind00: agreed. :)
<Eben>
mmind00: the irony is that I used LFS for over a year back in the early 2000's, I used gentoo back then too in anger. I'd hardly call myself a beginner with linux. But this has me chasing my tail....
<Eben>
heck I've been using Kali linux for PEN testing for the last couple of years....
<vagrantc>
kali linux has some supported arm boards...
<Eben>
normally I can just fix things and figure it out, this is a very opague...
<mmind00>
eben: the "beginner" was meant more as taking first steps with custom operating-systems on chromebooks :-)
<Eben>
ok so the basic steps from what I can gather is this. Build a kernel, modules, device tree (this is new to me), make an image using mkimage, then use vbutil_kernel to create a magic kernel partition and the dd that to the first partition?
<vagrantc>
without a serial console on these things, debugging is rather difficult (presuming depthcharge would even output to serial)
<vagrantc>
there is that awesome usb port as a serial console hack once you have linux booted with the right options compiled in...
<mmind00>
eben: correct ... and of course unlock developer mode as well as "usb boot" which also handles booting from sd-partitions
<Eben>
what I'm not clear on is how do I tell the kernel where init lives and how to mount fstab....
<Eben>
mmind00: I can boot arch linux just fine, so I'm guessing I got developer mode unlocked successfully...
<vagrantc>
you can pass commandline options through the vbutil_kernel
dlezcano has quit [Ping timeout: 260 seconds]
<vagrantc>
the --config option, if i remember correctly
<mmind00>
eben: as vagrantc said, look for the --config option of vbutil_kernel ... further down in my g+ post
<Eben>
it doesn't seem like it would be very easy to recover from a broken kernel build on this system....
<Eben>
ok it's starting to make sense now.
dlezcano has joined #linux-rockchip
<Eben>
looking at the vbutil_kernel command and working my way backwards, how do I create or find the correct keyblock and private key?
<vagrantc>
the default partition scheme has multiple kernels, and *somehow* it detects a failed boot and falls back to the last working kernel ... but i have not been able to trigger that from debian at all
<Eben>
I think the cmd-line passed to the kernel should be easy to figure out once I look at a few examples
<Eben>
vagrantc: that sounds like witchery to me....
<mmind00>
eben: I did link to a g+ post above ... that contains nearly all of that :-)
<mmind00>
eben: aka when installing vbutils packages, you should also get dev-keys from that
<Eben>
ok sweet I can see those in my chroot environment
<vagrantc>
eben: remember, you're talking about chromeOS here. :)
* vagrantc
thinks it's hard on the witches to compare
<Eben>
there's no such that as magically works in computers, there's always something that's doing the job....
<Eben>
ok so looking at my mainline kernel and trying to build a default config....
<Eben>
there's nothing in arch/arm/configs for veyron....
<Eben>
does that mean that I need difference kernel sources?
<mmind00>
eben: nope ... just that nowadays a generic kernel image is expected ... so multi_v7_defconfig would be right choice
<Eben>
I need to fiddle any other configs or can I just build it like that?
nighty has quit [Quit: Disappears in a puff of smoke]
dlezcano has quit [Ping timeout: 260 seconds]
erc has quit []
erc has joined #linux-rockchip
<Eben>
mmind00: build the dtb... will a make dtbs be suffient? which dtb should I grab?
<Eben>
I'm assuming that something generic would do the trick again?
<mmind00>
eben: yep, that should build all dtbs ... for your chromebook flip, you'll want the rk3288-veyron-minnie.dtb
<Eben>
bugger the mainline kernel didn't spit that out....
<Eben>
could I just copy the dts file from the chromeos version and build that with this kernel?
<mmind00>
eben: not sure what you did, but it should definitly have built the minnie dtb via "make ARCH=arm dtbs"
<mmind00>
and it should sit in arch/arm/boot/dts/ waiting for your
<mmind00>
-r
<Eben>
let me try that again....
<Eben>
The kernel is 4.1.15.... is that maybe too old?
<mmind00>
eben: that is waaaaay to old :-)
<mmind00>
4.8 was released nearly 2 weeks ago, you want to try that one
<nasuga>
I just figured out how to prepare the zImage, I just need to verify my findings
<Eben>
nasuga: that was easy to get running, I feel like once I've got this up and running I'll have to do another clean run through of it and document it...
<Eben>
I'm just downloading the 4.8.1 kernel now
<Eben>
nasuga: there's a PKGBUILD for arch that will shed some light onto it....
<nasuga>
My issue was I was calling vbutil_kernel with --vmlinuz pointing to zImage, I need to point it to a compiled FIT image (.itb)
<Eben>
but it uses a very old kernel....
<Eben>
ah right
<nasuga>
It uses same kernel version as ChromeOS does, 3.14
<nasuga>
I built 4.8.1 but I'm still getting a debian prepared on a SD card
<Eben>
I've got a good feeling about the newer kernel version....
<Eben>
I do have one hell of a mess on my SD card though....
<Eben>
so once I have a kernel built a clean run through would be in order....
<Eben>
I haven't made such a hash of a linux install since the 90's
<nasuga>
I've never done it till this week ...
<nasuga>
I usually let debian's package manager with Linux-Libre repo do the work
<Eben>
I'm an old school hacker... (well at least I thought I was), I've been using a mac for too many years.... but I'm about to "retire" at the end of the year and go sailing on my wooden boat with hardly any electronics
dr1337 has joined #linux-rockchip
<Eben>
so this will be my little bit of tech to allow me to blog while sailing...
<dr1337>
hey guys, does anyone have any experience comparing between rockchip and allwinner v7a SOCs?
<Eben>
I can easily charge this little chromebook from the very small solar system I have on the boat...
<nasuga>
C100 is a nice portable, easily becoming on of my favourites. It would be my favourite if it wasn't for soldered RAM and Wifi
<Eben>
nashpa: when you're as sick of tech as I am, it doesn't matter...
<Eben>
I'm so burnt out and over technology I feel I have to go live without it....
<Eben>
the only reason I'll be blogging is because my boat has a lot of history and theres a lot of people following what I do in the wooden boat community....
<Eben>
other than that I'm slowly getting rid of technological complications in my life....
<Eben>
I'll be minimising my dependence on electricity too....