Differences
This shows you the differences between two versions of the page.
| talk:picore:welcome [2026/01/24 07:49] – created geev03 | talk:picore:welcome [2026/01/24 07:55] (current) – geev03 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | A guide to compiling and packaging PARI/GP as a TinyCore .tcz extension | + | |
| - | + | Overview | |
| - | **Overview** | + | |
| PARI/GP is a fast computer‑algebra system widely used for number theory, algebra, and high‑precision arithmetic. This guide describes how to compile PARI/GP on piCore64 and package it into a proper TinyCore .tcz extension for persistent use. | PARI/GP is a fast computer‑algebra system widely used for number theory, algebra, and high‑precision arithmetic. This guide describes how to compile PARI/GP on piCore64 and package it into a proper TinyCore .tcz extension for persistent use. | ||
| The steps below were tested on piCore64 16.x running on Raspberry Pi hardware. | The steps below were tested on piCore64 16.x running on Raspberry Pi hardware. | ||
| + | |||
| + | Requirements | ||
| + | Load the required development tools and libraries: | ||
| + | |||
| + | tce-load -wi compiletc perl5 gmp-dev readline-dev ncurses-dev squashfs-tools | ||
| + | |||
| + | These provide the compiler, GMP support, readline, and the SquashFS utilities needed to build .tcz extensions. | ||
| + | |||
| + | Download and Unpack PARI/GP | ||
| + | mkdir -p ~/src | ||
| + | cd ~/src | ||
| + | wget https:// | ||
| + | tar xvf pari-2.17.3.tar.gz | ||
| + | cd pari-2.17.3 | ||
| + | |||
| + | Configure the Build | ||
| + | Configure PARI/GP to install into /usr/local and use GMP and readline: | ||
| + | |||
| + | ./Configure --prefix=/ | ||
| + | |||
| + | Compile and Install | ||
| + | make -j4 | ||
| + | sudo make install | ||
| + | |||
| + | This installs: | ||
| + | |||
| + | / | ||
| + | / | ||
| + | / | ||
| + | Create the .tcz Staging Directory | ||
| + | mkdir -p ~/ | ||
| + | |||
| + | Copy the installed files into the staging area: | ||
| + | |||
| + | cp -rf / | ||
| + | cp -rf / | ||
| + | cp -rf / | ||
| + | |||
| + | Strip Binaries (Optional) | ||
| + | strip ~/ | ||
| + | |||
| + | This reduces the final extension size. | ||
| + | |||
| + | Build the .tcz Extension | ||
| + | cd ~/tcz | ||
| + | mksquashfs pari-gp pari-gp.tcz -noappend | ||
| + | md5sum pari-gp.tcz > pari-gp.tcz.md5.txt | ||
| + | |||
| + | You should now have: | ||
| + | |||
| + | pari-gp.tcz | ||
| + | pari-gp.tcz.md5.txt | ||
| + | |||
| + | Install the Extension into TinyCore | ||
| + | Move the files into the extension directory: | ||
| + | |||
| + | sudo mv pari-gp.tcz / | ||
| + | sudo mv pari-gp.tcz.md5.txt / | ||
| + | |||
| + | Add it to the boot list: | ||
| + | |||
| + | echo " | ||
| + | |||
| + | Reboot and Test | ||
| + | sudo reboot | ||
| + | gp | ||
| + | |||
| + | You should see the PARI/GP banner and be able to run commands normally. | ||
| + | |||
| + | Notes | ||
| + | This extension is self‑contained and does not require persistence via filetool.sh. | ||
| + | If you want to include documentation or examples, place them under usr/ | ||
| + | The same method works for other mathematical tools such as GMP‑based calculators or Rust‑compiled number‑theory utilities. | ||
| + | |||
| + | | ||