This is the procedure used to upgrade my Pico/Elf CF cards to Elf/OS Kernel 0.4.0. Feel free to omit parts that may not apply to your hardware or software such as the Pixie Video upgrades.
A copy of the original kernel is saved in case one needs to back out the change. The Notes section contains some hints that might be helpful if something goes wrong.
Pico/Elf v2, STG NVR/RTC/UART card and Pixie Video GLCD v2 CDP1861 simulator with an STG 107 or STG 110 ROM.
Elf/OS Kernel 0.3.2 on a CF card with the 0.3.2 versions of init, turbo, hydro, pixie video drivers and adventureland.
- If not using the Pixie Video drivers, omit step 15. If not using adventureland, omit step 16. And so on.
- You may wish to copy chdir, dir and chmod to the root directory and make them executable, in case you need them to find the /bin directory in case of a rename error.
- copy /BIN/chdir chdir
- chmod +x chdir
- copy /BIN/dir dir
- chmod +x dir
- copy /BIN/chmod chmod
- chmod +x chmod
- This example uses the STG NVR/RTC/UART card for hardware serial, if using software serial, use xr instead of xrb to transfer files.
- If the file name becomes corrupted or the /BIN/ directory misnamed you can use the SEDIT tool in the STG ROM to fix it.
Update STG ROM to version 112 as required for Kernel 0.4.0
1. Replace STG 110 or 107 ROM with an STG 112 ROM (PicoElfSTG112Video.hex or STG v112 PicoElf.hex)
2. Reboot and verify that ROM works with Kernel 0.3.2.
Disable the init program, and set init to version command
3. rename INIT to no_init
4. copy /bin/ver init
5) chmod +x init
Save the current kernel for back out and
6. If necessary, create a /sav directory using command "mkdir /sav"
7. chdir /sav
8. kread kernel.sav
Download the new 0.4.0 kernel file, upgrade the kernel to 0.4.0 and verify the upgrade was successful.
9. xrb kernel.335 (use latest version of kernel 0.4.0)
10. sys kernel.335 (use latest version of kernel 0.4.0)
11. The sys command should reboot, if not press the button to reboot. You may need to press the key.
12. Verify that init prints out the correct version information for Kernel 4
Rename the BIN directory to bin
13. /BIN/rename BIN bin
Update software to Kernel 4 versions:
14. Update init, turbo, hydro to their Kernel 4 versions
15. Update Pixie Video Driver routines to their Kernel 4 version
16. Update Adventureland and other software to Kernel 4 versions
Reboot and Test updated software Kernel 4 versions:
17. Reboot and verify the updated programs work.
Back out Plan:
In case of failure, go to the /sav directory and restore the previous kernel. Undo renaming the /bin directory, if needed.
1. To back out kernel update, run the command "chdir /sav" to go to the /sav directory, you may need to specify the path in the command as "/BIN/chdir /sav" or "/bin/chdir /sav" to run the command.
2. In the /sav directory, run the command "sys kernel.sav" to restore the previous kernel saved in steps 5-7 above. You may need to specify the path in the command as "/BIN/sys kernel.sav" or "/bin/sys kernel.sav" to run the command.
3. Run the verify command "ver" to verify kernel 0.3.2 was restored. You may need to specify the path in the command as "/bin/ver" or "/BIN/ver" to run the command.
4. If necessary, rename the /bin directory back to /BIN as required for kernel 0.3.2, "rename bin BIN". You may need to specify the path in the rename command as "/bin/rename bin BIN" to run the command.