LSDK 19.09 BSP for FRWY-LS1012A does not boot

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LSDK 19.09 BSP for FRWY-LS1012A does not boot

2,666 次查看
hunterm522
Contributor I

I have spent the few days trying to get the latest Layerscape SDK (LSDK 19.09) BSP to boot on my FRWY-LS1012A dev board but have been unsuccessful. I have flashed the composite firmware to QSPI flash, flashed micro SD card, and uboot boots but Linux will fail to mount rootfs at some point and panics. It looks like it fails when Linux kernel tries to access the micro SD card and throws several errors when trying to mount rootfs (see attached log).

When I first received the board, I tried the pre-built images following `FRWY-LS1012AGSG.pdf` instructions (LSDK 17.12 it looks like) and can successfully boot into the BSP ubuntu rootfs. But for some reason, I cannot get the latest LSDK versions to work.

I am beginning to think either FRWY-LS1012A is not supported by NXP's LSDK anymore, I have a faulty board, or I completely missed something. Hopefully someone here can help me out. 

Here's what I have tried:

  • Using 2 different USB SD card readers and a micro SD to SD card adapter
  • Using a different computer (laptop with SD card slot)
  • Using 4 different kinds of micro SD cards
    • SanDisk Ultra 32GB Class 10 UHS-1
    • SanDisk Industrial 32GB Class 10 UHS-1
    • SanDisk Ultra 16GB Class 10 UHS-1
      • Coincidentally, I have the same exact model specified in `FRWY-LS1012AGSG.pdf` page 16
    • SanDisk Extreme 16GB Class 10 UHS-1
  • Tried `FRWY-LS1012AGSG.pdf` instructions (17.12 it looks like)
    • Tried pre-built method
      •  This WORKS
    • Tried building images manually using flexbuild
      • This will fail to build because of old URLs used in some packages/components that are built
  • Tried latest LSDK (19.09)
    • Tried pre-built images
    • Tried building images manually using flexbuild
      • Tried Ubuntu userland
      • Tried yocto:tiny userland
  • Tried LSDK 19.03
    • Tried pre-built images
    • Tried building images manually using flexbuild
  • Tried LSDK 18.06
    • Tried pre-built images
    • Tried building images manually using flexbuild

Host system info:


OS: Fedora 31 (Workstation Edition) x86_64 (NOTE I use the docker image provided in the LSDK)
Kernel: 5.5.7-200.fc31.x86_64
Shell: zsh 5.7.1
Docker version 19.03.7, build 7141c199a2
TFTP server using docker `pghalliday/tftp`

I have also tried this on a Laptop using Ubuntu 18.04 live CD, and a VMWare virtual machine running Ubuntu 18.04.

Target system info:

FRWY-LS1012A-PB
PSU: Meanwell GST25U05-PJ1 (5V, 4A; recommended from `FRWY-LS1012AGSG.pdf`)

Purchased from Mouser on Feb 22, 2020

Stickers on bottom:
SCH-32169 REV C
700-32169 REV X2

PCB trace on bottom:
170-32169 REV C

I assume then I have REV C. I also noticed that this board has 512MB DDR3L RAM (Micron), but all of the provided documentation (`FRWY-LS1012AGSG.pdf`, `FRWY-LS1012ARM.pdf`, and `FRWY-LS1012A-PA-DF`) call out Kingston 1GB DDR3L RAM. I assume then that all of that documentation found on https://www.nxp.com/design/qoriq-developer-resources/layerscape-frwy-ls1012a-board:FRWY-LS1012A is for a REV A? Where can I find the documentation and design files that matches my board (REV C)?

Attached

I have attached a few full boot logs (uboot + linux) and the commands that I ran.

标签 (1)
0 项奖励
回复
10 回复数

2,369 次查看
yipingwang
NXP TechSupport
NXP TechSupport

On your host PC, in LSDK1909, please run the following command to deploy image to SD card.

$ flex-installer -b bootpartition_LS_arm64_lts_4.19.tgz -r ubuntu_xenial_arm64_rootfs_202003072137.tgz -f
firmware_ls1012afrwy_uboot_sdboot.img -d /dev/mmcblk0

Please configure bootargs as the following under u-boot prompt on the target board.

setenv bootargs "console=ttyS0,115200 earlycon=uart8250,mmio,0x21c0500 root=/dev/mmcblk0p4  rw rootwait"

0 项奖励
回复

2,369 次查看
hunterm522
Contributor I

HI Yiping,

I tried what you asked but that didn't work.‍

Running:

flex-installer -b bootpartition_LS_arm64_lts_4.19.tgz -r ubuntu_xenial_arm64_rootfs_202003072137.tgz -f firmware_ls1012afrwy_uboot_sdboot.img -d /dev/sdd

Produces this error:

Not found bootpartition_LS_arm64_lts_4.19.tgz‍

I tried again but this time I added `-i auto -m ls1012afrwy` options since I saw that in the LSDK user guide to auto-download those files:

flex-installer -i auto -m ls1012afrwy -b bootpartition_LS_arm64_lts_4.19.tgz -r ubuntu_xenial_arm64_rootfs_202003072137.tgz -f firmware_ls1012afrwy_uboot_sdboot.img -d /dev/sdd

But that produces this error:

Installing system rootfs partition, please wait ...
format unknown is not supported

I then tried removing `-r ubuntu_xenial_arm64_rootfs_202003072137.tgz` option. This was able to flash the SD card OK (although uses rootfs_lsdk1909_LS_arm64_main.tgz  instead of ubuntu_xenial_arm64_rootfs_202003072137.tgz). I then set the uboot bootargs variable like you said but produced the same kernel panic as before. 

I've attached a full log showing what I did.

EDIT: forgot to attach log

0 项奖励
回复

2,369 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Rootfs is not deployed in SD card, probably there is problem in ubuntu_xenial_arm64_rootfs_202003072137.tgz.

Please download rootfs rootfs_lsdk2003_ubuntu_lite_arm64.tgz from https://drive.google.com/open?id=1aaW9raM-VZBTi_sUFbWBwaT1QXMe2zzi 

flex-installer -b bootpartition_LS_arm64_lts_4.19.tgz -r rootfs rootfs_lsdk2003_ubuntu_lite_arm64.tgz  -f firmware_ls1012afrwy_uboot_sdboot.img -d /dev/sdd

Under u-boot prompt, please run the following commands

=>setenv bootargs "console=ttyS0,115200 earlycon=uart8250,mmio,0x21c0500 root=/dev/mmcblk0p4  rw rootwait"

=>saveenv

If the above works, please generate Ubuntu-based main rootfs with the following commands.

$ flex-builder -i mkrfs -r ubuntu:main

0 项奖励
回复

2,370 次查看
hunterm522
Contributor I

Ok I downloaded rootfs_lsdk2003_ubuntu_lite_arm64.tgz from the link you provided and ran the flex-installer command you provided. That flashed to SD card OK. I ran the uboot commands like you asked, inserted SD card, then reset the board. Still does not work...linux kernel panics like before.

I tried two different uSD cards and two different USB card readers just to be sure.

0 项奖励
回复

2,370 次查看
yipingwang
NXP TechSupport
NXP TechSupport

In your log, bootargs  was saved in SPI flash not in SD CARD.

When you insert SD CARD enter into u-boot, please click "Enter" to go to u-boot prompt, then run the following commands

=>setenv bootargs "console=ttyS0,115200 earlycon=uart8250,mmio,0x21c0500 root=/dev/mmcblk0p4  rw rootwait"

=>saveenv

Then reset the target board to reboot.

0 项奖励
回复

2,370 次查看
hunterm522
Contributor I

I hope I understood you correctly. This time I inserted the SD card first and entered u-boot and ran the u-boot commands but it didn't work either.

Is u-boot supposed to save its environment to the SD card on the LS1012AFRWY board? All documentation says QSPI flash is the only boot source on that board (u-boot can only be loaded from QSPI, not SD card). I assume if this board loads u-boot from QSPI, then it must save its environment to QSPI.

Here's what I did:

  1. Unplug power and other cables from LS1012AFRWY target board
  2. Insert SD card into target board
  3. Plug micro USB cable into target board and host computer
  4. Plug power cable into target board
  5. Open up serial console on host PC
  6. Hit ENTER to go into u-boot prompt
  7. set bootargs variable
  8. saveenv
    1. It still saves environment to SPI flash
  9. Reset target board (RESET button)
  10. U-boot loads, Linux loads then kernel panics

At this point I reflashed the SD card and tried again:

  1. Re-download LSDK1909 and rootfs_lsdk2003_ubuntu_lite_arm64.tgz
  2. Re-flash SD card using flex-installer
  3. Unmount and eject SD card from host computer
  4. Follow above steps 1-10
0 项奖励
回复

2,370 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Would you please use "pri" command to print you u-boot environment?

0 项奖励
回复

2,370 次查看
hunterm522
Contributor I

=> pri
arch=arm
baudrate=115200
board=ls1012afrdm
board_name=ls1012afrdm
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; env exists secureboot && load ${devtype} ${devnum}:${distro_bootpart} ${scripthdraddr} ${prefix}${boot_script_hdr}; env exists secureboot && esbc_validate ${scripthdraddr};source ${scriptaddr}
boot_efi_binary=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr ${fdtcontroladdr};fi;load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootaa64.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_net_pci_enum=pci enum
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_script_hdr=hdr_ls1012afrwy_bs.out
boot_scripts=ls1012afrwy_boot.scr
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=mmc0 usb0
bootargs=console=ttyS0,115200 earlycon=uart8250,mmio,0x21c0500 root=/dev/mmcblk0p4 rw rootwait
bootcmd=pfe stop; run distro_bootcmd; run sd_bootcmd; env exists secureboot && esbc_halt;
bootcmd_mmc0=devnum=0; run mmc_boot
bootcmd_usb0=devnum=0; run usb_boot
bootdelay=10
console=ttyS0,115200
cpu=armv8
distro_bootcmd=scsi_need_init=; for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
eth1addr=00:04:9f:05:ce:24
ethaddr=00:04:9f:05:ce:23
fdt_addr=0x00f00000
fdt_addr_r=0x90000000
fdt_high=0xffffffffffffffff
fdtcontroladdr=b7b14fa0
fdtheader_addr_r=0x80100000
initrd_high=0xffffffffffffffff
installer=load mmc 0:2 $load_addr /flex_installer_arm64.itb; bootm $load_addr#$board
ipaddr=192.168.2.2
kernel_addr=0x01000000
kernel_addr_r=0x81000000
kernel_addr_sd=0x8000
kernel_size=0x2800000
kernel_size_sd=0x16000
kernelhdr_addr_sd=0x4000
kernelhdr_size_sd=0x10
kernelheader_addr=0x1fc000
kernelheader_addr_r=0x80200000
kernelheader_size=0x40000
load_addr=0x96000000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
qspi_bootcmd=echo Trying load from qspi..;sf probe && sf read $load_addr $kernel_addr $kernel_size; env exists secureboot && sf read $kernelheader_addr_r $kernelheader_addr $kernelheader_size && esbc_validate ${kernelheader_addr_r}; bootm $load_addr#$board
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootaa64.efi; then echo Found EFI removable media binary efi/boot/bootaa64.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x80000000
scripthdraddr=0x80080000
scsi_boot=run scsi_init; if scsi dev ${devnum}; then devtype=scsi; run scan_dev_for_boot_part; fi
scsi_init=if ${scsi_need_init}; then scsi_need_init=false; scsi scan; fi
sd_bootcmd=echo Trying load from sd card..;mmcinfo; mmc read $load_addr $kernel_addr_sd $kernel_size_sd ;env exists secureboot && mmc read $kernelheader_addr_r $kernelhdr_addr_sd $kernelhdr_size_sd && esbc_validate ${kernelheader_addr_r};bootm $load_addr#$board
serverip=192.168.2.1
soc=fsl-layerscape
stderr=serial
stdin=serial
stdout=serial
usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi
vendor=freescale
verify=no

Environment size: 4416/65532 bytes

0 项奖励
回复

2,370 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Please configure the following command under u-boot

=>setenv bootcmd “ext2load mmc 0:2 0x81000000 Image; ext2load mmc 0:2 0x8f000000 fsl-ls1012a-rdb.dtb;booti 0x81000000 - 0x8f000000”

=>saveenv

0 项奖励
回复

2,370 次查看
hunterm522
Contributor I

Same thing, kernel panic

See attached log

0 项奖励
回复