IRC channel logs

2024-03-11.log

back to list of logs

<oriansj>pabs3: I like the idea; it is a logical extension of the idea of using glass transistors which enable optical inspection.
<pabs3>not suitable for every malicious change (like that doping paper some time ago) but a useful technique yeah
<Guest85>Hello, I wanted to change the rootfs.py file to bash, help me find the error #!/bin/bash
<Guest85>create_config() {
<Guest85>    local config_path="steps/bootstrap.cfg"
<Guest85>    cat > "$config_path" <<EOF
<Guest85>FORCE_TIMESTAMPS=$1
<Guest85>CHROOT=${2:-$3}
<Guest85>UPDATE_CHECKSUMS=$4
<Guest85>JOBS=$5
<Guest85>SWAP_SIZE=$6
<Guest85>FINAL_JOBS=$5
<Guest85>INTERNAL_CI=${7:-false}
<Guest85>INTERACTIVE=$8
<Guest85>BARE_METAL=$9
<Guest85>EOF
<Guest85>    if [[ ($9 || $10) && -z $11 ]]; then
<Guest85>        echo "DISK=sdb1" >> "$config_path"
<Guest85>        echo "KERNEL_BOOTSTRAP=True" >> "$config_path"
<Guest85>    else
<Guest85>    elif [[ $bare_metal ]]; then
<Guest85>        if [[ $kernel ]]; then
<Guest85>            local path="$target/$(bash -c "generator_relpath \"$target\"")"
<Guest85>            echo "Please: 1. Take $path/initramfs and your kernel, boot using this. 2. Take $path/disk.img and put this on a writable storage medium."
<Guest85>        else
<Guest85>            local path="$target/$(bash -c "generator_relpath \"$target\"")"
<Guest85>            echo "Please: 1. Take $path.img and write it to a boot drive and then boot it."
<Guest85>        fi
<Guest85>    fi
<Guest85>}
<Guest85>main() {
<Guest85>    local arch target cores swap qemu_cmd qemu_ram target_size
<Guest85>    local chroot bwrap bare_metal kernel
<Guest85>    while [[ $# -gt 0 ]]; do
<Guest85>        case "$1" in
<Guest85>            -a|--arch) arch=$2; shift 2;;
<Guest85>            -c|--chroot) chroot=true; shift;;
<Guest85>            -bw|--bwrap) bwrap=true; shift;;
<Guest85>    qemu_cmd=${qemu_cmd:-qemu-system-x86_64}
<Guest85>    qemu_ram=${qemu_ram:-4096}
<Guest85>    target_size=${target_size:-16G}
<Guest85>    if [[ $qemu && $chroot ]] || [[ $qemu && $bwrap ]] || [[ $qemu && $bare_metal ]] || \
<Guest85>       [[ $chroot && $bwrap ]] || [[ $chroot && $bare_metal ]] || [[ $bwrap && $bare_metal ]]; then
<Guest85>        echo "Error: No more than one of qemu, chroot, bwrap, bare metal may be used."; exit 1
<Guest85>    elif [[ ! $qemu && ! $chroot && ! $bwrap && ! $bare_metal ]]; then
<Guest85>        echo "Error: One of qemu, chroot, bwrap, or bare metal must be selected."; exit 1
<Guest85>    fi
<Guest85>    if [[ $arch != "x86" ]]; then
<Guest85>        echo "Only x86 is supported at the moment, other arches are for development only."
<Guest85>    fi
<Guest85>    if [[ $bwrap && $tmpfs ]]; then
<Guest85>        echo "Error: tmpfs cannot be used with bwrap."; exit 1
<Guest85>    fi
<Guest85>    if [[ $cores -lt 1 ]]; then
<Guest85>        echo "Error: Must use one or more cores."; exit 1
<Guest85>    fi
<Foxboron>Generally refrain from pasting code into IRC. It spams the channel
<Guest85>sorry
<oriansj>Guest85: you can use sites like paste.debian.net and just share those links (it also provides syntax highlighting)
<stikonas>newer qemu versions seems to be randomly segfaulting with stage0-posix-riscv64 and aarch64...
<stikonas>riscv32 seems to work though
<oriansj>hmm, either qemu regression or we need to improve compliance with some standard I don't know about yet.
<matrix_bridge><Andrius Štikonas> Could again be some brk issue, qemu is not that good with brk