Confused about update and self build system

Until now I built and flashed my device with a USB Stick.

That procedure had following steps:

  1. make menuconfig
  2. make (build)
  3. upload via uboot and usb drive connected to host port of device
  4. create /overlay on SD-Card
  5. install needed packages in userspace via pip for my python project

This procedure seams quite awkward and as I now tried to update, I came to the point where I had to choose all make menuconfig packages and configs manually again. More, I had already forgotten all the packages I had in my previous build and had to do the steps above several times until I got my firmware built as it was before.

How can I streamline this process?

my device is CONFIG_TARGET_ramips_mt76x8_DEVICE_LinkIt7688=y

You store a .config recipe that contains your package selection.
E.g. the output of ./scripts/ (which can still be pruned, but should serve you)
And you use that as the seed for make menuconfig (or make defconfig) the next time.
Note that your SD card thing is a rarity, as most "normal" routers use normal flash and /overlay is created automatically.

I use this device as a IoT Thing.
Should I consider using another distro?
Until now i just not found another dist that has that nice webconfig tool.

The question is, why are you using the sd card as overlay / extroot?
Doesn't fit your pip packages and other stuff into the nor flash?

No it does not. I have 32MB /overlay and total 128Mb flash.
Bildschirmfoto 2020-04-12 um 13.25.43
Bildschirmfoto 2020-04-12 um 13.27.13
It is a tiny and cheep chip. Ideal for IoT applications.

What workflow would you recommend?

Sorry, now I'm confused.
I only see in your screenshot that you are using the 32 MByte (128 Mbit) spi nor flash for everything.

If you build your firmware from source, there is always a file config.seed along with your built images.
That file can be used to rebuild a firmware with the same selected packages.

For example:

cd /path/to/openwrt-source
cp /path/to/config.seed .config
make defconfig

Yes that's the device before setting /overlay to sdcard.
What I don't like by building myself is that no kmod driver is available over opkg after the build.
By using the official build and creating my firmware mod. by script i can still add any driver later...

I just recognized that a sysupdate over my own build resets my need for sysfs.
As I'm relying heavily on mraa I need sysfs. So that means scripting is not possible to me.
Can I somehow build an image that I can flash directly to sdcard like a raspian for pi?

I think the ralink custom u-boot does only boot from the 32 MB flash.
For sure you can interrupt auto boot and boot from sd card manually, but i think this is no real option.
So the answer is generally no, but nothing is impossible.

You can write a loader that sits in the flash instead of the kernel that loads your files from the sd card.
Or you can play with cmdline of the kernel to use the sd card as root...

How much time do you wanna invest and how are you embedded systems skills?

Thanks @juppin, that's all I wanted to hear. I do not intend to invest time. I thought maybe its possible but your explanation is very helpful to understand why not and what are the possibilities. Thanks a lot.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.