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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
956 次查看
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 项奖励
回复
1 解答
890 次查看
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 项奖励
回复
4 回复数
899 次查看
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 项奖励
回复
891 次查看
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 项奖励
回复
932 次查看
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 项奖励
回复
908 次查看
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 项奖励
回复