Problem Led support for Iconnect device

Install Arch Linux ARM on other devices.

Re: Problem Led support for Iconnect device

Postby igorert » Wed Dec 07, 2011 10:54 pm

$this->bbcode_second_pass_quote('WarheadsSE', 'D')oes the iConnect's uboot support scripting at all? because it would not be that hard to say:
a) If USB found & labeled "rootfs", set archNumber=YYYY, boot from usb.
b) no "rootfs" found on usb, set archNumber=XXXX, boot from NAND (or whatever)


I've actually thought about something similar too - the problem is that setting arcNumber does not take effect until you saveenv and reboot (at least as far as I can tell) and I don't feel very comfortable doing saveenv from a script, potentially every time you attach/remove the USB stick. But yes, this might be possible in theory - iconnect's uboot does not support much scripting but there is probably enough to check for rootfs...
igorert
 
Posts: 35
Joined: Sun Jun 26, 2011 5:31 pm
Location: aka chalkbag on irc

Re: Problem Led support for Iconnect device

Postby WarheadsSE » Wed Dec 07, 2011 11:39 pm

My guess:
arcNumber is passed as a kernel argument, or checked later? If it is a kernel argument (I think it is) then it's as simple as updating bootargs, and booting, no save necessary.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Problem Led support for Iconnect device

Postby kmihelich » Thu Dec 08, 2011 12:21 am

arcNumber is passed immediately at kernel start, it's what identifies which board file to use for device initialization. I imagine the u-boot on the devices has the same basic logic capabilities as the versions we use in the other devices. Could probably do something along the lines of:

if ext2load usb 0:1 0x800000 /boot/uImage; then setenv arcNumber 2870; bootm 0x800000; else setenv arcNumber 1682; <insert nand boot stuff>; fi;
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: Problem Led support for Iconnect device

Postby igorert » Thu Dec 08, 2011 4:50 pm

Hey, I'm not theorizing, I've actually tried this ;) Changes to arcNumber have no effect until you saveenv and reboot.

If you'd like the gory details: machine id (i.e., arcNumber) is not a kernel command line parameter so it can't be passed through bootargs; instead, it's a separate parameter to the kernel entry point function. If you look at uboot git source, you'll see that the code populates kernel command line from bootargs during the kernel boot process but sets machine id based on bi_arch_number field of a certain structure, which is populated when u-boot is loaded, not when control is about to be passed to the kernel. The git uboot code actually does allow overwriting that value with machid uboot variable but, alas, that part is not present in Marvell's uboot that is shipped on iconnect.
igorert
 
Posts: 35
Joined: Sun Jun 26, 2011 5:31 pm
Location: aka chalkbag on irc

Re: Problem Led support for Iconnect device

Postby WarheadsSE » Thu Dec 08, 2011 4:53 pm

Ah, we weren't sure which uboot you were using :)
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Previous

Return to [Please read announcement] Community-Supported Devices

Who is online

Users browsing this forum: No registered users and 3 guests