Poudriere enhancements to CCACHE for compiling GhostSBD-ARM64 source code

Poudriere enhancements to CCACHE for compiling GhostSBD-ARM64 source code

URLS to read and study: 
How to get Started with FreeBSD
Poudriere setup and configuration
BuildBot install and setup
My first blog post about setting up Poudriere for GhostBSD-ARM64 package compiling
 

PACKAGESITE setup and VERSION  Freebsd Forums post 70285

Use this to set up your PACKAGESITE environmental variable
set PACKAGESITE "http://pkg.freebsd.org/freebsd:13:aarch64/latest"
export PACKAGESITE
 
Do not have a trailing slash character at the end of the string '/'


 

How to Install Packages with pkg on FreeBSD 13?

 
ZENAMOR document on using pkg packaging tutorial. Very good to read.

4.6. Building Packages with poudriere

 
FreeBSD Handbook Chapter 4 Packaging

FreeBSD.org pkg mirror


Edit poudriere.conf file to use CCACHE; make directory ccache

ls -l /var/cache
mkdir /var/cache/ccache
ls -l /var/cache
 
enable CCACHE by uncommenting line in file /usr/local/etc/poudriere.conf
CCACHE_DIR=/var/cache/ccache
 

 
 
 
SET Loopback Interface LOIP4=127.0.0.3

Start Poudriere Bulk build jail 13.2

poudriere bulk -j ghostbsd-13-2-aarch64 -p ghostbsd_ports -a 



/boot/loader.conf   contents

kern.vty=vt
# Configure USB OTG; see usb_template(4).
hw.usb.template=3
umodem_load="YES"
# Multiple console (serial+efi gop) enabled.
boot_multicons="YES"
boot_serial="YES"
# Disable the beastie menu and color
#beastie_disable="YES"
loader_color="NO"
zfs_load="YES"
kern.geom.label.disk_ident.enable=0
kern.geom.label.gptid.enable=0
vfs.zfs.debug=1
# vfs.root.mountfrom="zfs:zroot/ROOT/default"
# vfs.root.mountfrom="zfs:arm64pool/ROOT/default"
vfs.root.mountfrom="zfs:arm64pool/ROOT/default"

/etc/rc.conf    contents


hostname="fredselfbuilt_rpi4b"
ntpd_enable="YES"
ntpd_sync_on_start="YES"

sshd_enable="YES"
defaultrouter="192.168.1.1"   # for my Raspberry Pi 4B network
ifconfig_genet0="DCHP"
background_dhclient="YES"
zfs_enable="YES"
root@fredselfbuilt_rpi4b:~ #


 

Picture of the two files

Note, line should remove GPTID label devs. Is 1 in the picture, should be 0
kern.geom.label.gptid.enable=0
 
With kern.geom.label.gptid.enable=1 
root@fredselfbuilt_rpi4b:~ # ls -l /dev/gpt
total 0
crw-r-----  1 root operator 0x77 Oct 16 14:03 efibootarm
crw-r-----  1 root operator 0x7f Oct 16 14:03 swap
crw-r-----  1 root operator 0x7a Oct 16 14:03 zfs
root@fredselfbuilt_rpi4b:~ # 
There is some consideration of using GPT labels outside the ZFS file system to enable SWAP from a /etc/fstab file like this:

/etc/fstab  file contents

root@fredselfbuilt_rpi4b:~ # cat /etc/fstab
# /dev/gpt/rootfs  /         zfs     rw,noatime 1 1
# / dev/gpt/esp     /boot/efi msdosfs rw,noatime 0 0
## `k:wq
# /dev/gpt/swapfs  none      swap    sw         0 0
root@fredselfbuilt_rpi4b:~ #

ZFS  starts and enables the various file volumes and file systems internally

Display these parameters with the zfs get command:

zfs get mounted,canmount,mountpoint,setuid,atime,exec  arm64pool/ROOT/default

 

 

 

Messages from Poudriere for the 4 cpu cores available

 zvol_os_create_minor:1396[1]: Creating ZVOL arm64pool/poudriere/jails/ghostbsd-13-2-aarch64-ghostbsd_ports-ref/03...
zvol_os_create_minor:1396[1]: Creating ZVOL arm64pool/poudriere/jails/ghostbsd-13-2-aarch64-ghostbsd_ports-ref/02...
zvol_os_create_minor:1396[1]: Creating ZVOL arm64pool/poudriere/jails/ghostbsd-13-2-aarch64-ghostbsd_ports-ref/04...
zvol_os_create_minor:1396[1]: Creating ZVOL arm64pool/poudriere/jails/ghostbsd-13-2-aarch64-ghostbsd_ports-ref/01...
 
 https://www.cyberciti.biz/faq/create-a-freebsd-swap-file/  Create a swap file,  I prefer a 4 or 8 gigabyte swap partition

Edited file /etc/fstab  to change  /dev/gpt/swapfs to /dev/gpt/swap  so that matches labels on da0 disk parition gpt labels of /dev/da0p3  swap
 swapctl -Ag

Below picture of various Swapinfo options


Notice the display differences for swapinfo options -g -m -k  GB, MB, KB
 
 
Use VMSTAT -h   command to view if SWAP memory is used
 vmstat -h
last pid: 39758;  load averages:  5.36,  5.69, 5.74                                                                            up 0+02:56:43  17:00:19
90 processes:  6 running, 84 sleeping
CPU: 91.7% user,  0.0% nice,  8.1% system,  0.2% interrupt,  0.0% idle
Mem: 190M Active, 201M Inact, 213M Laundry, 2154M Wired, 170M Free
ARC: 1236M Total, 337M MFU, 772M MRU, 1284K Anon, 7888K Header, 116M Other
     997M Compressed, 1290M Uncompressed, 1.29:1 Ratio
Swap: 8192M Total, 867M Used, 7324M Free, 10% Inuse

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    C   TIME    WCPU COMMAND
39756 root          1  96    0    18M  7872K CPU1     1   0:02  87.98% awk
39537 root          5  58    0   218M   178M uwait    1   0:39  87.93% rustc
39741 root          1  98    0   139M    78M RUN      0   0:02  82.66% cc
39721 root          1 109    0   161M    80M RUN      1   0:07  82.54% c++
25218 root          1 110    0    31M    10M RUN      3   4:00  27.86% bsdtar
 2100 root          1  26    0    24M  4024K select   1   3:33   4.12% htop
 1588 root          1  24    0    20M  2896K select   1   3:39   3.71% htop
 1536 root          3  21   -1   239M    64M select   1   3:15   3.02% Xorg
25217 root          1  23    0    12M   624K pipewr   3   0:35   2.62% cat
 1582 root          4  20    0   101M    10M select   1   0:54   0.85% xfce4-terminal
39757 root          1  34    0    13M  2928K CPU1     1   0:00   0.59% awk
39718 root          1  20    0    14M  3400K CPU3     3   0:00   0.29% top
 1557 root         13  20    0   234M  6712K select   1   0:20   0.27% xfwm4
 1579 root          4  20    0    45M  2200K select   2   0:02   0.05% gvfsd-trash
86042 root          3  20    0    82M    59M uwait    3   0:11   0.02% cargo
 1294 ntpd          1  20    0    23M  1524K select   3   0:01   0.01% ntpd
 1697 root          1  20    0    15M  2968K select   2   2:05   0.00% sh
root@fredselfbuilt_rpi4b:~ #

 
Yes, 867M used10% Inuse of the 8192M Total  So, running Poudriere we do use some 10% swap.

swapon, swapoff, swapinfo, swapctl  Look at these  4 commands for use on FreeBSD and GhostBSD to enable, disable, or view your swap memory usage.
vmstat -h  give a view of swap memory usage

See this blog post for more memory viewing tools

I like these tools FreeColor causes it simple, green, and sweet and like the Free   memory command on Linux.  DUF because I can view Disk File Usage.  It is a simple package install for FreeBSD.  HTOP cause I can see colorful moving changes of processes and of the one line of SWAP memory usage.

freebsd-memory.sh script easy to Fetch and use!

fetch https://raw.githubusercontent.com/ocochard/myscripts/master/FreeBSD/freebsd-memory.sh
sh freebsd-memory.sh

You can avoid Perl based code and use standard sh shell to get same info using freebsd-memory.sh script:
 


Example of using Fetch to download freebsd-memory.sh.  Then execute the command  sh freebsd-memory.sh  to view status and usage of memory.





xfce4-screenshooter

pkg install xfce4-screenshooter

Should install xfce4-screenshooter app to document computer usage for your future needs.   As in, How did I do that task before?  Seems so simple, that i would have remembered how i did that.  Well here is your chance to shine in the Document Creation department, with nice Screen pictures of a mouse selected region of the window;  the active window ;  or the Whole enchilada Desktop.  You can even add a few seconds delay to get windows and mouse ready, before snapping that clean picture shot.  Now insert that .PNG file into Abiword document processor and you can create/build your own manual.  Take that .PNG screen shot file and upload image into https://blogger.com for publishing your document world wide!!

Scrot: Linux command-line screen grabs made simple

Scrot is a basic, flexible tool that offers a number of handy options for taking screen captures from the Linux command line.

 

DUF Disk Utility File size     &   FreeColor  memory and swap space usage

pkg install  duf  freecolor

Your computer is not your grandfathers 64K Tandy Color Computer with the 6809 Motorola cpu. Nor is it your Fathers Dell 286 PC with 640K dram.  More than enough memory.  "Nobody will ever use more than 640 Kilobytes, says Bill Gates!" You have a whopping 8,000 Megabytes of dram memory in your Raspberry Pi 4B.  You need a couple tools to check on Disk File Usage, duf and on Memory Space Usage, freecolor -m



DUF  disk file usage  shows the mounted ON and the filesystem good for ZFS.
Here is the package listing for duf and for freecolor


 
Here is an exmple of using FreeColor.   After the package lists
freecolor example

More examples of FreeColor version 0.9.3
 
You can select  -m megabyte , -k kilobyte, -b byte,  -t total size line, -V version, -o old style display with text numbers and NO bar graph.
I like  freecolor -m  so I have an idea of how much SWAP SPACE and memory this running system is taking up right now.



Comments

Popular posts from this blog

FreeBSD 14.0 Compiling kernel for Raspberry Pi 4B

HDMI Audio sound patches into GhostBSD source code /usr/ghost14/ghostbsd-src SOLVED Jan20 2024

How to install GhostBSD-Arm64 into a USB Flash Drive stick April 24, 2024 update edition.