yocto image size gets increased with increase in partition size - yocto

I am creating an empty partition for my yocto image file(.wic) by adding below line to directdisk.wks:
part /opt --use-uuid --fstype=ext4 --label user --align 1024 --size 1024
Able to create a partition but the image size gets increased i.e. image size + partition size. let's say, I have created empty /opt partition of 1GB, then 1.53 GB(initial image size) + 1 GB(/opt) = 2.53 GB(new image size). My concern is what happens with a 128 GB SSD allocated fully with partitions. Will the image size be 128 GB?
Is there a way to generate .wic unaffected with empty partition
size?

Related

How is the size of a PNG file determined?

The image properties for this image say that the width and height are respectively 340 pixels and 471 pixels. The bit depth is 24 bits. My understanding was that this means that the value associated with each pixel is encoded using 24 bits. So I expected the file size to be around 471 * 340 * 24 = 3843360 bits = 480420 bytes =480 KB. But then one of the image properties says the size of the file is 9.98 KB. Why the big difference?
I am reading the images into a convolutional neural network where I need to supply the input shape.
Below is a screenshot of image properties
Below is a screenshot of actual image:
The PNG image format is designed to support lossless data compression. The file size you calculated is completely uncompressed, just raw image data. To save disk space, the file is compressed, and given your example of the image, this can be done very effectively because most of the image is exactly the same color.

How to increase disk size when building yocto

The default yocto image is about 1GB after bitbake core-image-minimal.
The free space is couple hundred MB.
How to assign or increase it?
Let's say you want to add 8G extra then you can set following in local.conf
IMAGE_ROOTFS_EXTRA_SPACE_append = " + 8000000"
Another way to do is to set IMAGE_OVERHEAD_FACTOR which will increase the size of image proportionally to the size of the content of image e.g.
IMAGE_OVERHEAD_FACTOR = "1.5"
will multiply the original size with 1.5 to create the final image.
also read through documentation for details.

Is frame number actually base address of memory where pages stored in paging?

My question is related to the paging system of memory management.
I'm a little bit confused about the frame number.
Is frame number actually base address of memory where a page stored?
If it is base address then why OS does multiplication frame number × page size (page no. × frame size + offset) to find the physical address.
Can't it just add offset with frame number to find a physical address?
Physical memory is divided into PAGE FRAME.
A process logical address space is divided into PAGES.
The page table maps PAGES to PAGE FRAMES.
Is frame number actually base address of memory where a page stored?
NO.
If it is base address then why OS does multiplication frame number × page size (page no. × frame size + offset) to find the physical address. Can't it just add offset with frame number to find physical address.
It's not.

How to make logrotate working for already existing log files?

I have written a conf that would compress the logs daily to the maximum size of 2GB. I have allowed a total of 3 such log rotated files:
/var/log/upstart/*.log {
daily
rotate 3
size 2G
compress
delaycompress
}
However, the directory where this file is located, it is not experiencing any log rotation. It became 10B in size.

ImageIO causes more memory to be allocated than the size of the images

I have 5 UIimageViews which display .png files, each max 200kb, but ImageIO allocates around and average of 1.3 mb for each. totaling 7.3 mb for the view when loaded.
What is causing this to happen?
I have another class with same amount of images and that allocates only 2 mb max.
As far as I understand images are stored in memory in raw RGBA data (red, green, blue, alpha). So load you load png/jpeg (both compressed formats) iPhone uses 4 bytes per pixel. So 100x100 image will be 40000 bytes. Waht size are your images?