Skip to content

Commit 250a144

Browse files
committed
Merge remote-tracking branch 'osresearch/master' into HEAD
2 parents 7ca8d42 + b28c257 commit 250a144

14 files changed

Lines changed: 251 additions & 15 deletions

.circleci/config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,13 @@ workflows:
491491
requires:
492492
- librem_14
493493

494+
- build:
495+
name: librem_11
496+
target: librem_11
497+
subcommand: ""
498+
requires:
499+
- librem_14
500+
494501
# dasharo release
495502
- build:
496503
name: nitropad-ns50

bin/seed_package_mirror.sh

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#! /usr/bin/env bash
2+
3+
set -eo pipefail
4+
5+
usage() {
6+
cat >&2 <<USAGE_END
7+
$0 <mirror-directory>
8+
9+
Downloads all current package artifacts needed to build Heads and copies them
10+
to a mirror directory, for seeding a package mirror.
11+
12+
Parameters:
13+
<mirror-directory>: Path to a directory where the packages are placed.
14+
Created if it does not already exist.
15+
USAGE_END
16+
}
17+
18+
ARGS_DONE=
19+
while [[ $# -ge 1 ]] && [ -z "$ARGS_DONE" ]; do
20+
case "$1" in
21+
--)
22+
ARGS_DONE=y
23+
shift
24+
;;
25+
--help)
26+
usage
27+
exit 0
28+
;;
29+
--*)
30+
echo "unknown parameter: $1" >&2
31+
usage
32+
exit 1
33+
;;
34+
*)
35+
ARGS_DONE=y
36+
;;
37+
esac
38+
done
39+
40+
if [[ $# -ne 1 ]]; then
41+
usage
42+
exit 1
43+
fi
44+
45+
ARG_MIRROR_DIR="$(realpath "$1")"
46+
47+
cd "$(dirname "${BASH_SOURCE[0]}")/.."
48+
49+
echo
50+
echo "Cleaning build to download all packages..."
51+
# fetch packages for representative boards
52+
rm -rf build/x86 build/ppc64
53+
rm -rf packages/x86 packages/ppc64
54+
echo
55+
echo "Downloading packages..."
56+
make packages BOARD=qemu-coreboot-fbwhiptail-tpm1-hotp
57+
make packages BOARD=talos-2 # newt, PPC
58+
make packages BOARD=librem_l1um_v2 # TPM2
59+
make packages BOARD=librem_l1um # coreboot 4.11
60+
make packages BOARD=x230-maximized # io386
61+
echo
62+
echo "Copying to mirror directory..."
63+
mkdir -p "$ARG_MIRROR_DIR"
64+
cp packages/x86/* packages/ppc64/* "$ARG_MIRROR_DIR/"

config/coreboot-kgpe-d16_server-whiptail.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# coreboot configuration
44
#
55

6+
# Viking HCL
7+
# https://wiki.vikings.net/hardware:kgpe-d16
8+
69
#
710
# General setup
811
#

config/coreboot-kgpe-d16_server.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# coreboot configuration
44
#
55

6+
# Viking HCL
7+
# https://wiki.vikings.net/hardware:kgpe-d16
8+
69
#
710
# General setup
811
#

config/coreboot-kgpe-d16_workstation-usb_keyboard.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# coreboot configuration
44
#
55

6+
# Viking HCL
7+
# https://wiki.vikings.net/hardware:kgpe-d16
8+
69
#
710
# General setup
811
#

config/coreboot-kgpe-d16_workstation.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# coreboot configuration
44
#
55

6+
# Viking HCL
7+
# https://wiki.vikings.net/hardware:kgpe-d16
8+
69
#
710
# General setup
811
#

config/coreboot-librem_11.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ CONFIG_DCACHE_BSP_STACK_SIZE=0x30400
140140
CONFIG_MAX_ACPI_TABLE_SIZE_KB=144
141141
CONFIG_HAVE_INTEL_FIRMWARE=y
142142
CONFIG_MRC_SETTINGS_CACHE_SIZE=0x10000
143-
# CONFIG_DRIVERS_INTEL_WIFI is not set
143+
CONFIG_DRIVERS_INTEL_WIFI=y
144144
CONFIG_IFD_BIN_PATH="3rdparty/purism-blobs/mainboard/purism/librem_jsl/librem_11/flashdescriptor.bin"
145145
CONFIG_ME_BIN_PATH="3rdparty/purism-blobs/mainboard/purism/librem_jsl/librem_11/me.bin"
146146
CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x20000
@@ -563,6 +563,7 @@ CONFIG_USE_PC_CMOS_ALTCENTURY=y
563563
CONFIG_PC_CMOS_BASE_PORT_BANK0=0x70
564564
# CONFIG_DRIVERS_SIL_3114 is not set
565565
CONFIG_DRIVERS_USB_ACPI=y
566+
CONFIG_DRIVERS_WIFI_GENERIC=y
566567
# CONFIG_DRIVERS_MTK_WIFI is not set
567568
CONFIG_MP_SERVICES_PPI=y
568569
CONFIG_MP_SERVICES_PPI_V1=y

initrd/bin/gui-init

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ check_gpg_key()
363363
option=$(cat /tmp/whiptail)
364364
case "$option" in
365365
g )
366-
gpg-gui.sh && BG_COLOR_MAIN_MENU="normnal"
366+
gpg-gui.sh && BG_COLOR_MAIN_MENU="normal"
367367
;;
368368
i )
369369
skip_to_menu="true"

initrd/bin/key-init

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,35 @@
11
#!/bin/bash
22
set -e -o pipefail
33
. /etc/functions
4+
. /etc/gui_functions
45

56
TRACE_FUNC
67

78
# Post processing of keys
89

9-
# Import user's keys
10-
gpg --import /.gnupg/keys/*.key /.gnupg/keys/*.asc 2>/dev/null || true
10+
# Good system clock is required for GPG to work properly.
11+
# if system year is less then 2024, prompt user to set correct time
12+
if [ "$(date +%Y)" -lt 2024 ]; then
13+
if whiptail_warning --title "System Time Incorrect" \
14+
--yesno "The system time is incorrect. Please set the correct time." \
15+
0 80 --yes-button Continue --no-button Skip --clear; then
16+
change-time.sh
17+
fi
18+
fi
19+
20+
# Import user's keys if they exist
21+
if [ -d /.gnupg/keys ]; then
22+
# This is legacy location for user's keys. cbfs-init takes for granted that keyring and trustdb are in /.gnupg
23+
# oem-factory-reset generates keyring and trustdb which cbfs-init dumps to /.gnupg
24+
# TODO: Remove individual key imports. This is still valid for distro keys only below.
25+
gpg --import /.gnupg/keys/*.key /.gnupg/keys/*.asc 2>/dev/null || warn "Importing user's keys failed"
26+
fi
1127

1228
# Import trusted distro keys allowed for ISO signing
13-
gpg --homedir=/etc/distro/ --import /etc/distro/keys/* 2>/dev/null || true
29+
gpg --homedir=/etc/distro/ --import /etc/distro/keys/* 2>/dev/null || warn "Importing distro keys failed"
1430
#Set distro keys trust level to ultimate (trust anything that was signed with these keys)
15-
gpg --homedir=/etc/distro/ --list-keys --fingerprint --with-colons|sed -E -n -e 's/^fpr:::::::::([0-9A-F]+):$/\1:6:/p' |gpg --homedir=/etc/distro/ --import-ownertrust 2>/dev/null || true
16-
gpg --homedir=/etc/distro/ --update-trust 2>/dev/null || true
31+
gpg --homedir=/etc/distro/ --list-keys --fingerprint --with-colons|sed -E -n -e 's/^fpr:::::::::([0-9A-F]+):$/\1:6:/p' |gpg --homedir=/etc/distro/ --import-ownertrust 2>/dev/null || warn "Setting distro keys ultimate trust failed"
32+
gpg --homedir=/etc/distro/ --update-trust 2>/dev/null || warn "Updating distro keys trust failed"
1733

1834
# Add user's keys to the list of trusted keys for ISO signing
19-
gpg --export | gpg --homedir=/etc/distro/ --import 2>/dev/null || true
35+
gpg --export | gpg --homedir=/etc/distro/ --import 2>/dev/null || warn "Adding user's keys to distro keys failed"

initrd/bin/oem-factory-reset

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ die() {
6262
exit 1
6363
}
6464

65-
whiptail_error() {
65+
local_whiptail_error() {
6666
local msg=$1
6767
if [ "$msg" = "" ]; then
6868
die "whiptail error: An error msg is required"
@@ -71,7 +71,7 @@ whiptail_error() {
7171
}
7272

7373
whiptail_error_die() {
74-
whiptail_error "$@"
74+
local_whiptail_error "$@"
7575
die
7676
}
7777

@@ -1111,7 +1111,7 @@ if [ "$GPG_GEN_KEY_IN_MEMORY" = "n" -o "$GPG_GEN_KEY_IN_MEMORY_COPY_TO_SMARTCARD
11111111
echo -e "\nChecking for USB Security Dongle...\n"
11121112
enable_usb
11131113
if ! gpg --card-status >/dev/null 2>&1; then
1114-
whiptail_error "Can't access USB Security Dongle; \nPlease remove and reinsert, then press Enter."
1114+
local_whiptail_error "Can't access USB Security Dongle; \nPlease remove and reinsert, then press Enter."
11151115
if ! gpg --card-status >/dev/null 2>/tmp/error; then
11161116
ERROR=$(tail -n 1 /tmp/error | fold -s)
11171117
whiptail_error_die "Unable to detect USB Security Dongle:\n\n${ERROR}"

0 commit comments

Comments
 (0)