Set Custom Hostname in LLDP SDK

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Set Custom Hostname in LLDP SDK

Jump to solution
772 Views
pvsnsubhash
Contributor II

I want to change the hostname of the LLDP SDK for NXP LX2160ARBD Board. I tried using "hostname" and "hostname_pn-base-files" in local.conf, but after building it shows the default hostname. I even tried creating a base-files recipe with a bbappend to modify hostname and hosts file in my custom layer, even that didn't work.. What else can be done?

 

Regards
PVSN Subhash
0 Kudos
Reply
1 Solution
84 Views
pvsnsubhash
Contributor II

I have resolved this by using the parameter HOST_NAME = "CUSTOM_HOSTNAME" in the respective distro's bb file, in my case it is ls-image-main. 

I created a ls-image-main.bbappend in my custom layer and added this line in that file and after building the distro recipe, host name change was reflected in the image.

Regards
PVSN Subhash

View solution in original post

0 Kudos
Reply
2 Replies
736 Views
June_Lu
NXP TechSupport
NXP TechSupport

If you want to add custom machine in the yocto, you could refer to

https://docs.nxp.com/bundle/UG10081_LLDP_L6.1.55_2.2.0/page/topics/how_to_add_a_custom_machine_in_fl...

Thanks

0 Kudos
Reply
85 Views
pvsnsubhash
Contributor II

I have resolved this by using the parameter HOST_NAME = "CUSTOM_HOSTNAME" in the respective distro's bb file, in my case it is ls-image-main. 

I created a ls-image-main.bbappend in my custom layer and added this line in that file and after building the distro recipe, host name change was reflected in the image.

Regards
PVSN Subhash
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2112550%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ESet%20Custom%20Hostname%20in%20LLDP%20SDK%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2112550%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20want%20to%20change%20the%20hostname%20of%20the%20LLDP%20SDK%20for%20NXP%20LX2160ARBD%20Board.%20I%20tried%20using%20%22hostname%22%20and%20%22hostname_pn-base-files%22%20in%20local.conf%2C%20but%20after%20building%20it%20shows%20the%20default%20hostname.%20I%20even%20tried%20creating%20a%20base-files%20recipe%20with%20a%20bbappend%20to%20modify%20hostname%20and%20hosts%20file%20in%20my%20custom%20layer%2C%20even%20that%20didn't%20work..%20What%20else%20can%20be%20done%3F%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2396203%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Set%20Custom%20Hostname%20in%20LLDP%20SDK%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2396203%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20have%20resolved%20this%20by%20using%20the%20parameter%26nbsp%3BHOST_NAME%20%3D%20%22CUSTOM_HOSTNAME%22%20in%20the%20respective%20distro's%20bb%20file%2C%20in%20my%20case%20it%20is%20ls-image-main.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20created%20a%20ls-image-main.bbappend%20in%20my%20custom%20layer%20and%20added%20this%20line%20in%20that%20file%20and%20after%20building%20the%20distro%20recipe%2C%20host%20name%20change%20was%20reflected%20in%20the%20image.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2115007%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Set%20Custom%20Hostname%20in%20LLDP%20SDK%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2115007%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20lang%3D%22en-US%22%3EIf%20you%20want%20to%20add%20custom%20machine%20in%20the%20yocto%2C%20you%20could%20refer%20to%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.nxp.com%2Fbundle%2FUG10081_LLDP_L6.1.55_2.2.0%2Fpage%2Ftopics%2Fhow_to_add_a_custom_machine_in_flexbuild_based_on_.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.nxp.com%2Fbundle%2FUG10081_LLDP_L6.1.55_2.2.0%2Fpage%2Ftopics%2Fhow_to_add_a_custom_machine_in_flexbuild_based_on_.html%3C%2FA%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20lang%3D%22en-US%22%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E