linux-mainline-on-arm-chromebooks icon indicating copy to clipboard operation
linux-mainline-on-arm-chromebooks copied to clipboard

WOW!

Open N4IRS opened this issue 3 years ago • 35 comments

I just booted a Lenovo Chromebook S330 from your elm-aarch64-focal image. The touchpad works, the screen works and the wifi works. I'm doing an update / upgrade now! I'll test more but this is COOL!

GREAT JOB! Thank you!

N4IRS avatar Jun 16 '21 18:06 N4IRS

i'm happy to hear that and thank you for the positive feedback ...

best wishes and good luck - hexdump

hexdump0815 avatar Jun 16 '21 19:06 hexdump0815

Someone should tell you if things work. I'll be setting up an environment so I can build a customized image. As of right now, I don't have sound, so I'll have to dig into that. The video seems good to me. Thanks again for your work!

N4IRS avatar Jun 16 '21 19:06 N4IRS

sound should - at least in theory - work, but maybe the s330 is different ... what does 'cat /proc/asound/cards' say on your system?

hexdump0815 avatar Jun 16 '21 20:06 hexdump0815

root@changeme:~# cat /proc/asound/cards 0 [mtkrt5650 ]: mtk-rt5650 - mtk-rt5650 mtk-rt5650

N4IRS avatar Jun 16 '21 22:06 N4IRS

speaker-test worked as user linux. Did not work as root (should it?) Everything pointed to pulseaudio. I ended up commenting out in /etc/pulse/default.pa module-udev-detect module-detect

I added: load-module module-alsa-sink device=hw:0,0

Sound now works in Firefox. I have not tried anything else.

N4IRS avatar Jun 17 '21 19:06 N4IRS

i just checked and my lenovo n23 has the same audio config - i thought that it was working for me out of the box, but i'll note down to retest it the next time i'll test new images on the n23 ... good that you have it working on your device somehow now

hexdump0815 avatar Jun 17 '21 21:06 hexdump0815

Is there a forum (BBS) redit etc where you discuss this work or just here on github?

N4IRS avatar Jun 17 '21 22:06 N4IRS

no there is none and i'm not planning anything like that, as i do not have the time to keep track of it. for now i plan to slowly making progress in providing some good starting point in case someone wants to use a real linux on an arm chromebook. whenever someone runs into a problem or has an idea, github issues should be the way to go and i'm trying to respond as good as time permits.

hexdump0815 avatar Jun 18 '21 19:06 hexdump0815

Works for me. I've used Pi-Gen and the Armbian build system, so I have some experience. I'll post here if I run into issues or have suggestions / pull requests. I have at least 2 other people interested in ARM based notebooks.

N4IRS avatar Jun 18 '21 19:06 N4IRS

I am able to create an image without errors but I can't boot from it. I get no errors when I run in this order as root: get-files.sh chromebook_oak aarch64 create-fs.sh chromebook_oak aarch64 focal create-image.sh chromebook_oak aarch64 focal The image looks good and I burn it to an SD card using the same process I use to burn your published image that does work.

When I do a CTRL U at the boot screen I get a beep and a quick flash of the screen. I using a RPi4 running PiOS (Raspbian) 64 bit to build the image (Linux build-arm64 5.10.17-v8+ #1403 SMP PREEMPT Mon Feb 22 11:37:54 GMT 2021 aarch64 GNU/Linux)

At this point on a SBC, I would be connected to the serial console looking for errors. Do you have any suggestions about how I should go about debugging?

N4IRS avatar Jun 19 '21 10:06 N4IRS

maybe first try to write the corresponding vmlinux.kpart image to the first partition of the sd card. if that works somehow the kernel did not end up properly there, if that does not work it looks like the chromeos specific partition flags done via cgpt in the scripts did not work well. the beep means that the bootloader was not ableto find a proper kernel in the right format.

hexdump0815 avatar Jun 19 '21 14:06 hexdump0815

I used dd to pull partition 1 and 2 from the working and non working image. I used vbutil_kernel --verify to look at the .dd files. In the case of the non working image I got Error verifying keyblock on both partitions. On the working image, I got "Body verification succeeded" on partition 1 but failed on partition 2. I wrote your working partition to partition 1 and the card booted.

As you suggested, I wrote partition 1 with dd if=vmlinux.kpart-elm-5.10.25-stb-mt7+ of=/dev/sdd1 and the card boots. It LOOKS to me like there is a problem with the image creation script. I'm continuing to troubleshoot.

N4IRS avatar Jun 19 '21 14:06 N4IRS

maybe it was a left over from the wrongly named file in the script (oak vs. elm) so that the kernel for the boot partition was not around and thus could not be written to the image?

just a heads up btw. - i have just comitted a bigger change to make the kernel config option handling more flexible, powerful and easy, so it might be good for you to pull the repo fresh if you are working with it right now ... a new shared repo will be used for the generic kernel options of all my kernel builds - https://github.com/hexdump0815/linux-mainline-mediatek-mt81xx-kernel/blob/master/readme.mt7#L5 ... at least it builds this way, i did not test the resulting kernel yet, but if i did not do a typo somewhere it should work

hexdump0815 avatar Jun 20 '21 20:06 hexdump0815

Adding to the WOW here... :) Running good on Lenovo IdeaPad 3 Chromebook. However finding the linux username/password was a bit tricky, it wasn't on the main github project page, nor under chromebook_kukui. I eventually found it with Google. Maybe you should make it easier to find.

Anyway, good job, keep it up!

shelterx avatar Mar 02 '23 14:03 shelterx

@shelterx - thanks a lot for the positive feedback ... i'm actually planning to improve the landing readme.md and add some first-steps.md to the doc dir to which i plan to point to from the readme. i hope to have both ready within the next weeks.

hexdump0815 avatar Mar 02 '23 17:03 hexdump0815

@hexdump0815 Sounds great! BTW, I haven't looked into it but is it easy just to update the kernel once a new image is released. Is it done with apt upgrade or do I have to manually copy the kernel/mods from the new image and edit something? I mean, I don't want to reinstall an entire new image if it's not needed.

shelterx avatar Mar 04 '23 08:03 shelterx

@shelterx - kernels are not packaged as this would make things a bit less flexible for me ... i would recommend https://github.com/hexdump0815/imagebuilder/blob/main/doc/building-own-kernels.md (its not that complicated and can be done on the system itself) or in case this is too much work then https://github.com/hexdump0815/imagebuilder/blob/main/doc/installing-a-newer-kernel.md ... please let me know if anything is unclear or if there are errors in those docs

good luck and best wishes - hexdump

hexdump0815 avatar Mar 04 '23 10:03 hexdump0815

@hexdump0815 Thanks, another thing tho', the permissions isn't right for some system directories. This is a part of the output from ls -l /

drwxr-xr-x   1 linux linux 3564 Mar  4 13:56 etc
drwxrwxr-x   1 linux linux  832 Feb 18 08:48 scripts
drwxrwxr-x   1 linux linux   84 Jul 16  2021 usr

I guess a chown -R root:root would do but still...

shelterx avatar Mar 04 '23 14:03 shelterx

@shelterx - oh - thats a very good hint ... i think this comes from me untaring the extra-files parts on top of the freshly created rootfs - i'll find a fix for it - thanks a lot for pointing this out, definitely not a good default permission ...

hexdump0815 avatar Mar 04 '23 16:03 hexdump0815

@shelterx - i checked and it looks this was due to the ownerships of my imagebuilder checkout on my image build machine was messed up (no real idea how that happend) ... i plan to add a "latest info" section to the upcoming new future top readme.md and will put a note on how to check and fix this issue soon. this should work if run as root to fix for all affected files:

# show all affected files
find /bin /boot /etc /lib /opt /root /sbin /scripts /usr -user linux -ls
# fix the ownership for them
find /bin /boot /etc /lib /opt /root /sbin /scripts /usr -user linux -exec chown root:root {} \;
# check again - nothing should be left
find /bin /boot /etc /lib /opt /root /sbin /scripts /usr -user linux -ls

hexdump0815 avatar Mar 04 '23 19:03 hexdump0815

@shelterx - fyi: some initial doc changes are online now ...

hexdump0815 avatar Mar 04 '23 22:03 hexdump0815

I'm not sure if I messed something up, but is it possible to get video acceleration in the browsers? I tried chromium, it says it's HW Video Acceleration is enabled but no codecs are available as being HW accelerated.

shelterx avatar Mar 12 '23 17:03 shelterx

@shelterx - i think this is a complicated one and from history it sometimes works and then breaks again if it once worked and highly depends on the platform - due to this i see this as a topic outside of those images, but if you find a way to get it working reliable, then i would of course be interested to know about it :)

on mt8183 i think there was some code recently added to support internal codec format call m2m or similar i think to ffmpeg and or the kernel i think ...

hexdump0815 avatar Mar 12 '23 20:03 hexdump0815

@hexdump0815 yeah hw acceleration in Linux for browsers is still a nightmare. I'm not sure if I had any acceleration during the initial. I saw vp9 being a codec the that was accelerated but I'm not sure where I saw it and if it even works.

shelterx avatar Mar 13 '23 11:03 shelterx

One more observation, there are still symlinks that belongs to the linux user on the filesystem. You can't chown those, apt upgrade complains about it too (depending on which package that gets upgraded).

Regarding the touchpad that sometimes doesn't work when booting, apart from just rebooting the entire system to fix it, you can also restart lightdm through the console.

Also, dropping to the console and logging in tends to spam it with kernel messages for some reason, which's a bit odd, shouldn't these go directly to syslog?

shelterx avatar Mar 16 '23 07:03 shelterx

@shelterx - i think the symlinks should be no problem, if desired one could remove them and recreate them the same way as root - i gues they are the ones in /usr/share/alsa/ucm2? ... future images will have this fixed for sure

thanks for the hint with the touchpad, at some point we will have to debug what the actual problem is - but better to have at least a workaround than none :) ... which lenovo ideapad 3 do you have - i guess the mt8183 one? i'm asking as the lenovo naming is sometimes not really clear: lenovo ideapad 3 coud match to the mt8173 11.6", to the mt8183 11.6", to the mt8183 14" and even to the snapdragon duet 3 ...

regarding the messages on the console: maybe they are at a level which routes them to both syslog and the console?

hexdump0815 avatar Mar 16 '23 17:03 hexdump0815

@hexdump0815 I have the mt8381 version. Yes, the messages in console probably isnt being sent to syslog, I just find it a bit odd. And yes, it's the symlinks in /usr/share/alsa/ucm2

shelterx avatar Mar 17 '23 09:03 shelterx

@shelterx - this: https://github.com/hexdump0815/imagebuilder/commit/0293bd3ec4c1ab358fec352c1a0aedc097566094 should take care of the symlinks as well

hexdump0815 avatar Mar 19 '23 18:03 hexdump0815

@hexdump0815 / is also owned by linux

root@chromie:~# ls -la /
total 52
drwxrwxr-x   1 linux linux  144 Mar  3 19:51 .
drwxrwxr-x   1 linux linux  144 Mar  3 19:51 ..

Regarding the touchpad I read that psmouse can cause issues, but that seems to compiled in the kernal and not as a module? So I can't really blacklist it.

shelterx avatar Mar 21 '23 08:03 shelterx

@shelterx - thanks once more, i added it to the important info as well: https://github.com/hexdump0815/imagebuilder/commit/40a3e67028dfa5990518676b04001dc74b6591c2

hexdump0815 avatar Mar 21 '23 17:03 hexdump0815