Plop Linux - Build ToolsTable of Contents
IntroductionYou can rebuild the whole Plop Linux from it's sources and create release archives with the build tools. Download
Current version: 24.2, 15/Feb/2024
Sources and Compile ScriptsDownload ploplinux-src-24.2.tar.gz (5.07 GB) to get the sources and compile scripts. ploplinux-nosrc-24.2.tar.gz (65.16 MB) has only the build scripts. Get the sources with a download script. Individual files can be downloaded here.
The primary directories are 05-configs/ <- Minimal /etc directory and compile scripts 10-kernel/ <- Linux Kernel Source Code + Firmware Archive 15-build-tools/ <- Some simple helper scripts 20-core/ <- Core programs (first build tree) 30-console/ <- Console programs (tools, network) 40-X/ <- Xorg, Xfce, Fluxbox, GUI programs 50-server/ <- Server programs (Webserver, MySQL, PHP, Mailing) 99-cleanup/ <- Cleanup scripts 99-optional/ <- Optional packages Compile scriptsScripts with the name 000_all are used to run all script with the flag b. Scripts with the name 001_continue are used to run continue the automatic build when the user interrupted 000_all. It continues with the compile script stored in the file x_current. The compile scripts name convention is [number]_[flag]_[name] number: For compilation sequence. flag: The flag can be b or X. b means the script will be started by 000_all or 001_continue. X means the script will be ignored by 000_all or 001_continue. name: The name of the package. You can either run single compile scripts. sh 050_b_zlib Or you use the 000_all script to execute all scripts with the b flag. This script creates a log output in the directory 009-logs/. The script does not stop on errors! sh 000_all The sources are in the 000_src/ directory. Additional files and patches are in the 000_src-add/ directory. A usual compile script looks like this tar xfz 000_src/bison-3.0.2.tar.gz cd bison-3.0.2 myconfigure But it can be also more complex #!/bin/sh tar xfz 000_src/e2fsprogs-1.42.12.tar.gz cd e2fsprogs-1.42.12 if [ "$(uname -m)" = "x86_64" ] then myconfigure --with-root-prefix="" \ --enable-elf-shlibs \ --disable-libblkid \ --disable-libuuid \ --disable-uuidd \ --disable-fsck \ --libdir=/lib64 else myconfigure --with-root-prefix="" \ --enable-elf-shlibs \ --disable-libblkid \ --disable-libuuid \ --disable-uuidd \ --disable-fsck fi make install make install-libs cd lib/et make install if [ "$(uname -m)" = "x86_64" ] then mv -v /lib64/pkgconfig/* /usr/lib64/pkgconfig rmdir /lib64/pkgconfig ln -sfv ../../lib64/libext2fs.so /usr/lib64 ln -sfv ../../lib64/libe2p.so /usr/lib64 fi Program updateJust download the new source code of the program. Store it in the 000_src/ directory and update the coresponding compile script with the new file name. Then run the updated compile script. Script 002_downloadThe 002_download script downloads the source code files. The script reads the file locations from the 000_src-add/download.list. Build Live ReleaseThe scripts are short and easy to understand. The most important functions and workflows are described here. You can build the standard version or create a custom Live version with additional programs. 1. Plop Linux Release ToolsDownload the ploplinux-release-24.2.tar.gz archive. Contents: desktop/arm-boot/ desktop/hd-images/ desktop/release/ live/create-core-sqfs/ <- Create the core files bin.sqfs, sbin.sqfs, lib|64.sqfs, usr.sqfs live/create-opt-sqfs/ <- Create the opt.sqfs file live/initramfs/ <- Create the initramfs.gz file live/release/ <- Create the compressed files for the Live Version 2. Build initramfsYou can build the initramfs for i486 and x86_64. The initramfs is using busybox and some boot scripts. You find the busybox source code and configuration files in the busybox/ directory. Build the final initramfs.gz with the 2 build scripts 1makeimage-i486 and 1makeimage-x86_64. The initramfs.gz has a minimal etc/ directory to boot Plop Linux. 3. etc.tgzThe etc.tgz will be extracted to /etc. Update etc.tgz to change or add configurations. 4. Core SQFS filesYou can create a live version from your personal Plop Linux with all your installed programs. It's also possible to create a size reduced version. The core Squashfs files are bin.sqfs, sbin.sqfs, lib.sqfs, lib64.sqfs, usr.sqfs. 4.1. Standard versionIn the directory create-core-sqfs/01-standard/ are 2 scripts. 10_copy-files-all is used to copy the directories /bin, /sbin, /lib, /lib64, /usr to the files/ directory. 20_mksquashfs creates the Squashfs files bin.sqfs, sbin.sqfs, lib.sqfs, lib64.sqfs, usr.sqfs from the directories in the files/ directory. You find the created Squashfs files also in the files/ directory. 4.2. Reduced sizeWhen you want smaller Squashfs files or you don't want all programs in the Squashfs files, maybe you don't want GCC in your Live Version or you want to reduce the size with stripping the binaries, then use the scripts in create-core-sqfs/02-reduced-size/. The skel-files/ directory is used as template. All the files in the skel-files/ directory will be copied from / to the files/ directory. You can create the template in skel-files/ by yourself or use scripts. The 10_copy-all-to-skel copies all files from / to skel-files/. Then use 30_cleanup-skel-files to remove all unwanted files. The 30_cleanup-skel-files example removes gcc and a lot of other files. Modify it for your needs. Another way to create the skel-files/ template is to use a filelist file. The script 10_copy-to-skel-from-list is reading the file skel-files.list and copies the files to the skel-files/ directory. When the skel-files/ template directory is ready then use 40_copy-files to copy the files from / to files/. To reduce the size of the binary files use the script
50_stripfiles. The final step is to run 90_mksquashfs to create the bin.sqfs, sbin.sqfs, lib.sqfs, lib64.sqfs, usr.sqfs files. You find them in the files/ directory. 5. Create the opt.sqfs fileCreate the opt.sqfs file with the scripts in create-opt-sqfs/. The file opt.sqfs is optional and not required to boot the Live Version of Plop Linux. The file opt.sqfs is the compressed version of the /opt/ directory. When you don't need the programs of /opt/ then it's not needed to add the opt.sqfs file to your Plop Linux Live Version. The directory additional/ is used to automatically add files to opt.sqfs. Use 10_copy-opt to copy the /opt/ directory and the content of ./additional/ to ./opt/. You can reduce the size of the opt/ directory with the 20_strip script. The script 30_mksqfs does some required modifications in the opt/ directory and creates the opt.sqfs file. The opt.sqfs has a own etc.tgz with the configurations for the programs in /opt. This etc.tgz will be extracted during boot and the config files became available through /etc/opt/. The root.conf.tgz file in opt.sqfs adds required files to the root user home directory. 6. Build release filesUse the scripts in release-live/ to create the ISO and compressed release files. To use your own custom Squashfs file, overwrite the sqfs files in the ploplinux directory with your own files. Remove the opt.sqfs file when you don't need it. Use the make-all.sh script to create the iso, tar.gz and zip files for the i486 and x86_64 version. This script just call the other make scripts with the release version as parameter. Just view the make-all.sh script. Note: The file ploplinux/ploplinux.version is used to find Plop Linux and keeps the release information. Build Desktop ReleaseThe scripts are short and easy to understand. The most important functions and workflows are described here. Plop Linux Release ToolsDownload the ploplinux-src-24.2.tar.gz archive. Contents: desktop/arm-boot/ <- Boot files for ARM desktop/hd-images/ <- Create the hard disk images desktop/release/ <- Create the compressed files for the desktop version live/create-core-sqfs/ live/create-opt-sqfs/ live/initramfs/ live/release/ Directories and scriptsarm/ <- ARM Plop Linux files arm-diff/ <- Different files for ARM etc/ <- Default etc files root/ <- Default root user directory var/ <- Default var files 00_all.sh <- Run all x86 scripts 00_arm-all.sh <- Run all ARM scripts 10_arm-copy-files <- Use arm/ directory 10_copy-files-all <- Use / directory 20_prepare <- Plop Linux Desktop default modifications 30_arm-compress <- Create tar.gz for ARM 30_compress <- Create tar.gz for x86 arm/: Copy the ARM Plop Linux Files to this directory. arm-diff/: This is the place for ARM files that differe from the x86 version. etc/: Default files like password files that can differ from your working Linux. root/: Default root user directory. var/: var files that differ from your working Linux. 00_all.sh: This script runs the scripts for a x86 release 10-copy-files-all, 20-prepare, 30-compress. 00_arm-all.sh: This script runs the scripts for the ARM release 10-arm-copy-files, 20-prepare, 30-arm-compress. 10_arm-copy-files: This script copies the ARM files from arm/ to ploplinux-desktop/ for further processing. 10_copy-files-all: This script copies the files from / to the ploplinux-desktop/ for further processing. 20_prepare: Prepare ploplinux-desktop/ for release 30_arm-compress: Rename ploplinux-desktop/ to the ARM release directory and compress to tar.gz. 30_compress: Rename ploplinux-desktop/ to the x86 release directory depending on the current arch version and compress to tar.gz. Create hard disk images (x86 and ARM)Plop Linux Release ToolsDownload the ploplinux-src-24.2.tar.gz archive. Contents: create-core-sqfs/ create-opt-sqfs/ hd-images/ <- Create the hard disk images initramfs/ release-desktop/ release-live/ You find the scripts to create hard disk images in the hd-images/ directory. Create the imageRun sh 10_create-img to create the image file. The image size can be set in the 10_create-img script. It's set to 10 GB. The script creates one linux partition in the image file. The partition of the image file will be mounted to the ./mnt/ directory. Copy/Extract the Plop Linux files to the ./mnt/ directory.
For a x86 image: Run 20_x86_lilo.conf to replace the lilo.conf on the image to boot from IDE. Needed to make the image bootable. Run 90_umount to unmount the image file. Make the x86 image bootableUse QEMU and plopkexec to make the image bootable. Boot the image with qemu -hda ploplinux.img -kernel plopkexec Make the MBR bootable lilo -M /dev/hda Install LILO with the command lilo Shutdown the virtual machine init 0 Done Test the x86 imageBoot the hard disk image with qemu -hda ploplinux.img -m 512 Note: -m 512 is used to allocate 512 MB RAM for the virtual machine. You can allocate more. Example: -m 1024. Test the ARM imageSee here. Optional: Install systemdYou find the systemd package in the ploplinux-src-24.2.tar.gz archive in the directory 99-optional/systemd/ or as direct download here. You compile systemd like the other programs. See Build Tools Sources and Compile Scripts. I tried systemd, but finally I was not happy with this system. I prefer the simple clean style of SysV. © 2024 by
Elmar Hanlhofer |