Multiple PXE Options based on Architecture

I have a fog server for serving PXE images to my computers, until now i set it up using the UCI options mentioned on but now i need to set up multiple options because I have some system which are UEFI and some are Legacy. There is a guide here on how to do it but I can't do it on OpenWRT
I tried disabling the Option Boot in the DHCP file but the PXE stops working because the SIserver becomes the OpenWRT server
I also tried setting the options directly on the dnsmasq file but it doesn't make any difference.

I forgot to paste my DHCP conf

config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/'
        option localservice '1'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option ra_slaac '1'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'
        option force '1'
        list dhcp_option '150,'
        list dhcp_option '66,'
        list dhcp_option '67,ipxe.efi'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

config domain
        option name ''
        option ip ''

config boot 'linux'
        option filename 'ipxe.efi'
        option serveraddress ''
        option servername ''
#        option vendorclass 'PXEClient'
1 Like

Thank you Vladislav, but it looks like they are using the tftp server from dnsmasq, I have to use a external tftp server