(Created page with "Switching from Blogger to be able to WordPress can easily be a nice idea, particularly if you are looking to be able to develop a more pro looking blog or alternatively online...") |
(First Version) |
||
Line 1: | Line 1: | ||
− | + | ||
− | + | == Compiling U-Boot with Device Tree Support for the Seagate GoFlex Home == | |
− | + | ||
− | + | Download the latest version of U-Boot and extract the files to a working folder: | |
− | + | ||
− | + | <PRE> | |
− | + | wget ftp://ftp.denx.de/pub/u-boot/u-boot-latest.tar.bz2 | |
− | + | tar -xjf u-boot-latest.tar.bz2 | |
− | + | cd u-boot-2014.01 | |
− | + | </PRE> | |
− | + | ||
− | + | By default, the Seagate GoFlex Home configuration does not enable Device Tree Support and needs to be manually enabled. To do this add the following to /include/configs/goflexhome.h | |
− | + | ||
− | + | <PRE> | |
+ | /* Enable flat device tree support */ | ||
+ | #define CONFIG_OF_LIBFDT | ||
+ | </PRE> | ||
+ | |||
+ | Now cross compile U-Boot using the GoFlex Home configuration: | ||
+ | |||
+ | <PRE> | ||
+ | make CROSS_COMPILE=arm-linux-gnueabi- distclean | ||
+ | make CROSS_COMPILE=arm-linux-gnueabi- goflexhome_config | ||
+ | make CROSS_COMPILE=arm-linux-gnueabi- u-boot.kwb | ||
+ | </PRE> | ||
+ | |||
+ | Compiling should conclude with output similar to that below. | ||
+ | |||
+ | <PRE> | ||
+ | Preparing kirkwood boot image to boot from nand | ||
+ | Nand ECC mode = default | ||
+ | Nand page size = 0x800 | ||
+ | Image Type: Kirkwood Boot from NAND Flash Image | ||
+ | Data Size: 418124 Bytes = 408.32 kB = 0.40 MB | ||
+ | Load Address: 00600000 | ||
+ | Entry Point: 00600000 | ||
+ | </PRE> | ||
+ | |||
+ | === Testing your new U-Boot === | ||
+ | |||
+ | It is always a good idea to load your newly compiled version of U-Boot into RAM first and test it. | ||
+ | |||
+ | <PRE> | ||
+ | setenv ipaddr 192.168.0.250 | ||
+ | setenv serverip 192.168.0.251 | ||
+ | tftp 0x800000 u-boot.kwb | ||
+ | go 0x800200 | ||
+ | </PRE> | ||
+ | |||
+ | Note: Older versions of U-Boot may not always chain load newer versions, and hence this may not always yield confidence-building results. | ||
+ | |||
+ | Another option is to test using the serial bootloader in Kirkwood SoCs that has a BootROM version 1.21 or greater. U-Boot distributes a kwboot utility in the tools folder for this task: | ||
+ | |||
+ | <PRE> | ||
+ | ./kwboot -t -B 115200 /dev/ttyUSB0 -b u-boot.kwb -p | ||
+ | </PRE> | ||
+ | |||
+ | This should yield results comparable to that below: | ||
+ | |||
+ | <PRE> | ||
+ | Sending boot message. Please reboot the target.../ | ||
+ | Sending boot image... | ||
+ | 0 % [......................................................................] | ||
+ | 2 % [......................................................................] | ||
+ | |||
+ | 96 % [......................................................................] | ||
+ | 98 % [...................................................] | ||
+ | [Type Ctrl-\ + c to quit] | ||
+ | � | ||
+ | |||
+ | U-Boot 2014.01 (Apr 11 2014 - 05:50:15) | ||
+ | Seagate GoFlex Home | ||
+ | |||
+ | SoC: Kirkwood 88F6281_A1 | ||
+ | DRAM: 128 MiB | ||
+ | WARNING: Caches not enabled | ||
+ | NAND: 256 MiB | ||
+ | *** Warning - bad CRC, using default environment | ||
+ | |||
+ | In: serial | ||
+ | Out: serial | ||
+ | Err: serial | ||
+ | Net: egiga0 | ||
+ | Warning: failed to set MAC address | ||
+ | </PRE> | ||
+ | |||
+ | === Flasing U-Boot === | ||
+ | |||
+ | When you are confident and ready to take the plunge, you can burn U-Boot to flash using: | ||
+ | |||
+ | <PRE> | ||
+ | setenv ipaddr 192.168.0.250 | ||
+ | setenv serverip 192.168.0.251 | ||
+ | tftp 0x6400000 u-boot.kwb | ||
+ | nand erase 0x0 0x100000 | ||
+ | nand write.e 0x6400000 0x0 0x100000 | ||
+ | </PRE> | ||
+ | |||
+ | Upon reboot, you should be greeted with your new U-Boot. Congratulations. | ||
+ | |||
+ | <PRE> | ||
+ | U-Boot 2014.01 (Apr 11 2014 - 05:50:15) | ||
+ | Seagate GoFlex Home | ||
+ | |||
+ | SoC: Kirkwood 88F6281_A1 | ||
+ | DRAM: 128 MiB | ||
+ | WARNING: Caches not enabled | ||
+ | NAND: 256 MiB | ||
+ | *** Warning - bad CRC, using default environment | ||
+ | |||
+ | In: serial | ||
+ | Out: serial | ||
+ | Err: serial | ||
+ | Net: egiga0 | ||
+ | Warning: failed to set MAC address | ||
+ | |||
+ | 88E1116 Initialized on egiga0 | ||
+ | Hit any key to stop autoboot: 0 | ||
+ | </PRE> | ||
+ | |||
+ | You will need to restore your ethernet MAC address. It can be found on the nameplate of your Seagate GoFlex Home. | ||
+ | |||
+ | <PRE> | ||
+ | Marvell>> setenv ethaddr 00:10:75:2A:71:CC | ||
+ | Marvell>> saveenv | ||
+ | Saving Environment to NAND... | ||
+ | Erasing NAND... | ||
+ | Erasing at 0x60000 -- 100% complete. | ||
+ | Writing to NAND... OK | ||
+ | </PRE> |
Download the latest version of U-Boot and extract the files to a working folder:
wget ftp://ftp.denx.de/pub/u-boot/u-boot-latest.tar.bz2 tar -xjf u-boot-latest.tar.bz2 cd u-boot-2014.01
By default, the Seagate GoFlex Home configuration does not enable Device Tree Support and needs to be manually enabled. To do this add the following to /include/configs/goflexhome.h
/* Enable flat device tree support */ #define CONFIG_OF_LIBFDT
Now cross compile U-Boot using the GoFlex Home configuration:
make CROSS_COMPILE=arm-linux-gnueabi- distclean make CROSS_COMPILE=arm-linux-gnueabi- goflexhome_config make CROSS_COMPILE=arm-linux-gnueabi- u-boot.kwb
Compiling should conclude with output similar to that below.
Preparing kirkwood boot image to boot from nand Nand ECC mode = default Nand page size = 0x800 Image Type: Kirkwood Boot from NAND Flash Image Data Size: 418124 Bytes = 408.32 kB = 0.40 MB Load Address: 00600000 Entry Point: 00600000
It is always a good idea to load your newly compiled version of U-Boot into RAM first and test it.
setenv ipaddr 192.168.0.250 setenv serverip 192.168.0.251 tftp 0x800000 u-boot.kwb go 0x800200
Note: Older versions of U-Boot may not always chain load newer versions, and hence this may not always yield confidence-building results.
Another option is to test using the serial bootloader in Kirkwood SoCs that has a BootROM version 1.21 or greater. U-Boot distributes a kwboot utility in the tools folder for this task:
./kwboot -t -B 115200 /dev/ttyUSB0 -b u-boot.kwb -p
This should yield results comparable to that below:
Sending boot message. Please reboot the target.../ Sending boot image... 0 % [......................................................................] 2 % [......................................................................] 96 % [......................................................................] 98 % [...................................................] [Type Ctrl-\ + c to quit] � U-Boot 2014.01 (Apr 11 2014 - 05:50:15) Seagate GoFlex Home SoC: Kirkwood 88F6281_A1 DRAM: 128 MiB WARNING: Caches not enabled NAND: 256 MiB *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: egiga0 Warning: failed to set MAC address
When you are confident and ready to take the plunge, you can burn U-Boot to flash using:
setenv ipaddr 192.168.0.250 setenv serverip 192.168.0.251 tftp 0x6400000 u-boot.kwb nand erase 0x0 0x100000 nand write.e 0x6400000 0x0 0x100000
Upon reboot, you should be greeted with your new U-Boot. Congratulations.
U-Boot 2014.01 (Apr 11 2014 - 05:50:15) Seagate GoFlex Home SoC: Kirkwood 88F6281_A1 DRAM: 128 MiB WARNING: Caches not enabled NAND: 256 MiB *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: egiga0 Warning: failed to set MAC address 88E1116 Initialized on egiga0 Hit any key to stop autoboot: 0
You will need to restore your ethernet MAC address. It can be found on the nameplate of your Seagate GoFlex Home.
Marvell>> setenv ethaddr 00:10:75:2A:71:CC Marvell>> saveenv Saving Environment to NAND... Erasing NAND... Erasing at 0x60000 -- 100% complete. Writing to NAND... OK