How to disable Autonegotiation process in petalinux?

581 views Asked by At

I need to disable autonegotiation phase on boot sequence in Petalinux 2019.2. Is there any idea about it? As all you know, an autonegotiation phase is starting automatically by boot sequence and if there is a network dedicates IP for devices this process is completed quickly. But Im working as stati IP dedication. So, I need to disable it?

Thanks, M.A.

Petalinux Version 2019.2

1

There are 1 answers

0
thelummox On BEST ANSWER

Your question leaves a little to be desired, but it sounds like you don't want the DHCP daemon to start automatically at boot. What you can do is create a small script that disables 'udhcpd' and will auto-run at startup (see Chapter 8: Application Auto Run at Startup). If you create a symbolic link to your program with the 'S00' prefix (ex: "S00myapp-init"), it will run before any other scripts.

#!/bin/bash
# myapp-init: Prevent udhcpd program from auto-starting
# rc[0,1,6] kill the programs, so leave be.
for rc in 2 3 4 5; do
    rm -f /etc/rc${rc}.d/*udhcpd
done

myapp-init.bb snippet:

do_install() {
    install -d ${D}${sysconfdir}/init.d
    install -d ${D}${sysconfdir}/rc2.d
    install -d ${D}${sysconfdir}/rc3.d
    install -d ${D}${sysconfdir}/rc4.d
    install -d ${D}${sysconfdir}/rc5.d

    install -m 0755 ${S}/myapp-init.sh ${D}${sysconfdir}/init.d/myapp-init
    
    # run this script before any others
    ln -sf ../init.d/myapp-init ${D}${sysconfdir}/rc2.d/S00myapp-init
    ln -sf ../init.d/myapp-init ${D}${sysconfdir}/rc3.d/S00myapp-init
    ln -sf ../init.d/myapp-init ${D}${sysconfdir}/rc4.d/S00myapp-init
    ln -sf ../init.d/myapp-init ${D}${sysconfdir}/rc5.d/S00myapp-init