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 ?
已解决! 转到解答。
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
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