Using a 5.2 Kernel

189 views
Skip to first unread message

Keith I Myers

unread,
Jul 19, 2019, 1:29:12 PM7/19/19
to Chromium OS dev
Good Morning All,
Do you think there would be any issues with using a 5.X kernel on a build of ChromiumOS? I have built many kernels for Ubuntu/Debian without much of an issue but wanted to be sure.

Would I just do a git clone of the upstream kernel and copy the contents of the chromos/scripts from a existing kernel?

--
 
--
Keith I Myers
 


Sean Paul

unread,
Jul 19, 2019, 1:41:23 PM7/19/19
to Keith I Myers, Chromium OS dev
On Fri, Jul 19, 2019 at 1:29 PM Keith I Myers
<keithiok...@gmail.com> wrote:
>
> Good Morning All,
> Do you think there would be any issues with using a 5.X kernel on a build of ChromiumOS? I have built many kernels for Ubuntu/Debian without much of an issue but wanted to be sure.
>

The only issues you'll face will be related to how well supported your
chromebook is upstream.

> Would I just do a git clone of the upstream kernel and copy the contents of the chromos/scripts from a existing kernel?
>

It's probably easier than that. Just add the upstream repo as a remote
to the appropriate third_party/kernel/vX.X chrome repo and check out
the appropriate branch. The build system will use the defconfig from
third_party/chromiumos-overlay/eclass/cros-kernel/<platform>_defconfig,
so you can emerge-<BOARD> as normal.

To give you an idea about what's involved, instructions for kevin are
here [1]. Most of the hard work in this doc is pulling in downstream
patches to make up for lacking upstream support. If you're using an
intel device it's probably just a matter of git remote/checkout,
build, deploy.

[1] https://www.chromium.org/chromium-os/how-tos-and-troubleshooting/mainline-kernel-on-kevin-chromebook-plus/chrome-os-mainline-kernel-on-kevin-chromebook-plus


Sean

> --
>
> Keith I Myers
> http://KMyers.me
> Mobile : (305)-929-3475
>
>
>
> --
> --
> Chromium OS Developers mailing list: chromiu...@chromium.org
> View archives, change email options, or unsubscribe:
> https://groups.google.com/a/chromium.org/group/chromium-os-dev
> ---
> To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.

Adam Kearn

unread,
Jul 24, 2019, 3:31:11 PM7/24/19
to Chromium OS Development, keithiok...@gmail.com
Did you get it working in the end Keith?
> To unsubscribe from this group and stop receiving emails from it, send an email to chromiu...@chromium.org.

Chintan Patel

unread,
Jul 24, 2019, 5:44:00 PM7/24/19
to Adam Kearn, Chromium OS Development, keithiok...@gmail.com
I was under impression that after checking out upstream branch, we also need to place/checkout chromeos directory in order to pick chromeos kernel configs. Is my understanding is correct or we don't need to do this?  

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.

Brian Norris

unread,
Jul 24, 2019, 6:05:35 PM7/24/19
to Chintan Patel, Adam Kearn, Chromium OS Development, Keith I Myers
There are fallback configs provided here:

https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/refs/heads/master/eclass/cros-kernel/

Those are maintained on a best effort basis (some of them are
extremely unloved), and we generally try to keep them mostly working
on at least the last few upstream releases (e.g., if a CONFIG_* symbol
gets renamed, we might leave both in the config). But
rockchip64_defconfig, for instance, should generally work for RK3399,
as I and a few others regularly test that one.

Chintan Patel

unread,
Jul 24, 2019, 6:40:45 PM7/24/19
to Brian Norris, Adam Kearn, Chromium OS Development, Keith I Myers
Good to know... thanks Brian!

Brian Norris

unread,
Jul 24, 2019, 6:48:09 PM7/24/19
to Chintan Patel, Adam Kearn, Chromium OS Development, Keith I Myers
You're welcome! I hope it also goes without saying: patches (or, CLs)
welcome. We'd all love to see more people testing out upstream Linux
on their Chrom{e,ium} OS.

Keith I Myers

unread,
Jul 25, 2019, 3:21:37 PM7/25/19
to Brian Norris, Chintan Patel, Adam Kearn, Chromium OS Development
Good Morning Brian,
Is there a specific $USE flag that needs to be passed to tell the build system to use the upstream kernel?

Brian Norris

unread,
Jul 25, 2019, 3:41:53 PM7/25/19
to Keith I Myers, Chintan Patel, Adam Kearn, Chromium OS Development
No. See Sean Paul's original reply to you as well, where he just suggests you check out the appropriate upstream git remote from within your applicable .../kernel/vX.Y directory (and run cros_workon-${BOARD} start chromeos-kernel-X_Y). The the normal emerge / build_packages will build that source tree instead of the original chromeos-X.Y kernel source tree. No USE flags involved.

The instructions he pointed at [1] cover some version of that as well as some graphics-related stuff specific to RK3399 that you may not need.

Keith I Myers

unread,
Jul 29, 2019, 12:36:51 PM7/29/19
to Brian Norris, Chintan Patel, Adam Kearn, Chromium OS Development
I must be missing something, does this look right?

export BOARD=amd64-generic
mkdir -p ~/trunk/src/third_party/kernel/v5.3/
cd ~/trunk/src/third_party/kernel/v5.3/
git init
pushd ~/trunk/src/third_party/kernel/v5.3/ && \
    git remote add torvalds git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git && \
    git fetch torvalds && \
    popd

I then try to run cros_workon-${BOARD} start chromeos-kernel-5.3 and it fails with
(cr) kmyers@office ~/trunk/src/third_party/kernel $ cros_workon-${BOARD} start chromeos-kernel-5.3                                                           12:36:16: WARNING: Could not find canonical package for "chromeos-kernel-5.3"
12:36:16: ERROR: Error parsing package list

Brian Norris

unread,
Jul 29, 2019, 12:51:54 PM7/29/19
to Keith I Myers, Chintan Patel, Adam Kearn, Chromium OS Development
The recommendations were all to reuse the existing directories and ebuilds. So for amd64-generic, that would be the 4.14 kernel directory.

Adding a whole new ebuild is a bit more work, and isn't really necessary when just doing local builds.

Keith I Myers

unread,
Jul 29, 2019, 12:53:10 PM7/29/19
to Brian Norris, Chintan Patel, Adam Kearn, Chromium OS Development
Ok, thanks for the clarification. 
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages