ls1046ardb. Installing OpenWRT from source code?

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

ls1046ardb. Installing OpenWRT from source code?

664 Views
mefer
Contributor I

After building from source, I get .bin firmware files. What are the steps to create an installation USB? In its current form, it requires .img files that I don't get after building from source.

As part of USB, I have files:

 

firmware_ls1046ardb_uboot_qspiboot_1133_5a59.img
ls1046ardb_update.scr
usb_update.itb
config.ini
firmware_ls1046ardb_uboot_sdboot_1133_5a59.img
OpenWRT_1133.img

 



0 Kudos
1 Reply

654 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to target/linux/layerscape/README in OpenWRT source code.

 Build
--------
Before configuration and build, update and install package feeds.

$ ./scripts/feeds update -a
$ ./scripts/feeds install -a

* make menuconfig

Target System: "NXP Layerscape"
Subtarget: (Select subtarget)
Target Profile: (Select device, or "Multiple devices")
Target Devices: (Select devices. Available when Target Profile is "Multiple devices")
Target Images: (Disable "GZip images" if don't want to compress images)

Note: The first time make menuconfig would create a .config file which
would include all dependencies for selected target. After that, make
menuconfig still could be used to modify packages. If want to change
other target, please remove .config and make menuconfig to select again.
Otherwise the packages selected in .config would be a mess.

* make download (or make download -j<n>)

* make (or make -j<n>)

* Final firmware/image

Path: bin/targets/layerscape/<subtarget>/
Firmware for flash: openwrt-layerscape-<subtarget>-<device>-<rootfs>-firmware.bin
Image for SD card: openwrt-layerscape-<subtarget>-<device>-<rootfs>-sdcard.img

Program sdcard.img to SD card
---------------------------------
sdcard.img could be programmed to SD card in either u-boot environment
or linux environment. After programming, configure the board to boot
from SD card.

* u-boot environment

=> tftp a0000000 <image_name>-sdcard.img
=> mmc write a0000000 0 a0000

Note: The default sdcard.img size is 320MB. a0000 is the block number for 320MB.
blk_num = filesize / 512.

* linux environment

$ dd if=./<image_name>-sdcard.img of=/dev/mmcblkx

Note: Need to check the SD card device name to replace "mmcblkx".

Program firmware.bin to flash
---------------------------------

* LS1046ARDB

Start up from bank1, and program firmware to bank2 with below commands.
Switch to bank2 to start up OpenWrt.

=> tftp a0000000 <firmware_name>-firmware.bin
=> sf probe 0:1
=> sf erase 0 +$filesize
=> sf write a0000000 0 $filesize
=> cpld reset altbank

 

 

0 Kudos