Luckfox Lyra on PicoCalc

If you are asking how to make one I made a little guide on Github if you want to see what to do now that the SDK doesn’t let you make one anymore. I mostly made it so I wouldn’t forget what to do. So you can give me some feedback :slight_smile: . Now we have a Yocto layer we probably don’t need it. Maybe I need to learn Yocto now.

2 Likes

Actually, you can scroll the screen in tmux. First, press Ctrl + b to send the prefix command, then press the “[” key (the left square bracket) to enter “Copy Mode.”

In this mode, you can scroll with the arrow keys and also use vi-like navigation keys—for example, q to quit, Ctrl + f to move forward one page, or Ctrl + b to move backward one page.

I found that @hisptoot embed a Pinyin IME with Fcitx, which is very important to me(And both the Ubuntu image in this post I try with apt-get,none of them make fcitx works). He has really great taste in tech.

1 Like

GOOD NEWS guys:
According to the Luckfox Lyra schematics, the audio pins (31 and 32) is connected to the MCU via an optional 0Ω resistor.

To disconnect the pins from the MCU, all you need to do is remove this resistor from the solder pad.

So we can get the sound works just mod the lyra board! No any affect to Pico & Pico 2 or other boards:
1,Remove the resistor on the Lyra board(show in the picture,sorry that “pin30”need to correct as“pin32”).
2,Ensure pin 32 is no longer connected to the MCU.
3,Solder pin 4 to pin 32 on the Lyra board with wire.


https://youtube.com/shorts/yaMkdAxdRjI?feature=share

Accroding to @hisptoot 's PWM audio driver only one audio channel is working.The mod for pin 31 (PicoCalc’s actually left channel) should be the same if software support is added. The audio quality is noticeably bad Compared with playing the same WAV file using MMbasic,and the volume is really really tiny.Looking forward to your guy’s software improvements.

7 Likes

Hi. I have been really enjoying tinkering with my PicoCalc. I started off with hisptoots image, worked great for games and such, but I needed usb ethernet and apt. So I switched to The Ubuntu image with sdk. Got ethernet sharing over USB, can add software using apt. However, I can’t get picoarch, dosbox, prboom, etc. to work. I’m assuming its got something to with the framebuffer. If I write my own SDL app and point it at fb1 I can draw to the screen. But prboom for example gives me the startup logs in terminal but never shows graphics. Any help/insights would be appreciated.

1 Like

Have you added your user account to the video and audio groups?

1 Like

Yes. I have also tried rebuilding SDL with different framebuffer support, directfb, kmsdrm, and fbcon.

Does this board work with the PicoCalc with no hardware tinkering like soldering or anything?

And also, with the PicoCalc’s gap for the micro-usb port, is it large enough for the usb C port on the luckfox lyra, and can’t that USB C port support a wifi dongle on it?

Yes, luckfox lyra works inside picocalc without soldering, except for sound for which PWM yields very noisy results (it’s not clear to me whether a better software implementation could fix it). For I2S sound, you need to cut / unsolder one pin and solder a wire to another pin.

As exaplained multiple times in the thread, you can plug an adapter for a USB connector, and use a WIFI adapter with it. Chose your adapter wisely if you don’t want to have to compile the missing kernel modules (but that’s not too difficult if done on device).

Using the internal usb port might be possible but I haven’t seen anybody do it. You need to recompile the kernel so that the usb controler works in host mode instead of gadget mode. You will loose the possibility to use Rockchip’s software for flashing, or adb for pushing files.

– edit –

That last claim is probably wrong. Flashing through Rockchip’s software is handled by the bootloader.

2 Likes

I really do sympathize with you on usability of open source software, but in my case at least, I built what I wanted to use so I could use it, and published it on github in hopes others might find it useful. I’m likely to scratch my own itch long before I scratch yours.

Even then though, Luckfox (and I think it’s really Rockchip ultimately) don’t seem to make it easy at all to get a simple SD card image from their SDK. The image it produces doesn’t have the right partition tables, and their proprietary flash tools seem to convert that to the appropriate formatting when you flash, and the few hours I spent trying to determine how it’s doing this weren’t ultimately fruitful and I found another way that’s easy enough for me.

EDIT: it looks like there is a tool - programmer_image_tool - that might do the trick. I’m going to test that out soon. we’ll see.

1 Like

I can tell you the gap is perfectly sized for the usb-c port on the lyra. looks almost like it was designed for it. I haven’t tried using this port in host mode, but I don’t see why it couldn’t be done.

1 Like

If you have Linux you can make an image using dd and parted. If you have the old SDK and make an Ubuntu image then you can create it like this (replace lyra_sdk with the path to your SDK):

fallocate -l 2G picocalc.img

parted --script picocalc.img \
    mklabel gpt \
    mkpart uboot 4MiB 8MiB \
    mkpart boot 8MiB 20MiB \
    mkpart rootfs 32MiB 100%

uboot=lyra_sdk/u-boot/uboot.img \
kernel=lyra_sdk/kernel-6.1/zboot.img \
rootfs=lyra_sdk/ubuntu/output/images/rootfs.ext4 \
target=picocalc.img \
bash -c '\
    dd if=$uboot of=$target bs=512 status=progress seek=8192 conv=notrunc status=progress && \
    dd if=$kernel of=$target bs=512 status=progress seek=16384 conv=notrunc status=progress && \
    dd if=$rootfs of=$target bs=512 status=progress seek=65536 conv=notrunc status=progress'


Then you can apply it to your SD card using dd too, for example if it is at /dev/sdb:


sudo dd if=picocalc.img of=/dev/sdb bs=2048 status=progress conv=notrunc status=progress

2 Likes

Is it possible to have a setup with Tiny Core Linux on the Lyra but with it stripped down, like some features disabled and all to leave the most user space for ram wise.

I don’t know of any current port, but it should be possible. You should start by rebuilding an already supported distribution, such as Buildroot or Ubuntu, and understand what it takes to make a new port.

It looks like tiny core will work, I just booted the raspberry pi version on my Lyra. It would need a little work to get it running properly, such as modifying U-boot to run an initramfs and maybe modifying the device tree to add a ramdisc or is that a kernel parameter? Tweak the tc-config and add a getty on serial for debug. Then add the Picocalc display and keyboard drivers. Buildroot already has Busybox as its base so maybe that is what you should try first.

1 Like

I only find SDKs for buildroot on the Luckfox wiki,where can I get SDK to build an Ubuntu image?

Luckfox Wiki → SDK google drive → backup → 2503 → Luckfox_Lyra_SDK_250311.tar.gz

Do all the Lyra’s work? I would like to use the ethernet version. Luckfox Lyra Plus RK3506G2 Linux Micro Development Board, with Ethernet Port.

I, too, would be curious to know this before I solder some pins onto my old Luckfox sitting in a drawer. A lot of people probably have these laying around as they were (up until very recently, when an easier method was found) widely used to jailbreak PS4 consoles.

Yeah both versions work.

Is there any way to get wifi working (using some external usb or whatever) and still having the flash usb-c port working at the same time?