fix zram in chrome os

This commit is contained in:
ading2210 2023-11-07 22:49:31 +00:00
parent 5990ca5df2
commit 48e194e7c4
2 changed files with 9 additions and 1 deletions

View File

@ -23,6 +23,7 @@ Note that rootfs partitions have to be named `shimboot_rootfs:<partname>` for th
Driver support depends on the device you are using shimboot on. This list is for the [`dedede`](https://chrome100.dev/board/dedede/) board, which is the only device I was able to do extensive testing on. The `patch_rootfs.sh` script attempts to copy all the firmware from the shim and recovery image into the rootfs, so expect most things to work on other boards.
### What Works:
- Booting Chrome OS
- Systemd
- X11
- XFCE
@ -30,12 +31,12 @@ Driver support depends on the device you are using shimboot on. This list is for
- Touchscreen
- 3D acceleration
- Bluetooth
- Zram
- Wifi (partially)
- Suspend (partially)
### What Doesn't Work:
- Audio
- Zram
### Development Roadmap:
- ~~build the image automatically~~

View File

@ -303,12 +303,19 @@ boot_chromeos() {
mount -o bind /newroot/tmp/empty /sys/class/tpm
fi
echo "patching chrome os rootfs"
cat /newroot/etc/ui_use_flags.txt | sed "/reven_branding/d" | sed "/os_install_service/d" > /newroot/tmp/ui_use_flags.txt
mount -o bind /newroot/tmp/ui_use_flags.txt /newroot/etc/ui_use_flags.txt
echo "moving mounts"
move_mounts /newroot
echo "switching root"
mkdir -p /newroot/tmp/bootloader
pivot_root /newroot /newroot/tmp/bootloader
echo "starting init"
/sbin/modprobe zram
pkill frecon-lite
local tty="/dev/pts/0"
exec /sbin/init < "$tty" >> "$tty" 2>&1