I did all my testing with only two drives in the bays, one of which did not boot and was only there to complete the bus. At the start I was booting the kernel uImage and an initrd from my TFTP server but once I got a combination I liked I put them on my hard drives. I then formatted he new drives I wanted to use and put a small RAID0 partition on them to act as my boot partition. U-Boot doesn&by MarkTurner - Debian
Not sure which model you have, Andy, but the U-Boot included with my 4-Bay Business NAS did not enable USB booting, nor does it react to the "magic packet" on the network. I had to buy an RS232-to-TTL board to access U-Boot's serial console, after which I was able to save BOOT_CMDS to do most of what I need. It's still a work in progress but mine is now running well enoughby MarkTurner - Debian
blackdevil Wrote: ------------------------------------------------------- >I would be great to get PCI express and with that USB 3.0 working. I tried it and found no way :( Hmm. My PCIe works and USB 3.0 as well: [ 3.290000] Board version 1.x. [ 3.290000] PCI-E0 uses external clock source. [ 3.300000] Active PCIe0 Clock, PHY and reset PCIe [ 3.300000] PCIe: Port[0] Enby MarkTurner - Debian
tommy79 Wrote: ------------------------------------------------------- > So the trick is to set the netboot variable to 1 > and then provide your own boot command (e.g. one > that boots from sata partition) in the netboot_cmd > variable. And than save the environment. Excellent! I can confirm that setting the netboot variable keeps uBoot from clobbering upon boot whatever flasby MarkTurner - Debian
tommy79 Wrote: > So the trick is to set the netboot variable to 1 > and then provide your own boot command (e.g. one > that boots from sata partition) in the netboot_cmd > variable. And than save the environment. Very interesting, Tommy! I will have to try this tomorrow. Thanks!by MarkTurner - Debian
bodhi Wrote: ------------------------------------------------------- > So when you set envs to boot into kernel 4.4.x and > used saveenv before boot, it did not stick to the > next boot? did you have any error or it was just > silently not executing the save? Settings will save but u-Boot seems to be ignoring them. It always boots the stock kernel in the flash partition. Iby MarkTurner - Debian
So, has anyone been successful in getting the SPI driver to work? I notice there is no mention of SPI in the bootup logs. I've tried KL Yang's kernel, Tommy's kernel, and my own but none seem to work. I believe Yang's kernel driver came from OpenWRT but I haven verified that (nor tried the OpenWRT kernel). I'm assuming the SPI support is what I need to access the flashby MarkTurner - Debian
tommy79 Wrote: ------------------------------------------------------- > Mark, > Did you use my config (with SATA_PMP enabled) or > your config? I saw some options are different in > your config. I added it to your config along with RAID support as I need that to boot my array.by MarkTurner - Debian
tommy79 Wrote: ------------------------------------------------------- > Mark, > I enabled this CONFIG_SATA_PMP but the result was > that none of the drives got recognized.... I built a kernel with your config last night and enabled CONFIG_SATA_PMP and all four drives came online. Is there something else your system needs? Thanks again for the source code and kernel config! Iby MarkTurner - Debian
tommy79 Wrote: ------------------------------------------------------- > Mark, > I enabled this CONFIG_SATA_PMP but the result was > that none of the drives got recognized.... That's a bit unexpected! The port multiplier was the key to getting my drives going. I don't know why enabling support might make your drives unrecognized? I posted my .120 config a few posts aby MarkTurner - Debian
tommy79 Wrote: ------------------------------------------------------- > Mark, > In my box me powering on with a button just works, > I have no issues with that. > I attached two harddrives and only one got > initialized - so I can confirm it is a problem > with sata driver. Did you have any patch for this? > You mentioned this earlier. Adding in the kernel'sby MarkTurner - Debian
tommy79 Wrote: > And what I advise you blackdevil, is to power off > the device for an hour or so and then try again :) Speaking of powering off, I noticed that after I issued the shutdown command I could not power up the box again without removing the power cord and plugging it back in. The front button didn't work. The power management may still be a little bit wonky. :)by MarkTurner - Debian
tommy79 Wrote: ------------------------------------------------------- > > Please test and let me know what are your opinions > :) Tommy, you do good work! It booted up fine on my 4-Bay and I have USB and an RTC! Boot log is attached. I only have one active drive in my chassis. Did you add the SATA Port multiplier support? I can't do RAID without it on my box. Attachedby MarkTurner - Debian
tommy79 Wrote: ------------------------------------------------------- > > Please test and let me know what are your opinions > :) Also, when can I get your source code? :-)by MarkTurner - Debian
tommy79 Wrote: ------------------------------------------------------- > Hi All, > > You can check this out: > https://www.dropbox.com/sh/vc0suib2su60b0d/AAA2lXRE2j5DfwO-VVFWVeYEa?dl=0 > > This is my brand new 4.4.121 kernel and modules > for our machines :) > > I used mainline newest 4.4 kernel and applied > patches from here: > https://github.com/by MarkTurner - Debian
tommy79 Wrote: ------------------------------------------------------- > I do not use initrd. I do not know how to handle > this, but you may try to increase all adresses you > use by 0x20000000. It means use 0x21100000 instead > of 0x1100000 and so on. > > Your init ramdisk is loaded at 00000000 while I > think it should at 20000000. Check if you can > supply LOby MarkTurner - Debian
tommy79 Wrote: ------------------------------------------------------- > Hi All, > I found out how to run 2-bay box (and most likely > 4-bay as well) with 512MB of RAM:) I am using > kernel 4.4.88 I mentioned above. Darn it. Doesn't seem to work for me on my 4-Bay. I built my kernel's uImage at 22000000: Image Name: Linux-4.4.120-jmt-1.2 Created: Mon Mby MarkTurner - Debian
tommy79 Wrote: ------------------------------------------------------- > > To do this you actually do not need to patch the > kernel. You only change LOADADDR for uImage and > change kernel parameters. Hey, this is also great news because it means a DTB kernel might work with the expanded memory! I was concerned when Bodhi mentioned the kernel "fixup" patch trick woby MarkTurner - Debian
tommy79 Wrote: ------------------------------------------------------- > Hi All, > I found out how to run 2-bay box (and most likely > 4-bay as well) with 512MB of RAM:) I am using > kernel 4.4.88 I mentioned above. > > To do this you actually do not need to patch the > kernel. You only change LOADADDR for uImage and > change kernel parameters. That's aweby MarkTurner - Debian
I just found this repo today. Anything useful here? https://github.com/lede-project/source/tree/master/target/linux/cns3xxxby MarkTurner - Debian
I can't get tld-1.2 to boot at all. Changing LOADADDR doesn't seem to help, either at U-Boot or using mkimage. It either hangs on "Starting Kernel Image ..." or segfaults and dumps me back into U-Boot. Incidentally, the kernels I can boot won't let me specify mem=512M. They won't load at all if I use that, so Tommy79's memory fixup seems to be necessary. Cby MarkTurner - Debian
I got the exact same results as blackdevil. :-/by MarkTurner - Debian
Bodhi, can you share your steps to make your kernels, please? I should also point out that somewhere recently your kernels went from being named cns3xxx to cns3xxxx. :)by MarkTurner - Debian
bodhi Wrote: ------------------------------------------------------- > But you should append the DTB to zImage and make a > new uImage in your rootfs. Use this Kirkwood > example (assuming the rootfs was mounted at sdb1 > on another Linux box): Hmm. Nothing I do will get me a bootable kernel when I append the dtb to the zImage and create an uImage from it. It gets to "dby MarkTurner - Debian
bodhi Wrote: ------------------------------------------------------- > @Mark, > > Which BlackArmor box do you have, could you post > the model number? I thought all Seagate BlackArmor > have Marvel SoC, not Cavium SoC. Apparently you > have one with Cavium! Yes, it's definitely Cavium. It was marketed as a Seagate Business Storage 4-Bay NAS, model # SRN04D.by MarkTurner - Debian
bodhi Wrote: ------------------------------------------------------- > So basically we have to append DTB to uImage to > boot properly (regardless whether there is uInitrd > used in booting or not) Ah, good to know! I'll give this a try in about an hour.by MarkTurner - Debian
OK, finally found a spare SATA drive I could put Bodhi's rootfs onto as /dev/sda1. I wanted to definitively rule out my uIinitrd tftp image hogging all the memory. Now I've got new and interesting errors which might require a new kernel build as it tells me there's no kernel memory protection. A snippet from the attached boot log: Freeing unused kernel memory: 188K This aby MarkTurner - Debian
After watching the native kernel boot, I decided to try booting Bodhi's 4.14.24 kernel and using /dev/md1 (the native Seagate filesystem) as the rootfs. This suggests loading uinitrd into memory is indeed the cause of the kernel paging fault. I've gotten a lot farther this time than others! Now it looks like the impediment for me is that software RAID isn't started so /dev/md1 can&by MarkTurner - Debian
The modprobe/kernel paging issue still exists: Whitney # bootm 0x2000000 0x5100000 0x5000000 enter do_eth_down!!! ## Booting kernel from Legacy Image at 02000000 ... Image Name: linux Created: 2018-03-07 12:42:23 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3349200 Bytes = 3.2 MB Load Address: 00800000 Entry Point: 00800000 ## Loaby MarkTurner - Debian
MarkTurner Wrote: ------------------------------------------------------- > Actually, I just remembered the QEMU ARM emulation > trick! I've used this before to use my laptop to > compile apps for my RPi. > https://hblok.net/blog/posts/2014/02/06/chroot-to-arm/ For anyone wanting to follow along, these are the steps I just took to build a chroot ARM environment. I'mby MarkTurner - Debian