Pico Pro/Max with Linux Host (SocToolKit/upgrade_tool for Linux with SD card support)
Posted: 2024-06-11 5:39
Hi, I'm new here.
I'm currently writing a guide how to get LuckFox Pico Pro/Max 128MB and 256MB boards configured using Linux as host.
The wiki.luckfox.com is OK and useful, but I think it misses crucial information how the board actually boots.
Here my preliminary understanding:
Be aware: you cannot write unto the SD card with the `upgrade_tool`, you need a MS-Windows system & SocToolKit.exe as of 2024/06. So, even though you are given the option with SDK running under Linux to choose eMMC and SD card, you cannot install update.img unto the SD card within Linux yet.
We need a Linux host solution to configure LuckFox boards - essentially replacing SocToolKit.exe
Update: there is a Linux version (unlike Wiki indicates at 2024/06/19): https://github.com/LuckfoxTECH/luckfox- ... SocToolKit
So, this thread shall operate to gather the information.
Update: the issue has been resolved, see below.
Configure eMMC (256MB) aka Firmware + Lightweight Linux
Use `upgrade_tool` as described in https://wiki.luckfox.com/Luckfox-Pico/L ... Burn-Image
for now choose eMMC option to build the system
Configure SD Card (any size) Heavyweight Linux
See a reply lower for the solution using blkenvflash script
FAQ:
I'm currently writing a guide how to get LuckFox Pico Pro/Max 128MB and 256MB boards configured using Linux as host.
The wiki.luckfox.com is OK and useful, but I think it misses crucial information how the board actually boots.
Here my preliminary understanding:
- ROM: there is a boot code within the chip which cannot be changed
- eMMC: 256MB SPI NAND FLASH which is booted first aka "firmware", it may contain also an entire lightweight Linux, or just a relay code to boot from the optional SD Card (when I checked the boot process pre-kernel launching, it looked like first SD card is checked and then goes to the eMMC back)
- optional SD Card: it can be 1GB-32GB in size, and contain a Linux system of your choice
Be aware: you cannot write unto the SD card with the `upgrade_tool`, you need a MS-Windows system & SocToolKit.exe as of 2024/06. So, even though you are given the option with SDK running under Linux to choose eMMC and SD card, you cannot install update.img unto the SD card within Linux yet.
We need a Linux host solution to configure LuckFox boards - essentially replacing SocToolKit.exe
Update: there is a Linux version (unlike Wiki indicates at 2024/06/19): https://github.com/LuckfoxTECH/luckfox- ... SocToolKit
So, this thread shall operate to gather the information.
Update: the issue has been resolved, see below.
Configure eMMC (256MB) aka Firmware + Lightweight Linux
Use `upgrade_tool` as described in https://wiki.luckfox.com/Luckfox-Pico/L ... Burn-Image
for now choose eMMC option to build the system
Configure SD Card (any size) Heavyweight Linux
See a reply lower for the solution using blkenvflash script
FAQ:
- "Definition of partition in the firmware is larger than flash" error: you were trying to put Heavyweight Linux into the tiny 256MB eMMC - you have chosen the wrong system to `./build.sh` and the resulting `update.img` actually belongs to the SD card (& eMMC), not only the eMMC which the `upgrade_tool` writes to. Solution: redo `./build.sh lunch` and choose eMMC only option (the numbering changes due updates of the SDK)