Luckfox Lyra on PicoCalc

finally got hisptoot’s buildroot to build after many failures.
how to add our own apps to it ?
even after trying some 5 to 6 wifi dongles, wifi is still not working.

2 Likes

I have to commend you on this, every time I sit down to sort it out, after about 20 minutes, I decide this is not a project I want to take on. However, someone needs to document the process, because hisptoot never bothered to and he has not posted in this topic since April.

1 Like

the key to the whole process is having a new user as “luckfox” and naming your sdk folder inline with what his script expects. the rest are just copy to the right folders and merger. Another important lesson was to use ubuntu 22.04 as python2 is a key requirement. Rest is completely automated.

2 Likes

This the last version he has published.


Fontsize is in
/root/.fbtermrc/

[edit]
You cannot scroll the terminal .. not complete true. Man page says shift Page-Up and Page-Down, but I have failed to find this keys on the keyboard ..

But here are the keys for fterm:(you can generate multiple screens, that is something i was not aware)
keyboard: CTRL_ALT_E: exit from FbTerm
CTRL_ALT_C: create a new window
CTRL_ALT_D: destroy current window
CTRL_ALT_1: switch to window 1
CTRL_ALT_2: switch to window 2
CTRL_ALT_3: switch to window 3
CTRL_ALT_4: switch to window 4
CTRL_ALT_5: switch to window 5
CTRL_ALT_6: switch to window 6
CTRL_ALT_7: switch to window 7
CTRL_ALT_8: switch to window 8
CTRL_ALT_9: switch to window 9
CTRL_ALT_0: switch to window 10
SHIFT_LEFT: switch to previous window
SHIFT_RIGHT: switch to next window
SHIFT_PAGEUP: history scroll up
SHIFT_PAGEDOWN: history scroll down
CTRL_ALT_F1: switch to encoding of current locale
CTRL_ALT_F2 to CTRL_ALT_F6: switch to additional encodings
CTRL_SPACE: toggle input method
CTRL_ALT_K: kill input method server

Thanks Michael!
Is not the most elegant solution, but if you use this after a command :

| less

I.e.

ls | less

You kind of can scroll in terminal, is not the best but its the only workaround I could find as PgUp and PgDown are not in the keyboard (maybe if the keyboard firmware is updated :thinking:?)

Regarding the font if I nano it its an empty file… maybe I need to update the os version to latest

1 Like

I haven’t tried this on the Lyra, but you may want to try pressing Shift + Up Arrow for Page Up and Shift + Down Arrow for Page Down. Also, Shift + Tab send Home and Shift + Del sends End. Weirdly, Shift + Enter also sends Break.

Keyboard mapping came up in the PicoMite code so I went through and added them based on the keyboard firmware and what the MicroPython port was using. Since it’s part of the keyboard firmware I’m guessing those should work on the Lyra too.

Note that the Shift key always sends a key code on the PicoCalc and also modifies the key pressed (if it can be shifted – a few can’t). Normal keyboards don’t do that, so depending on how the keyboard driver in the OS running on the Lyra works, this might cause some weirdness when reading keyboard input from some applications. Most will probably ignore those extra Shift keycodes anyway, but just FYI.

Nothing happens on the Lyra if I press Shitf + Up / Down :frowning:

Does anyone know how i can connect antenna to the wifi of luckfox Lyra board. Or would we need to dismantle the usb wifi dongle and solder to that antenna.

Luckfox Lyra does not have wifi. You’d need to solder an antenna to the dongle if that’s what you want to do (I have seen such hacks but they depend on the dongle model).


perfect

6 Likes

Hello everyone, I ported a new image and didn’t need to modify circuitry to play the sound, and I compiled ratroarch into it. I release it with the SDK, you can use the SDK to compile your own software, you can get the image and SDK on GitHub.

nekocharm/picocalc-luckfox-lyra

6 Likes

I assume this still requires Ubuntu 22.04 with Python2 to build, is this correct?
Does this include the wireless drivers from hisptoot’s image or do I need to integrate those myself?

Nice, I see you have also added the PicoCalc drivers to the SDK Makefile/Kconfig…
I added to PicoCalc menu for a Ubuntu OS version

My PicoCalc is now on the way

I see this is the same for another SDK supporting the Banana Pi BPI-Forge1 (RK3506J) also requires Ubuntu 22.04 and python2

Thanks for your effort!

I’ve tried the image, and indeed sound is working though it is distorted. Noticeable when playing an mp3, or by simply running RetroArch.

Anything I can help with testing, changing some settings?


Update, might be the same issue as with the Hisptoot image, ‘a loud noise using soft pwm’

Thank you, neko789.
I downloaded the image file of the Linux you built and I’m enjoying it.
I have the utmost respect for your wonderful work.
And when I saw your github, I wanted to try building Linux on my PC (Windows 11).
Fortunately, the base version, Luckfox_Lyra_SDK_250429, seems to be able to run on Windows 11 WSL2, unlike previous versions.

When I tried to build it, I had some problems, but I was able to build it properly as described on github.
The problems I had may have been my own mistakes, but I’m writing them down here in case they are of any use.

1). Windows 11, WSL2, Ubuntu 22.04 and PATH settings.
First, I installed Ubuntu 22.04.5LTS on Windows 11 (and WSL).
Then I tried to test-build with Luckfox Lyra’s SDK (Luckfox_Lyra_SDK_250429).
The problem here was PATH.
By default, the Windows PATH was inherited, and an error about PATH appeared.
The solution was to edit “/etc/wsl.conf”.

[interop]
appendWindowsPath = false

Add the above to “/etc/wsl.conf”, save it, and restart WSL.

To restart WSL, use the following command in the command prompt:
wsl.exe --shutdown
Now I can build Linux for Luckfox Lyra.

2). Adding some directories and changing file.
Next, I looked at nekocharm’s github and followed the instructions.
“1.1. SDK Environment Deployment”…This has already been done.
“1.2. Clone Picocalc-Luckfox-Lyra”…This also worked without any problems.
However, in “1.2. 3.Prepare”, an error occurred at “./prepare.sh”.

-The problem was … “Lyra-sdk/buildroot/package/retroarch/libretro-dosboxpure did not exist”.
To deal with that, I created a directory, “Lyra-sdk/buildroot/package/retroarch/libretro-dosboxpure”.

Furthermore, just to be on the safe side, I disabled dosbox pure.
I decided to think about dosbox pure later.
In other words, I edited
“picocalc-luckfox-lyra/src/buildroot/configs/rockchip_rk3506_picocalc_luckfox_defconfig”.
That is, comment out line 57.
57: # BR2_PACKAGE_LIBRETRO_DOSBOXPURE=y

And, I also had a problem … “Lyra-sdk/kernel-6.1/sound/pwm not existing”.
To deal with this, I created a directory, “Lyra-sdk/kernel-6.1/sound/pwm”.

After that, “./prepare.sh” no longer caused any problems.

3). Copying some files to prepare for the build.
I went into the “Lyra-sdk” directory and started working for build.
Then, in the github “2. Build” stage, even if “./build.sh lunch” was executed,
“picocalc_luckfox_lyra_buildroot_sdmmc_defconfig” did not appear.

The solution to this problem is probably as follows.
Copy the three files,
“amp_mcu.its”, “parameter-lyra-sdmmc-amp.txt” and “picocalc_luckfox_lyra_buildroot_sdmmc_defconfig”
in “Lyra-sdk/picocalc-luckfox-lyra/src/device/rockchip/.chips/rk3506”
to “Lyra-sdk/device/rockchip/.chips/rk3506”

By doing so, when “./build.sh lunch” is executed,
“picocalc_luckfox_lyra_buildroot_sdmmc_defconfig”
will appear.
Then, I ran “./build.sh” and the build was performed (although it took some time), and some image files were created.

As you can see, I ran into three problems, some of which may be my own mistakes, or they may all be my own mistakes.
But in the end, the build came out as described on github.
Thank you for reading this long post.

n602_na

1 Like

I don’t think these were your mistakes, I experienced the exact same problems. The shell script does not work quite right.

1 Like

Hi, maybe i have overscrolled it, but what format should the sd card for the sd slot be formatted in?

Thanks in advance
and thanks to hipstoot for all this crazy stuff

Thanks. That’s a relief to hear.
If there had been more issues like that I would have given up on the build.
But they were just a few minor issues compared to the amount of work the script does

The SD card format for the built in card-slot on the Lyra will need to be formatted using the SD card format tool. The SD card that come with the Pico calc can remain in the format it comes in and will be accessible here: /media/sdcard1. If you leave the Pico Calc SD in this format then you can continue to use it if you swap back to a RPI Pico.

1 Like