github actions related fixes
This commit is contained in:
parent
73a2a38698
commit
922eccba42
|
@ -1,6 +1,12 @@
|
|||
name: build-rootfs
|
||||
run-name: Build the base Debian rootfs
|
||||
on: [push]
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
working-directory: ./
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -17,7 +23,7 @@ jobs:
|
|||
run: sudo DEBUG=1 ./build_rootfs.sh data/rootfs bookworm hostname=shimboot root_passwd=root username=user user_passwd=user
|
||||
|
||||
- name: archive rootfs
|
||||
run: tar -vcf data/rootfs.tar.gz -C data/rootfs ./
|
||||
run: sudo tar -vcf data/rootfs.tar.gz -C data/rootfs ./
|
||||
|
||||
- name: upload rootfs
|
||||
uses: actions/upload-artifact@v4
|
||||
|
|
6
build.sh
6
build.sh
|
@ -27,9 +27,9 @@ fi
|
|||
. ./common.sh
|
||||
assert_deps "cpio binwalk pcregrep realpath cgpt mkfs.ext4 mkfs.ext2 fdisk rsync"
|
||||
|
||||
output_path=$(realpath "${1}")
|
||||
shim_path=$(realpath "${2}")
|
||||
rootfs_dir=$(realpath "${3}")
|
||||
output_path=$(realpath -m "${1}")
|
||||
shim_path=$(realpath -m "${2}")
|
||||
rootfs_dir=$(realpath -m "${3}")
|
||||
|
||||
echo "created loop device for shim"
|
||||
shim_loop=$(create_loop "${shim_path}")
|
||||
|
|
|
@ -41,7 +41,7 @@ sigint_handler() {
|
|||
}
|
||||
trap sigint_handler SIGINT
|
||||
|
||||
base_dir="$(realpath $(dirname "$0"))"
|
||||
base_dir="$(realpath -m $(dirname "$0"))"
|
||||
board="$1"
|
||||
shim_url="https://dl.osu.bio/api/raw/?path=/SH1mmer/$board.zip"
|
||||
boards_url="https://chromiumdash.appspot.com/cros/fetch_serving_builds?deviceCategory=ChromeOS"
|
||||
|
@ -90,7 +90,7 @@ echo "downloading shim image"
|
|||
download_and_unzip $shim_url $shim_zip $shim_bin
|
||||
|
||||
if [ ! "${args['rootfs_dir']}" ]; then
|
||||
rootfs_dir="$(realpath data/rootfs_$board)"
|
||||
rootfs_dir="$(realpath -m data/rootfs_$board)"
|
||||
rm -rf $rootfs_dir
|
||||
mkdir -p $rootfs_dir
|
||||
|
||||
|
@ -101,7 +101,7 @@ if [ ! "${args['rootfs_dir']}" ]; then
|
|||
username=user \
|
||||
user_passwd=user
|
||||
else
|
||||
rootfs_dir="$(realpath "${args['rootfs_dir']}")"
|
||||
rootfs_dir="$(realpath -m "${args['rootfs_dir']}")"
|
||||
fi
|
||||
|
||||
echo "patching debian rootfs"
|
||||
|
|
|
@ -47,9 +47,9 @@ compile_unionfs() {
|
|||
cd $original_dir
|
||||
}
|
||||
|
||||
rootfs_dir=$(realpath $1)
|
||||
old_dir=$(realpath $2)
|
||||
shim_path=$(realpath $3)
|
||||
rootfs_dir=$(realpath -m $1)
|
||||
old_dir=$(realpath -m $2)
|
||||
shim_path=$(realpath -m $3)
|
||||
|
||||
shim_rootfs="/tmp/shim_rootfs"
|
||||
root_squashfs="$rootfs_dir/root.squashfs"
|
||||
|
|
|
@ -17,7 +17,7 @@ make_bootable() {
|
|||
}
|
||||
|
||||
partition_disk() {
|
||||
local image_path=$(realpath "${1}")
|
||||
local image_path=$(realpath -m "${1}")
|
||||
local bootloader_size=${2}
|
||||
|
||||
#create partition table with fdisk
|
||||
|
@ -72,8 +72,8 @@ safe_mount() {
|
|||
}
|
||||
|
||||
create_partitions() {
|
||||
local image_loop=$(realpath "${1}")
|
||||
local kernel_path=$(realpath "${2}")
|
||||
local image_loop=$(realpath -m "${1}")
|
||||
local kernel_path=$(realpath -m "${2}")
|
||||
|
||||
#create stateful
|
||||
mkfs.ext4 "${image_loop}p1"
|
||||
|
@ -87,9 +87,9 @@ create_partitions() {
|
|||
}
|
||||
|
||||
populate_partitions() {
|
||||
local image_loop=$(realpath "${1}")
|
||||
local bootloader_dir=$(realpath "${2}")
|
||||
local rootfs_dir=$(realpath "${3}")
|
||||
local image_loop=$(realpath -m "${1}")
|
||||
local bootloader_dir=$(realpath -m "${2}")
|
||||
local rootfs_dir=$(realpath -m "${3}")
|
||||
|
||||
#mount and write empty file to stateful
|
||||
local stateful_mount=/tmp/shim_stateful
|
||||
|
@ -113,7 +113,7 @@ populate_partitions() {
|
|||
}
|
||||
|
||||
create_image() {
|
||||
local image_path=$(realpath "${1}")
|
||||
local image_path=$(realpath -m "${1}")
|
||||
local bootloader_size=${2}
|
||||
local rootfs_size=${3}
|
||||
|
||||
|
@ -126,7 +126,7 @@ create_image() {
|
|||
}
|
||||
|
||||
patch_initramfs() {
|
||||
local initramfs_path=$(realpath $1)
|
||||
local initramfs_path=$(realpath -m $1)
|
||||
|
||||
rm "${initramfs_path}/init" -f
|
||||
cp -r bootloader/* "${initramfs_path}/"
|
||||
|
|
|
@ -24,9 +24,9 @@ if [ -z "$3" ]; then
|
|||
fi
|
||||
|
||||
copy_modules() {
|
||||
local shim_rootfs=$(realpath $1)
|
||||
local reco_rootfs=$(realpath $2)
|
||||
local target_rootfs=$(realpath $3)
|
||||
local shim_rootfs=$(realpath -m $1)
|
||||
local reco_rootfs=$(realpath -m $2)
|
||||
local target_rootfs=$(realpath -m $3)
|
||||
|
||||
rm -rf "${target_rootfs}/lib/modules"
|
||||
cp -r "${shim_rootfs}/lib/modules" "${target_rootfs}/lib/modules"
|
||||
|
@ -43,7 +43,7 @@ copy_modules() {
|
|||
|
||||
copy_firmware() {
|
||||
local firmware_path="/tmp/chromium-firmware"
|
||||
local target_rootfs=$(realpath $1)
|
||||
local target_rootfs=$(realpath -m $1)
|
||||
|
||||
if [ ! -e "$firmware_path" ]; then
|
||||
download_firmware $firmware_path
|
||||
|
@ -54,14 +54,14 @@ copy_firmware() {
|
|||
|
||||
download_firmware() {
|
||||
local firmware_url="https://chromium.googlesource.com/chromiumos/third_party/linux-firmware"
|
||||
local firmware_path=$(realpath $1)
|
||||
local firmware_path=$(realpath -m $1)
|
||||
|
||||
git clone --branch master --depth=1 "${firmware_url}" $firmware_path
|
||||
}
|
||||
|
||||
shim_path=$(realpath $1)
|
||||
reco_path=$(realpath $2)
|
||||
target_rootfs=$(realpath $3)
|
||||
shim_path=$(realpath -m $1)
|
||||
reco_path=$(realpath -m $2)
|
||||
target_rootfs=$(realpath -m $3)
|
||||
shim_rootfs="/tmp/shim_rootfs"
|
||||
reco_rootfs="/tmp/reco_rootfs"
|
||||
|
||||
|
|
Loading…
Reference in New Issue