cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kevinkit
Observer
Observer
156 Views
Registered: ‎08-10-2020

Best practice for keeping changes in image

Hello,

I am very new to the Embedded Linux / Petalinux world, and I am facing the following problem:

I have created an Image (custom image for vitis ai 1.2.1 with Vitis Flow), however I need to do "many" changes after the boot, such things as changing the eth0 interface, and installing libunilog and all the needed libs needed for VITIS-AI. However, after I reboot all the changes are gone. I understand, that this is due to the image being loaded into the ram, and therefore changes will not sustain.

So, I thought about solutions to this, but I do not know what is "really possible" (for someone who has not much experience). On the one hand I know that it is possible to split up the SD Card into two partitions (BOOT & ROOT), - however I do not know how to do this with Vitis-AI, and I am not sure if it is even possible to do so. The tutorial I rely on does not really support that.

Another possible would be to create a script and copy the needed rpm files at the beginning to the SD-Card and simply call the script for executing the changes to the interface and install the needed libs etc. - this would be an easy to implement solution, but is this the way to go?

I am hoping to get some feedback from experienced developers what the best practice is


Greetings,

Kevin


0 Kudos
1 Reply
aravindb
Moderator
Moderator
124 Views
Registered: ‎02-07-2018

HI @kevinkit 

Please  copy ext4 filesystem to sdcard 2nd partition & use it.

 

Please disable the  INITRAMFS using below steps

petalinux-config -c kernel

 General setup  --->   [ ] Initial RAM filesystem and RAM disk (initramfs/initrd) support 

 

 By default is enabled , you should unselect it. save & exit

 

Note: if you want to boot from mmc  2nd partition , then you need to extract your rootfs in your 2nd partition and specify proper bootargs in your u-boot environment.

 copy BOOT.BIN and Image.ub into SD-Card 1st partition and extract

Your  rootfs to 2nd partition like this below tar -xvf  rootfs.tar.gz -C /media/rootfs/.

Once you get u-boot console run below command:

setenv bootargs 'console=ttyPS0,115200n8 root=/dev/mmcblk0p2 rw  rootfstype=ext4 rootwait'

 

Thanks & regards

Aravind

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

 

0 Kudos