"SMALL_FLASH" variable in Config-kernel.in

While looking through the Config-kernel.in file, I noticed that many hardening features depend on a variable called "SMALL_FLASH" being false.

What exactly triggers this variable to be true? How many MB?

Thank you.

Manual definition for devices or targets.

E.g. all ar71xx/tiny devices.


Typically devices with 4 MB flash.


According to the link you provided, all ath79 devices have the SMALL_FLASH flag set to true. One of those devices happens to be the GL-iNet AR300M, which has 128MB RAM, 16-144 MB Flash, and a 650 MHz CPU... This is more than enough to enable hardening, which should not be disabled on a router unless absolutely necessary.

Can you confirm that the AR300M will have the SMALL_FLASH flag set to true during installation?

All ath79/tiny devices

Not the ath79/generic or ath79/nand devices.

Thanks. What exactly makes a device "tiny"?

You can look from the image makefiles, which routers have been placedin the "tiny" recipes.


There is no exact definition, but mostly the devices with 4 MB flash and/or 32 MB RAM, and some others, e.g. those routers where the OEM bootloader assumes only a small flash area (like partition) for kernel, e.g. less than 2 MB for kernel.

Your device AR300M is not among the ones in the "tiny" image makefiles, which you have have noticed quite easily via search for AR300M.


I did search for AR300M, but "tiny" was undocumented. Hence why I asked. If my question annoyed you then perhaps better documentation would solve the problem.

Aside from that, thanks for the help.

Yeah, the "tiny" is not really documented anywhere, as it is just a selected descriptive name for one subtarget in ath79. Subtargets are just a way to group devices by their functionality to be built in. So "tiny" is not a technical classification coded somewhere.

Regarding the device classification in general, highest level is "target" like ath79, ar71xx, mvebu, x86, ipq806x etc. which mostly means processor/SoC families. Then the next level is "subtargets" for those targets, where a wide scale of devices with different resources/chips are inclucded. E.g. ar71xx/generic, ar71xx/nand, ar71xx/tiny. Generic has been the original, then came devices with NAND flash instead of NOR so different flash drivers needed, and finally when kernel grew, the "tiny" devices were groupes differently, as the regular OpenWrt kernel did not fit to them any more.

The subtargets vary a lot, e.g. for mvebu there are subtargets by processor features (cortex9, cortex53, ...) , while ath79 and subtargets for flash type and size.

Easiest you can see the whole target/subtarget universe from the buildbot: