LS1043: root file system on Sata

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

LS1043: root file system on Sata

992 Views
john_reed
Contributor II

When booting from USB or booting from the SDcard, there is a boot script which executes:

              ls1043ardb_boot.scr

It's easy enough to extract the contents of this file to a .txt file, and then re-make the .scr using this:

mkimage -A arm64 -O linux -T script -C none -a 0 -e 0 -n "boot.scr" -d ls1043ardb_boot.txt ls1043ardb_boot.scr

I have done this, so that I can change the 'root=' parameter.     I have a SATA drive in the PCIE slot I'd like to use as the root file system.    I change the 'root=' parm to:

                  root=/dev/sda1

Where I have the standard root file system.

It works just fine!    Note that booting from usb is sort of a 2-step process where you 1st have to boot up from either Nor-flash or the SDcard, and then "run bootcmd_usb0".    

OK, here's the MILLION DOLLAR QUESTION:

             How can I boot from Nor-flash ( both u-boot and kernel ), and have root file system as SATA ???

Side question might be:    How to get a custom-built kernel in NOR-Flash on the LS1043ardb??

Seems simple enough, and I'm pretty adept at figuring these things out.     So far, no go.

JR

Labels (2)
Tags (1)
0 Kudos
2 Replies

942 Views
yipingwang
NXP TechSupport
NXP TechSupport

You could deploy images to the alternate bank at the current bank.

=>tftp 0xa0000000 bl2_nor.pbl

=>erase 0x64000000 +$filesize

=>cp.b 0xa0000000  0x64000000  $filesize

=>tftp 0xa0000000 fip.bin

=>erase 0x64100000 +$filesize

=>cp.b 0xa0000000 0x64100000 $filesize

=>tftp 0xa0000000 Image

=>erase 0x65000000+$filesize

=>cp.b 0xa0000000 0x65000000 $filesize

=>tftp 0xa0000000 fsl-ls1043a-rdb-sdk.dtb

=>erase 0x64F00000+$filesize

=>cp.b 0xa0000000 0x64F00000 $filesize

On your PC, in flex-builder build environment please execute the following command to download rootfs_lsdk2004_ubuntu_main_arm64.tgz.

$ flex-installer -i download -m ls1043ardb

Please boot up your target board with lsdk_linux_arm64_LS_tiny.itb, use "fdisk /dev/sda" to create one SATA partition, use "mke2fs /dev/sda1" to format SATA partition, and copy rootfs_lsdk2004_ubuntu_main_arm64.tgz to /dev/sda1 and decompress it.

Please configure bootargs as the following.

=>cpld reset altbank 

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

=>booti 0x61000000 - 0x60F00000

0 Kudos

942 Views
john_reed
Contributor II

fip.bin should be fip_uboot.bin

This mostly got me going in the right direction.    The final 'booti' command was failing with FDT_ERR_<SOMETHING> and "could not create node" or something to that effect.    (Sorry for the inaccurate error msgs).

I fiddled around awhile, and settled on basically the same booti sequence as the one from the sdcard.    Then I just copied kernel and dtb to the correct location.    Here is my booti command:

( note I hardcoded in the length of the images, which is a potential shortcoming )

bootnor=cp.b 0x61000000 0x81000000 0x2300000; cp.b 0x60F00000 0x90000000 0x8000; booti 0x81000000 - 0x90000000;

0 Kudos