Repository navigation
Conversation
|
@doctorlogix ready for review as the userspace companion to denialwm/linux-perpetua#31. It carries the Barbet boot packing/flashing, Wi-Fi/Bluetooth/audio provisioning, and the sleep and Droidloom units. The open question is the boot-packer duplication with the kernel PR; |
|
Thanks for the work here. It is careful in the ways that matter most on a phone: slot A is never written, every write is checked by hash before and after, and no firmware is committed. We cannot test it, so this review is about structure, and on structure it needs to change before it can go in. Today it is a record of how one phone was brought up; what Phonewave holds is the phone described so that the shared image runs on it. Your question: where the packer livesIn the kernel repository. One change that touches every phoneThe watchdog feeder in
Please check this on your phone ( What a device looks like here
How to send itSmaller pull requests would let us take the parts as they become ready:
The findings in your READMEs (the ADSP order, |
A phone with no init_boot partition carries the early userspace in its boot image, after the kernel. --ramdisk writes just the legacy-lz4 ramdisk for that image. The boot tail then starts after the ramdisk as well as the kernel: the early userspace and phone-reboot add the ramdisk size from the header to the offset. A boot image with no ramdisk comes out the same. PHONEWAVE_KERNEL names the linux-perpetua source the rescue's font comes from, in place of the workstation path; it defaults to that path.
|
Agreed on the structure. We will split this into the three PRs you describe Where each thing goes:
Watchdog feeder. Checked on the phone. The running image predates the One question before the boot slice is ready: where should the module tail |
aad5ce0 to
4104f54
Compare
|
The split is up:
The two findings that left the device tree are now issues: denialwm/denial#283 (idle suspend after a non-input wake), denialwm/droidloom#41 (the example health HAL waking an idle cell), and #10 (the modem/ADSP/Bluetooth order and where it should live). On the tail layout: the tail follows the DTB. The device slice adds The original bring-up branch is preserved as |
Add the device facts and the boot layout: SM7250, the SOFEF01 panel, ST FTS touch and DRV2624 haptics, the WCN3990 behind the modem, and the RT5514P and TAS2562 audio parts. The phone boots from slot B with a version 2 image that carries the kernel, the ramdisk, the DTB and the tail; slot A is stock Android and is never written.
Take a release number like the other devices, build it unless it exists, and pack the modules and boot/tail/ with image/boot-tail. The ramdisk is the shared early userspace written by image/init-boot --ramdisk, since this phone keeps it in boot, and the image is packed by linux-perpetua's android-v2 from the verified working image in the vault. The kernel carries the Barbet tree it must boot, so --dtb replaces the template's Google tree, and --tail puts the modules and firmware after the DTB.
A version 2 boot image lays out the kernel, the ramdisk and the DTB in that order, and the tail follows. The early userspace and phone-reboot computed the offset from the kernel and ramdisk sizes alone, so on a v2 image they looked one DTB too early. Read the DTB size from the header as well; a version 4 template has zero there and keeps the old offset.
Record what the hardware run showed, with the battery as a voltage-derived estimate and the microphone as partial: the DSP loads and streams, but the samples carry a DC offset.
4104f54 to
14dbfb2
Compare
The device slice of the split you described. It replaces the bring-up record
with the phone as Phonewave holds it; the firmware/Wi-Fi and audio/Bluetooth
parts follow as separate pull requests.
What is here
devices/barbet/device.toml, the rootREADME.mdrow and theFEATURES.mdsection, with the hardware run's results. The battery row says the
percentage is a voltage-derived estimate; the microphone row stays partial
because of the DC offset.
devices/barbet/README.md: the hardware facts, the version 2 boot layoutand the install step.
devices/barbet/boot/build-boot.sh: takes a release number, builds itunless it exists, packs the modules and
boot/tail/withimage/boot-tail,writes the shared early userspace with
image/init-boot --ramdisk, andpacks the image with linux-perpetua's
android-v2from the vault's verifiedworking image. No
--evidence.the tail follows the DTB.
image/initramfs/initandtools/phone-rebootnow read the DTB size from the version 2 header and add it to the kernel and
ramdisk sizes. A version 4 template has zero there, so the old offset is
unchanged. The same change belongs in init-boot: Add --ramdisk for phones without an init_boot partition #2; this branch is based on init-boot: Add --ramdisk for phones without an init_boot partition #2, so it
carries that one commit until init-boot: Add --ramdisk for phones without an init_boot partition #2 lands.
What left
pack-boot.pyand its test: the packer isdevices/boot/android-v2inlinux-perpetua#42. That PR now also has
--tail, which writes the tailafter the DTB.
provisionscripts,flash-boot,serve-boot.sh,image/flash-root, the curl fallback and the 172.16.42.x addresses.sleep/,droidloom/and the three start scripts. Their findings aregoing into issues, as agreed.
exec switch_root,rescue only if the bootloader watchdog needs feeding, and without the
tenth-ping line.
Not tested here
No phone and no image tools (
mkbootimg,avbtool,mkfs.erofs) in thisenvironment.
build-boot.shis syntax-checked; the first real image needs arun on the workstation. The kernel PR is still unbuilt and unrun for the
same reason.