edison-fw / meta-intel-edison

Here is the meta-intel-edison that builds, tries to stay up to date. Master is based on Yocto Poky Gatesgarth LTS 5.10.yy vanilla kernels. It builds a 32bit kernel (Gatesgarth branch 64bit) with ACPI enabled and corresponding rootfs. Telegram group: https://t.me/IntelEdison Web-site:
https://edison-fw.github.io/meta-intel-edison/
MIT License
60 stars 38 forks source link

how to install driver #77

Closed shawnhsoia97 closed 4 years ago

shawnhsoia97 commented 4 years ago

Hi i want to install sierra driver,but that show "not found kernel modules" when i make install($(MAKE) -C $(/lib/modules/$(shell uname -r)/build) M=$(PWD) modules). So i think it should be no kernel header,then i add" IMAGE_INSTALL_append = linux-libc-header" to edison-image.bb,but i have encountered an error that show "unable to locate package linux-libc-header". can you help me?thank you. (thud branch)

htot commented 4 years ago

Don't modify extrausers.bbclass. Follow the manual: 6.34. extrausers.bbclass¶

Here is an example that uses this class in an image recipe: inherit extrausers EXTRA_USERS_PARAMS = "\ useradd -p '' tester; \ groupadd developers; \ userdel nobody; \ groupdel -g video; \ groupmod -g 1020 developers; \ usermod -s /bin/sh tester; \ "

Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns passwords: inherit extrausers EXTRA_USERS_PARAMS = "\ useradd -P tester01 tester-jim; \ useradd -P tester01 tester-sue; \ "

Finally, here is an example that sets the root password to "187618": inherit extrausers EXTRA_USERS_PARAMS = "\ usermod -P 187618 root; \

andy-shev commented 4 years ago

Also I want to use external rtc1 to set the system time.I have solved the problem of register i2c because your help thank!But I encountered new problems, I still don't use external rtc1 to set the system time.I found Kernel complains about a non existing rtc device on early boot. System clock may not set on early boot.

root@edison:/sys/class/rtc# dmesg | grep hctosys
[    2.086705] hctosys: unable to open rtc device (rtc1)
root@edison:/sys/class/rtc# dmesg | grep rtc
[    2.045441] rtc_cmos 00:00: registered as rtc0
[    2.045609] rtc_cmos 00:00: no alarms, 242 bytes nvram
[    2.086705] hctosys: unable to open rtc device (rtc1)
[    3.158197] rtc-rv3028 i2c-PRP0001:02: registered as rtc1

How can I solve it?Thank!

It seems you are using CONFIG_RTC_HCTOSYS_DEVICE=rtc1 when rtc1 is connected to I²C bus and being initialized later (ordering problems). To mitigate this you have to try built-in the driver (RTC and its dependencies, such as driver of I²C host controller) and supply ACPI table in initrd (initramfs). I'm not sure it will fix it, but that's most what we can do without patching a kernel code.

shawnhsoia97 commented 4 years ago

Hi @andy-shev,I have tried built-in the driver(such asCONFIG_I2C_CHARDEV=yCONFIG_RTC_DRV_RV3028=y),but no effect,and so is there any driver I can try?Also I don't know how to supply ACPI table in initrd,do you have any document?

htot commented 4 years ago

@shawnhsoia97 I load tables late, either from the initramfs or while debugging from the command line. Documentation is here: https://htot.github.io/meta-intel-edison/1.3-ACPI-or-not.html

shawnhsoia97 commented 4 years ago

Hi @htot ,awesome,I get it,thank you I have a new question,I want to add softether in edison-image,and so I try to clone that recipe to /poky/mate/,but not effect,that show

 NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES 'softether' (but /home/shawn/my_Edison_Workspace/thud/meta-intel-edison/meta-intel-edison-distro/recipes-core/images/edison-image.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'softether' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['softether']
ERROR: Required build target 'edison-image' has no buildable providers.
Missing or unbuildable dependency chain was: ['edison-image', 'softether']

And so do you know how to add a recipe that does not belong to OpenEmbedded?

Also Howto generate a Yocto image with .utf8 by default,My current edison-image.bb setup is this:

GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"      
IMAGE_LINGUAS = "de-de fr-fr en-gb en-us"

but locale LANG is not setup:

root@bovia-deb:~# locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
root@bovia-deb:~# locale -a
C
POSIX
de_DE
de_DE.utf8
en_GB
en_GB.utf8
en_US
en_US.utf8
fr_FR
fr_FR.utf8

I want to setup locale LANG at build image.

andy-shev commented 4 years ago

Hi @andy-shev,I have tried built-in the driver(such asCONFIG_I2C_CHARDEV=y

This has nothing to do with your case. You need to enable I²C controller driver (It's DesignWare one).

CONFIG_RTC_DRV_RV3028=y),but no effect,and so is there any driver I can try?Also I don't know how to supply ACPI table in initrd,do you have any document?

Read this documentation material https://www.kernel.org/doc/html/latest/admin-guide/acpi/ssdt-overlays.html

htot commented 4 years ago

And so do you know how to add a recipe that does not belong to OpenEmbedded?

You either copy the recipe directory into meta-intel-edison/meta-intel-edison-distro, or add the whole layer (as you do) and add the layer location to $yocto_conf_dir/bblayers.conf (see setup.sh)

Also Howto generate a Yocto image with .utf8 by default,My current edison-image.bb setup is this:

Don't know. Maybe in the Yocto mega manual?

shawnhsoia97 commented 4 years ago

Hi @andy-shev ,I load ACPI SSDTs from configfs according to that documentation,I found that the /config/acpi/table/ already the SSDT aml code and the aml attribute.

root@bovia-deb:/sys/kernel/config/acpi/table# ls
arduino  i2c3028  leds  spidev
root@bovia-deb:/sys/kernel/config/acpi/table# ls i2c3028/
aml  asl_compiler_id  asl_compiler_revision  length  oem_id  oem_revision  oem_table_id  revision  signature
root@bovia-deb:/sys/kernel/config/acpi/table#

And so unfortunately this issue is not resolved.

root@bovia-deb:/sys/kernel/config/acpi/table# dmesg | grep rtc
[    2.043898] rtc_cmos 00:00: registered as rtc0
[    2.044020] rtc_cmos 00:00: no alarms, 242 bytes nvram
[    2.085949] hctosys: unable to open rtc device (rtc1)
[    3.075209] rtc-rv3028 i2c-PRP0001:02: registered as rtc1
shawnhsoia97 commented 4 years ago

Hi @htot ,awesome, ,I succeed ,thank you for help me.

andy-shev commented 4 years ago

Hi @andy-shev ,I load ACPI SSDTs from configfs according to that documentation,I found that the /config/acpi/table/ already the SSDT aml code and the aml attribute.

No, configfs is not what I told you about. You need to attach it to initramfs (initrd). Read my first comment in this thread carefully.

htot commented 4 years ago

@shawnhsoia97 Maybe we can close this long thread and you can start a new one per particular issue?

That way it will also be easier for other people to find an answer to their problems.

shawnhsoia97 commented 4 years ago

Ok,thank you for help me.