Disclaimer: Newbie Forth question ....:-)<br><br>We are trying to create a consolidated unsecured update stick.<br><br>This is not for use in the real world, but in our wild lab.<br><br>We have learned and experimented a lot today, and everything pretty much humming along nicely, to a point:<br>
<br>We have borrowed oodles of forth code from various sources and put together a nice little olpc.fth file which is sitting in the /boot directory on the USB stick.<br><br>We then have an 885 .img file with the XO1 image, and an 885 .zd4 file with the XO1.5 image in the root of the stick.<br>
<br>We hae coded it such that If we hit no game keys on the boot process, all machine(s) boot up normally - just like there was no stick inserted. This is the desired effect.<br><br>If we hit the circle game key a bunch of stuff gets done. However, our attempt to select and execute fs-update when the machine is a 1.5, or copy-nand when the machine is a 1.0 is not working. It would appear that forth perhaps wants to parse the statements and fails because there is no command copy-nand in the 1.5 firmware or fs-update in the 1.0 firmware. If we use separate dedicated sticks without the offending command in the if statement, the machines flash beautifully.<br>
<br>Basically, as it stands right now, we have working separate olpc.fth files for each of the
machines, which isnt that inconvenient, and does enable us to auto-flash
non-secure (security-disabled) machines quickly (with non-signed custom OOB builds) via game-key press
rather than madly hitting the x key and then typing the correct command. <br><br>So for those coming from a non-Forth background, we have hit a road block. Is there perhaps a way to store a 'possible' command into a variable then execute that 'variable' as a command, thereby perhaps bypassing any of the apparent syntax error checking? Unexpected end-of-line is the most common result from attempting to call within an if statement. Or, we get copy-nand? on the 1.5 or fs-update? on the 1.0 when the command exists in the source - whether it will actually get 'called' or not ,based on the variable containing the machine type..<br>
<br>Or, is there an entirely more elegant way to accomplish this?<br><br>Thanks for any hints. And, apologies in advance to those shaking their heads violently at our incompetence :-)<br><br>KG and AG<br><br>