Welcome! Log In Create A New Profile

Advanced

HOWTO: Build a custom 2.6.38.8 kernel for Goflex Net

Posted by Vlad 
Re: HOWTO: Build a custom 2.6.38.8 kernel for Goflex Net
September 10, 2011 11:05AM
Thanks for that, I'll try!

If I have a rescue system on the NAND is the boot behavior like this:

1. USB-Stick
2. SATA HD
3. Rescue System

Or does Goflex only boot from SATA after the modifications ?

Greetings,
Thomas
Re: HOWTO: Build a custom 2.6.38.8 kernel for Goflex Net
September 10, 2011 11:11AM
^ Yes that's right. If you remove the hard disks it will boot the rescue system.
Re: HOWTO: Build a custom 2.6.38.8 kernel for Goflex Net
September 10, 2011 02:38PM
Hi Varkey,
great! That works !!!

fw_setenv sata_boot 'ide reset; mw 0x800000 0 1; ext2load ide 0:1 0x800000 /boot/uImage; if ext2load ide 0:1 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi'
fw_setenv sata_bootcmd 'run usb_set_bootargs; run sata_boot'
fw_setenv bootcmd 'usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run sata_bootcmd; run rescue_bootcmd; run pogo_bootcmd; reset'

And you are right, it only works with the righthand (from the front) SATA-Slot. (booting from two devices is very unconventional ;) )

Now I have only to find out the U-Boot settings for Sheeva, to use the one and only kernel and rootfs on all devices (Dockstar, Goflex and Sheeva)!

Greetings,
Thomas



Edited 1 time(s). Last edit at 09/10/2011 02:39PM by squeezeplug.
Re: HOWTO: Build a custom 2.6.38.8 kernel for Goflex Net
September 11, 2011 09:52AM
Ah. Thanks for that clarification varkey. Your uboot env mod is simple enough but it requires booting exclusively from the first port, right? It looks for the kernel and initrd on ide 0:1 and makes use of the usb_set_bootargs since the default value of usb_root is /dev/sda1 which hopefully would be the same device name assigned by udev.
Re: HOWTO: Build a custom 2.6.38.8 kernel for Goflex Net
September 11, 2011 10:31AM
kraqh3d Wrote:
-------------------------------------------------------
> ... but it requires booting exclusively from the first port, right?

right, right!
Re: HOWTO: Build a custom 2.6.38.8 kernel for Goflex Net
October 23, 2011 03:51AM
Hi,
does:
fw_setenv sata_boot 'ide reset; mw 0x800000 0 1; ext2load ide 0:1 0x800000 /boot/uImage; if ext2load ide 0:1 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi'
also work with ext3:
fw_setenv sata_boot 'ide reset; mw 0x800000 0 1; ext3load ide 0:1 0x800000 /boot/uImage; if ext3load ide 0:1 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi'

Thanks a lot!
Re: HOWTO: Build a custom 2.6.38.8 kernel for Goflex Net
October 23, 2011 02:23PM
Hi,
good news: the UBoot settings from above does not work, but even if you keep the old values:

fw_setenv sata_boot 'ide reset; mw 0x800000 0 1; ext2load ide 0:1 0x800000 /boot/uImage; if ext2load ide 0:1 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi'
the rootfs will be mounted as ext3 if it is formatted as ext3.

Greetings,
Thomas
Re: HOWTO: Build a custom 2.6.38.8 kernel for Goflex Net
February 25, 2012 03:09PM
Does anybody know if the patch for GoFlex Net and GoFlex Home have been incorporated in the main line? i.e. Debian 3.x.x?
Re: HOWTO: Build a custom 2.6.38.8 kernel for Goflex Net
February 26, 2012 02:41PM
Thanks Dpffan!
Re: HOWTO: Build a custom 2.6.38.8 kernel for Goflex Net
March 20, 2012 07:37PM
kraqh3d Wrote:
-------------------------------------------------------
> The only difference between Jeff's Uboot and the
> UBIT installed Uboot, as far as I understand, is
> that the UBIT installed one allows booting from
> SATA. Jeff's UBoot does not because I don't think
> it can sense the SATA ports. The booting issues
> arise because Linux udev will identify the SATA
> disks when the initrd is loaded. The SATA ports
> will get identified as /dev/sda1 and /dev/sda2,
> while Jeff's Uboot thinks /dev/sda1 is the first
> USB port where your root file system is
> locationed. Setting the root as a LABEL for Uboot
> works around the identification mismatch. But if
> you want to boot from SATA, I think UBIT is the
> only option.


I wonder if there is a way to fix u-boot so this misidentification cannot happen.

I've now got a u-boot 2011.12 patched with the L2Cachedisable feature, and it works w/ the usb rootfs (with the roofs label method). It will boot 3.2, 3.3 kernels, no kernel panic. BTW, I have it identified with machid = eSATA Sheevaplug.
32.853467] Freeing init memory: 140K                                        
[   32.892812] udevd[48]: starting version 175                                  
[   32.960207] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4    
[   33.054640] mv643xx_eth smi: probed                                          
[   33.103361] mv643xx_eth_port mv643xx_eth_port.0: eth0: port 0 with MAC addree
[   33.113421] mmc0: mvsdio driver initialized, using GPIO 47 for card detection
[   33.131873] usbcore: registered new interface driver usbfs                   
[   33.146943] SCSI subsystem initialized                                       
[   33.167188] usbcore: registered new interface driver hub                     
[   33.203040] usbcore: registered new device driver usb                        
[   33.210161] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver       
[   33.249286] libata version 3.00 loaded.                                      
[   33.254330] sata_mv sata_mv.0: version 1.28                                  
[   33.254469] sata_mv sata_mv.0: slots 32 ports 2                              
[   33.285476] scsi0 : sata_mv                                                  
[   33.292769] scsi1 : sata_mv                                                  
[   33.303011] ata1: SATA max UDMA/133 irq 21                                   
[   33.307140] ata2: SATA max UDMA/133 irq 21                                   
[   33.317385] orion-ehci orion-ehci.0: Marvell Orion EHCI                      
[   33.323527] orion-ehci orion-ehci.0: new USB bus registered, assigned bus nu1
[   33.352332] orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000               
[   33.372298] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00              
[   33.378313] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002    
[   33.385156] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber1
[   33.392420] usb usb1: Product: Marvell Orion EHCI                            
[   33.397144] usb usb1: Manufacturer: Linux 3.2.0-2-kirkwood ehci_hcd          
[   33.403449] usb usb1: SerialNumber: orion-ehci.0                             
[   33.409013] hub 1-0:1.0: USB hub found                                       
[   33.412812] hub 1-0:1.0: 1 port detected                                     
[   33.662314] ata1: SATA link down (SStatus 0 SControl F300)                   
[   33.732311] usb 1-1: new high-speed USB device number 2 using orion-ehci     
[   33.883218] usb 1-1: New USB device found, idVendor=0781, idProduct=5530     
[   33.889948] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   33.897130] usb 1-1: Product: Cruzer                                         
[   33.900723] usb 1-1: Manufacturer: SanDisk                                   
[   33.904846] usb 1-1: SerialNumber: 20060775101D8B336814                      
[   34.182319] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)          
[   34.602344] ata2.00: ATA-8: TOSHIBA MK1655GSX, FG010D, max UDMA/100          
[   34.608642] ata2.00: 312581808 sectors, multi 16: LBA48 NCQ (depth 31/32)    
[   34.652347] ata2.00: configured for UDMA/100                                 
[   34.656978] scsi 1:0:0:0: Direct-Access     ATA      TOSHIBA MK1655GS FG01 P5
[   34.705250] usbcore: registered new interface driver uas                     
[   34.713829] sd 1:0:0:0: [sda] 312581808 512-byte logical blocks: (160 GB/149)
[   34.722457] sd 1:0:0:0: [sda] Write Protect is off                           
[   34.727278] sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00                        
[   34.730964] Initializing USB Mass Storage driver...                          
[   34.735996] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doeA
[   34.745388] scsi2 : usb-storage 1-1:1.0                                      
[   34.750647] usbcore: registered new interface driver usb-storage             
[   34.756703] USB Mass Storage support registered.                             
[   34.883194]  sda: sda1 sda2 sda3                                             
[   34.888389] sd 1:0:0:0: [sda] Attached SCSI disk                             
[   35.743313] scsi 2:0:0:0: Direct-Access     SanDisk  Cruzer           1.26 P5
[   35.756239] sd 2:0:0:0: [sdb] 15633408 512-byte logical blocks: (8.00 GB/7.4)
[   35.773637] sd 2:0:0:0: [sdb] Write Protect is off                           
[   35.778457] sd 2:0:0:0: [sdb] Mode Sense: 43 00 00 00                        
[   35.779119] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doA
[   35.794751]  sdb: sdb1 sdb2 sdb3

=====================================================



Edited 1 time(s). Last edit at 03/20/2012 07:38PM by davygravy.
Re: HOWTO: Build a custom 2.6.38.8 kernel for Goflex Net
March 23, 2012 06:34AM
The problem actually occurs only with UBIT v0.6. As soon as a SATA HDD is attached, the "setenv bootargs" is not honoured any more and UBIT always sets root=/dev/sda1 regardless of the setenv values. I might test u-boot 2011.12 if someone could provide a good howto on compiling, testing and reflashing the u-boot, but first I need to get a JTAG module to be prepared for the worst.
Re: HOWTO: Build a custom 2.6.38.8 kernel for Goflex Net
March 23, 2012 09:58AM
I think I'm just about done w/ it - a drop-in replacement for the u-boot that Jeff & Carmichael built... in terms of booting functions, it works identically to Jeff's original, AFAICT.

I need to patch in the LED's still. Not sure if I want to use Jeff's&Carmichaels' code for that, or try to tie it in very closely with the already-existing KW_GPIO & mvgpio stuff.

BTW, the u-boot-2012.03-stable release is really just weeks or days away.

=====================================================
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: