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. 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: ### What Works:
- Booting Chrome OS
- Systemd - Systemd
- X11 - X11
- XFCE - XFCE
@ -30,12 +31,12 @@ Driver support depends on the device you are using shimboot on. This list is for
- Touchscreen - Touchscreen
- 3D acceleration - 3D acceleration
- Bluetooth - Bluetooth
- Zram
- Wifi (partially) - Wifi (partially)
- Suspend (partially) - Suspend (partially)
### What Doesn't Work: ### What Doesn't Work:
- Audio - Audio
- Zram
### Development Roadmap: ### Development Roadmap:
- ~~build the image automatically~~ - ~~build the image automatically~~

View File

@ -303,12 +303,19 @@ boot_chromeos() {
mount -o bind /newroot/tmp/empty /sys/class/tpm mount -o bind /newroot/tmp/empty /sys/class/tpm
fi 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" echo "moving mounts"
move_mounts /newroot move_mounts /newroot
echo "switching root" echo "switching root"
mkdir -p /newroot/tmp/bootloader mkdir -p /newroot/tmp/bootloader
pivot_root /newroot /newroot/tmp/bootloader pivot_root /newroot /newroot/tmp/bootloader
echo "starting init"
/sbin/modprobe zram
pkill frecon-lite pkill frecon-lite
local tty="/dev/pts/0" local tty="/dev/pts/0"
exec /sbin/init < "$tty" >> "$tty" 2>&1 exec /sbin/init < "$tty" >> "$tty" 2>&1