Discussion:
Building head of git repo gives kernel which segfaults loading init
Peter Howard
2014-04-03 22:57:55 UTC
Permalink
Dear All:

I'm trying to build a kernel from the current head of the git repository
for an OMAP-L138 board. This boots fine with a kernel built from the
last Ti release*. However when I substitute in a kernel built from the
repo, the kernel gets a SIGSEGV when it tries to start init (given you
see nothing from init itself I'm guessing the segfault occurs during the
loading of init).

I'm building using da8xx_omapl_defconfig and the arago 2011.09
toolchain. My questions at this point are:
* Should I be trying to build from the tip of the master branchy?
Is there a specific branch I should work from?
* Given that it looks (to me) like a problem with actually loading
init, has something significant changed in the memory mapping
since the 3.3 kernel (the release source)? The release kernel
sets up partitions on the m25p80 MTD, which the kernel built
from git doesn't - relevant?
* Other suggestions?

Thanks in advance.


* The release at:
http://processors.wiki.ti.com/index.php/DaVinci_PSP_Releases#DA850.28Spectrum_Digital_EVM.29.2C_DA830.28Spectrum_Digital_EVM_and_Spectrum_Digital_WiFi_EVM.29_and_OMAP-L138.28_Logic_PD_EVM_and_LCDK.29
--
Peter Howard <pjh at northern-ridge.com.au>
Peter Howard
2014-04-03 23:21:31 UTC
Permalink
Post by Peter Howard
I'm trying to build a kernel from the current head of the git repository
for an OMAP-L138 board. This boots fine with a kernel built from the
last Ti release*. However when I substitute in a kernel built from the
repo, the kernel gets a SIGSEGV when it tries to start init (given you
see nothing from init itself I'm guessing the segfault occurs during the
loading of init).
I'm building using da8xx_omapl_defconfig and the arago 2011.09
toolchain.
Minor extra details:

That defconfig doesn't enable MMC/SD support; I enabled it. No other
changes.

I also got the same behavior using da850_omapl138_defconfig from the
last Ti release.
Post by Peter Howard
* Should I be trying to build from the tip of the master branchy?
Is there a specific branch I should work from?
* Given that it looks (to me) like a problem with actually loading
init, has something significant changed in the memory mapping
since the 3.3 kernel (the release source)? The release kernel
sets up partitions on the m25p80 MTD, which the kernel built
from git doesn't - relevant?
* Other suggestions?
Thanks in advance.
http://processors.wiki.ti.com/index.php/DaVinci_PSP_Releases#DA850.28Spectrum_Digital_EVM.29.2C_DA830.28Spectrum_Digital_EVM_and_Spectrum_Digital_WiFi_EVM.29_and_OMAP-L138.28_Logic_PD_EVM_and_LCDK.29
Peter Howard
2014-04-04 01:05:06 UTC
Permalink
Problem tracked down - see at bottom.
Post by Peter Howard
Post by Peter Howard
I'm trying to build a kernel from the current head of the git repository
for an OMAP-L138 board. This boots fine with a kernel built from the
last Ti release*. However when I substitute in a kernel built from the
repo, the kernel gets a SIGSEGV when it tries to start init (given you
see nothing from init itself I'm guessing the segfault occurs during the
loading of init).
I'm building using da8xx_omapl_defconfig and the arago 2011.09
toolchain.
That defconfig doesn't enable MMC/SD support; I enabled it. No other
changes.
I also got the same behavior using da850_omapl138_defconfig from the
last Ti release.
I discovered the problem is not specific to the Ti git repo. So I went
bisecting and ended up at this commit:

[c2dde5f8f2095d7c623ff3565c1462e190272273] dmaengine: add TI EDMA DMA engine driver

da8xx_omapl_defconfig does not enable the DMA driver by default. Once I
enabled it, the problem went away. I'd say this is a bug. Either:
A. You should be able to use the MMC/SD slot without enabling the
DMA driver, or
B. You shouldn't be able to create a configuration for the DaVinci
where MMC/SD is enabled and the DMA driver isn't.

So, which should it be?
--
Peter Howard <pjh at northern-ridge.com.au>
Sekhar Nori
2014-04-04 07:42:01 UTC
Permalink
Post by Peter Howard
Problem tracked down - see at bottom.
Post by Peter Howard
Post by Peter Howard
I'm trying to build a kernel from the current head of the git repository
for an OMAP-L138 board. This boots fine with a kernel built from the
last Ti release*. However when I substitute in a kernel built from the
repo, the kernel gets a SIGSEGV when it tries to start init (given you
see nothing from init itself I'm guessing the segfault occurs during the
loading of init).
I'm building using da8xx_omapl_defconfig and the arago 2011.09
toolchain.
That defconfig doesn't enable MMC/SD support; I enabled it. No other
changes.
I also got the same behavior using da850_omapl138_defconfig from the
last Ti release.
I discovered the problem is not specific to the Ti git repo. So I went
[c2dde5f8f2095d7c623ff3565c1462e190272273] dmaengine: add TI EDMA DMA engine driver
da8xx_omapl_defconfig does not enable the DMA driver by default. Once I
A. You should be able to use the MMC/SD slot without enabling the
DMA driver, or
B. You shouldn't be able to create a configuration for the DaVinci
where MMC/SD is enabled and the DMA driver isn't.
So, which should it be?
'A' is the preferred solution. This problem however should be fixed in
latest linux-next where da8xx_omapl_defconfig is removed and
davinci_all_defconfig enables CONFIG_TI_EDMA

Thanks,
Sekhar

Loading...