I want to build a firmware with WiFi already enabled

I want to build a firmware in which i don't need to turn on wifi by default on restart. I need to add this lines in firmware build
This is all or i need to add something more.
Script to run on first boot (uci-defaults)

uci set wireless.radio0.disabled='0' uci set wireless.radio1.disabled='0'

I would:
a) configure that router manually as you need/want it to come up after a re-flash (so all WiFi set-up, and passwords)
b) make a copy of /etc/config/wireless (and any other config files you like to "inherit")
c) copy these to ${OPENWRT_BUILD_ROOT}/files/etc/config (replace OPENWRT_BUILD_ROOT with where you built openwrt, not the "outer" openwrt directory, but the first one with multiple sub directories)
d) build a new firmware

This new firmware will use all files found in the files "hierarchy" a very convenient way to customize your own OpenWrt builts, but it will require building your own...

The image builder has an option FILES where you can specify a folder with custom files to include. Just copy there your custom file /etc/config/wireless with wifi enable. You can also setup SSID and password and your wifi will be immediatly operationnal.

will it work ** uci set wireless.radio0.disabled='0' uci set wireless.radio1.disabled='0'**
i just want my device to have wifi on after reset so i can set up over wifi

Are you intending to flash OpenWRT to a device for the first time? Or are you intending to upgrade a device that is already running OpenWRT to a new version?

If it's the latter then as long as you select to keep the current settings and configuration (which is the default option if upgrading through Luci) everything will be kept as it was before the upgrade, including how the wifi was set up.

i am running 22.03.3 no issues there but now as i am using doh i am interested to build my own adding that and add wifi on on first boot

Doesn't answer the question. Are you intending to flash this build onto a device that either doesn't have OpenWRT or where you've opted to not retain the existing settings/configuration during flashing, i.e. doing a 'factory reset'. Or are you intending to flash it onto an already configured and working OpenWRT device where you'll be keeping the settings and configuration?

If it's the latter then you don't need to do anything to bring wifi up after the reflash. If it was on before you flashed it'll be on afterwards.

If it's the former then you'll want to add some additional commands to set SSID and, presumably, some security. Running uci show wireless on a configured device will show the relevant uci settings. You also need commit wireless at the end.

i missed yes i will install on a device that already running openwrt for last 1month

uci set wireless.radio0.disabled='0'
uci set wireless.radio1.disabled='0'
commit wireless

this is it to make my firmware boot with wireless on by default. give me a conformation so i will flash it

If you are flashing over a pre-existing install of OpenWRT and are not getting rid of the existing settings then you don't need to have anything in the uci-defaults. The wifi will come up just as it was before you flashed the new image.

But yes, the commands you've added should turn the wifi on.

thanks commit wireless that comment is need or i can skip that

It doesn't make any difference because for your use case you don't need any of those commands at all.

true but if i do a reset i should have wifi access on boot up
so if i dont add commit will it work i think it should

create a file 99_enable_wifi in package/base-files/files/uci-defaults

uci set wireless.@wifi-device[0].disabled=0
uci commit wireless
exit 0

replace wifi-device by name of your wifi

uci set wireless.radio0.disabled='0'
uci set wireless.radio1.disabled='0'

last snapshot the name may be different phy...

dont understand i am using this https://firmware-selector.openwrt.org/?version=22.03.3

That is for build your personalized firmware not with the firmware selector