Lenovo ThinkSmart View ROM/OS Development

Do you have the IP addresses in the router as Dynamic or did you assign static IPs to these devices? The router/WIFI DHCP expiry might cause such issues where a device is assigned an IP for few hours/a day then the device stops communicating with the router and the router de-assigns the IP. Till the device sends another packet, the router doesn’t renew the IP or extend the IP lease.

Thanks a lot… What are the “set up offline” steps you followed?

Just on the first boot, when it asks to connect to a wifi network I skipped that part. Go through the setup without connecting to wifi network until the home launcher appears

That’s not actually how TCP/IP works. The device starts requesting to refresh the IP address at half the TTL and will continue to do so until the router grants it.

2 Likes

That is true given Android system doesn’t turn off WIFI on sleep mode. Otherwise, the DHCPREQUEST will be sent once the system wakes up.

Just as I thought I’d be losing my sanity over this one :stuck_out_tongue:

This is a pretty barebones Kernel 6.7.2 trying to boot postmarketOS on the ThinkSmart View here (probably in a world-wide first :stuck_out_tongue_winking_eye:), no device configurations made, really. So nothing works as of now. But I couldn’t - for the life of me - get the thing to show me any more than a blinking cursor before.

I hope it gets easier from here. I’m almost sure it won’t but at least I’m not flying blind anymore :nerd_face:

22 Likes

Started updating the first post with the current status of PostmarketOS on the device. So far: It runs stable and I can SSH into it through USB Networking. Storage works. Not a whole lot else is working yet.

10 Likes

:exploding_head::partying_face::nerd_face:

You sir, are a hero and a gentleman :clap:

EPIC progress :sunglasses:

1 Like

Incredible work! Glued to the progress updates over here.

1 Like

Alright. Enough ThinkSmart for the day :stuck_out_tongue:

Quick recap, here’s what I got working today:

  • WiFi
  • Bluetooth
  • Touchscreen
  • GPU
  • Display

The graphics do not work well at this point. The GNOME desktop is very glitchy to the point of being barely usable. I will try other desktop environments and also try optimizing the kernel a bit further.

26 Likes

Holy crap!

That’s freaking impressive. Well done guys, you ROCK !

Just bought 3 of these off the back of this, keep it up :metal:

Amazing work! So camera, audio and maybe rotation sensor? Is anything else left after that? Can it run chromium without a full desktop? Would love to run this with OpenWakeWord and a Slimproto client! Thanks for all your work figuring this out!

Awesome job! With linux kernel and drivers working, we open this up to way more developers for the display layers.

What specifically is the problem with gnome? Is it gnome Wayland or X? What graphics hardware is on the device?

Could try just using the framebuffer (software graphics). The graphical requirements arent exactly fancy here.

What about a WM designed for touch interfaces, like plasma mobile?

Yes, that looks about right for what is still missing.

A bit stuck on the Camera. I can’t find a single good piece of information on the sensor that is installed. The stock libchromatix driver identifies it as s5kc505a which suggests it’s a Samsung ISOCELL sensor of some kind. Not sure if any of the mainline kernel drivers can speak to it. Online, the part is identified as Qtech:FX505AA:505A:SPY8133B:24 but I haven’t found anything conclusive yet.

Audio is contingent on getting the TI TAS5782M driver working on mainline. I believe the already existing TAS5805M mainline driver is similar enough for me to possibly slightly rewrite it to work with the TAS5782M. At first glance it looks like it’s just some differences in initialization. Thankfully it’s a TI part, they have their datasheets out in the open. It’s going to be a bit more work than what was needed to get WiFi working with the ath10k driver, but still not a major undertaking.

Sensors seem to be handled by the Hexagon ADSP on this platform (roughly related: Qualcomm Snapdragon Sensor Core - postmarketOS). I might be able to access the sensors directly via a bitbanged i2c bus on the GPIOs. The actual i2c bus is not directly accessible.

It should be able to run Chromium without a full desktop.

That’s what some of the postmarketOS devs recommended I try. Haven’t done so yet.
Right now I’m focusing on packaging up everything I have so far so I can get it out there for more people to test and play around with.

4 Likes

Another complication in the implementation of sound is that the board apparently uses the Secondary PCM to Bluetooth Audio.
It doesn’t look like PCM audio support is currently in the mainline driver.
There was a patch a few years ago, but it didn’t go anywhere: [alsa-devel] [PATCH 0/8] ASoC: qdsp6: db820c: Add support for external and bluetooth audio - Adam Serbinski

So Audio input/output via Bluetooth may be non functional for a while.

1 Like

Recreating your work from source is a pretty daunting task.

Any chance we could get a flash dump to try?

I fully indemnify you of any liability :sweat_smile: :stuck_out_tongue_winking_eye:

Haha. So far I’m still working off my first ThinkSmart. The other two are still shrink wrapped :wink:

Here is an image you can use for testing. The default user is pmos with password pmos.

pmos-lenovo-cd-18781y-testing-20240217.tar.xz (409MiB)

You can flash it with EDL (using the loader from the original mod post) like this:

edl --memory=emmc --loader=prog_emmc_firehose_8953_ddr.mbn w boot lenovo-cd-18781y-boot.img && \
edl --memory=emmc --loader=prog_emmc_firehose_8953_ddr.mbn w userdata lenovo-cd-18781y-rootfs.img

Would probably work with QFIL too, just never used it myself.

Be patient when booting for the first time. On first boot the partitions are resized and firmware is put into place from the /vendor partition. All of this can take a good 3-5 Minutes.

At the login screen use the keyboard button (left of 0) to enter the password pmos.

At some point in the boot process, if still connected via USB, the device will pop up as a USB network interface on your machine.
With that, once you see the Phosh login/lock screen you should also be able to SSH into the thing: ssh [email protected]
You can also just connect to WiFi using the UI.
Once logged into the system you can install additional packages using apk add. pmOS has access to Alpine Linux package repos, so pretty much anything should be there.

Bluetooth Keyboards and Mice can be added through the UI in the Bluetooth Settings. Works perfectly.

If you want to use Firefox you’ll have to disable hardware acceleration for now: Disable Use hardware acceleration when available (#56) · Issues · postmarketOS / mobile-config-firefox · GitLab

Even building from source should be fairly straightforward:

  1. Setup pmbootstrap
  2. Run pmbootstrap init. Set up your pmOS environment to your liking (I recommend using phosh as the UI option). When it asks for a device choose qemu-aarch64 for now until you install my pmaports git fork in the next steps.
  3. Go to the aports directory. You can find the path to it using pmbootstrap config aports.
  4. Add my git repo as a remote: git remote add kaechele https://gitlab.com/kaechele/pmaports.git
  5. Fetch my git repo: git fetch kaechele
  6. Switch to the correct branch: git checkout kaechele/lenovo-cd-18781y
  7. Set the target device to the ThinkSmart codename: pmbootstrap config device lenovo-cd-18781y
  8. Run the installation: pmbootstrap install. This will take some time as it will have to download and compile the kernel for you.
  9. Sign the boot image. I use magiskboot: magiskboot sign ~/.local/var/pmbootstrap/chroot_rootfs_lenovo-cd-18781y/boot/boot.img (adjust paths as needed, may need sudo because files in the chroot are owned by UID 0 (root))
  10. Flash the resulting images using the edl command above.

Note:
Currently kernel update flashing from within pmOS is not enabled yet. So you will have to both pmbootstrap sideload any updated kernel as well as EDL flash the resulting boot.img. I hope to change this soon, so that the EDL flashing step will be no longer necessary. Just need to find an easy way to sign boot images within the build process and on the device before writing to the partition. If I can get lk2nd working we may no longer need signing (other than for lk2nd).

8 Likes

On a random note: I’m hoping to see some movement in the Qualcomm GPU space in mainline for AI. In a weird coincidence I stumbled upon a live stream by George Hotz programming a Qualcomm GPU driver. Given his current work on tinygrad and the Snapdragon 845 maybe we can see some improvements there :slight_smile:

2 Likes