From e53a6fc1b4a404d331cfda176410121c8e75dc27 Mon Sep 17 00:00:00 2001 From: Ricardo Martins Date: Fri, 7 Feb 2014 14:50:54 +0000 Subject: [PATCH] mkconfig: backported cfg_eth_ext_soft_mac. --- mkconfig.bash | 17 +++++++++-------- systems/lctr-a9xx/config | 1 + 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/mkconfig.bash b/mkconfig.bash index ec9abc5..6b15db8 100755 --- a/mkconfig.bash +++ b/mkconfig.bash @@ -88,14 +88,15 @@ if ! [ -f "architectures/$cfg_architecture.cfg" ]; then fi source "architectures/$cfg_architecture.cfg" -# Creating the mac address if not set in configuration file we create one derivated from the IP address: -if [ -n $cfg_eth_ext_ip ]; then - ips=(`echo $cfg_eth_ext_ip | sed -e 's/\./\n/g'`) - for i in "${ips[@]}" - do - hip=("${hip[@]}" `printf '%x' $i`) - done - cfg_eth_ext_mac="80:c1:${hip[0]}:${hip[1]}:${hip[2]}:${hip[3]}" +# Create a MAC address based on the IP address if cfg_eth_ext_soft_mac +# is set. +if [ -n "$cfg_eth_ext_ip" ] && [ -n "$cfg_eth_ext_soft_mac" ]; then + ips=(`echo $cfg_eth_ext_ip | sed -e 's/\./\n/g'`) + for i in "${ips[@]}" + do + hip=("${hip[@]}" `printf '%x' $i`) + done + cfg_eth_ext_mac="80:c1:${hip[0]}:${hip[1]}:${hip[2]}:${hip[3]}" fi # Config: system name. diff --git a/systems/lctr-a9xx/config b/systems/lctr-a9xx/config index 3621581..e6b752b 100644 --- a/systems/lctr-a9xx/config +++ b/systems/lctr-a9xx/config @@ -11,6 +11,7 @@ cfg_ntpd_config='/etc/ntp/server.cfg' cfg_dtnd_config='/opt/lsts/dtn/etc/dtn.conf' cfg_eth_ext_mk='255.255.0.0' cfg_eth_ext_gw='10.0.0.1' +cfg_eth_ext_soft_mac='true' cfg_target_uboot_config='igep0020_config' cfg_target_linux_load_addr=0x80008000 cfg_partitions=\