Welcome! Log In Create A New Profile

Advanced

Dell Appliance

Posted by JDS420 
Re: Dell Appliance
June 28, 2018 09:55AM
More from another script:
    public static function LEDOff() {
        self::LEDControl('off', $white=false);
        self::LEDControl('off', $white=true);
    }

    // state = 'on' | 'off' | 'blink'
    public static function LEDControl($state = 'on', $white=true) {
        $color = $white ? 'white' : 'orange';

        // there's some interplay with triggers and brightness
        // lets start by turning everything off
        if (is_file("/sys/class/leds/$color/brightness")) {
            SudoClient::RunCommandWait("echo none > /sys/class/leds/$color/trigger; echo 0 > /sys/class/leds/$color/brightness");
        }

        if($state === 'off')
            return;

        // $state === 'on'
        $on = 255;
        $blink = 'none';

        if($state === 'blink') {
            $on = 255;
            $blink = 'heartbeat';
        }

        if (is_file("/sys/class/leds/$color/brightness")) {
            // setting blink to heartbeat, but on to false turns off led
            // so set the brightness first, then trigger
            SudoClient::RunCommandWait("echo $blink > /sys/class/leds/$color/trigger; echo $on > /sys/class/leds/$color/brightness");
        }
    }

    public static function LEDStatus() {
        if(!is_file('/sys/class/leds/white/brightness'))
            return "No LED detected\n";
        $out = '';
        $on = trim(file_get_contents('/sys/class/leds/white/brightness')) != '0' ? 'on' : 'off';
        $blink = trim(file_get_contents('/sys/class/leds/white/trigger'));
        $out .= "white: $on | $blink\n";
        $on = trim(file_get_contents('/sys/class/leds/orange/brightness')) != '0' ? 'on' : 'off';
        $blink = trim(file_get_contents('/sys/class/leds/orange/trigger'));
        $out .= "orange: $on | $blink\n";
        return $out;
    }

    public static function LEDWhiteIsOn() {
        if(!is_file('/sys/class/leds/white/brightness'))
            return true;
        return (trim(file_get_contents('/sys/class/leds/white/brightness')) != '0');        
    }
    public static function LEDOrangeIsOn() {
        if(!is_file('/sys/class/leds/orange/brightness'))
            return false;
        return (trim(file_get_contents('/sys/class/leds/orange/brightness')) != '0');
        
    }
Re: Dell Appliance
June 28, 2018 10:44PM
JDS420,

Right, it shows that we can just brute force our way to find these GPIO easily.

I can see only one LED in the back that blinks constanly. Is there other LEDs that you can see?

Update:

That's it. Only 1 LED that can be turned on White or Orange.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 2 time(s). Last edit at 06/28/2018 11:27PM by bodhi.
Re: Dell Appliance
June 28, 2018 10:48PM
BTW, I've confirmed that RTC works, too.

[    5.170730] rtc-mv f1010300.rtc: setting system clock to 2018-06-28 08:27:34 UTC (1530174454)

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 06/28/2018 10:49PM by bodhi.
Re: Dell Appliance
July 04, 2018 08:28PM
Here is what I got so far.

Everything is working well. Except:

Minor:
- SPI flash is still protected. So we can see the u-boot envs in Debian, but can't change it yet.
- LEDs: without GPL, looks like we need to ping each one. But this is a good-to-have, not important.

Major:
- 2GB Memory is a tough one. I've rebuilt the kernel to use highmem. But testing showed that it is quite unstable on Kirkwood (ARMV5). Kirkwood boxes that has 512MB is running fine. But kernel memory bug showed up when running with this box. Tasks that make use of the memory region > 768M caused a memory bug to show up.

[   26.262100] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   27.087276] BUG: Bad rss-counter state mm:7a16fc7b idx:1 val:1
[   28.386977] NET: Registered protocol family 15
[   31.463489] Bluetooth: Core ver 2.22
[   31.477927] NET: Registered protocol family 31
[   31.482399] Bluetooth: HCI device and connection manager initialized
[   31.503190] Bluetooth: HCI socket layer initialized
[   31.513677] Bluetooth: L2CAP socket layer initialized
[   31.518785] Bluetooth: SCO socket layer initialized
[   31.613470] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   31.618845] Bluetooth: BNEP filters: protocol multicast
[   31.637045] Bluetooth: BNEP socket layer initialized
[   34.016189] NFSD: starting 90-second grace period (net f000001c)
[   34.074115] BUG: Bad rss-counter state mm:d5a487c9 idx:1 val:1
[   41.244479] BUG: Bad rss-counter state mm:87a378b3 idx:1 val:1
[   43.146299] BUG: Bad rss-counter state mm:2ecb18d6 idx:1 val:1

If any of you guys can help in researching this kernel BUG issue, it would be great. Note that AMRV7 boxes such as the Thecus N2350 is fine using the same kernel config option (CONFIG_HIGHMEM).

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 07/04/2018 08:46PM by bodhi.
Re: Dell Appliance
July 05, 2018 08:27PM
bodhi Wrote:
> Major:
> - 2GB Memory is a tough one. I've rebuilt the
> kernel to use highmem. But testing showed that it
> is quite unstable on Kirkwood (ARMV5). Kirkwood
> boxes that has 512MB is running fine. But kernel
> memory bug showed up when running with this box.
> Tasks that make use of the memory region > 768M
> caused a memory bug to show up.
>
Looking through the existing DTS files for Kirkwood it appears that the kirkwood-openblocks_a7.dts another Armada 300 based system is the only one that currently enables more than 512MB of memory (it enables 1GB). So its likely that kirkwood support for anything more than 512MB of memory has minimal if any testing.

Ray
Re: Dell Appliance
July 05, 2018 11:02PM
Ray,

> So its likely that kirkwood support for
> anything more than 512MB of memory has minimal if
> any testing.

True. I have not seen a > 1GB Kirkwood box until this M300. There were memmory tricks in the past that allow us to go over 768M, but they all phased out (those were workarounds so they were removed when the CONFIG_HIGHMEM was merged to mainline).

I'll look around for a while. Perhaps I will release the next kernel with the M300 DTS supports. We will run with 768M until this bug is resolved

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 07/05/2018 11:03PM by bodhi.
Re: Dell Appliance
July 06, 2018 08:56PM
This is an interesting patch:

Quote

Linux 4.17-rc4

Leon Romanovsky (4):
RDMA/mlx5: Fix multiple NULL-ptr deref errors in rereg_mr flow
RDMA/mlx5: Protect from shift operand overflow
RDMA/mlx5: Properly check return value of mlx5_get_uars_page
RDMA/mlx4: Add missed RSS hash inner header flag

-bodhi
===========================
Forum Wiki
bodhi's corner
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: