LS2085ARDB How to boot upstream kernel

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LS2085ARDB How to boot upstream kernel

Jump to solution
2,635 Views
tylerbaker
Contributor I

Hi,

I've recently received a LS2085ardb board, but cannot seem to find the documentation on how to build a kernel.

I've flashed the lastest mainline u-boot and can tftp binaries into memory. However from looking at the u-boot environment, it seems it wants a FIT image?

So my questions are as follows:

1) How can I create a bootable FIT image from upstream sources? (fsl-ls2085a-simu.dtb)

2) Is there a way to boot a kernel and dtb without creating a FIT image?

Thanks in advance,

Tyler

0 Kudos
1 Solution
974 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Tyler Baker,

First I suggest you install the Linux SDK for LS2085ARDB, because you need to generate rootfs image with the Yocto Linux SDK.  The FIT image includes Linux Kernel image, device tree and rootfs filesystem. You could generate Kernel uncompressed image and dtb file via building the upstream Kernel, and use the prebuilt rootfs image from the LS2085 IMAGE ISO, if you don't want to customize the rootfs.

I assume that you already have Image-ls2085ardb.bin, Image-fsl-ls2085a-rdb.dtb and sl-image-core-ls2085ardb.ext2.gz, the attached is FIT configuration file, please replace "./arch/arm64/boot/Image.gz", ."/arch/arm64/boot/dts/freescale/fsl-ls2085a-rdb.dtb" and "./fsl-image-ls2085ardb.ext2.gz" with your images path and use the following command to generate to generate the FIT image kernel.itb.

$ mkimage -f kernel-rdb.its kernel.itb

In addition, the development team is discussing to use uImage, dts file and separate rootfs to boot the system LS2085, but this is not totally ready for customers now, probably you could use this solution in the future.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

2 Replies
975 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Tyler Baker,

First I suggest you install the Linux SDK for LS2085ARDB, because you need to generate rootfs image with the Yocto Linux SDK.  The FIT image includes Linux Kernel image, device tree and rootfs filesystem. You could generate Kernel uncompressed image and dtb file via building the upstream Kernel, and use the prebuilt rootfs image from the LS2085 IMAGE ISO, if you don't want to customize the rootfs.

I assume that you already have Image-ls2085ardb.bin, Image-fsl-ls2085a-rdb.dtb and sl-image-core-ls2085ardb.ext2.gz, the attached is FIT configuration file, please replace "./arch/arm64/boot/Image.gz", ."/arch/arm64/boot/dts/freescale/fsl-ls2085a-rdb.dtb" and "./fsl-image-ls2085ardb.ext2.gz" with your images path and use the following command to generate to generate the FIT image kernel.itb.

$ mkimage -f kernel-rdb.its kernel.itb

In addition, the development team is discussing to use uImage, dts file and separate rootfs to boot the system LS2085, but this is not totally ready for customers now, probably you could use this solution in the future.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

974 Views
tylerbaker
Contributor I

Hi Yiping,

Thanks for providing this information, it has been a great help.

If you want to let your development team know, I've sorted out how to use uImage, ramdisk, and dtb separately. The instructions are as follows:

mkimage -A arm64 -O linux -T kernel -C none -a 0x80080000 -e 0x80080000 -d Image uImage

mkimage -A arm64 -T ramdisk -C none -d rootfs.cpio.gz rootfs.cpio.gz.uboot

setenv autoload no

dhcp

setenv serverip <TFTP SERVER IP>

tftp 0xa0000000 path/to/uImage

tftp 0x91000000 path/to/rootfs.cpio.gz.uboot

tftp 0x90000000 path/to/fsl-ls2085a-simu.dtb

setenv bootargs 'console=ttyS1,115200 earlycon=uart8250,mmio,0x21c0600 debug rw root=/dev/ram0 ip=dhcp'

bootm 0xa0000000 0x91000000 0x90000000

* snip * Here is the boot log.

U-Boot 2015.10-rc4 (Oct 02 2015 - 12:08:03 -0700)

SoC:  LS2085E (0x87010010)

Clock Configuration:

       CPU0(A57):1800 MHz  CPU1(A57):1800 MHz  CPU2(A57):1800 MHz 

       CPU3(A57):1800 MHz  CPU4(A57):1800 MHz  CPU5(A57):1800 MHz 

       CPU6(A57):1800 MHz  CPU7(A57):1800 MHz 

       Bus:      600  MHz  DDR:      1866.667 MT/s     DP-DDR:   1600 MT/s

Reset Configuration Word (RCW):

       00: 48303830 48480048 00000000 00000000

       10: 00000000 00200000 00200000 00000000

       20: 00c12980 00002580 00000000 00000000

       30: 00000e0b 00000000 00000000 00000000

       40: 00000000 00000000 00000000 00000000

       50: 00000000 00000000 00000000 00000000

       60: 00000000 00000000 00027000 00000000

       70: 412a0000 00000000 00000000 00000000

Model: Freescale Layerscape 2085a RDB Board

Board: LS2085E-RDB, Board Arch: V1, Board version: D, boot from vBank: 4

FPGA: v1.18

SERDES1 Reference : Clock1 = 156.25MHz Clock2 = 156.25MHz

SERDES2 Reference : Clock1 = 100MHz Clock2 = 100MHz

I2C:   ready

DRAM:  Initializing DDR....using SPD

Detected UDIMM 18ASF1G72AZ-2G1A1

Detected UDIMM 18ASF1G72AZ-2G1A1

DP-DDR:  Detected UDIMM 18ASF1G72AZ-2G1A1

19.5 GiB

DDR    15.5 GiB (DDR4, 64-bit, CL=13, ECC on)

       DDR Controller Interleaving Mode: 256B

       DDR Chip-Select Interleaving Mode: CS0+CS1

DP-DDR 4 GiB (DDR4, 32-bit, CL=11, ECC on)

       DDR Chip-Select Interleaving Mode: CS0+CS1

Waking secondary cores to start from fff14000

All (8) cores are up.

Using SERDES1 Protocol: 42 (0x2a)

Using SERDES2 Protocol: 65 (0x41)

Flash: 128 MiB

NAND:  2048 MiB

MMC:   FSL_SDHC: 0

EEPROM: Invalid ID (ff ff ff ff)

PCIe1: disabled

PCIe2: disabled

PCIe3: Root Complex x1 gen1, regs @ 0x3600000

PCI:

     01:00.0    - 8086:10d3 - Network controller

PCIe3: Bus 00 - 01

PCIe4: Root Complex no link, regs @ 0x3700000

In:    serial

Out:   serial

Err:   serial

Debug Server FW: Not a FIT image

Net:   crc32+

fsl-mc: Booting Management Complex ... SUCCESS

fsl-mc: ERROR: Firmware major version mismatch (found: 7, expected: 8)

fsl-mc: Update the Management Complex firmware

e1000: 68:05:ca:36:9d:90

       e1000#0 [PRIME]

Warning: e1000#0 MAC addresses don't match:

Address in SROM is         68:05:ca:36:9d:90

Address in environment is  68:05:ca:12:6e:67

    0

setenv autoload no

setenv initrd_high '0xffffffff'

setenv fdt_high '0xffffffff'

setenv kernel_addr_r '0xa0000000'

setenv initrd_addr_r '0x91000000'

setenv fdt_addr_r '0x90000000'

setenv loadkernel 'tftp ${kernel_addr_r} tmpiBUj7T/uImage'

setenv loadinitrd 'tftp ${initrd_addr_r} tmpiBUj7T/ramdisk.cpio.gz.uboot; setenv initrd_size ${filesize}'

setenv loadfdt 'tftp ${fdt_addr_r} tmpiBUj7T/fsl-ls2085a-simu.dtb'

setenv bootargs 'console=ttyS1,115200 earlycon=uart8250,mmio,0x21c0600 debug rw root=/dev/ram0 ip=dhcp'

setenv bootcmd 'dhcp; setenv serverip 192.168.1.34; run loadkernel; run loadinitrd; run loadfdt; bootm ${kernel_addr_r} ${initrd_addr_r} ${fdt_addr_r}'

boot

BOOTP broadcast 1

BOOTP broadcast 2

BOOTP broadcast 3

BOOTP broadcast 4

DHCP client bound to address 192.168.1.170 (1759 ms)

Using e1000#0 device

TFTP from server 192.168.1.34; our IP address is 192.168.1.170

Filename 'tmpiBUj7T/uImage'.

Load address: 0xa0000000

Loading: * T #################################################################

  #################################################################

  #################################################################

  #################################################################

  #################################################################

  #################################################################

  #################################################################

  #################################################################

  #################################################################

  ##################

  1.5 MiB/s

done

Bytes transferred = 8848960 (870640 hex)

Using e1000#0 device

TFTP from server 192.168.1.34; our IP address is 192.168.1.170

Filename 'tmpiBUj7T/ramdisk.cpio.gz.uboot'.

Load address: 0x91000000

Loading: * T #################################################################

  #################################################################

  #################################################################

  #################################################################

  #################################################################

  #######################################

  955.1 KiB/s

done

Bytes transferred = 5330194 (515512 hex)

Using e1000#0 device

TFTP from server 192.168.1.34; our IP address is 192.168.1.170

Filename 'tmpiBUj7T/fsl-ls2085a-simu.dtb'.

Load address: 0x90000000

Loading: * T #

  0 Bytes/s

done

Bytes transferred = 1944 (798 hex)

## Booting kernel from Legacy Image at a0000000 ...

   Image Name:  

   Created:      2015-10-09  22:44:05 UTC

   Image Type:   AArch64 Linux Kernel Image (uncompressed)

   Data Size:    8848896 Bytes = 8.4 MiB

   Load Address: 80080000

   Entry Point:  80080000

   Verifying Checksum ... OK

## Loading init Ramdisk from Legacy Image at 91000000 ...

   Image Name:  

   Created:      2015-10-09  22:44:12 UTC

   Image Type:   AArch64 Linux RAMDisk Image (uncompressed)

   Data Size:    5330130 Bytes = 5.1 MiB

   Load Address: 00000000

   Entry Point:  00000000

   Verifying Checksum ... OK

## Flattened Device Tree blob at 90000000

   Booting using the fdt blob at 0x90000000

   Loading Kernel Image ... OK

   Loading Ramdisk to ff7f7000, end ffd0c4d2 ... OK

   Loading Device Tree to 00000000ff7f3000, end 00000000ff7f6797 ... OK

fdt_fixup_smmu: WARNING: no SMMU node found

Starting kernel ...

Booting Linux on physical CPU 0x0

Initializing cgroup subsys cpu

ion 4.8.3 20140401 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2014.04 - Linaro GCC 4.8-2014.04) ) #1 SMP PREEMPT Sun Oct 4 18:51:53 CEST 2015

CPU: AArch64 Processor [411fd071] revision 1

Detected PIPT I-cache on CPU0

alternatives: enabling workaround for ARM erratum 832075

alternatives: detected feature: GIC system register CPU interface

Ignoring memory block 0x8080000000 - 0x83e0000000

earlycon: Early serial console at MMIO 0x21c0600 (options '')

bootconsole [uart0] enabled

efi: Getting EFI parameters from FDT:

efi: UEFI not found.

cma: Reserved 16 MiB at 0x00000000fe400000

On node 0 totalpages: 524288

  DMA zone: 8192 pages used for memmap

  DMA zone: 0 pages reserved

  DMA zone: 524288 pages, LIFO batch:31

PERCPU: Embedded 15 pages/cpu @ffffffc07ff72000 s24064 r8192 d29184 u61440

pcpu-alloc: s24064 r8192 d29184 u61440 alloc=15*4096

pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [0] 4 [0] 5 [0] 6 [0] 7

Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 516096

Kernel command line: console=ttyS1,115200 earlycon=uart8250,mmio,0x21c0600 debug rw root=/dev/ram0 ip=dhcp

log_buf_len individual max cpu contribution: 4096 bytes

log_buf_len total cpu_extra contributions: 28672 bytes

log_buf_len min size: 16384 bytes

log_buf_len: 65536 bytes

early log buf free: 14608(89%)

PID hash table entries: 4096 (order: 3, 32768 bytes)

Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)

Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)

software IO TLB [mem 0xf8600000-0xfc600000] (64MB) mapped at [ffffffc078600000-ffffffc07c5fffff]

Memory: 1964236K/2097152K available (5333K kernel code, 469K rwdata, 2252K rodata, 512K init, 204K bss, 116532K reserved, 16384K cma-reserved)

Virtual kernel memory layout:

    vmalloc : 0xffffff8000000000 - 0xffffffbdbfff0000   (   246 GB)

    vmemmap : 0xffffffbdc0000000 - 0xffffffbfc0000000   (     8 GB maximum)

              0xffffffbdc2000000 - 0xffffffbdc4000000   (    32 MB actual)

    fixed   : 0xffffffbffa7fd000 - 0xffffffbffac00000   (  4108 KB)

    PCI I/O : 0xffffffbffae00000 - 0xffffffbffbe00000   (    16 MB)

    modules : 0xffffffbffc000000 - 0xffffffc000000000   (    64 MB)

    memory  : 0xffffffc000000000 - 0xffffffc080000000   (  2048 MB)

      .init : 0xffffffc0007eb000 - 0xffffffc00086b000   (   512 KB)

      .text : 0xffffffc000080000 - 0xffffffc0007ea484   (  7594 KB)

      .data : 0xffffffc00087b000 - 0xffffffc0008f0600   (   470 KB)

SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1

Preemptible hierarchical RCU implementation.

  Build-time adjustment of leaf fanout to 64.

  RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=8.

RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=8

NR_IRQS:64 nr_irqs:64 0

GIC: Using split EOI/Deactivate mode

ITS: No ITS available, not enabling LPIs

CPU0: found redistributor 0 region 0:0x0000000006100000

Architected cp15 timer(s) running at 25.00MHz (phys).

clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x5c40939b5, max_idle_ns: 440795202646 ns

sched_clock: 56 bits at 25MHz, resolution 40ns, wraps every 4398046511100ns

Console: colour dummy device 80x25

Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000)

pid_max: default: 32768 minimum: 301

Security Framework initialized

Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)

Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)

Initializing cgroup subsys memory

Initializing cgroup subsys hugetlb

hw perfevents: enabled with arm/armv8-pmuv3 PMU driver, 7 counters available

EFI services will not be available.

CPU1: Booted secondary processor

Detected PIPT I-cache on CPU1

CPU1: found redistributor 1 region 0:0x0000000006120000

CPU2: Booted secondary processor

Detected PIPT I-cache on CPU2

CPU2: found redistributor 100 region 0:0x0000000006140000

CPU3: Booted secondary processor

Detected PIPT I-cache on CPU3

CPU3: found redistributor 101 region 0:0x0000000006160000

CPU4: Booted secondary processor

Detected PIPT I-cache on CPU4

CPU4: found redistributor 200 region 0:0x0000000006180000

CPU5: Booted secondary processor

Detected PIPT I-cache on CPU5

CPU5: found redistributor 201 region 0:0x00000000061a0000

CPU6: Booted secondary processor

Detected PIPT I-cache on CPU6

CPU6: found redistributor 300 region 0:0x00000000061c0000

CPU7: Booted secondary processor

Detected PIPT I-cache on CPU7

CPU7: found redistributor 301 region 0:0x00000000061e0000

Brought up 8 CPUs

SMP: Total of 8 processors activated.

CPU: All CPU(s) started at EL2

alternatives: patching kernel code

devtmpfs: initialized

DMI not present or invalid.

clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns

pinctrl core: initialized pinctrl subsystem

NET: Registered protocol family 16

cpuidle: using governor ladder

cpuidle: using governor menu

vdso: 2 pages (1 code @ ffffffc000881000, 1 data @ ffffffc000880000)

hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.

DMA: preallocated 256 KiB pool for atomic allocations

Serial: AMBA PL011 UART driver

vgaarb: loaded

SCSI subsystem initialized

libata version 3.00 loaded.

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

dmi: Firmware registration failed.

clocksource: Switched to clocksource arch_sys_counter

NET: Registered protocol family 2

TCP established hash table entries: 16384 (order: 5, 131072 bytes)

TCP bind hash table entries: 16384 (order: 6, 262144 bytes)

TCP: Hash tables configured (established 16384 bind 16384)

UDP hash table entries: 1024 (order: 3, 32768 bytes)

UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)

NET: Registered protocol family 1

RPC: Registered named UNIX socket transport module.

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

RPC: Registered tcp NFSv4.1 backchannel transport module.

PCI: CLS 0 bytes, default 64

Unpacking initramfs...

Freeing initrd memory: 5204K (ffffffc07f7f7000 - ffffffc07fd0c000)

kvm [1]: GICv3: no GICV resource entry

kvm [1]: disabling GICv2 emulation

kvm [1]: interrupt-controller@ffffffc0000a9f2c IRQ5

kvm [1]: timer IRQ3

kvm [1]: Hyp mode initialized successfully

futex hash table entries: 2048 (order: 5, 131072 bytes)

audit: initializing netlink subsys (disabled)

audit: type=2000 audit(0.820:1): initialized

HugeTLB registered 2 MB page size, pre-allocated 0 pages

VFS: Disk quotas dquot_6.6.0

VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)

NFS: Registering the id_resolver key type

Key type id_resolver registered

Key type id_legacy registered

fuse init (API version 7.23)

9p: Installing v9fs 9p2000 file system support

io scheduler noop registered

io scheduler cfq registered (default)

Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled

msm_serial: driver initialized

21c0500.serial: ttyS0 at MMIO 0x21c0500 (irq = 6, base_baud = 18750000) is a 16550A

console [ttyS1] disabled

21c0600.serial: ttyS1 at MMIO 0x21c0600 (irq = 6, base_baud = 18750000) is a 16550A

console [ttyS1] enabled

console [ttyS1] enabled

bootconsole [uart0] disabled

bootconsole [uart0] disabled

Unable to detect cache hierarchy from DT for CPU 0

loop: module loaded

tun: Universal TUN/TAP device driver, 1.6

tun: (C) 1999-2004 Max Krasnyansky

sky2: driver version 1.30

smc91x: not found (-19).

ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

ehci-pci: EHCI PCI platform driver

ehci-platform: EHCI generic platform driver

ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver

ohci-pci: OHCI PCI platform driver

ohci-platform: OHCI generic platform driver

usbcore: registered new interface driver usb-storage

mousedev: PS/2 mouse device common for all mice

sdhci: Secure Digital Host Controller Interface driver

sdhci: Copyright(c) Pierre Ossman

sdhci-pltfm: SDHCI platform and OF driver helper

ledtrig-cpu: registered to indicate activity on CPUs

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

NET: Registered protocol family 17

9pnet: Installing 9P2000 support

Key type dns_resolver registered

registered taskstats version 1

hctosys: unable to open rtc device (rtc0)

086b000)

Freeing alternatives memory: 44K (ffffffc00086b000 - ffffffc000876000)

Starting logging: OK

Populating /dev using udev: udevd[723]: starting version 2.1.1

random: udevd urandom read with 1 bits of entropy available

done

Initializing random number generator... done.

Starting network...

Starting dropbear sshd: OK

/bin/sh: can't access tty; job control turned off

* snip *

Thanks much!

Tyler

0 Kudos