3

I'm working on a bsp layer for SBC Pine64 and my image is successfully generated but I'm getting "FATAL: kernel too old" when booting init from busybox. I've checked my busybox binary and it's being compiled for kernel 3.14.0.

My kernel is version 3.10 and I've used Linaro 5.3 toolchain. I've tried adding: OLDEST_KERNEL = "3.10.0" and I've also tried using Linaro 4.9 but I still get the same error. I'm using yocto Krogoth and generating core-image-minial. Please, see below a snip of the error from boot log:

[13.068932] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[13.086717] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[13.112988] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[13.127040] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[13.143393] devtmpfs: mounted
[13.151972] Freeing unused kernel memory: 520K (ffffffc0009e4000 - ffffffc000a66000)
FATAL: kernel too old
[13.198566] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[13.198566]
[13.218884] CPU: 2 PID: 1 Comm: init Not tainted 3.10.102-pine64 #1
[13.230876] Call trace:

How can I configure yocto to compile linaro eglibc for kernel 3.10.0?

Thx, Montez

Tom Rini
  • 2,058
  • 8
  • 11
mont3z
  • 85
  • 7
  • Where and how did you change OLDEST_KERNEL ? That is the right thing to do, but I suspect that you didn't make the change correctly, or that you didn't rebuild everything after you made the change. Doing a 'bitbake -e busybox | grep ^OLDEST_KERNEL=' will tell you what it evaluated to. – Tom Rini Aug 22 '16 at 19:37
  • @TomRini Thx a lot for your reply. I had OLDEST_KERNEL in my conf/local.conf. As soon as I get back home I'll run bitbake -e busybox and let you know. I also didn't rebuilt everything from scratch after my change in local.conf. I'm very thank full for all your help in this project. It's being a lot of fun doing it. I hope that I can publish something reasonable soon. – mont3z Aug 22 '16 at 20:50
  • @TomRini The result of `build$ bitbake -e busybox | grep ^OLDEST_KERNEL=` is `OLDEST_KERNEL="3.14"`. I rebuilt everything from scratch but nothing changed. – mont3z Aug 23 '16 at 05:37

1 Answers1

3

When you want to override an existing variable that is not "soft-assigned", which is to say does not use the ?= syntax but instead = syntax, you need to use one of the variables in OVERRIDES as part of changing the value. You can see how overrides work already as in conf/bitbake.conf we have:

##################################################################
# Kernel info.
##################################################################

OLDEST_KERNEL = "3.2.0"
OLDEST_KERNEL_aarch64 = "3.14"
OLDEST_KERNEL_nios2 = "3.19"

And aarch64 is already found in your overrides list. Fortunately there are other values in that list, and when evaluating variables the ones later in the list in OVERRIDES take precedence. So in your local.conf you can do:

OLDEST_KERNEL_forcevariable = "3.10"

And then confirm that it has taken effect:

$ bitbake -e busybox | grep -E ^OLDEST_KERNEL=
OLDEST_KERNEL="3.10"
Tom Rini
  • 2,058
  • 8
  • 11
  • It works perfectly!! I tried using OLDEST_KERNEL_pine64 and it works too. I can't thank you enough. Unfortunately I couldn't give a point to your answer because my reputation is still below 15. I'll let you know when I have this project published. – mont3z Aug 23 '16 at 14:45
  • Thx for your help. My project was finally published at github.com/mont3z/meta-pine64 – mont3z Sep 19 '16 at 14:20