This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM62x-SK Permanent IP address

Hi,Experts

I'm starting the Demo with reference to the AM62x Starter Kit EVM Quick Start Guide, but I would like to evaluate it in a fixed IP environment instead of DHCP.

Previously, by directly changing /etc/network/interfaces or changing parameters in uBoot (bootargs),
Fixed IP was possible from DHCP, but referring to printenv of AM62x-SK, the specifications have changed significantly,
Bootargs also seems to exist in multiple places.

Please tell me how to fix the IP to an official that can change bootargs and other scripts on AM62x-SK (linux).

arch=arm
args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 ${mtdparts}
args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
args_usb=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
avb_verify=avb init ${mmcdev}; avb verify $slot_suffix;
baudrate=115200
board=am62x
board_name=am62x_skevm
board_rev=E3
board_serial=0186
board_software_revision=01
boot=mmc
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootaa64.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_efi_bootmgr=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_fdt=try
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=linux fastboot recovery system panic
bootcmd=run distro_bootcmd
bootcmd_fastboot=if test "${android_boot}" -eq 1; then;setenv run_fastboot 0;if gpt verify mmc ${mmcdev} ${partitions}; then; else echo Broken MMC partition scheme;setenv run_fastboot 1;fi; if test "${run_fastboot}" -eq 0; then if bcb load 0 misc; then if bcb test command = bootonce-bootloader; then echo BCB: Bootloader boot...; bcb clear command; bcb store; setenv run_fastboot 1;elif bcb test command = boot-fastboot; then echo BCB: fastboot userspace boot...; setenv force_recovery 1;fi; else echo Warning: BCB is corrupted or does not exist; fi;fi;if test "${run_fastboot}" -eq 1; then echo Running Fastboot...;fastboot 0; fi;fi
bootcmd_linux=if test "${android_boot}" -eq 0; then;run findfdt; run envboot;run init_${boot}; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern;fi
bootcmd_panic=if test "${android_boot}" -eq 1; then;fastboot 0; reset;fi
bootcmd_recovery=if test "${android_boot}" -eq 1; then;setenv run_recovery 0;if bcb load 0 misc; then if bcb test command = boot-recovery; then; echo BCB: Recovery boot...; setenv run_recovery 1;fi;else echo Warning: BCB is corrupted or does not exist; fi;if test "${skip_recovery}" -eq 1; then echo Recovery skipped by environment;setenv run_recovery 0;fi;if test "${force_recovery}" -eq 1; then echo Recovery forced by environment;setenv run_recovery 1;fi;if test "${run_recovery}" -eq 1; then echo Running Recovery...;mmc dev ${mmcdev};setenv bootargs "${bootargs} androidboot.serialno=${serial#}";run get_current_slot; if test -e "${current_slot}"; then setenv slot_suffix _${current_slot}; else echo current_slot not found;exit;fi;setenv bootargs_ab androidboot.slot_suffix=${slot_suffix}; echo A/B cmdline addition: ${bootargs_ab};setenv bootargs ${bootargs} ${bootargs_ab};if test "${force_avb}" -eq 1; then if run avb_verify; then echo AVB verification OK.;setenv bootargs "$bootargs $avb_bootargs";else echo AVB verification failed.;exit; fi;else setenv bootargs "$bootargs androidboot.verifiedbootstate=orange";echo Running without AVB...; fi;part start mmc ${mmcdev} boot${slot_suffix} boot_start;part size mmc ${mmcdev} boot${slot_suffix} boot_size;if mmc read ${loadaddr} ${boot_start} ${boot_size}; then echo Preparing FDT...; if test $board_name = am62x_skevm; then echo "  Reading DTB for am62x_skevm..."; setenv dtb_index 0;else echo Error: Android boot is not supported for $board_name; exit; fi; abootimg get dtb --index=$dtb_index dtb_start dtb_size; cp.b $dtb_start $fdt_addr_r $dtb_size; fdt addr $fdt_addr_r  0x80000; echo Running Android Recovery...;bootm ${loadaddr} ${loadaddr} ${fdt_addr_r};fi;echo Failed to boot Android...;reset;fi;fi
bootcmd_system=if test "${android_boot}" -eq 1; then;echo Loading Android boot partition...;mmc dev ${mmcdev};setenv bootargs ${bootargs} androidboot.serialno=${serial#};run get_current_slot; if test -e "${current_slot}"; then setenv slot_suffix _${current_slot}; else echo current_slot not found;exit;fi;setenv bootargs_ab androidboot.slot_suffix=${slot_suffix}; echo A/B cmdline addition: ${bootargs_ab};setenv bootargs ${bootargs} ${bootargs_ab};if test "${force_avb}" -eq 1; then if run avb_verify; then echo AVB verification OK.;setenv bootargs "$bootargs $avb_bootargs";else echo AVB verification failed.;exit; fi;else setenv bootargs "$bootargs androidboot.verifiedbootstate=orange";echo Running without AVB...; fi;part start mmc ${mmcdev} boot${slot_suffix} boot_start;part size mmc ${mmcdev} boot${slot_suffix} boot_size;if mmc read ${loadaddr} ${boot_start} ${boot_size}; then echo Preparing FDT...; if test $board_name = am62x_skevm; then echo "  Reading DTB for am62x_skevm..."; setenv dtb_index 0;else echo Error: Android boot is not supported for $board_name; exit; fi; abootimg get dtb --index=$dtb_index dtb_start dtb_size; cp.b $dtb_start $fdt_addr_r $dtb_size; fdt addr $fdt_addr_r  0x80000; setenv bootargs "${bootargs}  androidboot.force_normal_boot=1"  ; echo Running Android...;bootm ${loadaddr} ${loadaddr} ${fdt_addr_r};fi;echo Failed to boot Android...;fi
bootdelay=2
bootdir=/boot
bootenvfile=uEnv.txt
bootm_size=0x10000000
bootpart=1:2
bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
console=ttyS2,115200n8
cpu=armv8
default_device_tree=k3-am625-sk.dtb
dfu_alt_info_emmc=rawemmc raw 0 0x800000 mmcpart 1;rootfs part 0 1 mmcpart 0;tiboot3.bin.raw raw 0x0 0x400 mmcpart 1;tispl.bin.raw raw 0x400 0x1000 mmcpart 1;u-boot.img.raw raw 0x1400 0x2000 mmcpart 1;u-env.raw raw 0x3400 0x100 mmcpart 1;sysfw.itb.raw raw 0x3600 0x800 mmcpart 1
dfu_alt_info_mmc=boot part 1 1;rootfs part 1 2;tiboot3.bin fat 1 1;tispl.bin fat 1 1;u-boot.img fat 1 1;uEnv.txt fat 1 1;sysfw.itb fat 1 1
dfu_alt_info_ospi=tiboot3.bin raw 0x0 0x080000;tispl.bin raw 0x080000 0x200000;u-boot.img raw 0x280000 0x400000;u-boot-env raw 0x680000 0x020000;sysfw.itb raw 0x6c0000 0x100000;rootfs raw 0x800000 0x3800000
dfu_alt_info_ram=tispl.bin ram 0x80080000 0x200000;u-boot.img ram 0x81000000 0x400000
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
dtboaddr=0x89000000
efi_dtb_prefixes=/ /dtb/ /dtb/current/
envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootscript; then run bootscript;else if run loadbootenv; then echo Loaded env from ${bootenvfile};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;fi;fi;
eth1addr=70:ff:76:1e:a4:b1
ethaddr=f4:84:4c:fc:12:90
fdt_addr_r=0x88000000
fdtaddr=0x88000000
fdtcontroladdr=f7eeee40
findfdt=setenv name_fdt ${default_device_tree};setenv fdtfile ${name_fdt}
finduuid=part uuid ${boot} ${bootpart} uuid
get_current_slot=if part number mmc ${mmcdev} misc control_part_number; then echo misc partition number:${control_part_number};ab_select current_slot mmc ${mmcdev}:${control_part_number};else echo misc partition not found;fi;
get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
get_fdt_usb=load usb ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
get_fit_mmc=load mmc ${bootpart} ${addr_fit} ${bootdir}/${name_fit}
get_fit_usb=load usb ${bootpart} ${addr_fit} ${bootdir}/${name_fit}
get_kern_mmc=load mmc ${bootpart} ${loadaddr} ${bootdir}/${name_kern}
get_kern_usb=load usb ${bootpart} ${loadaddr} ${bootdir}/${name_kern}
get_overlay_mmc=fdt address ${fdtaddr};fdt resize 0x100000;for overlay in $name_overlays;do;load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && fdt apply ${dtboaddr};done;
get_overlay_usb=fdt address ${fdtaddr};fdt resize 0x100000;for overlay in $name_overlays;do;load usb ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && fdt apply ${dtboaddr};done;
importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}
init_mmc=run args_all args_mmc
init_usb=run args_all args_usb
kernel_addr_r=0x82000000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
loadaddr=0x82000000
loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr
loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
mmcboot=mmc dev ${mmcdev}; devnum=${mmcdev}; devtype=mmc; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadimage; then run args_mmc; if test ${boot_fit} -eq 1; then run run_fit; else run mmcloados;fi;fi;fi;
mmcdev=1
mmcloados=if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
mmcrootfstype=ext4 rootwait
name_kern=Image
partitions=uuid_disk=${uuid_gpt_disk};name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}
partitions_android=uuid_disk=${uuid_gpt_disk};name=bootloader,start=5M,size=8M,uuid=${uuid_gpt_bootloader};name=tiboot3,start=4M,size=1M,uuid=${uuid_gpt_tiboot3};name=uboot-env,start=13M,size=512K,uuid=${uuid_gpt_env};name=misc,start=13824K,size=512K,uuid=${uuid_gpt_misc};name=boot_a,size=40M,uuid=${uuid_gpt_boot_a};name=boot_b,size=40M,uuid=${uuid_gpt_boot_b};name=dtbo_a,size=8M,uuid=${uuid_gpt_dtbo_a};name=dtbo_b,size=8M,uuid=${uuid_gpt_dtbo_b};name=vbmeta_a,size=64K,uuid=${uuid_gpt_vbmeta_a};name=vbmeta_b,size=64K,uuid=${uuid_gpt_vbmeta_b};name=super,size=4608M,uuid=${uuid_gpt_super};name=metadata,size=16M,uuid=${uuid_gpt_metadata};name=userdata,size=-,uuid=${uuid_gpt_userdata}
pxefile_addr_r=0x80100000
ramdisk_addr_r=0x88080000
rd_spec=-
rdaddr=0x88080000
run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done; setenv devplist
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;run boot_efi_bootmgr;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootaa64.efi; then echo Found EFI removable media binary efi/boot/bootaa64.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x80000000
serial#=0000000000000186
set_android_boot=setenv android_boot 1;setenv partitions $partitions_android;setenv mmcdev 0;setenv force_avb 0;saveenv;
soc=k3
stderr=serial@2800000
stdin=serial@2800000
stdout=serial@2800000
usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi
usbboot=setenv boot usb;setenv bootpart 0:2;usb start;run findfdt;run init_usb;run get_kern_usb;run get_fdt_usb;run run_kern
vendor=ti


Best,Regards,
Hidekazu

  • Hi,

    There a few ways to set a static IP address which what I think you mean when you say fixed address.  Please see these links about setting a static IP for Linux. These are for another processor but they use systemD for system init and should work for you as well on this processor.

    Link to Static IP 1

    Link to Static IP 2

    Best Regards,

    Schuyler

  • Hi,Schuyler

    Thank you for your reply.

    Both links lead to a systemd solution,
    but the following differences can be seen in the description
    in the /etc/systemd/network/01-eth-static.network file.

    Link to Static IP 1

    [Network]
    Address=192.168.0.140
    Broadcast=192.168.0.255
    Netmask=255.255.255.0
    Gateway=192.168.0.1
    -----EOF-----------

    Link to Static IP 2

    [Network]
    Address=192.168.0.140
    -----EOF-----------

    Why are Broadcast/Netmask/Gateway omitted?


    Best Regars,
    Hidekazu

  • Hi,

    Thanks for pointing this out. There is no reason it was not added, probably a quick test that was posted.  It is best to have the Broadcast, Netmask and gateway addresses added. 

    Best Regards,

    Schuyler