[iConnect] How to set arcNumber to 2870

Install Arch Linux ARM on other devices.

[iConnect] How to set arcNumber to 2870

Postby igorert » Wed Mar 14, 2012 10:31 pm

If you followed the guide for installing Arch on iConnect, you ended with the system that boots the kernel variant for Marvell RD-88F6281 Reference Board off USB. iConnect is based on that board but is slightly different. In particular, it doesn't have eth1 ethernet port and the initialization of eth0 is different; the reference board code doesn't have the LEDs, OTB button or the temperature sensor support either.

If you'd like to run a modern kernel and have support for all those iConnect-specific features, you have two options: apply Iomega's iConnect patchset to kernel's RD-88F6281 code and compile the custom kernel or change the arcNumber of your iConnect. I'll only explain how to do the latter here.

WARNING: Once you change the arcNumber on iConnect, you will no longer be able to boot Iomega stock kernel until you reset arcNumber back to stock.

Brief explanation

arcNumber is a parameter that iConnect's uBoot loader passes to Linux kernel to tell it what hardware it will be running on. In other words, it tells the kernel to execute the code specific to that particular hardware. In case of iConnect, two values of arcNumber are relevant:
  • 1682 is what the stock iConnect ships with and is the only value supported by Iomega's shipped kernel; as this happens to correspond to the reference board's arcNumber, Arch kernel can also boot with it but some iConnect-specific initialization and features will be missing.
  • 2870 is the value assigned to iConnect device in the official Linux machine id registry. Arch Linux kernel needs to be passed this value to execute iConnect-specific initialization. Stock Iomega kernel will not be able to boot at all if passed this value.

Note that you need a reasonably recent Arch kernel to run with arcNumber of 2870 so updating to the latest is a good idea.


Changing arcNumber from the Iomega stock kernel.

If you cannot properly boot into Arch Linux after following the guide on this forum (e.g., because you can't get the IP address on eth0), you can try to change the arcNumber from Iomega stock kernel. Follow the first two steps of the iConnect install guide to ssh into your iConnect and run the following commands:

Code: Select all
cd /tmp
wget --no-check-certificate https://raw.github.com/igors/iconnect_usb_boot/master/iconnect_install.sh
chmod +x iconnect_install.sh
./iconnect_install.sh --set-arcNumber --no-uboot --no-arch


You're done. If the only problem you had prior to changing the arcNumber was eth0 initialization, it should now work fine and you'll also get full control of your LEDs etc.


Changing arcNumber from Arch Linux.

If you already have a working Arch installation on your iConnect, you can change the arcNumber from within Arch. ssh into the iConnect and install uboot-env package:

Code: Select all
pacman -S uboot-env


You need to edit /etc/fw_env.config; open it in your favorite editor and make sure the only uncommented line there is as follows:

Code: Select all
/dev/mtd0       0xa0000       0x20000       0x20000


If you installed Arch by following the guide on this forum, the installation script probably created /etc/fw_env.conf file for you; feel free to rename it to /etc/fw_env.config.

Now, check that your setup is operational by running
Code: Select all
fw_printenv
as root - it should print a few dozen lines of uboot environment variables and produce no error messages. Running
Code: Select all
fw_printenv arcNumber
should print "arcNumber=1682". DO NOT PROCEED IF fw_printenv IS NOT OPERATIONAL, you'll brick your iconnect.

If fw_printenv works, change the arcNumber:

Code: Select all
fw_setenv arcNumber 2870


You're done. Reboot and enjoy full control of your LEDs, the temperature sensor, OTB button and fully operational eth0.

If you ever want to boot Iomega stock kernel again, you'll need to reset the arcNumber back to 1682.
igorert
 
Posts: 35
Joined: Sun Jun 26, 2011 5:31 pm
Location: aka chalkbag on irc

Re: [iConnect] How to set arcNumber to 2870

Postby Gravis » Tue Mar 27, 2012 8:08 pm

[root@alarm ~]# fw_printenv
baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
usbstart=usb start
run_diag=yes
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)
CASset=min
MALLOC_len=1
bootargs_root=root=/dev/nfs rw
bootargs_end=:::orion:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
eth1addr=00:50:43:5a:1a:2d
eth1mtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
iomega=123
nandEcc=1bit
ethprime=egiga0
ethact=egiga0
ipaddr=192.168.100.97
serverip=192.168.100.91
uboot_start=0x0
uboot_size=0xc0000
env_start=0xa0000
env_size=0x20000
kernel_start=0x100000
kernel_size=0x300000
initrd_start=0x540000
initrd_size=0x300000
boot_start=0x980000
boot_size=0x1f400000
flash_load=run make_boot_args load1 load2 boot
load1=nand read.e 0x2000000 $(kernel_start) $(kernel_size)
load2=nand read.e 0x4500000 $(initrd_start) $(initrd_size)
boot=bootm 0x2000000 0x4500000
krn=run a b c
rd=run d e f
a=tftp 0x2000000 zImage
b=nand erase $(kernel_start) $(kernel_size)
c=nand write.e 0x2000000 $(kernel_start) $(kernel_size)
d=tftp 0x4500000 initrd
e=nand erase $(initrd_start) $(initrd_size)
f=nand write.e 0x4500000 $(initrd_start) $(initrd_size)
flashall=run krn rd
make_boot_args=setenv bootargs console=ttyS0,115200 mtdparts=orion_nand:;setenv bootargs $(bootargs)$(uboot_size)@$(uboot_start)(uboot),;setenv bootargs $(bootargs)$(env_size)@$(env_start)(env),;setenv bootargs $(bootargs)$(kernel_size)@$(kernel_start)(zImage),;setenv bootargs $(bootargs)$(initrd_size)@$(initrd_start)(initrd),;setenv bootargs $(bootargs)$(boot_size)@$(boot_start)(boot)
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
hddPowerCtrl=no
enaAutoRecovery=yes
pcieTune=no
ethaddr=00:D0:B8:12:04:C1
make_bootsetenv=make_boot_args setenv bootargs console=ttyS0,115200 mtdparts=orion_nand:;setenv bootargs $(bootargs)$(uboot_size)@$(uboot_start)(uboot),;setenv bootargs $(bootargs)$(env_size)@$(env_start)(env),;setenv bootargs $(bootargs)$(kernel_size)@$(kernel_start)(zImage),;setenv bootargs $(bootargs)$(initrd_size)@$(initrd_start)(initrd),;setenv bootargs
bootargs=setenv bootargs console=ttyS0,115200
boot_starsetenv=boot_start 0x980000
boot_sizesetenv=boot_size 0x1f400000
MAPOWERENV=Ver. 1.1.27 English
usb_scan_1=setenv usb 0:1; setenv dev sda1
usb_scan_2=setenv usb 1:1; setenv dev sdb1
usb_scan_3=setenv usb 2:1; setenv dev sdc1
usb_scan_4=setenv usb 3:1; setenv dev sdd1
usb_scan_5=setenv usb 0:1; setenv dev sda2
usb_scan_6=setenv usb 1:1; setenv dev sdb2
usb_scan_7=setenv usb 2:1; setenv dev sdc2
usb_scan_8=setenv usb 3:1; setenv dev sdd2
bootcmd_usb_1=run usb_scan_1;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /boot/uImage;bootm 0x00800000
bootcmd_usb_2=run usb_scan_2;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /boot/uImage;bootm 0x00800000
bootcmd_usb_3=run usb_scan_3;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /boot/uImage;bootm 0x00800000
bootcmd_usb_4=run usb_scan_4;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /boot/uImage;bootm 0x00800000
bootcmd_usb_5=run usb_scan_5;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /uImage;bootm 0x00800000
bootcmd_usb_6=run usb_scan_6;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /uImage;bootm 0x00800000
bootcmd_usb_7=run usb_scan_7;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /uImage;bootm 0x00800000
bootcmd_usb_8=run usb_scan_8;run make_usb_bootargs;ext2load usb $(usb) 0x00800000 /uImage;bootm 0x00800000
make_usb_bootargs=run make_boot_args;setenv bootargs $(bootargs) root=/dev/$(dev) rootdelay=10
bootcmd_usb=usb start;run bootcmd_usb_1;run bootcmd_usb_2;run bootcmd_usb_3;run bootcmd_usb_4;run bootcmd_usb_5;run bootcmd_usb_6;run bootcmd_usb_7;run bootcmd_usb_8
bootcmd=run bootcmd_usb; run flash_load
[root@alarm ~]# fw_printenv arcNumber
## Error: "arcNumber" not defined


What than?
Gravis
 
Posts: 2
Joined: Sat Mar 24, 2012 12:23 pm

Re: [iConnect] How to set arcNumber to 2870

Postby igorert » Tue Mar 27, 2012 8:23 pm

It sounds like you managed to unset the arcNumber somehow. Have you run "fw_setenv arcNumber" without the numeric third parameter by any chance?

Anyway, I'd recommend you do set it before you reboot (I don't think your system will come up without it). Set it to 1682 if you want the original behavior or 2870 to get iconnect-specific features on Arch.
igorert
 
Posts: 35
Joined: Sun Jun 26, 2011 5:31 pm
Location: aka chalkbag on irc

Re: [iConnect] How to set arcNumber to 2870

Postby Gravis » Tue Mar 27, 2012 8:31 pm

Ok I've put fw_setenv arcNumber 2870 then reboot and it works ;) don't know what was wrong before...
Gravis
 
Posts: 2
Joined: Sat Mar 24, 2012 12:23 pm

Re: [iConnect] How to set arcNumber to 2870

Postby zigomatic » Thu Apr 12, 2012 12:24 pm

[root@alarm etc]# fw_printenv
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200

dmesg say :
uncorrectable error :

uname -a
Linux alarm 3.1.10-6-ARCH #1 PREEMPT Wed Mar 21 03:41:04 UTC 2012 armv5tel Feroceon 88FR131 rev 1 (v5l) Marvell RD-88F6281 Reference Board GNU/Linux

[root@alarm etc]# cat /proc/mtd
dev: size erasesize name
mtd0: 000c0000 00020000 "uboot"
mtd1: 00020000 00020000 "env"
mtd2: 00300000 00020000 "zImage"
mtd3: 00300000 00020000 "initrd"
mtd4: 1f400000 00020000 "boot"

I active the line in fw_env.config:
# iomega iconnect
/dev/mtd0 0xa0000 0x20000 0x20000

if i modify to 0xc0000 like i see in the /proc , i receive :
Cannot read bad block mark: Invalid argument

if i do strings /etc/mtd >/tmp/mtd.txt

i see this :

bootdelay=3
baudrate=115200
loads_Echo=0
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
bootarg3=console=ttyS0,115200 ramdisk=32768 mtdparts=orion_nand:0xc0000@0x0(uboot),0x20000@0xa0000(env),0x300000@0x100000(zImage),0x300000@0x540000(initrd),0x1f400000@0x980000(boot)
ethprime=egiga0
ethact=egiga0
serverip=192.168.100.70
ipaddr=192.168.100.71
arcNUmber=1682
mainlineLinux=yes
usbstart=usb start
load!=fatload usb 0:1 0x2000000 uImage_nasplug_2.6.30.9_Ramdisk 0x300000
load2=fatload usb 0:1 0x2300000 uboot.ramfs.gz 0x300000
boot=bootm 0x2000000 0x2300000
bootcmd=run usbstart load1 load2 boot
run_Diag=yes

i don't understand why the result is CRC.

The only action done before pacman -S uboot-env was pacman -Suy

I do the arcNumber change from the iconnect script but now i'm just think about how to reverse back to the old value as i can't access on the iconnect linux ?
:? strange , What's the issue ?
zigomatic
 
Posts: 28
Joined: Sun Feb 19, 2012 4:37 pm

Re: [iConnect] How to set arcNumber to 2870

Postby zigomatic » Thu Apr 12, 2012 4:05 pm

Solved now after power off /power on
zigomatic
 
Posts: 28
Joined: Sun Feb 19, 2012 4:37 pm

Re: [iConnect] How to set arcNumber to 2870

Postby WarheadsSE » Thu Apr 12, 2012 4:09 pm

Essentially: set, save, reset. U-boot only reads those values @ startup, not after they are changed.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6623
Joined: Mon Oct 18, 2010 2:12 pm


Return to [Please read announcement] Community-Supported Devices

Who is online

Users browsing this forum: No registered users and 2 guests