Pregunta

I'm working with a custom embedded device and I'm using busybox. I want to remove the whole dhcp stuff from my image. Actually I don't really know how to do it.

I'm using YoctoProject's poky environment ( 9.0 dylan ). The busybox version is 1.20.2.

I wrote a static address to /etc/network/interfaces. After this I rebooted the device and the whole thing was working fine, but I need to be able to do this with by just installing a rootfs. Tried to install a package to my image which overwrites /etc/network/interfaces with my desired one, but somehow it's not working.

Also tried: ( in busybox recipe )

   do_configure_prepend() {
       sed -i 's/CONFIG_UDHCPD=y/# CONFIG_UDHCPD=y/g' ${WORKDIR}/defconfig
    }

Can you suggest me a solution?

¿Fue útil?

Solución

I was able to disable udhcpd with the following:

do_configure_append() {
    sed -i "/CONFIG_$i/c\# CONFIG_$i is not set" .config
}

By appending to do_configure() we avoid any patches that would otherwise override our change to the .config file.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top