Niagara 510: Updating x-loader and u-boot

From Define Wiki
Revision as of 09:14, 15 May 2014 by Jon (talk | contribs) (→‎Update the u-boot image)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

  • The Broadcom SOC uses a first stage boot loader called x-loader and this is called as soon as the unit powers on.
  • x-loader then calls and runs the second stage boot loader u-boot
  • x-loader exists on the first partition of the SD card
  • u-boot exists on the second partition (FAT FS) of the SD card

Updating x-loader

x-loader is provided with the IM510 SDK (version 2.3 in this case):

Jons-MacBook-Air-2:~ Jon$ cd Downloads/N511_Sdk23
Jons-MacBook-Air-2:N511_Sdk23 Jon$ tree
.
├── Binaries
│   ├── n511_225_xload.bin  # <-- This is the x-loader image
│   ├── n511_225_xload_38400.bin  # <-- This is the same with serial set to 38400 baud
│   ├── n511_23_u-boot.bin
│   ├── n511_23_u-boot_38400.bin
│   ├── nae_app_N511_23
│   ├── netos_N511_23.elf
│   ├── vmlinux_N511_23
│   ├── xlp8xx-linux.dtb_N511_23
│   └── xlp8xx-netos.dtb_N511_23
├── Kconfig
├── Patches
│   ├── X.patch
│   ├── lib.patch
│   ├── sysconfig.patch
│   ├── u-boot.patch
│   └── xloader.patch
├── README
├── build.sh
├── init
├── nae.c
└── nlm_xlp_evp_N511_defconfig

Identify the SD card (using lsblk in this case):

[root@localhost ~]# lsblk 
NAME                        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                           8:0    0   1.8T  0 disk 
├─sda1                        8:1    0   500M  0 part /boot
└─sda2                        8:2    0   1.8T  0 part 
  ├─VolGroup-lv_root (dm-0) 253:0    0    50G  0 lvm  /
  ├─VolGroup-lv_swap (dm-1) 253:1    0  31.5G  0 lvm  [SWAP]
  └─VolGroup-lv_home (dm-2) 253:2    0   1.8T  0 lvm  /home
sde                           8:64   1   1.9G  0 disk  # <-- This is the SD card
├─sde1                        8:65   1 155.9M  0 part 
└─sde2                        8:66   1   1.7G  0 part

Use dd to write the x-loader image to the sd card.
NB - use the disk identifier, not the partition number in the "of=" argument:

[root@localhost ~]# dd if=n511_225_xload.bin of=/dev/sde seek=2
229+1 records in
229+1 records out
117440 bytes (117 kB) copied, 0.0861841 s, 1.4 MB/s

Update the u-boot image

u-boot is provided with the IM510 SDK (version 2.3 in this case):

Jons-MacBook-Air-2:~ Jon$ cd Downloads/N511_Sdk23
Jons-MacBook-Air-2:N511_Sdk23 Jon$ tree
.
├── Binaries
│   ├── n511_225_xload.bin 
│   ├── n511_225_xload_38400.bin 
│   ├── n511_23_u-boot.bin  # <-- This is the u-boot image
│   ├── n511_23_u-boot_38400.bin  # <-- Same as above with serial set to 38400 baud
│   ├── nae_app_N511_23
│   ├── netos_N511_23.elf
│   ├── vmlinux_N511_23
│   ├── xlp8xx-linux.dtb_N511_23
│   └── xlp8xx-netos.dtb_N511_23
├── Kconfig
├── Patches
│   ├── X.patch
│   ├── lib.patch
│   ├── sysconfig.patch
│   ├── u-boot.patch
│   └── xloader.patch
├── README
├── build.sh
├── init
├── nae.c
└── nlm_xlp_evp_N511_defconfig

Identify the second partition on the SD card:

[root@localhost ~]# lsblk 
NAME                        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                           8:0    0   1.8T  0 disk 
├─sda1                        8:1    0   500M  0 part /boot
└─sda2                        8:2    0   1.8T  0 part 
  ├─VolGroup-lv_root (dm-0) 253:0    0    50G  0 lvm  /
  ├─VolGroup-lv_swap (dm-1) 253:1    0  31.5G  0 lvm  [SWAP]
  └─VolGroup-lv_home (dm-2) 253:2    0   1.8T  0 lvm  /home
sde                           8:64   1   1.9G  0 disk  # <-- This is the SD card
├─sde1                        8:65   1 155.9M  0 part 
└─sde2                        8:66   1   1.7G  0 part  # <-- This is the second partition

Mount partition:

[root@localhost ~]# mount /dev/sde2 /mnt/
[root@localhost ~]# cd /mnt/
[root@localhost mnt]# ls
u-boot.bin

Copy new u-boot image:

[root@localhost mnt]# cp /root/N511_Sdk23/Binaries/n511_23_u-boot.bin .
[root@localhost mnt]# mv u-boot.bin u-boot.bin.old 
[root@localhost mnt]# mv n511_23_u-boot.bin u-boot.bin

Unmount the partition/SD card:

[root@localhost mnt]# cd
[root@localhost ~]# umount /mnt/

Reinstall the SD card into the N510/N511

  • Reinstall the SD Card back into the N510/N511
  • Power cycle system