From: Igor Marnat Date: Tue, 27 Mar 2007 15:15:29 +0400 Subject: [U-Boot-Users] netconsole doesn't work if $(serverip) is assigned to ncip instead of hardcoded value In-Reply-To: <20070327084001.D08A635261B@atlas.denx.de> References: <20070327084001.D08A635261B@atlas.denx.de> Message-ID: <15015754812.20070327151529@rambler.ru> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Wolfgang, WD> You must be doing something wrong. "ncip" and "serverip" are WD> completely unrelated. Sure. I just thought that it's possible to use environment variables to assign values to all other variables. That is to say, if assignment addip=setenv bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):$(netdev):off panic=1 works ok (it uses $(serverip)), why can't I use ncip=$(serverip)? See below the full environment. The only difference between two scenarious is that it works if ncip=10.0.0.55 and it doesn't if ncip=$(serverip). => printenv baudrate=115200 loads_echo=1 eth1addr=00:50:c2:1e:af:fd netdev=eth0 ethaddr=00:50:c2:1e:af:f1 kernel_flash_addr=ffe04000 kernel_flash_end=fffbffff kernel_flash_space=$(kernel_flash_addr) $(kernel_flash_end) poff=protect off $(kernel_flash_addr) $(kernel_flash_end) erase_kernel=era $(kernel_flash_addr) $(kernel_flash_end) upd_kernel=tftpboot; run poff; run erase_kernel; cp.b $(fileaddr) $(kernel_flash_addr) $(filesize) flash_nfs=run nfsargs addip addcons;bootm $(kernel_flash_addr) nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath) rootpath=$(rootpath) addip=setenv bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):$(netdev):off panic=1 addcons=setenv bootargs $(bootargs) console=ttyS0,$(baudrate) nfs26=/home/igor/tz-64/ppc/tz_64_nfs rootpath=/home/igor/tz-64/ppc/tz_64_nfs addmem=setenv bootargs $(bootargs) mem=16M filesize=ebe75 fileaddr=200000 netmask=255.255.255.0 serverip=10.0.0.55 bootargs=root=/dev/nfs rw nfsroot=90.0.0.55:/home/igor/tz-64/ppc/tz_64_nfs rootpath=/home/igor/tz-64/ppc/tz_64_nfs ip=90.0.0.137:90.0.0.55::255.255.255.0::eth0:off panic=1 net_nfs=tftp 200000 $(bootfile);run nfsargs addip addcons addmem;bootm mtd_args=setenv bootargs root=/dev/mtdblock0 rw rootfstype=jffs2 net_mtd=tftp 200000 $(bootfile);run mtd_args addip addcons addmem;bootm ipaddr=10.0.0.239 bootfilesaved=uImage26 bootcmdsaved=run net_mtd bootfile=uImage26nandconsole nc=setenv stdout nc;setenv stdin nc ncip=10.0.0.55 ethact=ppc_4xx_eth0 com_eth_go=run echo_sleep; run nc; run echo_sleep; run net_nfs bootcmd=run com_eth_go echo_sleep=echo "I am sleeping, press CTRL-C to stop";sleep 4; bootdelay=2 stdin=serial stdout=serial stderr=serial -- Best regards, Igor Marnat mailto:marny at rambler.ru