Merge pull request #341 from fosslinux/early-tools
Early tools in subdirectories
This commit is contained in:
commit
d4e0fc9911
|
@ -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
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
|
||||
#
|
||||
# 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
|
|
@ -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;
|
||||
}
|
|
@ -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");
|
||||
|
|
|
@ -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 ..
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
|
||||
#
|
||||
# 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
|
|
@ -0,0 +1 @@
|
|||
bf49a897e96fe4052904aaedc8281f6849e3dc1836899d393c43726cc8f5e92e /usr/bin/simple-patch
|
Loading…
Reference in New Issue