diff --git a/.reuse/dep5 b/.reuse/dep5 index 4d437e1..e499642 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -9,6 +9,6 @@ Source: https://github.com/fosslinux/live-bootstrap # Copyright: $YEAR $NAME <$CONTACT> # License: ... -Files: sys*/*/sources sysa/checksum-transcriber.*.SHA256SUM sysa/*/*.checksums sysa/SHA256SUMS.pkgs sysa/*/simple-patches/* +Files: sys*/*/sources sysa/*/*.checksums sysa/SHA256SUMS.pkgs sysa/*/simple-patches/* Copyright: none License: MIT diff --git a/sysa/checksum-transcriber.amd64.SHA256SUM b/sysa/checksum-transcriber-1.0/checksum-transcriber-1.0.amd64.checksums similarity index 100% rename from sysa/checksum-transcriber.amd64.SHA256SUM rename to sysa/checksum-transcriber-1.0/checksum-transcriber-1.0.amd64.checksums diff --git a/sysa/checksum-transcriber-1.0/checksum-transcriber-1.0.kaem b/sysa/checksum-transcriber-1.0/checksum-transcriber-1.0.kaem new file mode 100644 index 0000000..6599471 --- /dev/null +++ b/sysa/checksum-transcriber-1.0/checksum-transcriber-1.0.kaem @@ -0,0 +1,20 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2023 fosslinux +# +# SPDX-License-Identifier: GPL-3.0-or-later + +set -ex + +# Build & install +M2-Mesoplanet --architecture ${ARCH} -f src/checksum-transcriber.c -o ${BINDIR}/checksum-transcriber + +# Checksums +if match x${UPDATE_CHECKSUMS} xTrue; then + sha256sum -o ${pkg}.${ARCH}.checksums \ + /usr/bin/checksum-transcriber + + cp ${pkg}.${ARCH}.checksums ${SRCDIR} +else + sha256sum -c ${pkg}.${ARCH}.checksums +fi diff --git a/sysa/checksum-transcriber.riscv64.SHA256SUM b/sysa/checksum-transcriber-1.0/checksum-transcriber-1.0.riscv64.checksums similarity index 100% rename from sysa/checksum-transcriber.riscv64.SHA256SUM rename to sysa/checksum-transcriber-1.0/checksum-transcriber-1.0.riscv64.checksums diff --git a/sysa/checksum-transcriber.x86.SHA256SUM b/sysa/checksum-transcriber-1.0/checksum-transcriber-1.0.x86.checksums similarity index 100% rename from sysa/checksum-transcriber.x86.SHA256SUM rename to sysa/checksum-transcriber-1.0/checksum-transcriber-1.0.x86.checksums diff --git a/sysa/checksum-transcriber.c b/sysa/checksum-transcriber-1.0/src/checksum-transcriber.c similarity index 100% rename from sysa/checksum-transcriber.c rename to sysa/checksum-transcriber-1.0/src/checksum-transcriber.c diff --git a/sysa/kexec-fiwix/kexec-fiwix.checksums b/sysa/kexec-fiwix-1.0/kexec-fiwix-1.0.checksums similarity index 100% rename from sysa/kexec-fiwix/kexec-fiwix.checksums rename to sysa/kexec-fiwix-1.0/kexec-fiwix-1.0.checksums diff --git a/sysa/kexec-fiwix/kexec-fiwix.kaem b/sysa/kexec-fiwix-1.0/kexec-fiwix-1.0.kaem similarity index 100% rename from sysa/kexec-fiwix/kexec-fiwix.kaem rename to sysa/kexec-fiwix-1.0/kexec-fiwix-1.0.kaem diff --git a/sysa/kexec-fiwix/src/kexec-fiwix.c b/sysa/kexec-fiwix-1.0/src/kexec-fiwix.c similarity index 94% rename from sysa/kexec-fiwix/src/kexec-fiwix.c rename to sysa/kexec-fiwix-1.0/src/kexec-fiwix.c index 0c38b09..9c4d1f5 100644 --- a/sysa/kexec-fiwix/src/kexec-fiwix.c +++ b/sysa/kexec-fiwix-1.0/src/kexec-fiwix.c @@ -81,11 +81,11 @@ int main() { char *bare_metal = getenv("BARE_METAL"); if (bare_metal != NULL && strcmp(bare_metal, "True") == 0) { - sprintf(cmdline, "fiwix root=/dev/ram0 ramdisksize=%d initrd=sysa.ext2 kexec_proto=linux kexec_size=67000 kexec_cmdline=\"init=/init\"", INITRD_MB * 1024); + sprintf(cmdline, "fiwix root=/dev/ram0 ramdisksize=%d initrd=fiwix.ext2 kexec_proto=linux kexec_size=67000 kexec_cmdline=\"init=/init\"", INITRD_MB * 1024); } else { - sprintf(cmdline, "fiwix console=/dev/ttyS0 root=/dev/ram0 ramdisksize=%d initrd=sysa.ext2 kexec_proto=linux kexec_size=67000 kexec_cmdline=\"init=/init console=ttyS0\"", INITRD_MB * 1024); + sprintf(cmdline, "fiwix console=/dev/ttyS0 root=/dev/ram0 ramdisksize=%d initrd=fiwix.ext2 kexec_proto=linux kexec_size=67000 kexec_cmdline=\"init=/init console=ttyS0\"", INITRD_MB * 1024); } char * boot_loader_name = "kexec-fiwix"; @@ -117,8 +117,8 @@ int main() { pmultiboot_module->mod_end = 0x1C6000 + (INITRD_MB * 1024 * 1024); next_avail_mem += sizeof(multiboot_module_t); pmultiboot_module->cmdline = next_avail_mem; - strcpy((char *) next_avail_mem, "sysa.ext2"); - next_avail_mem += (strlen("sysa.ext2") + 1); + strcpy((char *) next_avail_mem, "fiwix.ext2"); + next_avail_mem += (strlen("fiwix.ext2") + 1); /* Set memory map info */ pmultiboot_info->mmap_addr = next_avail_mem; @@ -182,7 +182,7 @@ int main() { int filenum; unsigned int filename_addr; for (filenum = 4, filename_addr = 0x201000; filenum <= 14335; filenum++, filename_addr += 1024) { - if (!strcmp((char *) filename_addr, "/boot/sysa.ext2")) { + if (!strcmp((char *) filename_addr, "/boot/fiwix.ext2")) { printf("Found image at filenum %d\n", filenum); break; } diff --git a/sysa/kexec-fiwix/src/multiboot1.h b/sysa/kexec-fiwix-1.0/src/multiboot1.h similarity index 100% rename from sysa/kexec-fiwix/src/multiboot1.h rename to sysa/kexec-fiwix-1.0/src/multiboot1.h diff --git a/sysa/lwext4-1.0.0-lb1/files/make_fiwix_initrd.c b/sysa/lwext4-1.0.0-lb1/files/make_fiwix_initrd.c index 9a05508..728a09d 100644 --- a/sysa/lwext4-1.0.0-lb1/files/make_fiwix_initrd.c +++ b/sysa/lwext4-1.0.0-lb1/files/make_fiwix_initrd.c @@ -205,10 +205,10 @@ int main(int argc, char **argv) next_file_address = *((unsigned int *) 0x7F8D); - printf("Starting sysa.ext2 at addr 0x%08x\n", next_file_address); + printf("Starting fiwix.ext2 at addr 0x%08x\n", next_file_address); /* Create zeroed out disk image file */ - input_name = "/boot/sysa.ext2"; + input_name = "/boot/fiwix.ext2"; memset(zeros, 0, BLOCK_SIZE); FILE *ext2file = fopen(input_name, "w"); diff --git a/sysa/run.kaem b/sysa/run.kaem index c506204..e11b79b 100755 --- a/sysa/run.kaem +++ b/sysa/run.kaem @@ -9,13 +9,19 @@ set -ex -# checksum-transcriber utility M2LIBC_PATH=/M2libc -M2-Mesoplanet --architecture ${ARCH} -f checksum-transcriber.c -o ${BINDIR}/checksum-transcriber -sha256sum -c checksum-transcriber.${ARCH}.SHA256SUM + +# checksum-transcriber utility +pkg="checksum-transcriber-1.0" +cd ${pkg} +kaem --file ${pkg}.kaem +cd .. # simple patch tool based on before and after chunks -M2-Mesoplanet --architecture ${ARCH} -f simple-patch.c -o ${BINDIR}/simple-patch +pkg="simple-patch-1.0" +cd ${pkg} +kaem --file ${pkg}.kaem +cd .. # Environmental variables needed for mes NYACC_PKG=nyacc-1.00.2 @@ -69,7 +75,7 @@ if match x${BUILD_FIWIX} xTrue; then cd .. # Live boot loader for Fiwix - pkg="kexec-fiwix" + pkg="kexec-fiwix-1.0" cd ${pkg} kaem --verbose --file ${pkg}.kaem cd .. diff --git a/sysa/simple-patch-1.0/simple-patch-1.0.kaem b/sysa/simple-patch-1.0/simple-patch-1.0.kaem new file mode 100644 index 0000000..7ad2dc2 --- /dev/null +++ b/sysa/simple-patch-1.0/simple-patch-1.0.kaem @@ -0,0 +1,20 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2023 fosslinux +# +# SPDX-License-Identifier: GPL-3.0-or-later + +set -ex + +# Build & install +M2-Mesoplanet --architecture ${ARCH} -f src/simple-patch.c -o ${BINDIR}/simple-patch + +# Checksums +if match x${UPDATE_CHECKSUMS} xTrue; then + sha256sum -o ${pkg}.checksums \ + /usr/bin/simple-patch + + cp ${pkg}.checksums ${SRCDIR} +else + sha256sum -c ${pkg}.${ARCH}.checksums +fi diff --git a/sysa/simple-patch-1.0/simple-patch-1.0.x86.checksums b/sysa/simple-patch-1.0/simple-patch-1.0.x86.checksums new file mode 100644 index 0000000..adfd26c --- /dev/null +++ b/sysa/simple-patch-1.0/simple-patch-1.0.x86.checksums @@ -0,0 +1 @@ +bf49a897e96fe4052904aaedc8281f6849e3dc1836899d393c43726cc8f5e92e /usr/bin/simple-patch diff --git a/sysa/simple-patch.c b/sysa/simple-patch-1.0/src/simple-patch.c similarity index 100% rename from sysa/simple-patch.c rename to sysa/simple-patch-1.0/src/simple-patch.c