WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Community thread on building a Device tree enabled kernel  (Read 7635 times)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Community thread on building a Device tree enabled kernel
« Reply #15 on: February 07, 2015, 04:45:15 AM »
1) How to boot initrd, see ramfsaddr=-1

2) Stock kernel do not have compressed RAM, NOZSWAP in cmdline.txt needed (piCore kernel will fix it)

Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Community thread on building a Device tree enabled kernel
« Reply #16 on: February 08, 2015, 02:18:23 AM »
Hi Belá

So if I understand you correctly we need to add this to the /arch/arm/configs/bcmrpi_defconfig before we use it as .config for building piCore?

Code: [Select]
CONFIG_LOCALVERSION="-piCore+"

CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_HAVE_KERNEL_LZ4=y
CONFIG_KERNEL_GZIP=y

Steen

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Community thread on building a Device tree enabled kernel
« Reply #17 on: February 08, 2015, 02:48:53 AM »
Steen

do not touch defconfig. Use .config only.

Béla
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Community thread on building a Device tree enabled kernel
« Reply #18 on: February 08, 2015, 03:04:22 AM »
Sorry, probably wrong wording from my side - I'm not touching the defconfig directly.

What I have been told is to make a copy of defconfig and rename it to .config as defconfig contains the options the Raspberry foundation use to make their default kernel.

Then we have to modify/adapt this .config for making a piCore, so I was merely trying to make a list of needed changes that have to be set in order to produce a working .config for building piCore.

I know that we also remove some options that we don't need, but it could be handy to know what we at least need to add to the default raspberry config in order to start building a working piCore. Then we can always start removing unnecessary options from a booting piCore.

Steen 

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Community thread on building a Device tree enabled kernel
« Reply #19 on: February 08, 2015, 07:11:33 AM »
defconfig is not the same as the Raspbian config. On a clean system after defconfig you must work a lot to get a config you want. Even I experencied non-working system using a plain kernel after defconfig.

Better to start with a prooven config and make necessary changes. In case of 3.18.6 main changes on Raspbian kernel:

- configure squashfs and move to kernel
- enable compressed RAM and compressed swap
- enable USB/IP
- few smaller changes

Regards... Béla
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1243
Re: Community thread on building a Device tree enabled kernel
« Reply #20 on: February 08, 2015, 09:15:51 AM »
What I have been told is to make a copy of defconfig and rename it to .config as defconfig contains the options the Raspberry foundation use to make their default kernel.

defconfig files typically only contain hardware related patches.  It's always best to get a working config from the system you are trying to upgrade.   On the odroid-c1 it has been a bit of a challenge, as they don't have the options turned on to put a copy of the config in the kernel /proc.   But in the case of the odroid, it does appear they are pushing changes to the defconfig_odroidc, so I think I'm okay.

What I have been struggling with is doing things the tiny core way.    Things like sound are built into the kernel by default, but If I make them modules, the kernel doesn't load.  I think it has something to do with the way the dtb is expecting to find the driver.......but still learning the dtb concepts.

Offline jgrulich

  • Sr. Member
  • ****
  • Posts: 341
    • GRULICH DESIGN - R&D Lab.
Re: Community thread on building a Device tree enabled kernel
« Reply #21 on: May 10, 2015, 09:49:15 AM »
Now I'm solving the same issue. I need to add the new hardware support. The Rasbian build works fine and after applying mkknlimg loads all overlays correctly. Now I'm looking for the building modifications to get the TC kernel. Please share the tutorial for the TC build.