From 53aef7922ba36fd03d9c0f38bc510398932294f5 Mon Sep 17 00:00:00 2001 From: restitux Date: Tue, 25 Oct 2022 07:25:22 +0000 Subject: [PATCH] Documentation of initial GCW Zero image build process research --- projects/gcwzero/Home.rest | 96 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 projects/gcwzero/Home.rest diff --git a/projects/gcwzero/Home.rest b/projects/gcwzero/Home.rest new file mode 100644 index 0000000..081de8f --- /dev/null +++ b/projects/gcwzero/Home.rest @@ -0,0 +1,96 @@ +Custom GCW Zero OS Image +------------------------ + +This page serves to record everything I've learned about building an OS Image for the GCW Zero. + +Existing Images +=============== +- `The official image `_ + - This was last updated 2015-07-23 + - This is based on OpenDingux +- `Current OpenDingux development images `_ + - GCW Zero update packages, odboot binaries, and toolchains are available `here `_. + - These are automatically? built by GitHub actions. + - Work to bring OpenDingux / device support to newer Linux Kernel versions is supposedly happening in this repo +- `Adam Image `_ + - This is built on top of the newer OpenDingux releases. + - Currently this seems to be fixed to a version from `2022-02-13 `_. + - This image opens up the OpenDingux image and creates a modified userspace with a different launcher and newer appliactions. + - The boot flow seems to be identical to the OpenDingux upstream. + +Boot Flow +========= +`UBIBoot `_ +_______ +- Bootloader for launching a Linux Kernel off a UBI partition +- This seems like it is used all over the place, but none of the images that I've looked at are using an UBI partition. + - They have been FAT32 + - I should double check this, otherwise I'm a bit confused here. + - Maybe all the SDCard images have this program written to their first 512 bytes (MBR style) + - This would explain why the base offset for the `/boot` partition on the images is such a high number + - Is there a UBI partition that launches before the kernel in the FAT32 partition is loaded? + - This would probably not be visible when mounting the images + - I should reinvestigate this + - The Adam Image build scripts would probably be a good reference + + +Kernel +______ + +- It is probably best to use the OpenDingux built kernel for now. + - It looks like there is some upstreaming working being done, but the status of that in unknown. + - It would be cool to extract this from the buildroot flow so it could be built independently. +- One known issue with the latest OpenDingux kernel is that the display output doesn't work. + - This seems to be due to a conflict in the HDMI driver. + - I think disabling HDMI or removing the kernel module if there one might work around this. + - This might be fixed now based on `this thread `_ on the Adam Image issue tracker. + - I think this was a seperate issue based on the fact that the `fix `_ was in the Adam Image build scripts. + - Adam Image is using too old of a OpenDingux base to have hit this issue, as it was discovered in May 2022 [1]_ + - One interesting tidbit from this thread is that the `OpenDingux maintainer seems to be working on fixing this issue `_. + - This is helpful, as the github issue that this same person opened has no replies. [1]_ + - This person might be overstating that the maintainer knowns, not sure here. + +`Mininit `_ +_______ +- Mininit is a bootloader that allows loading the root filesystem from a squashfs image called `rootfs.squashfs`. +- It also supports loading kernel modules from a squashfs image called `modules.squashfs`. +- After it mounts all the required filesystems, control is handed off to the `/sbin/init` binary in the mounted rootfs [2]_. + + + +Booting Debian +============== + +Creating a boot partition +_________________________ +- TODO + +Creating a mips32le squashfs rootfs +___________________________________ +- `Docker based flow to build rootfs `_ + +Creating a sdcard image +_______________________ +- TODO + +Packaging the Kernel as a `.deb` +________________________________ +- TODO + +Packaging userspace applications as `.deb`s +___________________________________________ +- TODO + +Creating package repo for serving updates +_________________________________________ +- TODO + +Useful Links +============ +- `OpenDingux blog post on new kernel and device tree cleanup work `_ + + +Citations +========= +.. [1] https://github.com/OpenDingux/buildroot/issues/77 +.. [2] https://github.com/OpenDingux/mininit#rootfs-image-layout \ No newline at end of file