Welcome! Log In Create A New Profile

Advanced

Linux Kernel 4.12.8 Kirkwood package and Debian rootfs

Posted by bodhi 
Re: Linux Kernel 4.12.1 Kirkwood package and Debian rootfs
July 24, 2017 04:13AM
The new Debian stretch rootfs Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 has been uploaded. Please see 1st post for download link.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 07/24/2017 04:14AM by bodhi.
bodhi Wrote:
-------------------------------------------------------
> Dmitriy,
>
>
> > I have a question, is it possible to control the
> L
> > ED from UBOOT for example to blink until the ker
> ne
> > l has booted. The matter is that in an environme
> nt
> > the green and orange LED is indicated.
> > And STORA uses blue LED
>
> Yes. I'm glad you asked. I forgot to include the s
> ome boxes such as the Stora LED controls in the ro
> otfs!
>
> The control is in /etc/rc.local.
>
> They look like this:
>
>
> if [ -d /sys/class/leds/nsa325:green:sys ]; then
> echo default-on  > /sys/class/leds/nsa325:green
> :sys/trigger
> echo none        > /sys/class/leds/nsa325:orang
> e:sys/trigger
> fi
>
>
> So the Stora should have similar triggers in /sys/
> class/leds. Please post your output of
>
>
> ls -l /sys/class/leds
>

The rest of Led work as it should, thanks bodhi!

But I'm interested in the blue status diode! In the original uboot it blinked before loading the kernel then shone constantly.
With panic continued to blink ......

In the new uboot it is silent before starting the kernel only after that it lights up and goes into the trigger (heartbeat), by the way not very informative trigger. I reassembled it in (panic)

Is it possible in some way in the future assembly of UBOOT to return the old logic of the operation of this diode. In addition, it turned out that it has 3 brightness states and is controlled by two gpio.


root@stora:~# ls -l /sys/class/leds
итого 0
drwxr-xr-x  2 root root 0 июл 24 20:16 .
drwxr-xr-x 41 root root 0 июл 24 20:16 ..
lrwxrwxrwx  1 root root 0 июл 24 20:16 status:blue:activity_led -> ../../devices/platform/gpio-leds/leds/status:blue:activity_led
lrwxrwxrwx  1 root root 0 июл 24 20:16 status:blue:power_led -> ../../devices/platform/gpio-leds/leds/status:blue:power_led
lrwxrwxrwx  1 root root 0 июл 24 20:16 status:green:disk1_led -> ../../devices/platform/gpio-leds/leds/status:green:disk1_led
lrwxrwxrwx  1 root root 0 июл 24 20:16 status:green:disk2_led -> ../../devices/platform/gpio-leds/leds/status:green:disk2_led
lrwxrwxrwx  1 root root 0 июл 24 20:16 status:red:disk1_fail_led -> ../../devices/platform/gpio-leds/leds/status:red:disk1_fail_led
lrwxrwxrwx  1 root root 0 июл 24 20:16 status:red:disk2_fail_led -> ../../devices/platform/gpio-leds/leds/status:red:disk2_fail_led
Quote

Warning: Watch the apt-get upgrade progress. If the apt-get upgrade results in a new initramfs, the log would shows this message:

update-initramfs: Generating /boot/initrd.img-4.12.1-kirkwood-tld-1


Then you need to regenerate the uInitrd boot file:

what happen without renenerate the uInitrd?
Re: Linux Kernel 4.12.1 Kirkwood package and Debian rootfs
July 24, 2017 07:33PM
iomega ez Wrote:
-------------------------------------------------------
>
Quote

Warning: Watch the apt-get upgrade progress
> . If the apt-get upgrade results in a new initramf
> s, the log would shows this message:
>
> update-initramfs: Generating /boot/initrd.img-4.12
> .1-kirkwood-tld-1
>
>
> Then you need to regenerate the uInitrd boot file:
>
>
> what happen without renenerate the uInitrd?

Most of the time the kernel will boot. But it might not boot in some cases (if there are important modules needed). And if it booted, some packages will not work if there was config files changes.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 4.12.1 Kirkwood package and Debian rootfs
July 25, 2017 12:32AM
Dmitriy,

The Stora u-boot indeed does not have code to flash LED during booting.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 2 time(s). Last edit at 07/25/2017 12:34AM by bodhi.
Re: Linux Kernel 4.12.1 Kirkwood package and Debian rootfs
July 25, 2017 04:42PM
Re: Linux Kernel 4.12.1 Kirkwood package and Debian rootfs
July 26, 2017 03:19AM
Hello bodhi
My HP t5325 is arriving tomorrow and I have already created Debian rootfs on a USB and hope it will work.
I was wondering if it is possible to flash the rootfs in internal NAND because I will be needing all 4 USB ports?
Thank you
Re: Linux Kernel 4.12.1 Kirkwood package and Debian rootfs
July 26, 2017 05:01AM
kalehrl Wrote:
-------------------------------------------------------
> Hello bodhi
> My HP t5325 is arriving tomorrow and I have alread
> y created Debian rootfs on a USB and hope it will
> work.
> I was wondering if it is possible to flash the roo
> tfs in internal NAND because I will be needing all
> 4 USB ports?
> Thank you

It is possible, since the intenal NAND is really a flash drive! It is not real NAND, iirc. I'll have to look again to refresh my memory. However, it is too small to be useful. I would use a USB hub if I were you. In the furture you would need a lot more space to install packages than what is provided by the NAND space.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 4.12.1 Kirkwood package and Debian rootfs
July 26, 2017 08:48AM
Thank you for the reply and I'm looking forward to your instructions how to flash the rootfs in the internal memory. Is it possible for you to provide a minimal command line rootfs, the one you would get just by installing Debian minimal system or is this already that kind of rootfs? I guess that way it would be smaller and therefore possible to be flashed in internal memory. If not, how difficult is it to create such rootfs myself? I'm not a Linux newbie but also not so proficient.



Edited 1 time(s). Last edit at 07/26/2017 09:08AM by kalehrl.
Re: Linux Kernel 4.12.1 Kirkwood package and Debian rootfs
July 26, 2017 05:06PM
kalehrl,

Sorry I can't do that. It would take too much time for me to write a tutorial of this type.

In the old days, we use emdebbian and Jeff (our forum host) has written instruction for that here: http://forum.doozan.com/read.php?2,72. You could read his post and learn a great deal (I did) about how one would go about create system in NAND. emdebbian development is no longer active so the rootfs should be replaced with my released rootfs in Jeff's instruction.

Also, I'd suggest you search the web for similar instruction for OpenWrt (which is the system that have their rootfs in NAND). And our forum member bobafethotmail has a beta installation here: http://forum.doozan.com/read.php?4,29966.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 4.12.1 Kirkwood package and Debian rootfs
July 28, 2017 03:47AM
Re: Linux Kernel 4.12.1 Kirkwood package and Debian rootfs
July 30, 2017 02:10AM
Dmitriy Wrote:
-------------------------------------------------------
> ... I have a question, is it possible to control the L
> ED from UBOOT for example to blink until the kerne
> l has booted. The matter is that in an environment
> the green and orange LED is indicated.
> And STORA uses blue LED

Dmitriy!

Does that STORA uses Marvell CPU? Then yes. Writing certain register makes GPIO bits toggle automatically by hardware, no Uboot or OS required. I use UBoot to write to the register, then load Linux. I think Linux resets the GPIOs when it loads. This turns off the blinking.

Below is relevant part of my Uboot. My machine is not a STORA so maybe LEDs are on different GPIOs but you will get the idea. The DTS file will show you which GPIO bit is the LED and so which value to write. The datasheet will show you which register to write.

bootcmd=mw.l 0xf1010148 0x80; ide reset; ext2load ide 0:1 0x800000 /uImage; ext2load ide 0:1 0x1100000 /uInitrd; setenv bootargs $(console) $(bootargs_root) $(bootargs_end); bootm 0x800000 0x1100000

Do you see the write to the register before loading Linux? You need something similiar to blink LEDs. Good luck!
Re: Linux Kernel 4.12.1 Kirkwood package and Debian rootfs
July 30, 2017 03:51AM
Re: Linux Kernel 4.12.1 Kirkwood package and Debian rootfs
August 21, 2017 07:29PM
Kernel linux-4.12.8-kirkwood-tld-1 package has been uploaded. Please see 1st post for download link.

Note:

The Qizitong 501m_v2 DTS and DTB were updated after the the tarball has been uploaded. So if you have this box, please use the additional attached files. Copy the kirkwood-qizhitong_501m_v2.dtb to /boot/dts/ in your rootfs. The DTS file is for information and kernel building only.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Attachments:
open | download - kirkwood-qizhitong_501m_v2.dts (2.8 KB)
open | download - kirkwood-qizhitong_501m_v2.dtb (10.5 KB)
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: