Welcome! Log In Create A New Profile

Advanced

Linux Kernel 6.11.6 Kirkwood package and Debian rootfs

Posted by bodhi 
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
October 24, 2014 02:55PM
Almaz Wrote:
-------------------------------------------------------
> I guess, it's impossible to boot from raid.
> Before I start playing with uboot setting, is it
> possible to boot from another partition such as
> /dev/sda2?

Yes, you can boot from any partition, providing the u-boot env is set correctly to boot that specific partition. The device in ext2load command to load uImage, and the root parameter to the kernel. Those 2 envs are where you would specify the info.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
October 24, 2014 04:18PM
I couldn't find much from fw_printenv. I have no idea what I can modify here
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else boot

What if I change here from SDA1 to SDA2? Would it work?
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_do
ne=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
October 24, 2014 05:10PM
@Almaz,

First, do you have 1 partition where your rootfs resides and no separate /boot partition? and do you have only one disk or multiple disks?

What ever partition that contains /boot/uImage is the device being detected by usb_scan. If /boot is the 1st partition in the 1st disk then usb_device is 0:1 (if there is only one device).

So if you change the /boot to sda2 then usb_device will be detected as 0:2.

Rootfs is a different issue altogether, to ensure it is selected as rootfs, no matter how the disks were enumerated, then label it "rootfs" and define env (usb_root must be in the bootargs):
usb_root=LABEL=rootfs

If you're not sure. Then list your u-boot env, how nay disks, how many partitions, and where is the rootfs, here and I'll show you how to set them. It does not matter what letter being assigned to partition during boot, we'll just need to script them in a foolproof way.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 3 time(s). Last edit at 10/24/2014 05:17PM by bodhi.
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
October 24, 2014 05:20PM
BTW, I'm creating a new scan script that will be a little bit more resilient for multiple disks types. I was planning include it in the default envs for the next u-boot release.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
October 24, 2014 05:29PM
I'm using main rootfs on a physical drive as a daily server and a second usb stick rootfs for compiling only. Usb stick for compiling doesn't have enough capacity to load all the apps. I need somehow extend it. Since I'm using the main rootfs on a physical drive, I'd like to create a second partition and to be able to boot from one partition or another one. Another option to setup VmWare with toolchain for PogoPlug but I didn't find a good tutorial how to properly cross compile for pogoplug. If you have any better suggestions, please let me know.

U-Boot 2011.12 (Feb 20 2012 - 21:21:59)
Pogoplug E02U-Boot
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
October 24, 2014 06:14PM
Thanks bodhi, as usual you are the first to help and always hit the target :). I just tried with a second usb. I put rootfs in second partition and changed uboot to fw_setenv usb_scan_2 usb=1:2 dev=sdb2 and it booted up. It looks like I can install rootfs on second partition of a primary hard drive. I should be able to switch OS with
First boot partition
fw_setenv usb_scan_1 usb=0:1 dev=sda1

Second boot partition 
fw_setenv usb_scan_1 usb=0:2 dev=sda2



Edited 1 time(s). Last edit at 10/24/2014 06:15PM by Almaz.
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
October 24, 2014 07:28PM
Cool!

However, one more thing to keep in mind is: If you have multiple drives plugged in, then the boot drive is not guarantee to be 0: it could be 1:, because the way the Pogo E02 starts the drives, whichever come up first will be 0:, then 1:, … so on.

A very good way (but not foolproof) is to plug that boot drive into the USB port right next to the Ethernet port. All things equal (speed,…), that USB will get to be device 0:

So as I've mentioned above, the ultimate solution is to use a better mechanism to do this so that it does not matter about what brand, speed,… the drives are. We will have that in the next u-boot release.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
October 25, 2014 03:21PM
Almaz Wrote:
-------------------------------------------------------
> I guess, it's impossible to boot from raid.

boot from raid (only mirror - raid1) is possible from uboot.
Confirmed working for my Lacie NS2MAX unit:
https://github.com/davidedg/NAS-NS2MAX-mod/blob/master/install/install-on-hdd_mdadm.txt#L61

Basically, you create a small md volume for /boot, with the old metadata format (0.90), which means that fs can look almost like a normal fs to u-boot, being able to read from that the kernel.
You can create other MD volumes (for / or data volumes) with recent metadata format, or even use lvm then.
I don't think lvm can be used for /boot, though.

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod
Re: Linux Kernel 3.16 Kirkwood package and rootfs (Non Flattened Device Tree)
October 25, 2014 03:33PM
Thanks davidedg
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
October 26, 2014 05:18PM
Kernel 3.17.0-kirkwood-tld-1 package was uploaded. Please see 1st post for download link.

This is the first FDT kernel in my continuing release series for Debian Kirkwood boxex. So please read the new installation instruction even though you've installed these kernels before and familiar with the installation.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 10/26/2014 05:26PM by bodhi.
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
October 27, 2014 03:05AM
Where can i find "fw_setenv & fw_printenv " ?

My debian says "comand not found".



Edited 1 time(s). Last edit at 10/27/2014 03:07AM by jst818.
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
October 27, 2014 03:30AM
jst818,

Which rootfs are you running?

If it is not in your current rootfs, install with:
apt-get u-boot-tools

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
October 27, 2014 06:39AM
I'm using E02 with kernel 3.16 I'm getting an error.
ethtool -K eth0 tso off                                     [0/0]
Cannot change tcp-segmentation-offload
Should I switch to another kernel? I use only Samba and need to make sure that I won't get any corruptions.

EDIT:

Please disregard. Looks like it's already disabled by default.
root@debian:~# ethtool -k eth0
Features for eth0:
rx-checksumming: on
tx-checksumming: on
        tx-checksum-ipv4: on
        tx-checksum-ip-generic: off [fixed]
        tx-checksum-ipv6: off [fixed]
        tx-checksum-fcoe-crc: off [fixed]
        tx-checksum-sctp: off [fixed]
scatter-gather: on
        tx-scatter-gather: on
        tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: off
        tx-tcp-segmentation: off [fixed]
        tx-tcp-ecn-seg



Edited 2 time(s). Last edit at 10/27/2014 07:22AM by Almaz.
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
October 27, 2014 07:15AM
Quote

root@pogo:~# apt-get install u-boot-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
u-boot-tools is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@pogo:~# uname -a

Linux pogo 3.16.0-kirkwood-tld-2 #2 PREEMPT Sun Aug 31 18:56:01 PDT 2014 armv5tel GNU/Linux
root@pogo:~#


uboot is latest: uboot.2014.07-tld-1.pogo_e02.bodhi
http://forum.doozan.com/read.php?3,12381,page=1


Strange, now it works (those fw set/printenv are located under /usr/bin ).



Edited 3 time(s). Last edit at 10/27/2014 08:17AM by jst818.
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
October 27, 2014 08:25AM
After upgrading to kernel 3.17 ftd, 4a method, can those file be deleted ?

/boot/linux-headers-3.17.0-kirkwood-tld-1_1_armel.deb
/boot/linux-image-3.17.0-kirkwood-tld-1_1_armel.deb
/boot/zImage-3.17.0-kirkwood-tld-1


/lib/firmware/3.15.3-kirkwood-tld-1/ (and subfolders)
/lib/modules/3.16.0-kirkwood-tld-2/ (and subfolders)

fw_printenv output:
Quote

arcNumber=3542
baudrate=115200
bootcmd=run bootcmd_usb; run bootcmd_sata; run bootcmd_rescue; reset
bootcmd_mmc=run mmc_init; run set_bootargs_mmc; run mmc_boot
bootcmd_pogo=run bootcmd_rescue
bootcmd_rescue=run set_bootargs_rescue; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot;
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot;
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
ethaddr=00:xxxxx
filesize=a1a
if_netconsole=ping $serverip
ipaddr=192.168.1.100
led_error=orange blinking
led_exit=green off
led_init=green blinking
machid=dd6
mainlineLinux=yes
mmc_boot=mw 0x800000 0 1; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
mmc_init=mmc rescan
mmc_load_uimage=ext2load mmc $device 0x800000 /boot/uImage
mmc_load_uinitrd=ext2load mmc $device 0x1100000 /boot/uInitrd
mmc_root=/dev/mmcblk0p1
mtddevname=rootfs
mtddevnum=2
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
preboot=run if_netconsole start_netconsole
preboot_nc=run if_netconsole start_netconsole
rescue_installed=1
rootdelay=10
rootfstype=ext3
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
serverip=192.168.1.2
set_bootargs_mmc=setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_rescue=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
usb_init=usb start
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=/dev/sda1
load_dtb=ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-pogo_e02.dtb
load_initrd=ext2load usb 0:1 0x1100000 /boot/uInitrd
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
usb_boot=run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi



Edited 1 time(s). Last edit at 10/27/2014 08:29AM by jst818.
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
October 27, 2014 11:45AM
jst818 Wrote:
-------------------------------------------------------
> After upgrading to kernel 3.17 ftd, 4a method, can
> those file be deleted ?
>
> /boot/linux-headers-3.17.0-kirkwood-tld-1_1_armel.
> deb
> /boot/linux-image-3.17.0-kirkwood-tld-1_1_armel.de
> b
> /boot/zImage-3.17.0-kirkwood-tld-1

Yes, remove them. You can always redownload if needed, or keep the tarball around for future reinstallation.

>
> /lib/firmware/3.15.3-kirkwood-tld-1/ (and
> subfolders)
> /lib/modules/3.16.0-kirkwood-tld-2/ (and
> subfolders)
>

When you remove older kernels, these folders will be removed automatically. Use dpkg to check status and remove, purge…. older kernels.
dpkg -l | grep -i linux-image

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
October 31, 2014 10:21PM
Rootfs Debian-3.17.0-kirkwood-tld-1 was uploaded. Please see 1st post for download link.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
3.17 kernel update on sata. failed.
November 03, 2014 07:15AM
I open a new thread because sata boot failed after 3.17 upgrade.



Edited 1 time(s). Last edit at 11/03/2014 12:11PM by robert1968@gmail.com.
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
November 03, 2014 04:58PM
@robert,

Please refrain from changing the subject of this thread. It's a kernel release thread.

The reason your SATA boot failed was because you have not adapted the DTB booting syntax (the instruction is for USB) in to your SATA boot commands. I will respond in detail in your new thread when I have time to post again (if you have not solved it by then).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
November 05, 2014 10:46AM
Hi Bodhi-

I am on a Pogoplug V4, which has been successfully running Debian or Arch according to your and Quis previous instructions.

I have attempted to make a new ROOTFS with the new kernel 3.17. I followed all of your instructions, but I am unable to get the SD card to boot the file system. I am getting both the green and the red LED lit up at the same time and hanging there.

Do you have any advice, or is this not enough information to help?
Thanks
Peter
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
November 05, 2014 01:32PM
@Peter,

It's best to trouble shoot this with netconsole or serial console. However, if you post the log of what you did, usually we can spot a wrong setting some where.

Both green and red LED is orange LED. It means that u-boot did not find one of the 3 kernel files that it tried to load (depending how you set the envs). In this case, probaly the envs were not set properly. So check your rootfs first, if these files are there, then problem is probably with u-boot envs.
/boot/uImage
/boot/uInitrd
/boot/dts/kirkwood-pogoplug_v4.dtb

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
shv
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
November 07, 2014 09:13AM
You can find some performance figures for different OS für Zyxel NSA325v2:http://www.zyxelforum.de/openmediavault-1-0-ist-da%C7%83-anleitung-zum-installieren--t7787s27.html. It seams to depend on the OS or optimization of its kernel which throughput can be reached. Archlinux and Freenas seam to deliver very good speed but Openmediavault is less than half of this speed. What throughput can be reached with the Debian Kernel on the Zyxel NSA325v2? Could it be improved if the same or similar optimizations are used for the Debian kernel?

-shv



Edited 1 time(s). Last edit at 11/07/2014 09:14AM by shv.
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
November 07, 2014 09:12PM
shv,

> What throughput can be reached
> with the Debian Kernel on the Zyxel NSA325v2?
> Could it be improved if the same or similar
> optimizations are used for the Debian kernel?

I'm not sure what optimization done were done on Arch and FreeNAS. Do you have some benchmarks that indicate there are differences in performance between Debian & Arch?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
shv
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
November 08, 2014 01:49AM
bodhi,

I didn't use any alternative OS on my Zyxel NAS because I expect less performance compared to the original OS. I think I read here in the forum about the performance if Debian is running on the device.

-shv
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
November 08, 2014 01:59AM
shv Wrote:
-------------------------------------------------------
> bodhi,
>
> I didn't use any alternative OS on my Zyxel NAS
> because I expect less performance compared to the
> original OS. I think I read here in the forum
> about the performance if Debian is running on the
> device.
>
> -shv

I'm running Debian and more than happy with performance. I don't know where you got your info but without benchmarks, it's nonsense. Everything is running here at max speed from what I can see.
shv
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
November 08, 2014 02:02AM
@Almaz:

which is you NFS and Samba troughput?

-shv



Edited 2 time(s). Last edit at 11/08/2014 02:06AM by shv.
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
November 08, 2014 02:04AM
shv Wrote:
-------------------------------------------------------
> @Almaz:
>
> can you please post which NFS and Samba troughput
> can be reached?
>
> -shv

I'm using usb drive with PogoPlug E02. You can't get higher speed than that because it's USB limitation. I don't use NFS so can't comment on it.
Samba
write to PogoPlug = 27-28 MB/s
read from PogoPlug = 29 MB/s



Edited 1 time(s). Last edit at 11/08/2014 02:04AM by Almaz.
shv
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
November 08, 2014 02:13AM
On your PogoPlug E02 you have USB2.0 which is limiting the speed. It might be completely different with Zyxel NAS if it can reach 120MB/s. In this case the kernel and system configuration could limit the reachable speed.

-shv
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
November 08, 2014 02:20AM
shv Wrote:
-------------------------------------------------------
> On your PogoPlug E02 you have USB2.0 which is
> limiting the speed. It might be completely
> different with Zyxel NAS if it can reach 120MB/s.
> In this case the kernel and system configuration
> could limit the reachable speed.
>
> -shv

I don't know where you got that info but no physical hard drive can achieve that kind of speed. Just maybe the most expensive ones but I've never seen one yet. From zyxel you should expect 37MB/s Here are some benchmarks http://www.bit-tech.net/hardware/storage/2012/01/25/zyxel-nsa310-review/2
shv
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
November 08, 2014 02:41AM
If you look at my comparision of device performance at http://pogoplug.square7.de/forum/viewtopic.php?f=4&t=13#p75 you will see that you don't reach the highest possible speed with your Pogoplug E02. Moreover you can see that the Goflex Net device can read data from harddrive with 100MB/s from a 2.5" harddisk but reaches just 32MB/s Samba troughput and that this speed limitation doesn't depend on the network or drive speed. The kernel and system configuration seams to have a high impact on the reachable speed. Please regard, that 4TB harddrives with 7200 rpm can reach up to 180MB/s and are not expensive compared to their size.

With the original Zyxel OS I reach up to 93MB/s read speed and 63 MB/s write speed with Samba and single drive configuration. The NFS speed is less than the Samba speed. The used harddrive reaches up to 130MB/s. I was impresse to read that with Archlinux and Freenas up to 120 MB/s can be reached - either with RAID or single drive configuration.

-shv



Edited 1 time(s). Last edit at 03/11/2017 09:43AM by shv.
Sorry, you can't reply to this topic. It has been closed.