User Tools

Site Tools


ls1043ardb:install

Installing Guinnux on the NXP LS1043A RDB

The installation procedure consists of 3 steps:

I am assuming that you have played with the LS1043A RDB a bit. It will be useful if you are familiar with booting into one of the many pre-installed u-boot loaders and that you have a spare SD card lying around that is >1GB.

These instructions are written for Linux.

Preparing the SD card

Firstly download the Guinnux boot images from the Guinnux site here and keep it in a handy location.

To prepare the SD card we will need to perform the following actions:

  • Create a new partition table with one partition;
  • Write u-boot and the ls1043 u-code binaries into the space before the partition table; and
  • Write the boot files into a newly created ext4 file system on the same SD card.

Partition Table

Create a brand new partition table on the SD card. Pay attention to where the first block is allocated as the binaries we will be putting onto the SD card are larger than the default space (2048 sectors). For example, with fdisk:

fdisk /dev/sdb

Replace 'dev/sdb' with the actual block device name of your SD card. You will now be dropped into the fdisk command prompt.

Next create a band new dos partition table using the 'o' command

Command (m for help): o
Created a new DOS disklabel with disk identifier 0x7e1d80a2.

Now we create a brand new partition using the 'n' command

Command (m for help): n

Pressing enter to accept all the defaults is in order until the location of the first sector is asked:<

Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): 

Using default response p.
Partition number (1-4, default 1): 

When prompted for the location of the first sector type 3000. This will leave enough space for the boot images.

First sector (2048-7759871, default 2048): 3000

It is now in order to select the default as the last sector as this will create a partition that fills the whole SD card.

Last sector, +sectors or +size{K,M,G,T,P} (3000-7759871, default 7759871): 

Created a new partition 1 of type 'Linux' and of size 3.7 GiB.

Now remember to write the new partition table to disk using the 'w' command.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

Boot Loader

Next the two boot images needs to be written to the SD card. I make use of the 'dd' utility for this. Take care to write to the correct location on the SD card using the offset argument.

First the u-boot boot loader to offset 8:

[root@lucy ref]# dd if=./u-boot-with-spl-pbl.bin of=/dev/sdb seek=8
1367+1 records in
1367+1 records out
700067 bytes (700 kB, 684 KiB) copied, 0.211835 s, 3.3 MB/s

And then the ls1043a u-code to offset 2080:

[root@lucy ref]# dd if=./fsl_fman_ucode_t2080_r1.1_108_4_5.bin of=/dev/sdb seek=2080
68+1 records in
68+1 records out
35252 bytes (35 kB, 34 KiB) copied, 0.0132634 s, 2.7 MB/s

Filesystem

Finally, the boot filesystem needs to created and the boot file copied onto it.

Create an ext4 filesystem on the SD card image.

[root@lucy ref]# mkfs.ext4 -O ^metadata_csum,^64bit /dev/sdb1
mke2fs 1.43.4 (31-Jan-2017)
Creating filesystem with 969609 4k blocks and 242880 inodes
Filesystem UUID: 445467a4-b6df-442d-ab48-43c136805dd3
Superblock backups stored on blocks: 
        32768, 65536, 98304, 131072, 163840, 196608, 229376, 262144, 294912, 
        327680, 360448, 393216, 425984, 458752, 491520, 524288, 557056, 589824, 
        622592, 655360, 688128, 720896, 753664, 786432, 819200, 851968, 884736, 
        917504, 950272

Allocating group tables: done                            
Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done 

The '-O ^metadata_csum,^64bit' option is necessary as u-boot is sometimes confused by some of the ext4 extended options.

Create a mount point and mount the newly create ext4 filesystem.

[root@lucy ref]# mkdir mnt

[root@lucy ref]# mount /dev/sdb1 ./mnt

Change directory into the mount point and extract the boot tar archive into this location.

[root@lucy ref]# cd ./mnt/

[root@lucy mnt]# tar -xf ../boot.tar.gz

Exit the directory and un-mount the SD card.

[root@lucy mnt]# cd ..

[root@lucy ref]# umount /dev/sdb1

The Guinnux boot image is now prepared

Installing Rescue Image

The Guinnux rescue image is used as a failover when a fully functional Guinnux system is not detected. The rescue system allows for a Guinnux installation to be recovered or a new Guinnux system to be installed. During this step the Guinnux rescue system will be flashed onto the on board SPI flash. The SPI flash is used as to not interfere with any of the other images that may be avalable on the RDB.

In order to acheive this, the u-boot loaded onto the SD card needs to be booted. Thus the SW4[1-8] and SW5[1] dip switches need to be setup like this: SW4[1-8]+SW5[1] = 0b'00100000_0 as per the LSS1043A RDB User Manual.

Now boot the u-boot image from the SD card and halt the autoboot:

U-Boot SPL 2016.01-19741-g7b0fea8-dirty (Oct 31 2016 - 16:53:48)
Initializing DDR....
Trying to boot from MMC


U-Boot 2016.01-19741-g7b0fea8-dirty (Oct 31 2016 - 16:53:48 +0200)

SoC:  unknown (0x87920410)
Clock Configuration:
       CPU0(A53):1600 MHz  CPU1(A53):1600 MHz  CPU2(A53):1600 MHz  
       CPU3(A53):1600 MHz  
       Bus:      400  MHz  DDR:      1600 MT/s  FMAN:     500  MHz
Reset Configuration Word (RCW):
       00000000: 08100010 0a000000 00000000 00000000
       00000010: 14550002 80004012 60040000 c1002000
       00000020: 00000000 00000000 00000000 00038800
       00000030: 00000000 00001100 00000096 00000001
I2C:   ready
Model: LS1043A RDB Board
Board: LS1043ARDB, boot from SD
CPLD:  V1.4
PCBA:  V3.0
SERDES Reference Clocks:
SD1_CLK1 = 156.25MHZ, SD1_CLK2 = 100.00MHZ
DRAM:  Detected UDIMM Fixed DDR on board
2 GiB (DDR4, 32-bit, CL=11, ECC off)
SEC0: RNG instantiated
PPA Firmware: Version 0.1
Using SERDES1 Protocol: 5205 (0x1455)
Flash: 128 MiB
NAND:  512 MiB
MMC:   FSL_SDHC: 0
*** Warning - bad CRC, using default environment

EEPROM: NXID v1
PCIe1: disabled
PCIe2: Root Complex no link, regs @ 0x3500000
PCIe3: Root Complex no link, regs @ 0x3600000
In:    serial
Out:   serial
Err:   serial
SCSI:  Error: SCSI Controller(s) 1B4B:9170 not found
Net:   
MMC read: dev # 0, block # 2080, count 128 ...
Fman1: Uploading microcode version 108.4.5
FM1@DTSEC1, FM1@DTSEC2, FM1@DTSEC3 [PRIME], FM1@DTSEC4, FM1@DTSEC5, FM1@DTSEC6, FM1@TGEC1
Hit any key to stop autoboot:  0 

Probe and erase the serial flash. The erase step will take some time.

=> sf probe 0
SF: Detected N25Q128 with page size 256 Bytes, erase size 64 KiB, total 16 MiB

=> sf erase 0 0x1000000
SF: 16777216 bytes @ 0x0 Erased: OK

Now load the rescue image from the SD card into RAM and write it to the SPI flash. This operation takes forever so maybe go get a cup of coffee in the meantime

=> ext4load mmc 0:1 0xa0000000 boot/rescue-aarch64.pacman.jffs2
13107200 bytes read in 3457 ms (3.6 MiB/s)

=> sf write 0xa0000000 0 $filesize
device 0 offset 0x0, size 0xc80000
SF: 13107200 bytes @ 0x0 Written: OK

The rescue system is now ready. Reset the board and boot into it.

=> reset
resetting ...

Installing Guinnux

The board should start now and boot into the Guinnux Rescue System. The board will need internet connectivity in order to install Guinnux. The Rescue System make use of eth2 i.e. RGMII1 for internet connectivity, thus connect this interface onto the LAN.

Login to the rescue system. User is root password is bigbang

Beginning login session...

rescue login: root
Password: 
rescue:~ # 
rescue:~ # 

Verify that the board has Internet connectivity. If needed, use nano to edit the /etc/network/interfaces file or the /etc/resolv.conf file to customise the network configuration to suit your networking environment.

Install Guinnux to the SD card by running the setup script. It is safe to answer yes to all questions.

rescue:~ # setup

Reboot the board when done

rescue:~ # reboot -f

The board should now boot the full blown Guinnux Aarch64 awesomeness. The user name and password for the full installation is also root / bigbang or default / remote for normal user access.

Point a web browser at the board and play with the Guinnux web configuration interface. Pretty much everything for the board can be configured from here. Have a look at the getting started pages for more things to do. For the more adventurous, download the Guinnux 5 Aarch64 toolchain and have a look at the How To pages in order to cross compile some applications for Guinnux

ls1043ardb/install.txt · Last modified: 2017/03/15 13:38 by ben