OpenFirmware and Linux v5.0 on XO-1.75

Lubomir Rintel lkundrak at v3.sk
Sun Apr 21 06:02:56 EDT 2019


On Sat, 2019-04-20 at 18:08 +1000, James Cameron wrote:
> On Fri, Apr 19, 2019 at 08:58:15AM +0200, Lubomir Rintel wrote:
> > On Mon, 2019-02-25 at 20:00 +1100, James Cameron wrote:
> > > On Sat, Feb 23, 2019 at 06:06:56PM +0100, Lubomir Rintel wrote:
> > > > On Sat, 2019-02-23 at 10:52 +1100, James Cameron wrote:
> > > > > On Fri, Feb 22, 2019 at 12:14:00PM +0100, Lubomir Rintel wrote:
> > > > > > Also, which config? Mine is basically this:
> > > > > > https://raw.githubusercontent.com/hackerspace/olpc-xo175-linux/lr/olpc-xo175/arch/arm/configs/olpc_xo175_defconfig
> > > > > 
> > > > > The config used by Fedora.
> > > > > 
> > > > > Can we work toward some kind of reproducible build?
> > > > 
> > > > Not sure what you mean here.
> > > 
> > > Sorry.  Configuring and building kernels is for me a rare thing to do,
> > > and whenever I try I'm usually interrupted by something more urgent,
> > > as I've quite a few other things I've got to do.  I'm still a newbie
> > > at it because I can't dedicate the time.  [...]
> > 
> > So, over the last week or so, I spent some effort making this work with
> > the OLPC RPM build tooling. Here's what I came up with:
> > 
> > http://v3.sk/~lkundrak/olpc/green_ears.jpeg
> 
> Thanks, that's fantastic.  I've mostly reproduced your work, and have
> my build of your 5.0 kernel running on an XO-1.75 with an adjusted
> Fedora 18 user space and a fixed root= argument.

(regarding the root= argument, see also the stable mmc names patch
below)

> 
> > The kernel:
> > 
> >   git pull https://github.com/hackerspace/olpc-xo175-linux/ olpc-5.0
> > 
> > Based on vanilla v5.0.8, a few parts taken from olpc-4.8,
> > olpc-3.0-arm, along with my defconfig and a couple of changes to
> > support cross-build on Fedora 30. I've not tested native builds, I
> > didn't dare to run it on the XO.
> 
> Pushed as http://dev.laptop.org/git/olpc-kernel/log/?h=olpc-5.0
> 
> My dmesg;
> http://dev.laptop.org/~quozl/z/1hHiN5.txt
> 
> I used an Ubuntu 18.04 cross-build to make the kernel I'm using at the
> moment, as our production builder is Fedora 18.  I've started to
> iterate on a Fedora 30 builder, but I'm not sure I've got everything I
> need.  Here's the packages I'm adding;
> 
> gcc-arm-linux-gnu binutils-arm-linux-gnu
> rpm-build bison flex m4 make openssl-devel perl

Sounds about right. In general I think it's the *-arm-linux-gnu cross-
toolchain packages + the RPM's BuildRequires.

> > Firmware:
> > 
> >   git pull https://github.com/lkundrak/openfirmware/ lr/olpc-xo175-3
> > 
> > A couple more small fixups here and there since lr/olpc-xo175-2. The
> > most notable fix is for a regression that caused the RTC to be cleared
> > on each boot.
> 
> Pushed as
> https://github.com/quozl/openfirmware/commits/lr/olpc-xo175-3
> 
> Released q4e00ja.rom from this as is;
> http://dev.laptop.org/~quozl/q4e00ja.rom
> 
> Removed the dtcompat.fth fload and released q4e01ja.rom;
> http://dev.laptop.org/~quozl/q4e01ja.rom

This second image removes the ablity to boot the legacy OLPC OS kernel,
doesn't it?

> As the firmware will update on a standard system before the kernel
> will boot, this seems an okay way to do it.  What do you think?

Sounds all right.

> >   git pull https://github.com/lkundrak/dracut-modules-olpc/ master
> > 
> > There's a fix for assumptions about the mmc controller
> > numbering. Also, to boot a FDT-based kernel the initramfs needs to
> > avoid triggering the compat boot path (that lies about bootpath and
> > disables the DT flattening).

By the way there's this patch we could use if we needed stable device
names:

https://lore.kernel.org/lkml/20190416133930.1819-1-lkundrak@v3.sk/

But as the OLPC OS' initrd already relies on incorrect numbering
(different from what OFW and presumably marvell uses) and the dtcompat
translates it to something yet more incorrect, this wouldn't really be
useful for compatibility. So if nobody picks up the patch, there's
probably not much point in pushing it forward.

> Thanks.  I'm yet to use this, but plan to.
> 
> >   git pull https://github.com/lkundrak/olpc-utils/ v5.0
> >   git pull https://github.com/lkundrak/olpc-utils/ master
> > 
> > Fixes the X11 video.
> 
> Thanks, yes, it does work, though I had to recreate the xorg.conf.d
> symlink, not sure why.
> 
> Pushed as http://dev.laptop.org/git/projects/olpc-utils/log/?h=v5.1
> 
> Packaged as
> http://dev.laptop.org/~quozl/olpc-utils-5.1.0-0.olpc.armv7hl.rpm
> http://dev.laptop.org/~quozl/olpc-utils-5.1.0-0.olpc.src.rpm
> 
> > The patched packages are here: http://v3.sk/~lkundrak/olpc/
> > The dracut-modules-olpc package needs to be installed prior to the
> > kernel.
> 
> Oops, I should have read all this way before acting.  I got caught up
> in code review.  Sorry.  I'll do another test using your binaries.
> 
> By the way, there's an interesting symptom on WiFi, a variable latency
> on inbound ssh, also shows up as a latency staircase effect in
> outbound "ping -n -i 0.200".

I have no idea why would this happen. I'll focus my attention on
getting the remaning drivers merged first and then look into the bugs.

> Also, power is not turned off on system halt.  I remember fixing that
> once, so no biggie.

That is because the EC driver is not yet in. It is probably ready to
merge at this point (went throught several rounds of reviews now), but
it sort of depends on platform/x86 parts of the battery branch.

However, the battery branch now landed in the power-supply tree and as
it's a standalone immutable branch in said tree, the x86 crowd can
merge it in and then the EC branch can follow.

Take care
Lubo



More information about the Devel mailing list