Page 1 of 1

Doubt how to include a startup script and a custom python package in a custom rootfs using pico max board

Posted: 2025-09-23 23:48
by castro.fernando
Hello,

I am getting started with the LuckFox Pro Max and I’d like some guidance on the recommended way to embed custom software and scripts into the root filesystem image.

My first attempt was to create a package under package/mycustompackage/, with both a Config.in and a mycustom.mk file, and then include it in the top-level package/Config.in. However, when I enable the package via make menuconfig and save the configuration, the option does not persist when I reopen the configuration menu. (curious thing is if I modify using make menuconfig it persists, but using build.sh it doesnt.)

My goal is fairly simple:

Include a custom script in the rootfs image.

Have this script run automatically at startup (via /etc/init.d/).

The script should configure a static IP and start a Python web server.

Could you please advise what the best practice would be in this case? Should I continue with the custom package approach, or would it be simpler to use a rootfs overlay or a post-build script?

I'm incluing my example in attachment. It's just a initial test.

Re: Doubt how to include a startup script and a custom python package in a custom rootfs using pico max board

Posted: 2025-09-25 1:56
by castro.fernando
I ended up found the solution on wiki page [SDK][https://wiki.luckfox.com/Luckfox-Pico-R ... stem-image]
The custom files/scripts can be add on overlay, then when the firmware is package all your files are included in same structure pointed in overlay.