Welcome! Log In Create A New Profile

Advanced

Problem booting Linux Kernel 4.4.79 Oxnas (OX820) Pogo V3

Posted by multiplex'd 
Problem booting Linux Kernel 4.4.79 Oxnas (OX820) Pogo V3
August 06, 2017 03:55PM
bodhi,

I have just updated the kernel image on my Pogo Pro to 4.4.79-oxnas-tld-1 and it fails to boot. After attaching a serial port to the device I see that it hangs after showing the following text:

U-Boot SPL 2013.10-tld-4 (Sep 07 2014 - 14:10:12)
  Boot device: NAND
Attempting to set PLLA to 850 MHz ...
  plla_ctrl0 : 0000020a
  plla_ctrl1 : 00330000
  plla_ctrl2 : 0065008b
  plla_ctrl3 : 000000f1

PLLA Set


U-Boot 2015.10-tld-1 (Nov 21 2015 - 01:17:59 -0800)
OXNAS OX820

DRAM:  128 MiB
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   dwmac.40400000
Hit any key to stop autoboot:  0 

Reset IDE: Bus 0: OK 
  Device 0: Model: FUJITSU MHZ2250BH G1 Firm: 0040020C Ser#: K61DT942DF7V
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 238475.1 MB = 232.8 GB (488397168 x 512)
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Partition Map for IDE device 0  --   Partition Type: DOS

Part	Start Sector	Num Sectors	UUID		Type
  1	2048      	478150656 	a68080b4-01	83
  2	478152704 	10244464  	a68080b4-02	82
loading envs from ide 0 ...
** File not found /boot/uEnv.txt **

no USB devices available
running scan_disk ...
Scan device ide

Reset IDE: Bus 0: OK 
  Device 0: Model: FUJITSU MHZ2250BH G1 Firm: 0040020C Ser#: K61DT942DF7V
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 238475.1 MB = 232.8 GB (488397168 x 512)
device ide 0:1
1 bytes read in 92 ms (0 Bytes/s)
Found bootable drive on ide 0
loading uImage ...
4619104 bytes read in 3514 ms (1.3 MiB/s)
loading uInitrd ...
4236902 bytes read in 3155 ms (1.3 MiB/s)
loading DTB /boot/dts/ox820-pogoplug-pro.dtb ...
7067 bytes read in 97 ms (70.3 KiB/s)
## Booting kernel from Legacy Image at 60500000 ...
   Image Name:   Linux-4.4.79-oxnas-tld-1
   Created:      2017-08-06  20:40:20 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4619040 Bytes = 4.4 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 60e00000 ...
   Image Name:   initramfs-4.4.79-oxnas-tld-1
   Created:      2017-08-06  20:40:26 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    4236838 Bytes = 4 MiB
   Load Address: 60000000
   Entry Point:  60000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 62c00000
   Booting using the fdt blob at 0x62c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 67a21000, end 67e2b626 ... OK
   Loading Device Tree to 67a1c000, end 67a20b9a ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

I also noted that the updated installation instructions append the appropriate flattened device tree image to the end of the kernel, but I don't know if that's really necessary. My Pogo's u-boot loads the .dtb file off the boot device, as shown above, so why does it need to be included in the kernel image loaded by u-boot? I tried booting the Pogo with a kernel image with the .dtb file appended to it and with a kernel image without the .dtb file appended to it and both times my Pogo failed to boot.



Edited 1 time(s). Last edit at 08/06/2017 04:50PM by bodhi.
Re: Linux Kernel 4.4.79 Oxnas (OX820) Pogo V3 package and Debian rootfs
August 06, 2017 04:49PM
multiplex'd,

> I also noted that the updated installation instruc
> tions append the appropriate flattened device tree
> image to the end of the kernel, but I don't know i
> f that's really necessary. My Pogo's u-boot loads
> the .dtb file off the boot device, as shown above,
> so why does it need to be included in the kernel i
> mage loaded by u-boot?

No, it does not need to be appended in uImage if you have new u-boot. This is the last full kernel installation instruction for linux-4.4.38-oxnas-tld-5. Later I just refered to previous installation, since the only thing change was the kernel version.


Quote

Updated 12 Dec 2016:

Kernel linux-4.4.38-oxnas-tld-5 package was uploaded.

Warning: This kernel has grown too big, so it will not work for stock u-boot or its Arch u-boot variant. Stock u-boot has a limitation of 4M uImage, so it will not boot. Please stay with kernel 3.18.5 if you're still booting with stock u-boot. The new u-boot works without limitation.

Credits: Thanks Daniel Golle (LEDE) for the updated patches, and Neil Armstrong for upstreaming activities. I've incorporated the code and ideas from both of these sources to build this kernel.

Latest Linux kernel 4.x general release information can be found at:
LinuxChanges log

Download at Dropbox

linux-4.4.38-oxnas-tld-5.bodhi.tar.bz2
md5:
663df6cee6f8124d829051d0e75c5592
sha256:
300810b969a8282c1b6df9e08a3434a8b826c6fa4796bc8917f42f8bfc9fea44


This tarball contains 6 files:

linux-image-4.4.38-oxnas-tld-5_5_armel.deb
linux-headers-4.4.38-oxnas-tld-5_5_armel.deb
config-4.4.38-oxnas-tld-5
zImage-4.4.38-oxnas-tld-5
linux-dtb-4.4.38-oxnas-tld-5.tar
linux-4.4.38-oxnas-tld-5.patch


INSTALLATION:

A. Installation to run with new U-Boot in NAND (see new U-Boot thread here)

1. Backup your current uImage and uInitrd and other kernel files. In the /boot directory, these are files for your current kernel (xx.xx.xx is the version number):

uInitrd
uImage
initrd.img-xx.xx.xx-xxx
System.map-xx.xx.xx-xxx
vmlinuz-xx.xx.xx-xxx
config-xx.xx.xx-xxx

2. Extract the kernel in the archive:
cd /boot
tar -xjf linux-4.4.38-oxnas-tld-5.bodhi.tar.bz2

3. Extract the dts tarball for the dtb files
cd /boot
tar -xf linux-dtb-4.4.38-oxnas-tld-5.tar

4. And install it with dpkg. If you encounter error with flash-kernel when running dpkg, then remove flash-kernel first to avoid potential problem (It is much better to generate uImage and uInitrd manually anyway):
cd /boot
apt-get remove flash-kernel
dpkg -i linux-image-4.4.38-oxnas-tld-5_5_armel.deb

5. Create uImage and uInitrd manually:
cd /boot
mv uImage uImage.bak
mv uInitrd uInitrd.bak
mkimage -A arm -O linux -T kernel -C none -a 0x60008000 -e 0x60008000 -n Linux-4.4.38-oxnas-tld-5 -d vmlinuz-4.4.38-oxnas-tld-5 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x60000000 -e 0x60000000 -n initramfs-4.4.38-oxnas-tld-5 -d initrd.img-4.4.38-oxnas-tld-5 uInitrd

6. Setup U-Boot envs:

Note: you must have the latest U-Boot (e.g. 2013.10 and later) installed to do this step.

If you have the Pogo Pro (with PCI) then there is no need to adjust the DTB variable. If you have other boxes such as the Pogo Classic (no PCI), then adjust the DTB name. Other envs in the default can be adjusted later after booted into Debian.

fw_setenv dtb_file '/boot/dts/ox820-pogoplug-classic.dtb'

Note: DTBs for supported and potentially support boxes:
ox820-pogoplug-pro.dtb
ox820-kd20.dtb
ox820-akitio.dtb
ox820-pogoplug-classic.dtb
ox820-stg212.dtb


7. Sync. Double check your u-boot envs, make sure there is no error. And reboot
sync
fw_printenv
reboot

B. Installation to run with stock U-Boot in NAND

This method is deprecated due to the kernel 4.0 Oxnas size and stock u-boot limitation. Please see kernel linux-3.18.5-oxnas-tld-1for instruction to install that kernel version if you are still running stock u-boot.

DONE.


What you must have looked at was the rootfs installation instruction. In rootfs installation instruction it also said you should skip the step about appending DTB if running new u-boot:


Quote

4. Create uImage with embedded DTB for booting with stock u-boot. Skip this step if you have installed the latest released uboot for OXNAS, or are installing this u-boot at the same time.

=======

Something in your rootfs is not rigtht, the quickest way to see where it stopped is to add a parameter to kernel bootargs: earlyprintk=serial.

Power up, interrupt serial console and

setenv custom_params 'earlyprintk=serial'
and then
boot

Please post serial console log here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 4.4.79 Oxnas (OX820) Pogo V3 package and Debian rootfs
August 07, 2017 10:18AM
bodhi,

bodhi Wrote:
-------------------------------------------------------
> What you must have looked at was the rootfs ins
> tallation instruction
. In rootfs installation
> instruction it also said you should skip the step
> about appending DTB if running new u-boot:
>
> <snip>

Yes, I misread the instructions - my mistake.

> Something in your rootfs is not rigtht, the quickest
> way to see where it stopped is to add a parameter
> to kernel bootargs: earlyprintk=serial.
>
> <snip>

Strangely, my Pogo now boots okay using the most recent kernel. I have tried rebooting it several times and I cannot reproduce the boot failure I observed yesterday. I will post in this thread again if I have any more boot issues with this kernel.
Re: Problem booting Linux Kernel 4.4.79 Oxnas (OX820) Pogo V3
August 07, 2017 04:32PM
> Strangely, my Pogo now boots okay using the most r
> ecent kernel. I have tried rebooting it several ti
> mes and I cannot reproduce the boot failure I obse
> rved yesterday.

Cool!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
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: