fix handling of compressed kernel modules
This commit is contained in:
parent
b26505849c
commit
8c522cd615
51
README.md
51
README.md
|
@ -22,49 +22,34 @@ Note that rootfs partitions have to be named `shimboot_rootfs:<partname>` for th
|
|||
## Status:
|
||||
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
|
||||
- Backlight
|
||||
- Touchscreen
|
||||
- 3D acceleration
|
||||
- Bluetooth
|
||||
- Zram
|
||||
- Wifi
|
||||
- Booting a squashfs
|
||||
- Webcam
|
||||
### Device Compatibility Table:
|
||||
| Feature \ Board Name | [`dedede`](https://chrome100.dev/board/dedede/) | [`octopus`](https://chrome100.dev/board/octopus/) | [`reks`](https://chrome100.dev/board/reks/) | [`nissa`](https://chrome100.dev/board/nissa/) |
|
||||
|----------------------|-------------------------------------------------|---------------------------------------------------|---------------------------------------------|-----------------------------------------------|
|
||||
| X11 | yes | yes | no (kernel too old) | yes |
|
||||
| Wifi | yes | yes | yes | yes |
|
||||
| Internal Audio | no | yes | untested | no |
|
||||
| Backlight | yes | yes | untested | yes |
|
||||
| Touchscreen | yes | yes | untested | yes |
|
||||
| 3D Acceleration | yes | yes | no | yes |
|
||||
| Bluetooth | yes | yes | untested | yes |
|
||||
| Webcam | yes | yes | untested | yes |
|
||||
|
||||
### What Doesn't Work:
|
||||
- Audio (due to a firmware bug on `dedede`, this works just fine on `octopus`)
|
||||
This table is incomplete. If you want to contribute a device compatibility report please create a new issue on the Github repository.
|
||||
|
||||
On all devices, the following features will not work:
|
||||
- Suspend (disabled by the kernel)
|
||||
- Swap (disabled by the kernel)
|
||||
|
||||
### Development Roadmap:
|
||||
- ~~build the image automatically~~
|
||||
- ~~boot to a shell~~
|
||||
- ~~switch_root into an actual rootfs~~
|
||||
- ~~start X11 in the actual rootfs~~
|
||||
- ~~ui improvements in the bootloader~~
|
||||
- ~~load all needed drivers~~
|
||||
- ~~autostart X11~~
|
||||
- ~~host repo for patched systemd packages~~
|
||||
- ~~use debootstrap to install debian~~
|
||||
- ~~prompt user for hostname and account when creating the rootfs~~
|
||||
- ~~auto load iwlmvm~~
|
||||
- ~~get wifi fully working~~
|
||||
- ~~host prebuilt images~~
|
||||
- ~~write detailed documentation~~
|
||||
### TODO:
|
||||
- Finish Python TUI rewrite
|
||||
|
||||
### Long Term Goals:
|
||||
- Transparent disk compression
|
||||
- Full disk encryption
|
||||
- eliminate binwalk dependency
|
||||
- get audio to work
|
||||
- get kexec working
|
||||
|
||||
PRs and contributions are welcome to help implement these features.
|
||||
|
||||
## Usage:
|
||||
|
||||
### Prerequisites:
|
||||
|
@ -88,7 +73,7 @@ Alternatively, you can run each of the steps manually:
|
|||
7. Run `sudo ./build.sh image.bin path_to_shim data/rootfs` to generate a disk image at `image.bin`.
|
||||
|
||||
### Booting the Image:
|
||||
1. Obtain a shimboot image by downloading a [prebuilt one](https://github.com/ading2210/shimboot/actions?query=branch%3Amain) or building it yourself.
|
||||
1. Obtain a shimboot image by downloading a [prebuilt one](https://github.com/ading2210/shimboot/releases) or building it yourself.
|
||||
2. Flash the shimboot image to a USB drive or SD card. Use the [Chromebook Recovery Utility](https://chrome.google.com/webstore/detail/chromebook-recovery-utili/pocpnlppkickgojjlmhdmidojbmbodfm) or [dd](https://linux.die.net/man/1/dd) if you're on Linux.
|
||||
3. Enable developer mode on your Chromebook. If the Chromebook is enrolled, follow the instructions on the [sh1mmer website](https://sh1mmer.me) (see the "Executing on Chromebook" section).
|
||||
4. Plug the USB into your Chromebook and enter recovery mode. It should detect the USB and run the shimboot bootloader.
|
||||
|
|
|
@ -80,7 +80,7 @@ move_mounts() {
|
|||
|
||||
print_license() {
|
||||
cat << EOF
|
||||
Shimboot v1.0.0
|
||||
Shimboot v1.0.1
|
||||
|
||||
ading2210/shimboot: Boot desktop Linux from a Chrome OS RMA shim.
|
||||
Copyright (C) 2023 ading2210
|
||||
|
|
|
@ -7,16 +7,16 @@ if [ "$DEBUG" ]; then
|
|||
set -x
|
||||
fi
|
||||
|
||||
. ./common.sh
|
||||
. ./image_utils.sh
|
||||
|
||||
print_help() {
|
||||
echo "Usage: ./patch_rootfs.sh shim_path reco_path rootfs_dir"
|
||||
}
|
||||
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "this needs to be run as root."
|
||||
exit 1
|
||||
fi
|
||||
assert_root
|
||||
assert_deps "git gunzip"
|
||||
assert_args "$3"
|
||||
|
||||
if [ -z "$3" ]; then
|
||||
print_help
|
||||
|
@ -39,6 +39,9 @@ copy_modules() {
|
|||
mkdir -p "${target_rootfs}/etc/modprobe.d/"
|
||||
cp -r "${reco_rootfs}/lib/modprobe.d/"* "${target_rootfs}/lib/modprobe.d/"
|
||||
cp -r "${reco_rootfs}/etc/modprobe.d/"* "${target_rootfs}/etc/modprobe.d/"
|
||||
|
||||
#decompress kernel modules if necessary - debian won't recognize these otherwise
|
||||
find "${target_rootfs}/lib/modules" -name "*.gz" | xargs gunzip
|
||||
}
|
||||
|
||||
copy_firmware() {
|
||||
|
|
|
@ -68,7 +68,7 @@ Another problem is encountered at this stage: the Chrome OS kernel will complain
|
|||
After copying all the firmware from the recovery image and shim to the rootfs, we're able to boot to a mostly working XFCE desktop.
|
||||
|
||||
<b id="prebuilt">Prebuilt Images:</b>
|
||||
Prebuilt images are available <a href="https://github.com/ading2210/shimboot/actions">here</a>. If there is not a prebuilt image for your board, you must manually build the shimboot image.
|
||||
Prebuilt images are available <a href="https://github.com/ading2210/shimboot/releases">here</a>. If there is not a prebuilt image for your board, you must manually build the shimboot image.
|
||||
|
||||
For these images, the root password is "root". The name of the default user is "user" and its password is "user" as well. You should change these credentials as soon as possible.
|
||||
|
||||
|
@ -92,6 +92,7 @@ Alternatively, you can run each of the steps manually:
|
|||
4. Plug the USB into your Chromebook and enter recovery mode. It should detect the USB and run the shimboot bootloader.
|
||||
5. Boot into Debian and log in with the username and password that you configured earlier. The default username/password for the prebuilt images is `user/user`.
|
||||
6. Expand the rootfs partition so that it fills up the entire disk by running `sudo growpart /dev/sdX 4` (replacing `sdX` with the block device corresponding to your disk) to expand the partition, then running `sudo resize2fs /dev/sdX4` to expand the filesystem.
|
||||
7. Change the root password and regular user password by running `sudo passwd root` and `passwd user`.
|
||||
|
||||
<b id="copyright">Copyright:</b>
|
||||
Shimboot is licensed under the <a href="https://www.gnu.org/licenses/gpl-3.0.txt">GNU GPL v3</a>. Unless otherwise indicated, all code has been written by me, <a href="https://ading.dev">ading2210</a>.
|
||||
|
|
Loading…
Reference in New Issue