Jump to content

Enabling a kernel device in mainline


Christos

Recommended Posts

Hi,

Creating a build for OPiPCPlus, mainline/dev/4.11, xenial,desktop.

Need to enable the UDA1380 device in my local kernel build, yet I see some ..obstacles..

 

Tried initially to do a KERNEL_CONFIGURE="yes" in compile.sh but after started the compile and reached the point of menuconfig the UDA1380 option did not got presented (might be because there is no tristate string in mainline sound/soc/codecs/Kconfig..) so I reverted it back to normal.

After the first attempt, I tried by modifying the lib/config/kernel/linux-sun8i-dev.config and added "CONFIG_SND_SOC_UDA1380=m", tried the compile again and waited to finish, yet at the end, although the other .o object files (bt, spdif) created correctly in the sources/linux-sun8i-mainline/orange-pi-4.11/sound/soc/codecs folder, the required UDA1380 did not.

 

So, is there something that I miss here or doing it not right?

Is there another 'proper' way to enable a mainline kernel device in Armbian?

 

Christos

Link to comment
Share on other sites

Hi,

 

@martinayotte , yep, as I said, I did that (the actual file on filesystem is relative to armbian start, lib/config/kernel/linux-sun8i-dev.config ) but afterwards the required .o did not got presented in kernel's sound/soc/codecs  folder..

Actually, I also got a message on screen stating

 

scripts/kconfig/conf  --oldconfig Kconfig
.config:4034:warning: override: reassigning to symbol SND_SOC_UDA1380
#
# configuration written to .config
#

 

Link to comment
Share on other sites

20 minutes ago, Christos said:

but after started the compile and reached the point of menuconfig the UDA1380 option did not got presented

This indicates that dependencies for this option are not satisfied. You may have to use Kconfig search option to see the dependencies and their state

Link to comment
Share on other sites

@zador.blood.stained

Did the Kconfig search and got

 

Symbol: SND_SOC_UDA1380 [=n]
Type  : tristate
Defined at sound/soc/codecs/Kconfig:901
Depends on: SOUND [=y] && !M68K && !UML && SND [=y] && SND_SOC [=m] && I2C [=y]
Selected by: SND_PXA2XX_SOC_MAGICIAN [=n] && SOUND [=y] && !M68K && !UML && SND [=y] && SND_SOC [=m] && SND_PXA2XX_SOC [=n] && MACH_MAGICIAN [=n] && I2C [=y] || SND_SOC_SAMSUNG_H1940_UDA1380 [=..

Does it looks correct?

Link to comment
Share on other sites

16 minutes ago, Christos said:

Does it looks correct?

It has no prompt value, so it is an invisible option that is selected by other Kconfig symbols

 

According to a quick search, it is selected by

  • SND_SOC_ALL_CODECS
  • SND_SOC_SAMSUNG_H1940_UDA1380
  • SND_SOC_SAMSUNG_RX1950_UDA1380
  • SND_PXA2XX_SOC_MAGICIAN

so it must be a SoC specific option

Link to comment
Share on other sites

@zador.blood.stained , ok, did now something quite drastic, added "CONFIG_SND_SOC_ALL_CODECS=m" in lib/config/kernel/linux-sun8i-dev.config.

 

While compilation did not got this time the warning mentioned above but..

 

[ o.k. ] Using kernel config file [ lib/config/kernel/linux-sun8i-dev.config ]
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/bin2c
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --olddefconfig Kconfig
#
# configuration written to .config
#

 Armbian building script, http://www.armbian.com | Author: Igor Pecovnik
 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Compiling kernel...                                                                                                                                                                                │  
  │────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────│  
  │ arch/arm/boot/dts/sun9i-a80-optimus.dtb: Warning (simple_bus_reg): Node /soc/reset@080014b0 simple-bus unit address format error, expected "80014b0"                                               │  
  │ arch/arm/boot/dts/sun9i-a80-optimus.dtb: Warning (simple_bus_reg): Node /soc/interrupt-controller@080015a0 simple-bus unit address format error, expected "80015a0"                                │  
  │ arch/arm/boot/dts/sun9i-a80-optimus.dtb: Warning (simple_bus_reg): Node /soc/ir@08002000 simple-bus unit address format error, expected "8002000"                                                  │  
  │ arch/arm/boot/dts/sun9i-a80-optimus.dtb: Warning (simple_bus_reg): Node /soc/serial@08002800 simple-bus unit address format error, expected "8002800"                                              │  
  │ arch/arm/boot/dts/sun9i-a80-optimus.dtb: Warning (simple_bus_reg): Node /soc/pinctrl@08002c00 simple-bus unit address format error, expected "8002c00"                                             │  
  │ arch/arm/boot/dts/sun9i-a80-optimus.dtb: Warning (simple_bus_reg): Node /soc/i2c@08003400 simple-bus unit address format error, expected "8003400"                                                 │  
  │   DTC     arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb                                                                                                                                              │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/usb@00a00000 simple-bus unit address format error, expected "a00000"                                              │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/usb@00a00400 simple-bus unit address format error, expected "a00400"                                              │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/phy@00a00800 simple-bus unit address format error, expected "a00800"                                              │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/usb@00a01000 simple-bus unit address format error, expected "a01000"                                              │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/phy@00a01800 simple-bus unit address format error, expected "a01800"                                              │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/usb@00a02000 simple-bus unit address format error, expected "a02000"                                              │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/usb@00a02400 simple-bus unit address format error, expected "a02400"                                              │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/phy@00a02800 simple-bus unit address format error, expected "a02800"                                              │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/clock@00a08000 simple-bus unit address format error, expected "a08000"                                            │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/mmc@01c0f000 simple-bus unit address format error, expected "1c0f000"                                             │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/mmc@01c10000 simple-bus unit address format error, expected "1c10000"                                             │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/mmc@01c11000 simple-bus unit address format error, expected "1c11000"                                             │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/mmc@01c12000 simple-bus unit address format error, expected "1c12000"                                             │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/clk@01c13000 simple-bus unit address format error, expected "1c13000"                                             │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/interrupt-controller@01c41000 simple-bus unit address format error, expected "1c41000"                            │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/clock@03000000 simple-bus unit address format error, expected "3000000"                                           │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/clock@06000000 simple-bus unit address format error, expected "6000000"                                           │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/timer@06000c00 simple-bus unit address format error, expected "6000c00"                                           │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/watchdog@06000ca0 simple-bus unit address format error, expected "6000ca0"                                        │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/pinctrl@06000800 simple-bus unit address format error, expected "6000800"                                         │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/serial@07000000 simple-bus unit address format error, expected "7000000"                                          │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/serial@07000400 simple-bus unit address format error, expected "7000400"                                          │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/serial@07000800 simple-bus unit address format error, expected "7000800"                                          │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/serial@07000c00 simple-bus unit address format error, expected "7000c00"                                          │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/serial@07001000 simple-bus unit address format error, expected "7001000"                                          │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/serial@07001400 simple-bus unit address format error, expected "7001400"                                          │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/i2c@07002800 simple-bus unit address format error, expected "7002800"                                             │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/i2c@07002c00 simple-bus unit address format error, expected "7002c00"                                             │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/i2c@07003000 simple-bus unit address format error, expected "7003000"                                             │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/i2c@07003400 simple-bus unit address format error, expected "7003400"                                             │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/i2c@07003800 simple-bus unit address format error, expected "7003800"                                             │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/watchdog@08001000 simple-bus unit address format error, expected "8001000"                                        │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/reset@080014b0 simple-bus unit address format error, expected "80014b0"                                           │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/interrupt-controller@080015a0 simple-bus unit address format error, expected "80015a0"                            │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/ir@08002000 simple-bus unit address format error, expected "8002000"                                              │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/serial@08002800 simple-bus unit address format error, expected "8002800"                                          │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/pinctrl@08002c00 simple-bus unit address format error, expected "8002c00"                                         │  
  │ arch/arm/boot/dts/sun9i-a80-cubieboard4.dtb: Warning (simple_bus_reg): Node /soc/i2c@08003400 simple-bus unit address format error, expected "8003400"                                             │  
  └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘  
    

 

 

A really large number of ..cubieboard errors!

 

 

 

The compile finished

[ o.k. ] Free space: [ SD card ]
/dev/loop0p1    2,8G  2,0G  739M  74% /home/christos/armbian/output/cache/mount-dev-orangepipcplus-xenial-yes
[ o.k. ] Writing U-boot bootloader [ /dev/loop0 ]
[ o.k. ] Done building [ /home/christos/armbian/output/images/Armbian_5.27_Orangepipcplus_Ubuntu_xenial_dev_4.11.0_desktop.img ]
[ o.k. ] Runtime [ 12 min ]

 

 

but again in sound/soc/codecs only bt and spdif drivers got build..

 

I'm lost..

 

Link to comment
Share on other sites

1 minute ago, Christos said:

@zador.blood.stained , ok, did now something quite drastic, added "CONFIG_SND_SOC_ALL_CODECS=m" in lib/config/kernel/linux-sun8i-dev.config.

You should never edit the config file directly - use the menuconfig to change it.

 

1 minute ago, Christos said:

While compilation did not got this time the warning mentioned above but..

These warnings can be ignored

Link to comment
Share on other sites

13 minutes ago, zador.blood.stained said:

You should never edit the config file directly - use the menuconfig to change it.

 

Got it, since menuconfig takes care of prerequisites and presents only valid options.

 

It looks though that I need to be educated about the asoc scheme in mainline, simple device stuff that are easy in legacy do pose significant obstacles in mainline at least as I see it.

 

Thanks to both of you guys, @zador.blood.stained @martinayotte .

 

Christos

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines