Building kernel and deploying to device for LS1028ARDB: kernel configs not saving

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Building kernel and deploying to device for LS1028ARDB: kernel configs not saving

Jump to solution
969 Views
noahw
Contributor III

I am trying to build kernel using flex-builder with custom config. I am following instructions in sections 4.3.6 and 4.3.10 of the LSDK v21.08 user guide (https://www.nxp.com/docs/en/user-guide/LSDKUG_Rev21.08.pdf). I edit my config file at components/linux/linux/arch/arm64/configs/defconfig, adding some additional configs like CONFIG_I2C_MPC=y and CONFIG_SENSORS_INA2XX=y. Then I run

bld -c linux

After the kernel build, I am expecting to see my new configs reflected in build/linux/linux/arm64/LS/output/LSDK-21.08/.config. But I don't see them in that file. Am I doing something wrong?

0 Kudos
Reply
1 Solution
903 Views
noahw
Contributor III

Thank you, it is working now.

Using a fresh image of the Ubuntu desktop LSDK, I get:

# cat /boot/config-5.10.35 | grep SENSORS_INA2XX
CONFIG_SENSORS_INA2XX=m

So get the ina2xx driver working with lm-sensors, I needed to run the following command first to load the kernel module:

modprobe ina2xx

Now I see:

# sensors
ina220-i2c-3-40
Adapter: i2c-0-mux (chan_id 2)
in0: 3.00 mV
in1: 1.01 V
power1: 4.40 W
curr1: 5.16 A

ddr_controller-virtual-0
Adapter: Virtual device
temp1: +45.0°C (crit = +95.0°C)

core_cluster-virtual-0
Adapter: Virtual device
temp1: +45.0°C (crit = +95.0°C)

 

View solution in original post

0 Kudos
Reply
4 Replies
912 Views
June_Lu
NXP TechSupport
NXP TechSupport

Yes, I found the CONFIG_I2C_MPC is unavailable.

Have you enable the CONFIG_SENSORS_INA2XX=y?

If you enable it, you would find logs below after you install the lm-sensors.

root@localhost:/boot/# sensors

ina220-i2c-3-40

Adapter: i2c-0-mux (chan_id 2)

in0:           3.00 mV

in1:           1.00 V

power1:        4.40 W

curr1:         4.58 A

0 Kudos
Reply
904 Views
noahw
Contributor III

Thank you, it is working now.

Using a fresh image of the Ubuntu desktop LSDK, I get:

# cat /boot/config-5.10.35 | grep SENSORS_INA2XX
CONFIG_SENSORS_INA2XX=m

So get the ina2xx driver working with lm-sensors, I needed to run the following command first to load the kernel module:

modprobe ina2xx

Now I see:

# sensors
ina220-i2c-3-40
Adapter: i2c-0-mux (chan_id 2)
in0: 3.00 mV
in1: 1.01 V
power1: 4.40 W
curr1: 5.16 A

ddr_controller-virtual-0
Adapter: Virtual device
temp1: +45.0°C (crit = +95.0°C)

core_cluster-virtual-0
Adapter: Virtual device
temp1: +45.0°C (crit = +95.0°C)

 

0 Kudos
Reply
945 Views
June_Lu
NXP TechSupport
NXP TechSupport

In the linux file

$ vi .config

In the file .config, add

CONFIG_I2C_MPC=y

CONFIG_SENSORS_INA2XX=y

$ sudo apt-get install gcc-aarch64-linux-gnu

$ export CROSS_COMPILE=aarch64-linux-gnu-

$ export ARCH=arm64

make mrproper;make defconfig;make lsdk.config;make menuconfig;make

0 Kudos
Reply
921 Views
noahw
Contributor III

The .config file you refer to is the one in build/linux/linux/arm64/LS/output/LSDK-21.08/, correct?

 

I tried adding the new CONFIG statements into that file, but after the build when I check the file again, the CONFIG_I2C_MPC line has been automatically removed. Does that seem right?

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2075556%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EBuilding%20kernel%20and%20deploying%20to%20device%20for%20LS1028ARDB%3A%20kernel%20configs%20not%20saving%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2075556%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20am%20trying%20to%20build%20kernel%20using%20flex-builder%20with%20custom%20config.%20I%20am%20following%20instructions%20in%20sections%204.3.6%20and%204.3.10%20of%20the%20LSDK%20v21.08%20user%20guide%20(%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fuser-guide%2FLSDKUG_Rev21.08.pdf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fuser-guide%2FLSDKUG_Rev21.08.pdf%3C%2FA%3E).%20I%20edit%20my%20config%20file%20at%20components%2Flinux%2Flinux%2Farch%2Farm64%2Fconfigs%2Fdefconfig%2C%20adding%20some%20additional%20configs%20like%20CONFIG_I2C_MPC%3Dy%20and%20CONFIG_SENSORS_INA2XX%3Dy.%20Then%20I%20run%3C%2FP%3E%3CP%3Ebld%20-c%20linux%3C%2FP%3E%3CP%3EAfter%20the%20kernel%20build%2C%20I%20am%20expecting%20to%20see%20my%20new%20configs%20reflected%20in%20build%2Flinux%2Flinux%2Farm64%2FLS%2Foutput%2FLSDK-21.08%2F.config.%20But%20I%20don't%20see%20them%20in%20that%20file.%20Am%20I%20doing%20something%20wrong%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2078746%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Building%20kernel%20and%20deploying%20to%20device%20for%20LS1028ARDB%3A%20kernel%20configs%20not%20saving%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2078746%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThank%20you%2C%20it%20is%20working%20now.%3C%2FP%3E%3CP%3EUsing%20a%20fresh%20image%20of%20the%20Ubuntu%20desktop%20LSDK%2C%20I%20get%3A%3C%2FP%3E%3CP%3E%23%20cat%20%2Fboot%2Fconfig-5.10.35%20%7C%20grep%20SENSORS_INA2XX%3CBR%20%2F%3ECONFIG_SENSORS_INA2XX%3Dm%3C%2FP%3E%3CP%3ESo%20get%20the%20ina2xx%20driver%20working%20with%20lm-sensors%2C%20I%20needed%20to%20run%20the%20following%20command%20first%20to%20load%20the%20kernel%20module%3A%3C%2FP%3E%3CP%3Emodprobe%20ina2xx%3C%2FP%3E%3CP%3ENow%20I%20see%3A%3C%2FP%3E%3CP%3E%23%20sensors%3CBR%20%2F%3Eina220-i2c-3-40%3CBR%20%2F%3EAdapter%3A%20i2c-0-mux%20(chan_id%202)%3CBR%20%2F%3Ein0%3A%203.00%20mV%3CBR%20%2F%3Ein1%3A%201.01%20V%3CBR%20%2F%3Epower1%3A%204.40%20W%3CBR%20%2F%3Ecurr1%3A%205.16%20A%3C%2FP%3E%3CP%3Eddr_controller-virtual-0%3CBR%20%2F%3EAdapter%3A%20Virtual%20device%3CBR%20%2F%3Etemp1%3A%20%2B45.0%C2%B0C%20(crit%20%3D%20%2B95.0%C2%B0C)%3C%2FP%3E%3CP%3Ecore_cluster-virtual-0%3CBR%20%2F%3EAdapter%3A%20Virtual%20device%3CBR%20%2F%3Etemp1%3A%20%2B45.0%C2%B0C%20(crit%20%3D%20%2B95.0%C2%B0C)%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2078733%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Building%20kernel%20and%20deploying%20to%20device%20for%20LS1028ARDB%3A%20kernel%20configs%20not%20saving%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2078733%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EYes%2C%20I%20found%20the%20CONFIG_I2C_MPC%20is%20unavailable.%3C%2FP%3E%0A%3CP%3EHave%20you%20enable%20the%20CONFIG_SENSORS_INA2XX%3Dy%3F%3C%2FP%3E%0A%3CP%3EIf%20you%20enable%20it%2C%20you%20would%20find%20logs%20below%20after%20you%20install%20the%20lm-sensors.%3C%2FP%3E%0A%3CP%3Eroot%40localhost%3A%2Fboot%2F%23%20sensors%3C%2FP%3E%0A%3CP%3Eina220-i2c-3-40%3C%2FP%3E%0A%3CP%3EAdapter%3A%20i2c-0-mux%20(chan_id%202)%3C%2FP%3E%0A%3CP%3Ein0%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%203.00%20mV%3C%2FP%3E%0A%3CP%3Ein1%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201.00%20V%3C%2FP%3E%0A%3CP%3Epower1%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%204.40%20W%3C%2FP%3E%0A%3CP%3Ecurr1%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%204.58%20A%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2078680%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Building%20kernel%20and%20deploying%20to%20device%20for%20LS1028ARDB%3A%20kernel%20configs%20not%20saving%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2078680%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThe%20.config%20file%20you%20refer%20to%20is%20the%20one%20in%20build%2Flinux%2Flinux%2Farm64%2FLS%2Foutput%2FLSDK-21.08%2F%2C%20correct%3F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI%20tried%20adding%20the%20new%20CONFIG%20statements%20into%20that%20file%2C%20but%20after%20the%20build%20when%20I%20check%20the%20file%20again%2C%20the%20CONFIG_I2C_MPC%20line%20has%20been%20automatically%20removed.%20Does%20that%20seem%20right%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2076039%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Building%20kernel%20and%20deploying%20to%20device%20for%20LS1028ARDB%3A%20kernel%20configs%20not%20saving%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2076039%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20lang%3D%22en-US%22%3EIn%20the%20linux%20file%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20lang%3D%22en-US%22%3E%24%20vi%20.config%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20lang%3D%22en-US%22%3EIn%20the%20file%20.config%2C%20add%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20lang%3D%22en-US%22%3ECONFIG_I2C_MPC%3Dy%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20lang%3D%22en-US%22%3ECONFIG_SENSORS_INA2XX%3Dy%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20lang%3D%22en-US%22%3E%24%20sudo%20apt-get%20install%20gcc-aarch64-linux-gnu%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20lang%3D%22en-US%22%3E%24%20export%20CROSS_COMPILE%3Daarch64-linux-gnu-%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20lang%3D%22en-US%22%3E%24%20export%20ARCH%3Darm64%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20lang%3D%22en-US%22%3Emake%20mrproper%3Bmake%20defconfig%3Bmake%20lsdk.config%3Bmake%20menuconfig%3Bmake%3C%2FP%3E%3C%2FLINGO-BODY%3E