AmigaOne X5000 Update Uboot
To Update U-Boot on your X-5000 machine, you can use any one of several different methods.
1. Write to a new SD card: This method leaves your old SD card untouched and you can always go back and start again if it fails. SD cards are cheap and a spare gives you peace of mind.
2. Write to the existing SD card from OS4: If you can boot OS4 from HD, you can update U-Boot from OS4. It will protect you against mistakes, but it will leave you with no fallback if something goes wrong. It may not work if you can only boot from the Install CD.
3. Write to the existing SD card from U-Boot: This method is more tricky and a mistake can brick your machine until a new SD card is obtained.
Method 1 - Writing a new SD Card
For this you need any computer that can unpack the U-Boot image and write it directly to an SD card (a raw write). An Amiga with a USB card reader is fine; if your X-5000 is running OS4, you can use OS4 utilities. A Linux machine can also do the job using the "dd" utility. Note that the AmigaOS USB stack may have problems with some brands or sizes of SD card.
1.1. Download the U-Boot image and unpack to RAM: (or anywhere). Let's call the resulting image "X5000-firmware.bin". It will be 75-100 MB in size.
1.2. Make sure you have the "RawWrite" utility somewhere handy.
1.3. Put the target SD card into a USB card reader connected to your Amiga. Do not expect to see the card on the Workbench. If the card is formatted with a file system and appears on the Workbench, ensure that you really want to write U-Boot to it, as any files stored on the card will be destroyed. If the card appears on the Workbench and you are sure that you want to over-write it, dismount the card's volume before you go any further. If the card appears as "MySDCard", issue the dismount command (without quotes):
1.4. From the Workbench or Shell, run Media Toolbox. You should see a list of "devices" including "usbdisk.device".
1.5. Double-click on "usbdisk.device" and you should see a line like this: "Generic STORAGE DEVICE" "3, 0" "Removable hard disk" and "Not installed". If the card contains a file system, the line might read something else instead of "Not installed".
1.6. Do not "install" the SD card with Media Toolbox. We only want to know the Unit number (the first digit in the "Id, LUN" column). In the example above, it is "3". Remember this number or write it down. You may then exit from Media Toolbox without doing anything else, but do not remove the SD card from the card reader or change it unless you repeat steps 1.4 to 1.6. The Unit number may change if you remove the SD card from the machine and replace it.
1.7. Using the "RawWrite" utility in a Shell, type the following command (without quotes):
RawWrite from RAM:X5000-firmware.bin to usbdisk.device unit 3
Use the filename of the U-Boot image as it is wherever you unpacked it. Make sure that the Unit number is the same as you read from Media Toolbox. If you enter the wrong Unit number, this command will write over some other USB device and likely render any files stored on it unreadable.
1.8. A progress bar will be printed as the file is written to the SD card. The process will take about 10 seconds to complete on an X-1000.
1.9. You have now written the new U-Boot to the new SD card. You may remove the card from the card reader and proceed to install it in your X-5000.
You can also use OS4 to write to a new card in the X-5000's on-board slot. Refer to the following Method 2 for details.
Method 2 - Writing directly to your SD Card from OS4
For this you need to be able to boot AmigaOS from HD, with suitably up-to-date system components. If your "bootsd.resource" is too old, this procedure will not work.
2.1. In a Shell, type:
version full bootsd.resource
Version 54.6 or later is required. If your version is older, this method will not work.
2.2. Download the U-Boot image and unpack to RAM: (or anywhere). Let's call the resulting image "X5000-firmware.bin". It will be 75-100 MB in size.
2.3. Make sure you have the "UpdateUBoot" utility somewhere handy.
2.4. Using the utility in a Shell, type (without quotes):
Use the filename of the U-Boot image as it is wherever you unpacked it.
2.5. A progress bar will be printed as the file is written to the SD card. The process will take a couple of minutes to complete.
2.6. You have now replaced the U-Boot image on the SD card, as well as "amigaboot" and all the stored non-volatile variables. You will have to check the NV variables before attempting to boot it.
Note that if you can boot OS4, you can also write U-Boot to a new SD card, if you are prepared to remove and replace the SD card while the power is on. Boot the machine using your old SD card, then, without shutting down the machine, remove the card, insert a new card and perform a warm boot (Ctrl/Amiga/Amiga). The machine will restart and you can then copy U-Boot to the new card while leaving your old card untouched.
Method 2 - Writing directly to your SD Card from U-Boot
This method is the lowest-level and you must be careful at every step. If you make a mistake, you could render your machine unbootable until you can source a new SD card. You have to copy the new U-Boot image to a USB stick, then use U-Boot commands to load the image into memory and write it to the SD card.
U-Boot, like other USB stacks, can have difficulties with some brands of USB stick. You may have to try more than one USB stick before you find one that will work without errors.
3.1. Using any computer, unpack the U-Boot image to a FAT-32 USB stick. The file will be 75-100 MB in size. Let's call it "X5000-firmware.bin".
3.2. Reset your Amiga and wait until the Boing Ball starts to spin and shoot. Hit the "M" key once to get into the U-Boot menu. Press "S" key to display "System Info".
3.3. Write down the Ethernet addresses (or read them from the motherboard). They may be over-written by the new U-Boot image and you will need to correct them.
3.4. Plug the USB stick containing the U-Boot image file into a USB port near the serial connector. 3.5. Enter the following 2 commands (without quotes):
"usb start", "usb storage"
The second command outputs a list of up to 5 storage devices - if the USB device with your "X5000-firmware.bin" file is one of them note the device number and proceed to step 3.6. If the required disk is not listed, you need to move the USB key with the U-Boot image file to a lower numbered slot (closer to the serial connector). Then repeat this step.
3.6. Enter the command:
load usb <n> 10000000 X5000-firmware.bin
Replace "<n>" with the number listed by the "usb storage" command.
U-Boot should print
Reading X5000-firmware.bin 88604672 bytes read in 3485 ms (24.2 Mib/s)
(the actual numbers may be different).
This command loads the "X5000-firmware.bin" file into memory. Do not proceed to the next step if you do not get success in this step!
3.7. Write the contents of the memory-resident U-Boot image into the SD card with the "mmc write" command (without quotes): "mmc write 10000000 0 2a400". Check what you have typed before you hit Enter! If you make a mistake here, you could brick your Amiga until you get a new SD card.
U-Boot should say something like:
MMC write: dev # 0, block # 0, count 173056 ... 173056 blocks write: OK
If the Write works OK, you are done. Proceed to reboot and check your non-volatile variables.
Checking and modifying the Non-Volatile variables
4.1. Reset your Amiga and wait until the Boing Ball starts to spin and shoot. Hit the "M" key twice to get into the U-Boot command line.
4.2. Using the U-Boot "setenv" command, set these variables (you can delete a variable by typing "setenv <name>", which will delete it):
4.2a "ethaddr" (mandatory) Check that it matches the MAC1 address printed on your motherboard.
4.2b "eth1addr" (mandatory) Check that it matches the MAC2 address printed on your motherboard.
4.2c "bootable_only" (recommended) This variable will restrict the list of displayed boot partitions to those that are marked "Bootable" in Media Toolbox. It must be set to "Y", "y" or "1" to have an effect.
4.2d "boot_config" (optional) This variable will define a default partition/kicklayout configuration to boot from. Without it, Kickstart files will be loaded from the first partition in the boot list.
4.2e "os4_bootdevice" (recommended) This variable forces the system to boot from a particular partition, that is, make that partition the "system volume". This happens after the Kickstart files are loaded (see 4.2d). If the variable is set to a partition name, then that partition will become the "system volume". If the variable is set to "auto", then the partition that provided the Kickstart files will become the "system volume" (this is the normal condition). If the variable is not defined, then the partition with the highest "boot priority" will become the "system volume".
4.2f "os4_commandline" (optional) The value of this variable is passed to the kernel when the system boots. For beta-testing work, a typical setting might be "serial munge debuglevel=1". Higher values than "1" will produce more debug output to the serial port.
4.2g "stdin" (optional) This variable tells U-Boot which devices to listen to for command input. Changing it from "serial,usbkbd" to "usbkbd" will prevent debug output from a remote machine being interpreted as invalid or illegal commands by U-Boot.
4.3. When you have finished setting your variables, save them permanently to the SD card with the command "saveenv".