All of lore.kernel.org
 help / color / mirror / Atom feed
* Writing a BSP from downstream kernel sources
@ 2021-01-23  2:18 Jonas Vautherin
  2021-01-23 10:06 ` [yocto] " Paul Barker
  0 siblings, 1 reply; 12+ messages in thread
From: Jonas Vautherin @ 2021-01-23  2:18 UTC (permalink / raw)
  To: Yocto-mailing-list

[-- Attachment #1: Type: text/plain, Size: 2823 bytes --]

As a learning experience, I am trying to create a BSP for a device I own
and whose downstream kernel is published. The device in question is the
Parrot Skycontroller3, and the sources are available here
<https://github.com/parrot-opensource/skycontroller3-opensource>.

Let me start by sharing my issue. When I build the kernel with `bitbake
virtual/kernel`, it fails with errors like:

```
|   AS      arch/arm/lib/backtrace.o
|   AS      arch/arm/lib/bswapsdi2.o
|   AS      arch/arm/lib/call_with_stack.o
| /tmp/ccz8jKgm.s: Assembler messages:
| /tmp/ccz8jKgm.s:985: Error: .err encountered
| /tmp/ccz8jKgm.s:1033: Error: .err encountered
| /tmp/ccz8jKgm.s:6812: Error: .err encountered
```

My layer is available here.
<https://github.com/JonasVautherin/meta-skycontroller3>

I created it getting inspiration from meta-raspberrypi and meta-qti-bsp
<https://github.com/mcharleb/meta-qti-bsp/blob/yocto.lnx.1.0.r10-rel/conf/machine/apq8009.conf>,
which seems to have the same CPU: apq8009. According to the Parrot sources
<https://github.com/parrot-opensource/skycontroller3-opensource/blob/master/sources/linux-3.18.31/atom.mk#L1>,
my device runs a Qualcomm apq8009/msm89090 cpu. In my repo, I use as a
defconfig file the linux.config
<https://github.com/parrot-opensource/skycontroller3-opensource/blob/master/sources/linux-3.18.31/linux.config>
that is available in the Parrot sources (I copied it in my kernel recipe
under `files/defconfig` and added it to SRC_URI).

The Parrot sources
<https://github.com/parrot-opensource/skycontroller3-opensource/blob/master/sources/linux-3.18.31/atom.mk#L12>
also refer to `LINUX_DEFAULT_CONFIG_TARGET := msm8909_defconfig`, so I
tried to set `KBUILD_DEFCONFIG = "msm8909_defconfig"`, but that is failing
with different errors, such as:

```
error: 'VM_ARM_DMA_CONSISTENT' undeclared (first use in this function); did
you mean 'DMA_ATTR_NON_CONSISTENT'?
```

or

```
error: 'L_PTE_YOUNG' undeclared
```

As a side note, their `drivers/Kconfig` seemed invalid, so I patched it
<https://github.com/JonasVautherin/meta-skycontroller3/blob/main/recipes-kernel/linux/files/Kconfig.patch>
.

I am a bit lost now, not completely sure where my issues come from. I
realize that changing the defconfig has quite some impact (I get different
errors), and also that my machine configuration
<https://github.com/JonasVautherin/meta-skycontroller3/tree/main/conf/machine>
may be completely wrong (I am essentially guessing from the fact that it is
an apq8009/msm8909, but for instance the tuning I just copied from
meta-qti-bsp, which may be invalid).

I would be glad if I could get hints about debugging this. Again, it is
really a learning project: I would like to learn how to create a BSP from a
downstream kernel.

Best,

[-- Attachment #2: Type: text/html, Size: 3313 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-02-04  2:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-23  2:18 Writing a BSP from downstream kernel sources Jonas Vautherin
2021-01-23 10:06 ` [yocto] " Paul Barker
2021-01-23 13:06   ` Jonas Vautherin
     [not found]   ` <165CDE54CF259D2E.7022@lists.yoctoproject.org>
2021-01-24 13:30     ` Jonas Vautherin
2021-01-25  8:00       ` Diego Santa Cruz
2021-01-30  2:50         ` Jonas Vautherin
2021-01-30  7:25           ` Joel A Cohen
     [not found]           ` <165EF1C95601254E.16314@lists.yoctoproject.org>
2021-01-30  7:29             ` Joel A Cohen
2021-01-31 21:23               ` Jonas Vautherin
2021-02-01  7:04                 ` Diego Santa Cruz
2021-02-01  8:21                   ` Herman van Hazendonk (Herrie)
2021-02-04  2:19                     ` Jonas Vautherin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.