hexdump0815 / imagebuilder

velvet os - simple script framework to build ubuntu 22.04 lts jammy (in older versions also 20.04 lts focal) and debian 12 bookworm (in older versions also 11 bullseye) bootable usb / sd card images for some arm and intel devices - lots of prebuilt images as well
GNU General Public License v3.0
287 stars 43 forks source link

chromebook_trogdor: status: homestar (lenovo duet 5 chromebook) #68

Open hexdump0815 opened 1 year ago

hexdump0815 commented 1 year ago

notes on homestar running 5.19.1:

here is list of working and non working features on the lenovo duet 5 chromebook. please also have a look at https://github.com/hexdump0815/imagebuilder/issues/44 as it also contains some useful information for homestar in it.

working

untested

broken

installation

coming soon

problems

none so far

bsammon commented 1 year ago

Just got a Duet 5 a few days ago, and made a boot-thumbdrive out of your image yesterday. Boots up and so-far-so-good.

hexdump0815 commented 1 year ago

@bsammon - thanks a lot for the feedback ... i plan to look at newer kernels and images a bit after linux kernel v6.1 is out - looks like there might be some patches required to make it work nicely on snapdragon 7c from what i read on the irc channel ... i hope to have something ready around new year maybe

bsammon commented 1 year ago

Discovery: trying to modify the partition table of the boot-thumbdrive with parted (most attempts were actually the gparted frontend, but IIRC one attempt was commandline parted) renders the thumbdrive unbootable. Each attempt was tried on a recently-created and recently-working thumbdrive setup. Modifying the partition table with fdisk was successful, however.

I'm not really sure what the partition layout needs to look like to be bootable, and how strict the constraints are.

bsammon commented 1 year ago

Since I can't really find a relevant forum (or mailing list/etc) for discussing this (non-ChromeOS/crostini/crouton-linux-on-Duet), I'm thinking of posting my discoveries/questions here on an ongoing basis. Let me know if you'd like me to stop or set limits or something.

hexdump0815 commented 1 year ago

@bsammon - that is the idea of those per device threads and issues here, so you are welcome to continue giving feedback here about what you notice ... regarding your parted issue you might have a look at this: https://oftc.irclog.whitequark.org/linux-cros-arm/2022-12-13#31712113 ... if you just want to extend the filesystem to full size, for that there is a script /scripts/extend-rootfs.sh to be run as root for exactly that

bsammon commented 1 year ago

Yeah, I didn't want to grow the filesystem to fill the drive, just expand it a few gigs, leaving space for other partitions. I did experiment with customizing the extend-rootfs script; don't remember if that's the approach that I ended up using.

While the parted information in that IRC thread was confusing (What's the "-f" argument to parted? Undocumented?), the Kali Linux forum thread linked from there had some interesting info.

My current thinking: If you're going to use parted, learn how to use cgpt first.

hexdump0815 commented 1 year ago

@bsammon - i plan to maybe switch to a more simply parted approach at some point in time when i find some time to change and test it ... let me know in case you find any working solution

bsammon commented 1 year ago

So... (a question that came to mind while commenting in another issue) ... which kernel source do I download if I want to compile a kernel for this device?

hexdump0815 commented 1 year ago

@bsammon - answered here: https://github.com/hexdump0815/imagebuilder/issues/104#issuecomment-1366862821

bsammon commented 1 year ago

So, in this case, the relevant document would be https://github.com/hexdump0815/imagebuilder/blob/main/systems/chromebook_trogdor/readme.md ? Looking at that document, it seems to be more of a general "how to build a kernel from git sources" document, and not specific information about which sources should be used for which hardware. Or do I just want to use Linus's kernel tree?

...okay, poking around a bit more, maybe what I'm supposed to do is go to https://github.com/hexdump0815/imagebuilder/releases/tag/220814-01, and download the "source code" there?

hexdump0815 commented 1 year ago

@bsammon - its all described in the three documents i have linked in the other issue - please have a look at them ... i spent quite a bit of time to write them, so you should also invest that even less time it needs to read them :)

bsammon commented 1 year ago

I've read them. Either I'm confused, or they don't answer my questions (or both). And it's probably compounded by me not expressing my questions clearly.

bsammon commented 1 year ago

It seems like there's a lot of "You've never compiled a kernel before? Here's what you need to know" there, and I (as someone who's compiled a kernel before) am having problems finding the one or two lines that tell me what specifically to do to get the correct kernel source. That doesn't mean it's not in there, just that I'm having trouble finding it.

bsammon commented 1 year ago

Alternatively, I'm thinking, rather than looking for the answer in the documentation, I'll try reading the source to the scripts you've created, and maybe that'll tell me what source files get downloaded.

bsammon commented 1 year ago

Digging and digging, I'm looking for information about kernel patches that you use, or a special git repository with trogdor-specific kernel support, and all I've found is that the version number is 5.19.1, and https://github.com/hexdump0815/kernel-extra-patches , which seems to be (optional-i.e. I can build a bootable, usable kernel without them) efficiency patches.

I'm starting to find myself coming to the conclusion that vanilla 5.19.1 kernel sourcecode is all that I need, with no special patches, just the right .config file. Or am I missing something?

hexdump0815 commented 1 year ago

@bsammon - i just added some extra info to the kernel deb package issue - lets continue the kernel build discussion there

JamesLastBolero commented 1 year ago

Image 230218-03 - debian bookworm runs fine on Homestar Rev3. Working are Graphics, attached keyboard and touchpad, wifi. Not working is sound (as noted). Did an install to internal emmc and wiped chromeos (yeah), boots fine. Did an update using your kernel config to linux 6.2.6, installed depthcharge package for automatic kernel and initrd upgrades, worked fine after deleting plymouth (image with graphical boo was to big to fit into the kernel partition). Any suggestions where to look to get sound working ? Thank you James

bsammon commented 1 year ago

Did an install to internal emmc and wiped chromeos (yeah), boots fine.

Did you have/make a script/installer that does this, or did you do it manually? Is there any documentation that you found about this? I'm considering doing this myself.

Any suggestions where to look to get sound working ?

I found https://github.com/hexdump0815/imagebuilder/blob/main/doc/alsa-ucm-pulseaudio-hacking.txt a few days ago.. haven't gotten around to trying it (or even understanding it) yet. I'd be interested in hearing about what you've tried, may save me some time. Also, Cadmium claims to have sound working on the Duet 5, but it wouldn't boot (or it booted and didn't display anything) the time I tried it. I gave up on Cadmium pretty quickly (I'm meaning to get back to it sometime soon)

hexdump0815 commented 1 year ago

@JamesLastBolero - thanks a lot for the report ... for sound i think this would be mostly around the ucm config, the mentioned ucm debugging notes might be helpful, also maybe reading through https://github.com/hexdump0815/imagebuilder/issues/54 is good (especially please keep in mind my headphone and other warnings in it) ... if it worked with cadmium then the cadmium ucm files might be a good start or the ones from the chromeos sources

@bsammon - regarding the emmc installation i have recently written some doc: https://github.com/hexdump0815/imagebuilder/blob/main/doc/install-to-emmc-on-arm-chromebooks.md ... i just wrote it down, but there might still be errors in it, so please let me know if something should not work (but in theory it should simply work) ... it is an easier to read version of https://github.com/hexdump0815/imagebuilder/blob/main/doc/install-to-emmc-with-luks-full-disk-encryption.txt

SiFan229 commented 11 months ago

Excuse me, I found that the touch screen seems to be unusable during use

hexdump0815 commented 11 months ago

@SiFan229 - i must admit that i never really used the touchscreen and usually use such convertible devices usually just in laptop mode - maybe i should have a closer look at it ... maybe it is a similar problem as described here - https://github.com/hexdump0815/imagebuilder/issues/44 ?

raremotas commented 9 months ago

I was able to verify bluetooth works.

Am looking to test things for the touch screen and audio support! I will report back anything else I can figure out.

EDIT:

I gave the #44 method for fixing the touchscreen a shot and was unsuccessful. The fix was swapping libinput for evdev on the touch screen.

The issue for coachz seems to have been working out of the box but would break with big touches. With Homestar we're looking at the touchscreen not working at all.

SOUND:

As mentioned previously bluetooth sound does work! I will look into making the dtsi edits mentioned on #44 as well and see if that works for Homestar - Would I need to build an entire image or just the kernel for this?

Edit 2: Remembered it should just be kernel, will check back in once I give it a spin.

bsammon commented 8 months ago

So... I've been running pretty well under 5.19.1, but I have some free time, and I thought I'd take a shot at upgrading to v6 of the kernel. I got the impression that 6.1.51 would be a good one to try, as it appears that others have gotten that kernel version to work.

I'm just getting started, but thought I check in to see if anyone here has a pointer to a config file that I should start with, or a document I should start with (in particular, a document with specific info about building kernels for this chromebook -- I've already found general kernel-building tutorials), or just advice in general.

[edited -- Initially I said 6.1.59, now I'm thinking 6.1.51 makes more sense]

bsammon commented 8 months ago

I've found https://github.com/hexdump0815/linux-mainline-and-mali-generic-stable-kernel/blob/lts/config.cbq-6.1.51-stb-cbq Seems like a reasonable candidate.

hexdump0815 commented 8 months ago

@bsammon - in case you prefer a precompiled kernel, then you can have a look at https://github.com/hexdump0815/linux-mainline-and-mali-generic-stable-kernel/releases/tag/6.1.51-stb-cbq and https://github.com/hexdump0815/imagebuilder/blob/main/doc/installing-a-newer-kernel.md ... but compiling a kernel yourself is the better option anyway - for that https://github.com/hexdump0815/imagebuilder/blob/main/doc/building-own-kernels.md might be useful ...

bsammon commented 8 months ago

Yeah, I may want that precompiled kernel for comparison's sake if the one I build doesn't work.

Since you didn't comment on my choice of config file, I'm assuming you have no objections or reservations.

bsammon commented 8 months ago

Also, is https://github.com/hexdump0815/linux-mainline-and-mali-generic-stable-kernel/blob/lts/readme.cbq the latest version of the process you use to build the FIT images?

hexdump0815 commented 7 months ago

yes - for v6.1 it is and there is another branch with some initial (not really well tested yet) v6.6 experiments

hexdump0815 commented 5 months ago

@JamesLastBolero @bsammon @raremotas - please have a look at https://github.com/hexdump0815/imagebuilder/issues/44 as well, which now also contains some information useful for homestar and sound maybe worth trying.

LukIsHere commented 1 month ago

image homestar seams to only work with one external monitor instead of 2 image not sure why

LukIsHere commented 1 month ago

USI chromebook stylus works fine

Sidenote. it requires some obscure AAAA (<-it is not a typo) batery so i would recommend buying version 2.0 version 2.0 (rechargeable one) ~not tested yet (should work too)~ tested and does work Note. assuming you use only built in screen when connecting second screen it stretches across screen (hard to explain, it is an issue with most non wacom tablets afaik) but i can't imagine anyone using chromebook as drawing tablet with additional screen connected so it's fine

marcusramberg commented 1 month ago

I've tried this on my duet 5 booting from usb, and it mostly seems to work nicely, except for wifi, I can't find the interface at all. ethernet works over my usb-c screen tho. Do I need to modprobe some extra module, or could it be that the network card has changed in my revision of the hardware? @JamesLastBolero you said you've installed on your emmc, were you able to disable the firmware write protection, I'm curious if it works using a suzyqable.

hexdump0815 commented 1 month ago

@marcusramberg - i have no idea why wifi is not working for you - maybe @LukIsHere has an idea as it seems to be working there i guess ... maybe https://github.com/hexdump0815/imagebuilder/issues/44 has some useful info as well? i do not have a duet 5 at hand right now to check myself ...

for emmc installation see https://github.com/hexdump0815/linux-mainline-on-arm-chromebooks and https://github.com/hexdump0815/imagebuilder/blob/main/doc/install-to-emmc-on-arm-chromebooks.md

LukIsHere commented 1 month ago

@marcusramberg

i don't think there is any write protection for gbb flags in this model but just to be sure i unplugged the actual battery and set them (it likely isn't required) image i managed to install onto emmc without any issue

also wifi is working out of the box on the latest debian image are you using ubuntu image by any chance?

marcusramberg commented 1 month ago

@marcusramberg

i don't think there is any write protection for gbb flags in this model but just to be sure i unplugged the actual battery and set them (it likely isn't required) image i managed to install onto emmc without any issue

also wifi is working out of the box on the latest debian image are you using ubuntu image by any chance?

Thanks, that makes sense. I am indeed using the ubuntu image. Will give the Debian one a go then :)

marcusramberg commented 1 month ago

Can confirm that the wifi on the debian bookwork image worked out of the box :) Will probably do the battery hack just in case and flash to the emmc then. Thanks again.

LukIsHere commented 1 month ago

@marcusramberg there is no write protection stoping you from installing to emmc there sometimes is one when setting gbb flags (but doesn't seams to be the case for duet 5)

@hexdump0815 the wifi problem seams to be ubuntu image issue

marcusramberg commented 1 month ago

@marcusramberg there is no write protection stoping you from installing to emmc there sometimes is one when setting gbb flags (but doesn't seams to be the case for duet 5)

@hexdump0815 the wifi problem seams to be ubuntu image issue

Yepp, I meant to set the gbb flags, as I got the impression you can risk ending in a permanent brick situation without setting them. I just tried and write protection is enabled when the battery is connected, so I guess I'd have to disconnect the battery like you did. Just have to find my pry tool to get the display out 😅

LukIsHere commented 1 month ago

@marcusramberg just in case here is a hardware mainteanance mamual so u don't break your device doing it https://download.lenovo.com/consumer/mobiles_pub/chromebook_duet_5_hmm.pdf

marcusramberg commented 1 month ago

@marcusramberg just in case here is a hardware mainteanance mamual so u don't break your device doing it https://download.lenovo.com/consumer/mobiles_pub/chromebook_duet_5_hmm.pdf

Thanks. Mission already successful after following https://youtu.be/WZ6yCSes5HI?si=_OFUgFBLrZHNN5Wg 😀

marcusramberg commented 1 month ago

I've flashed the internal drive now (using the rsync procedure as my usb stick already had some config, and with the newer kernel touch works good as well. I guess sound is the only thing I'd like to get going if possible. Tried to look into some of the suggestions in the other threads, but it seems like the internal sound devices aren't detected at all right now? At least for me, I can only see the dummy output. Can confirm external usb sound devices are detected fine tho, and I guess bluetooth would work as well.

LukIsHere commented 1 month ago

@marcusramberg there are some solutions higher up in this issue the quickest is to go to volume controll app image and in the last section switch to advanced or sth then switching the output to nr.2

marcusramberg commented 1 month ago

Perfect, thanks. This is such a nice little linux tablet :)

LukIsHere commented 2 days ago

@marcusramberg btw

if u remove the glue that held ur battery in place

ur device is on drop away from being a brick image

marcusramberg commented 1 day ago

@LukIsHere hmm, no I didn't remove the battery, just unplugged it, and reattached the fastener after plugging it back in. Thanks for the heads-up tho, is that your device ? Ooops. :(

LukIsHere commented 1 day ago

no problem i did it for whatever reason and now i have to get a new motherboard

it's better to use suzyqcable for this stuff instead of opening that device but didn't have any at that time

hexdump0815 commented 1 day ago

maybe ask in one of those phone repair shops - they sometimes can do wonders around hardware ... or watch out for a used duet 5 with a broken screen - they usually go for much lower - most of my tablets are of this kind for that reason :)