Adding udev rules and/or netplan config.yaml file to Ubuntu devel rfs

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

Adding udev rules and/or netplan config.yaml file to Ubuntu devel rfs

跳至解决方案
835 次查看
hungtran669
Contributor I

I couldn't find any examples of updating networking related stuff like netplan config.yaml or udev rules to the Ubuntu devel distro for flex-builder. Is there a simple way to do this or do we need to follow "How to add a new app component in Flexbuid" to just copy the files to the appropriate location like /etc/netplan ? 

 

0 项奖励
回复
1 解答
818 次查看
yipingwang
NXP TechSupport
NXP TechSupport
You method is correct.

在原帖中查看解决方案

0 项奖励
回复
3 回复数
821 次查看
hungtran669
Contributor I

Hi yipingwang,

Thanks for the feedback. But in my case I want to be able to commit these changes to the repo and make it permanent. In your example above, the changes it is pack and compress the rfs with the changes within the build. 

Is there a way to make it config.yaml change permanent to be able to commit to repo or even any other changes to rfs (I had other question like how to update /etc/sshd_config file, or adding files to /lib/systemd/network/..)?

What I ended up doing was add it as a component:

1) Add config.yaml under components/apps/networking/netplan_config/

2) Create a netplan_config.mk under packages/app/networking/ which would create the directory, copy the file over to the destination:

...

cd $(NETDIR)/netplan_config && \
mkdir -p $(DESTDIR)/etc/netplan && \
cp config.yaml $(DESTDIR)/etc/netplan/ && \

..

3) Run 'flex-builder -c netplan_config -r ubuntu:devel -a arm64'

4) Run 'flex-builder -i merge-component -r ubuntu:devel -a arm64'

5) flex-builder -i packrfs -r ubuntu:devel -a arm64

This appears to do what I need but I'm not sure if this is the right way to handle it or if there is an easier solution? For example, under packages there is a rfs/misc/udev/udev-rules-qoriq directory, could it be there is a way to just add say a rfs/misc/netplan directory and put config.yaml in there?

Thanks,

Hung

0 项奖励
回复
819 次查看
yipingwang
NXP TechSupport
NXP TechSupport
You method is correct.
0 项奖励
回复
825 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Please execute the following command.

$ flex-builder -i mkrfs -r ubuntu:main

Then go to folder build/rfs/rootfs_lsdk2108_ubuntu_main_arm64, add config.yaml in etc/netplan or put udev rules in folder etc/udev/rules.d/.

Run the following command to get rootfs_lsdk2108_ubuntu_main_arm64.tgz in folder build/images/.

$ flex-builder -i packrfs  

0 项奖励
回复