From 62ae740deb5202c4a7cf787907d59fca4e1510b6 Mon Sep 17 00:00:00 2001 From: ading2210 Date: Fri, 27 Oct 2023 20:45:03 +0000 Subject: [PATCH] fix x11 failing to start sometimes --- README.md | 15 ++++++++------- build_rootfs.sh | 1 - rootfs/etc/systemd/system/kill-frecon.service | 10 ++++++++++ rootfs/opt/setup_rootfs.sh | 5 ++++- 4 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 rootfs/etc/systemd/system/kill-frecon.service diff --git a/README.md b/README.md index 8066121..1461e2d 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Note that rootfs partitions have to be named `shimboot_rootfs:` for th ## Status: ### What Works: -- Systmed +- Systemd - X11 - XFCE - Backlight @@ -69,12 +69,13 @@ Note that rootfs partitions have to be named `shimboot_rootfs:` for th 1. Grab a Chrome OS RMA Shim from somewhere. Most of them have already been leaked and aren't too difficult to find. 2. Download a Chrome OS [recovery image](https://chromiumdash.appspot.com/serving-builds?deviceCategory=ChromeOS) for your board. 3. Clone this repository and cd into it. -4. Run `sudo ./build_rootfs.sh data/rootfs bookworm` to build the base rootfs. -5. Run `sudo ./patch_rootfs.sh path_to_shim path_to_reco data/rootfs` to patch the base rootfs and add any needed drivers. -6. Run `sudo ./build.sh image.bin path_to_shim data/rootfs` to generate a disk image at `image.bin`. -7. Flash the generated image to a USB drive or SD card. -8. Enable developer mode on your Chromebook. Even if it's enrolled and dev mode is blocked, it'll still work for running shimboot. -9. Plug the USB into your Chromebook and enter recovery mode. It should detect the USB and run the shimboot bootloader. +4. Run `mkdir -p data/rootfs` to create a directory to hold the rootfs. +5. Run `sudo ./build_rootfs.sh data/rootfs bookworm` to build the base rootfs. +6. Run `sudo ./patch_rootfs.sh path_to_shim path_to_reco data/rootfs` to patch the base rootfs and add any needed drivers. +7. Run `sudo ./build.sh image.bin path_to_shim data/rootfs` to generate a disk image at `image.bin`. +8. Flash the generated image to a USB drive or SD card. +9. Enable developer mode on your Chromebook. Even if it's enrolled and dev mode is blocked, it'll still work for running shimboot. +10. Plug the USB into your Chromebook and enter recovery mode. It should detect the USB and run the shimboot bootloader. Note that these instructions are currently incomplete. diff --git a/build_rootfs.sh b/build_rootfs.sh index ccf1bde..915bf05 100755 --- a/build_rootfs.sh +++ b/build_rootfs.sh @@ -52,7 +52,6 @@ done chroot_command="DEBUG=${DEBUG} release_name=${release_name} /opt/setup_rootfs.sh" chroot $rootfs_dir /bin/bash -c "${chroot_command}" -chroot_mounts="proc sys dev run" for mountpoint in $chroot_mounts; do umount -l "${rootfs_dir}/$mountpoint" done diff --git a/rootfs/etc/systemd/system/kill-frecon.service b/rootfs/etc/systemd/system/kill-frecon.service new file mode 100644 index 0000000..9951128 --- /dev/null +++ b/rootfs/etc/systemd/system/kill-frecon.service @@ -0,0 +1,10 @@ +[Unit] +Description=kill frecon to allow xorg to start + +[Service] +Type=oneshot +ExecStart=/usr/bin/pkill frecon-lite +RemainAfterExit=true + +[Install] +WantedBy=graphical.target \ No newline at end of file diff --git a/rootfs/opt/setup_rootfs.sh b/rootfs/opt/setup_rootfs.sh index 35f1985..dd4e36a 100755 --- a/rootfs/opt/setup_rootfs.sh +++ b/rootfs/opt/setup_rootfs.sh @@ -25,8 +25,11 @@ apt-get install -y ca-certificates apt-get update apt-get upgrade -y +#enable shimboot services +systemctl enable kill-frecon.service + #install desktop -apt-get install -y task-xfce-desktop cloud-utils +apt-get install -y task-xfce-desktop cloud-utils #set up hostname and username read -p "Enter the hostname for the system: " hostname