Simplify support for multiple architectures

This commit is contained in:
fdupoux 2020-03-07 16:18:46 +00:00
parent 236c216902
commit fad6f9d360
4 changed files with 7 additions and 17 deletions

View file

@ -1 +0,0 @@
x86_64

View file

@ -9,10 +9,11 @@ https://git.archlinux.org/archiso.git
## Building SystemRescueCd
SystemRescueCd can be built for x86_64 or i686 architectures. It must be built
on archlinux (or archlinux32). The following packages must be installed on the
build system: archiso, grub, mtools. The archiso package must be modified to add
support for an option which allows to optimize the squashfs compression. The
patch can be found in the "patches" folder in this git repository.
on archlinux if you want to build a 64bit edition, or archlinux32 if you want
to create a 32bit edition. The following packages must be installed on the
build system: archiso, grub, mtools. The archiso package must be modified to
add support for an option which allows to optimize the squashfs compression.
The patch can be found in the "patches" folder in this git repository.
The package list contains packages which are not part of the official binary
package repositories. These packages need to be built from sources from the AUR
@ -24,12 +25,6 @@ The repo-add command must be used to generate the repository package index.
The pacman.conf file must be updated with the address of this repository so
custom packages can be accessed.
By default the target architecture will be x86_64. The following must be changed
in order to build a 32bit version instead:
* Update the ARCHITECTURE file (replace "x86_64" with "i686")
* Update Architecture in pacman.conf (replace "auto" with "i686")
* Replace archlinux repositories with archlinux32 repositories in pacman.conf
The build process can be started by running the build.sh script. It will create
a large "work" sub-directory and the ISO file will be written in the "out"
sub-directory.

View file

@ -4,7 +4,6 @@ set -e -u
script_path=$(readlink -f ${0%/*})
version_file="${script_path}/VERSION"
arch_file="${script_path}/ARCHITECTURE"
iso_name=systemrescuecd
iso_version="$(<${version_file})"
@ -16,7 +15,7 @@ install_dir=sysresccd
work_dir=work
out_dir=out
gpg_key=
arch="$(<${arch_file})"
arch="$(uname -m)"
sfs_comp="xz"
sfs_opts="-Xbcj x86 -b 512k -Xdict-size 512k"
@ -77,7 +76,7 @@ run_once() {
make_pacman_conf() {
local _cache_dirs
_cache_dirs=($(pacman -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g'))
sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${_cache_dirs[@]})|g" ${script_path}/pacman.conf > ${work_dir}/pacman.conf
sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${_cache_dirs[@]})|g; s|^Architecture\s*=.*$|Architecture = ${arch}|" ${script_path}/pacman.conf > ${work_dir}/pacman.conf
}
# Base installation, plus needed packages (airootfs)

View file

@ -78,13 +78,10 @@ SigLevel = Optional TrustAll
[core]
Include = /etc/pacman.d/mirrorlist
#Server = http://de.mirror.archlinux32.org/$arch/$repo
[extra]
Include = /etc/pacman.d/mirrorlist
#Server = http://de.mirror.archlinux32.org/$arch/$repo
[community]
Include = /etc/pacman.d/mirrorlist
#Server = http://de.mirror.archlinux32.org/$arch/$repo