-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with old bootloader and recognizing disks in slot 1 & 2 for NAS440 #24
Comments
I read about support for display and the buttons, and the nas440.c and nas440.h modules, but I cannot find them... Any help would be appreciated... Cheers! |
You'll find them in the diff: https://github.com/hn/seagate-blackarmor-nas/blob/master/u-boot-2022.04-nas440.diff If you update U-Boot, you'll have |
From within Linux, you can control the LCD display with lcdproc. When I tested it (roughly 3 years ago) something required to be manually compiled, because 'ugpio' or 'gpiod' was missing. This might have changed. In the end it worked, the LCD showed CPU load, network activity etc. This is something I found in my copy-paste buffer, But beware, i have no idea whether it makes any sense:
If you get it working, please report back on how you did it. |
Please report the make, model and transport info of your drives in slot 1 and 2 (top lines of |
Will do in a few days, I'm away this week. |
Attached are the files from 3 disks:
All disks are SATA3. Speeds are not the maximum 6 Gb/s but are more than 1.5Gb/s which is suggested (cca 2 Gb/s). The tested speeds with hdparm are the same across the disks and in all bays (Seagate was tested only in bay 0):
|
Thanks. Can you please post a full boot log (U-Boot and kernel, or just 'dmesg' if you do not have serial connected) as well? |
Here it is: u-boot.log |
By the way, funny story, after every boot, one of the network adapters doesn't work, they alternate between them. Both are on the same network, two different addresses, I have to try and find out on which I can ssh this time... |
Thanks for the boot log. There is a
I've never seen this (positive) behaviour, need to investigate that. |
So, I was wrong... When it wasn't recognized
When it was recognized
I'm not sure, but I think that two Seagate ST1000DM 003-9YN162 came with BA440 when I bought it. It was a long time ago, but I'm positive that it came with four Seagate 1 TB drives... This is a list of all disks that I could find to test:Disks that work:
Disks that don't work
|
Also, when NAS is booted from the disk in Slot1, it recognizes WD and Toshiba disks in Slot2, Slot3 and Slot4. Slot 3
Slot2
|
So, an update...I was able to get LCD working, using NAS440.c code, libgpiod2 library and python3-libgpiod library.
With gpiod you get a set of tools to check, set and get GPIOs from the command line. Here is the current Python script: lcd-test.zip What is working
What is not working
In the script, there is a function to turn the LEDs on/off for disks and the front panel system. I need to upgrade further this because I need to turn on/off individual LEDs. On the previous system (Lenny) I was able to change the individual disk LED to red and flashing red. Do not know how to do that with GPIO. The previous system had drivers for the LCD and LED and it is obviously achievable. TODO:
About the LEDs:On my board, four disk LEDs are connected with one pin to the shift register (that can be turned on/off through the GPIO pins) and the other two pins (for red and green colour) to the four OR and four NAND gates output (two ICs; SN54LVC32A and 74LVC00A). I didn't trace the inputs to these ICs, maybe later. I guess they are used to set up flash behaviour. |
I was using the previous "hack" on BA440 with Lenny distribution; my setup is as follows:
Disk in slot 1 was booting Lenny, and slots 2, 3 and 4 were used for hot-swappable disks with a lot of media files on them (films, music, photos etc). A few convenient scripts and I was able to automatically mount any disk that was put in bays 2, 3 or 4 and use the two buttons and display to umount any one of them. I was using the OSMC media server on RPi to access the disks via NFS/CIFS.
But, recently it started to freeze, so I got my eyes on this project, and here I am, trying to create fresh nas with recent Debian on it...
So, the problems...
Old bootloader.
You should have seen my face after u-boot displayed the USB command not found...
Going through Help I could see there are no usb or fatload commands offered (there was ext2load, but to no avail since no USB was accessible). So, I was stuck and tried numerous other options to get files loaded. In the end, only TFTP was successful. I have installed the TFTP server on my Linux workstation, changed the env serverip variable to point to my box, and executed tftpload command.
Not recognized disk
As I said in the introduction, because of my setup and needs, I need as many free bays as possible. So I tried to install Debian on disk in slot 1 but to no avail. The solution I tried was to use Bookworm release in the hope that the new kernel supports this controller. And it did!
Changed the blackarmor-nas-debian-prep.sh script:
DEBDIST=${DEBDIST:-bullseye}
to
DEBDIST=${DEBDIST:-bookworm}
It successfully booted from bay 1!
I do not know the speed of the disks in bays 1 and 2, I haven't tested it yet.
Now on the task to try to automount disks and USB devices. And to control buttons and display...
Cheers!
The text was updated successfully, but these errors were encountered: