@bodhi Step 1 Backed up mtd's and checked size ok at 4.0M Step 2 The only kwboot I can see linked by you in the thread appears to be arm, I'm x86 I will try to track a recent one down. EDIT Grabbed your ubuntu build version and now get in invalid image error ./kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0.stock.rs816 -p mtd0.stock.rs816: Invalid image. rw-r--r-- 1 richaby richjn - Debian
@bodhi Very happy to proceed however you feel best.by richjn - Debian
@bodhi and @jdwl101 I have iminfo and imxtract Marvell>> iminfo ## Checking Image at 02000000 ... Unknown image format! But that's probably because I just copied the address from the following link which no doubts has a different sized zImage HDD Raw Sector How To To copy zImage I did dd if=zImage of=/dev/sda bs=1M seek=10 zImage size is -rw-r--r-- 1 richard richby richjn - Debian
@bodhi mw.l f1018100 00080000 Does bring up drive 1 and drive 2 but I have to pull the drive and reinsert to see it or issue scsi reset does the same. ide reset does nothing. scsi reset Marvell>> scsi reset Reset SCSI AHCI init for unit0 Target spinup took 0 ms. SATA link 1 timeout. SATA link 0 timeout. SATA link 1 timeout. SATA link 2 timeout. SATA link 3 timeout.by richjn - Debian
@bodhi Thanks for the explanation that makes it a bit clearer, I will go "back to school" and see if I can get my head round the whole topic, I get the numbering from right and expansion of the hex but the return hex calculation still leaves me feeling dumb. The command you provided didn't power up drive 1 (viewed front panel from left) but did power up drive 2, from memory driby richjn - Debian
@bodhi QuoteCool :) is that GPIO 15? My comment that your math was correct was simply based on the fact it worked so the drive powered up was GPIO1 5 (viewed from front panel numbering from left to right drive 3 and 4) Although this powered up the drive u-boot still reported no drives. I didn't try GPIO 15 mainly because even with your example in front of me I had no clue of the math iby richjn - Debian
@bodhi Away for 8 - 9 hoursby richjn - Debian
@bodhi QuoteBTW, I will post the flash instruction tomorrow. All done, but need more editing. Thank youby richjn - Debian
@bodhi Your math is correct :) ide reset Reset IDE: Marvell Serial ATA Adapter no device found On a second ide reset no IDE devices available EDIT The drive is powered upby richjn - Debian
@bodhi md.l f1018100 1 f1018100: 00000000 md.l f1018140 1 f1018140: 00040000 I'm not sure what to echo back ?by richjn - Debian
@bodhi Quotebodhi It means the HDD is not initialized. Recall the memory pokes that we removed from the bootcmd? Try mw 0xf10a2620 0x251 mw 0xf10a2e20 0x251 ide reset Yes, I do recall and I think you make a very good point. Unfortunately those two memory pokes don't bring up any sata ports (I tried all four)by richjn - Debian
@jdwl101 Thanks for the help! u-boot is all new to me. No matter what "ide" command I enter I just get "Warning: Please run 'ide reset' before running other ide commands" Marvell>> help ide ide - ide - IDE sub-system Usage: ide reset - reset IDE controller ide info - show available IDE devices ide device - show or set current device iby richjn - Debian
@bodhi Quotebodhi 2. Using RAID, we will need to go back to uInitrd solution. Eventhough in your environment, you can run your own custom built kernel to include mdm, it will not work for linux-5.1.2-mvebu-tld-1 to do that. If you compile the raid modules as built in you can do what I have done at least on mbr, no need to do anything else. For large gpt disks it is sufficient to have /bootby richjn - Debian
@bodhi Test 7 zImage, uInitrd in raw HDD sector, pull DTB from tftp I am not getting far with this but probably because I don't know what I am doing! Steps so far 1) partition single HDD 1 partition offset 128mb to allow for zImage etc 2) Install rootfs to /dev/sda1 as normal 3) Copy zImage & uInitrd to space before partition dd if=zImage of=/dev/sda bs=1M seek=10 dby richjn - Debian
@bodhi Thanks for preparing the flash instructions, much appreciated. Quick question, are you posting above my posts ? twice now I seem to have "missed" relevant posts, for example the kernel naming convention, I did not see this till just now. I will try the raw sector install on a single HDD and report back.by richjn - Debian
@bodhi SPI flash info From Debian cat /proc/mtd dev: size erasesize name mtd0: 00400000 00001000 "boot" mtd1: 00400000 00001000 "spi-rootfs" cat /etc/fw_env.config # MTD device name Device offset Env. size Flash sector size Number of sectors /dev/mtd1 0x3E0000 0x10000 0x00001000 fw_printenv CASset=max MALLOC_len=5 MPmode=SMby richjn - Debian
@bodhi A day marked by interruptions and long builds but we are getting there. This whole question of booting from raid had taken on a bit of a life of its own so I decided to get back to basics. I'm old enough to remember the early days of raid support in linux where you could actually just use the kernel itself to handle it for you. This code has stagnated as best I can see but still offby richjn - Debian
@bodhi I will rebuild kernel with raid built in so we get that in zImage, I'm not sure why initrd.img didn't kick in to bring the raid up as under the current test this is sat on a std partition but building the raid modules in wont do any harm and eliminates one more variable. This is going to take a while.by richjn - Debian
@bodhi Just a progress update Raid test failed at kernel panic but I think I have a few things to work through in my install routine and potential device re-numbering when install usb is not there. I will run a few more tests then I think I will build the raid modules in to rule that one out.by richjn - Debian
@bodhi Test 4 Single HDD, gtp, ext4, separate /boot partition Boot command setenv ipaddr 192.168.1.250 setenv serverip 192.168.1.2 setenv load_dtb_addr 0x1000000 setenv load_image_addr 0x02000000 setenv load_image 'echo loading zImage from tftpserver ...; tftpboot $load_image_addr zImage' setenv load_dtb 'echo loading DTB from tftpserver ...; tftpboot $load_dtb_addr arby richjn - Debian
@bodhi Quotecheck the output of lsmod I'm half way through the next test but I will check next time. Most modules needed for this box are built in so the list will be short anyway. QuoteYou need uInitrd to do this I was just wondering on that, the current kernel config builds all the raid drivers as modules so, yes, it would need uInitrd but if I build the raid modules into the kernby richjn - Debian
@bodhi Test 3 Single HDD, gpt, ext4 Boot command As test 2 Result root@debian:~# Next test 4 is to split /boot onto a separate partition so that the main rootfs can sit on raid. For this test I will just do the split, if it works (can't think that it wouldn't) I will move onto setting up / on raid 5 for test 5.by richjn - Debian
@bodhi I'm getting interrupted a lot this morning testing may be slow! Test 2 Single HDD, msdos, ext3 Boot command setenv ipaddr 192.168.1.250 setenv serverip 192.168.1.2 setenv load_dtb_addr 0x1000000 setenv load_image_addr 0x02000000 setenv load_image 'echo loading zImage from tftpserver ...; tftpboot $load_image_addr zImage' setenv load_dtb 'echo loading DTBby richjn - Debian
@bodhi This is the first of a series of posts as I try various HDD configurations, I'm posting as I go so I don't confuse myself. Test 1 (existing currently works with tftp zImage, uInitrd and DTB) rootfs on 4 drive raid 1, gpt, ext4 Boot command setenv ipaddr 192.168.1.250 setenv serverip 192.168.1.2 setenv load_dtb_addr 0x1000000 setenv load_image_addr 0x02000000 setenvby richjn - Debian
@bodhi My plan of attack for tomorrow is; 1) setup a single disk HDD install with mbr ext3... basically everything old. Partition offset 128MB for 3) 2) Even though you think env's may be lacking for loading initd from HDD I will try it anyway just to see if without the complexity of gpt, raid and ext4 it can fly. 3) Try the boot files embedded in raw disk sector and see if it workby richjn - Debian
@bodhi Everything is ok in the rootfs which is good but no answers to be found there. I tried using /dev/md0 in envs rather than rootfs LABEL but no change, same kernel panic. Looks like I owe you and everyone else an apology for raising hopes as it appears to be an error on my part and we were still booting uInitrd from tftp. Unless you have something you want to try now I might take aby richjn - Debian
@bodhi I set rootdelay to 60 seconds just to give it loads of time to spin up but we end on a kernel panic [ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]--- I don't like to admit it but maybe in my rush to try this before my visitor arrived I booted from my previously save tftp settings not from the new ones but I was so sure I had used the newby richjn - Debian
@bodhi I have rescued the system and will now work through your comments above and see if I can get it right this time. The bit I don't understand was I had it working, must have made a mistake on final edit or something. Back in a bit with hopefully better news.by richjn - Debian
@bodhi Put the shiraz away for a while! I just got bitten by stock again even though I was super quick to pull the plug. The issue arose when I aligned the differences in our two boot envs, there was nothing wrong with yours!, it was just I had left $load_initrd_addr and you had a "-" when I did this mine failed to boot because it appears if you don't have $load_initrd_addrby richjn - Debian
@bodhi saveenv and reset works Time to try and flash SPI ? Do you want me to repeat the output you requested previously ? I'm away for 30 mins but its time to celebrate I reckon!!by richjn - Debian