Hi all,
I'm attempting to port an OpenWrt image onto the LS1028ARDB and have a couple of questions before starting:
Can I use Yocto-generated images (PBL/U-Boot/DTB/Kernel) along with the OpenWrt root file system?
Is there a standalone OpenWrt image that includes all files (PBL/U-Boot/DTB/Kernel and OpenWrt RFS) in a single image?
Please provide support for both of these approaches and share any relevant documentation or steps that need to be followed.
Thanks,
Gourav Jain
1. Yes, you can. However probably some functions would be affected.
2. LS1028ARDB has already been integrated into OpenWrt, please refer to target/linux/layerscape/README.
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
---------------------------------
* LS1028ARDB
Program firmware to current flash with below commands.
=> tftp a0000000 <firmware_name>-firmware.bin
=> sf probe
=> sf erase 0 +$filesize
=> sf write a0000000 0 $filesize
=> reset
Thanks for addressing the issue..
1) I tried first option and it worked fine.(Yocto generated pbl/u-boot/kernel + openwrt rfs)
2) Now trying to boot LS120ARDB with only openwrt image in SD mode..but not getting full image for SD boot.
I can find below images, in the dir, "bin/targets/layerscape/armv8_64b/"
openwrt-layerscape-armv8_64b-fsl_ls1028a-rdb-rootfs.tar.gz --> only rfs can be used with any combination
openwrt-layerscape-armv8_64b-fsl_ls1028a-rdb-initramfs-kernel.bin
openwrt-layerscape-armv8_64b-fsl_ls1028a-rdb-squashfs-firmware.bin ---> must be NOR flash full file
openwrt-layerscape-armv8_64b-fsl_ls1028a-rdb-squashfs-sysupgrade.bin
openwrt-layerscape-armv8_64b-fsl_ls1028a-rdb.manifest
Where I can find *img for SD boot ??
regards,
Gourav
Please remove ".config", then run "make menuconfig" and configure the menu as the following.
Please configure Target Profile as (NXP LS1028A-RDB SD Card Boot), then run make to build image.
Hi,
It appears that the SD boot image does not contain the PBL and U-Boot, whereas the flash image has the correct files. I have examined both images in the U-Boot environment as follows:
Size:
1) *sdboot.img.gz:12MB
2) *firmware.bin:28MB
=> tftp a0000000 RIR-images/openwrt-ls1028a-rdb-sdboot-full.img.gz
Using enetc#0 device
TFTP from server 192.168.24.195; our IP address is 192.168.24.61
Filename 'RIR-images/openwrt-ls1028a-rdb-sdboot-full.img.gz'.
Load address: 0xa0000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
###############################
3.1 MiB/s
done
Bytes transferred = 11897599 (b58aff hex)
=> md a0000000
a0000000: 00088b1f 00000000 58ec0302 d55c707d ...........X}p\.
a0000010: 63ef3f75 daacb5a5 12daed6b 2b7debb6 u?.c....k.....}+
a0000020: 36825fc9 28fe4b60 92b5741e 13329bb1 ._.6`K.(.t....2.
a0000030: 49ad2f61 0cb2b568 419d2881 562e2538 a/.Ih....(.A8%.V
a0000040: c19093d1 9e894d63 3db53151 44865ad1 ....cM..Q1.=.Z.D
a0000050: a67693bb 0afc6ec6 049b2bc1 4b053352 ..v..n...+..R3.K
a0000060: 994e93c8 f18d92b2 6c854220 b4b03d07 ..N..... B.l.=..
a0000070: bbb79dfd 334cd046 ded2ff93 fb9bccdf ....F.L3........
a0000080: e739ee7d b9ce7b9e 77e2488f b3fb5f11 }.9..{...H.w._..
a0000090: 9322112d a13c7566 0a86bdb5 fe8284a5 -.".fu<.........
a00000a0: efb45e23 5fa95221 ca91bf68 49a9093d #^..!R._h...=..I
a00000b0: 09090909 09090909 89090909 27b81fff ...............'
a00000c0: 9f406fc1 e1b413e9 6a31ffd6 f4cc942b .o@.......1j+...
a00000d0: aa46dfd6 fbd334b9 f4a6656c 7dfb16fd ..F..4..le.....}
a00000e0: 4639e1fd a5edb6a6 fff7fd99 be379fe0 ..9F..........7.
a00000f0: f9ab15ec c4511b0d b6c04dea 3cfdc96c ......Q..M..l..<
=> tftp a0000000 RIR-images/openwrt-firmware.bin
Using enetc#0 device
TFTP from server 192.168.24.195; our IP address is 192.168.24.61
Filename 'RIR-images/openwrt-firmware.bin'.
Load address: 0xa0000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
############################################
3.1 MiB/s
done
Bytes transferred = 28311556 (1b00004 hex)
=> md a0000000
a0000000: aa55aa55 80100000 34004010 00000030 U.U......@.40...
a0000010: 00000000 00000000 00000000 008f0000 ................
a0000020: 0030c000 00000000 020031a0 00002580 ..0......1...%..
a0000030: 00000000 00003296 00000000 00000010 .....2..........
a0000040: 00000000 00000000 00000000 00000000 ................
a0000050: 00000000 00000000 00000000 00000000 ................
a0000060: 00000000 00000000 00000000 00000000 ................
a0000070: 200e705a 00000000 bb580000 00000000 Zp. ......X.....
a0000080: 00000000 00000000 3c8ca4b5 334008bc ...........<..@3
a0000090: 00000001 33400154 47474747 33400158 ....T.@3GGGGX.@3
a00000a0: 47474747 334008bc 00000000 335008bc GGGG..@3......P3
a00000b0: 00000001 33500154 47474747 335008bc ....T.P3GGGG..P3
a00000c0: 00000000 33400890 00800401 33500890 ......@3......P3
a00000d0: 00800401 33400098 00000000 33500098 ......@3......P3
a00000e0: 00000000 31e00900 00000004 31e00400 .......1.......1
a00000f0: 1800d000 8000000f 20009000 1800d000 ........... ....