# Projects

# 12-pin FFC ribbon for Raspberry Pi camera

[![image.png](https://kb.epesi.net/uploads/images/gallery/2024-10/scaled-1680-/4C4AY6PoII2KzWnB-image.png)](https://kb.epesi.net/uploads/images/gallery/2024-10/4C4AY6PoII2KzWnB-image.png)

FFC tape 12 pin 150mm 0.5 15cm type B tape  
  
Description: AWM 20624 80C 60V VW-1  
Number of pins: 12pin  
Raster: 0.5mm  
Tape width: about 6.5mm  
Tape length: 150mm

# Orange Pi PC 2 - OS image

Orange Pi PC2 SD card images  
[h](https://sd-card-images.johang.se/boards/orange_pi_pc2.html)[ttps://sd-card-images.johang.se/boards/orange\_pi\_pc2.html](https://sd-card-images.johang.se/boards/orange_pi_pc2.html)

---

Xunlong Orange Pi PC2 running Ubuntu 24.04 LTS

[![image.png](https://kb.epesi.net/uploads/images/gallery/2024-11/scaled-1680-/JvPmBps5O0SWTnPO-image.png)](https://kb.epesi.net/uploads/images/gallery/2024-11/JvPmBps5O0SWTnPO-image.png)

[![image.png](https://kb.epesi.net/uploads/images/gallery/2024-11/scaled-1680-/2ekFJKytCtECw3HC-image.png)](https://kb.epesi.net/uploads/images/gallery/2024-11/2ekFJKytCtECw3HC-image.png)

[![image.png](https://kb.epesi.net/uploads/images/gallery/2024-11/scaled-1680-/EKToaF0oM8X2yBhg-image.png)](https://kb.epesi.net/uploads/images/gallery/2024-11/EKToaF0oM8X2yBhg-image.png)

Disk layout - 64 GB but only 4 GB would be sufficient probably

[![image.png](https://kb.epesi.net/uploads/images/gallery/2024-11/scaled-1680-/mehAYLNTLLZyRvN3-image.png)](https://kb.epesi.net/uploads/images/gallery/2024-11/mehAYLNTLLZyRvN3-image.png)

It takes about 12 minutes. Unusable. 64 GB

It can be "shaved" and saved.

[https://web.archive.org/web/20200602173912/https://softwarebakery.com/shrinking-images-on-linux](https://web.archive.org/web/20200602173912/https://softwarebakery.com/shrinking-images-on-linux)

##### Truncate empty space from a raw dd image

[https://superuser.com/questions/958812/truncate-empy-space-from-a-raw-dd-image](https://superuser.com/questions/958812/truncate-empy-space-from-a-raw-dd-image)

Check for sector sizes:

sudo fdisk -l '/home/user/images/test.img'

Units: sectors of 1 \* 512 = 512 bytes  
Sector size (logical/physical): 512 bytes / 512 bytes  
I/O size (minimum/optimal): 512 bytes / 512 bytes  
Disklabel type: dos  
Disk identifier: 0x00070424

Device Boot Start End Sectors Size Id Type  
/home/user/images/test.img1 \* 2048 26623 24576 12M e W95 FAT16  
/home/user/images/test.img2 26624 7200767 7174144 3,4G 83 Linux  
Use end number (7200767) as reference add 1 and \* 512 like below:

sudo truncate --size=$\[(7200767+1)\*512\] '/home/user/images/test.img'  
Your file should be truncated

#### Opposite process:

[https://serverfault.com/questions/870594/resize-partition-to-maximum-using-parted-in-non-interactive-mode](https://serverfault.com/questions/870594/resize-partition-to-maximum-using-parted-in-non-interactive-mode)

---

### Locale error

[![image.png](https://kb.epesi.net/uploads/images/gallery/2024-11/scaled-1680-/NjHfydmaUfNlHSOV-image.png)](https://kb.epesi.net/uploads/images/gallery/2024-11/NjHfydmaUfNlHSOV-image.png)

How to fix the error:

-bash: warning: setlocale: LC\_ALL: cannot change locale (en\_US.UTF-8)

[https://stackoverflow.com/questions/27292368/vagrantfile-set-locale-for-ssh-agent](https://stackoverflow.com/questions/27292368/vagrantfile-set-locale-for-ssh-agent)

[![image.png](https://kb.epesi.net/uploads/images/gallery/2024-11/scaled-1680-/eBxlTAdewWza3xgQ-image.png)](https://kb.epesi.net/uploads/images/gallery/2024-11/eBxlTAdewWza3xgQ-image.png)

No more locale error.  
Only 96.6 MB of RAM used (out of 926 MB) or about 10% only.