UPDATE:
now that netboot is up, it can not connect to xnbd on the host.
command and log on host:
------------------------------------------
sudo xnbd-server --target --lport 10809 agl-demo-platform-imx6qdlsabreauto-20190804063210.rootfs.ext4
xnbd-server(23532) msg: listen port 10809
xnbd-server(23532) msg: cmd target mode
xnbd-server(23532) WARN: disksize 1762785280 is not a multiple of a page size (4096)
xnbd-server(23532) WARN: disksize 1762785280 is not a multiple of 4096 (xnbd's cache block size)
xnbd-server(23532) msg: disk /home/vahid/YOCTO/rootfs_images/agl-demo-platform-imx6solo-icmm1010-20190908052044.rootfs.ext4 size 1762785280 B (1681 MB)
xnbd-server(23532) WARN: disksize is not a multiple of CBLOCKSIZE
xnbd-server(23532) msg: xnbd master initialization done
xnbd-server(23532) msg: server 0.0.0.0:10809,TCP,fd=4,reuseaddr,nodelay
xnbd-server(23532) msg: server [::]:10809,TCP,fd=5,reuseaddr,nodelay
xnbd-server(23532) msg: start polling
xnbd-server(23532) msg: cmd target mode
xnbd-server(23532) WARN: disksize 1762785280 is not a multiple of a page size (4096)
xnbd-server(23532) WARN: disksize 1762785280 is not a multiple of 4096 (xnbd's cache block size)
xnbd-server(23532) msg: disk /home/vahid/YOCTO/rootfs_images/agl-demo-platform-imx6solo-icmm1010-20190908052044.rootfs.ext4 size 1762785280 B (1681 MB)
xnbd-server(23532) WARN: disksize is not a multiple of CBLOCKSIZE
xnbd-server(23532) msg: xnbd master initialization done
xnbd-server(23532) msg: server 0.0.0.0:10809,TCP,fd=4,reuseaddr,nodelay
xnbd-server(23532) msg: server [::]:10809,TCP,fd=5,reuseaddr,nodelay
xnbd-server(23532) msg: start polling
-----------------------------------------------------
log on target:
-----------------------------------------------------
Run /sbin/init as init process
________________________________________________________________________________
___ ________ _ __ __ __ __
/ | / ____/ / / | / /__ / /_/ /_ ____ ____ / /_
/ /| |/ / __/ / ______ / |/ / _ \/ __/ __ \/ __ \/ __ \/ __/
/ ___ / /_/ / /___ /_____/ / /| / __/ /_/ /_/ / /_/ / /_/ / /_
/_/ |_\____/_____/ /_/ |_/\___/\__/_.___/\____/\____/\__/
________________________________________________________________________________
/sbin/init[1]: starting initrd script
/sbin/init[1]: mounting FS: proc /proc
/sbin/init[1]: mounting FS: sysfs /sys
/sbin/init[1]: mounting FS: devtmpfs /dev
/sbin/init[1]: /dev (devtmpfs) already mounted
/sbin/init[1]: mounting FS: devpts /dev/pts
/sbin/init[1]: mounting FS: tmpfs /dev/shm
/sbin/init[1]: mounting FS: tmpfs /tmp
/sbin/init[1]: mounting FS: tmpfs /run
/sbin/init[1]: NBD parameters: device /dev/nbd0, server :10809
/sbin/init[1]: mounting FS: smackfs /sys/fs/smackfs
/sbin/init[1]: Starting NBD client
BusyBox v1.29.3 (2019-10-02 15:12:01 UTC) multi-call binary.
Usage: nbd-client HOST PORT BLOCKDEV
/sbin/init[1]: NBD client failed
/sbin/init[1]: Retrying (5 trie(s) left)...
/sbin/init[1]: Starting NBD client
BusyBox v1.29.3 (2019-10-02 15:12:01 UTC) multi-call binary.
Usage: nbd-client HOST PORT BLOCKDEV
/sbin/init[1]: NBD client failed
/sbin/init[1]: Retrying (4 trie(s) left)...
/sbin/init[1]: Starting NBD client
BusyBox v1.29.3 (2019-10-02 15:12:01 UTC) multi-call binary.
Usage: nbd-client HOST PORT BLOCKDEV
/sbin/init[1]: NBD client failed
/sbin/init[1]: Retrying (3 trie(s) left)...
/sbin/init[1]: Starting NBD client
BusyBox v1.29.3 (2019-10-02 15:12:01 UTC) multi-call binary.
Usage: nbd-client HOST PORT BLOCKDEV
/sbin/init[1]: NBD client failed
/sbin/init[1]: Retrying (2 trie(s) left)...
/sbin/init[1]: Starting NBD client
BusyBox v1.29.3 (2019-10-02 15:12:01 UTC) multi-call binary.
Usage: nbd-client HOST PORT BLOCKDEV
/sbin/init[1]: NBD client failed
/sbin/init[1]: Retrying (1 trie(s) left)...
/sbin/init[1]: Starting NBD client
BusyBox v1.29.3 (2019-10-02 15:12:01 UTC) multi-call binary.
Usage: nbd-client HOST PORT BLOCKDEV
/sbin/init[1]: NBD client failed
/sbin/init[1]: ERROR Unable to mount NBD device /dev/nbd0 using server :10809
/sbin/init[1]: Rebooting...
ci_hdrc ci_hdrc.0: remove, state 4
usb usb1: USB disconnect, device number 1
ci_hdrc ci_hdrc.0: USB bus 1 deregistered
reboot: Restarting system
________________________________________________________________________________
___ ________ _ __ __ __ __
/ | / ____/ / / | / /__ / /_/ /_ ____ ____ / /_
/ /| |/ / __/ / ______ / |/ / _ \/ __/ __ \/ __ \/ __ \/ __/
/ ___ / /_/ / /___ /_____/ / /| / __/ /_/ /_/ / /_/ / /_/ / /_
/_/ |_\____/_____/ /_/ |_/\___/\__/_.___/\____/\____/\__/
________________________________________________________________________________
/sbin/init[1]: starting initrd script
/sbin/init[1]: mounting FS: proc /proc
/sbin/init[1]: mounting FS: sysfs /sys
/sbin/init[1]: mounting FS: devtmpfs /dev
/sbin/init[1]: /dev (devtmpfs) already mounted
/sbin/init[1]: mounting FS: devpts /dev/pts
/sbin/init[1]: mounting FS: tmpfs /dev/shm
/sbin/init[1]: mounting FS: tmpfs /tmp
/sbin/init[1]: mounting FS: tmpfs /run
/sbin/init[1]: NBD parameters: device /dev/nbd0, server :10809
/sbin/init[1]: mounting FS: smackfs /sys/fs/smackfs
/sbin/init[1]: Starting NBD client
BusyBox v1.29.3 (2019-10-02 15:12:01 UTC) multi-call binary.
Usage: nbd-client HOST PORT BLOCKDEV
/sbin/init[1]: NBD client failed
/sbin/init[1]: Retrying (5 trie(s) left)...
/sbin/init[1]: Starting NBD client
BusyBox v1.29.3 (2019-10-02 15:12:01 UTC) multi-call binary.
Usage: nbd-client HOST PORT BLOCKDEV
/sbin/init[1]: NBD client failed
/sbin/init[1]: Retrying (4 trie(s) left)...
/sbin/init[1]: Starting NBD client
BusyBox v1.29.3 (2019-10-02 15:12:01 UTC) multi-call binary.
Usage: nbd-client HOST PORT BLOCKDEV
/sbin/init[1]: NBD client failed
/sbin/init[1]: Retrying (3 trie(s) left)...
/sbin/init[1]: Starting NBD client
BusyBox v1.29.3 (2019-10-02 15:12:01 UTC) multi-call binary.
Usage: nbd-client HOST PORT BLOCKDEV
/sbin/init[1]: NBD client failed
/sbin/init[1]: Retrying (2 trie(s) left)...
/sbin/init[1]: Starting NBD client
BusyBox v1.29.3 (2019-10-02 15:12:01 UTC) multi-call binary.
Usage: nbd-client HOST PORT BLOCKDEV
/sbin/init[1]: NBD client failed
/sbin/init[1]: Retrying (1 trie(s) left)...
/sbin/init[1]: Starting NBD client
BusyBox v1.29.3 (2019-10-02 15:12:01 UTC) multi-call binary.
Usage: nbd-client HOST PORT BLOCKDEV
/sbin/init[1]: NBD client failed
/sbin/init[1]: ERROR Unable to mount NBD device /dev/nbd0 using server :10809
/sbin/init[1]: Rebooting...
ci_hdrc ci_hdrc.0: remove, state 4
usb usb1: USB disconnect, device number 1
ci_hdrc ci_hdrc.0: USB bus 1 deregistered
reboot: Restarting system
-----------------------------------------------------------------------
appriciate any help.
kind regards
Vahid
On Mon, Oct 7, 2019 at 3:21 PM Vahid Gharaee <vgharaee@xxxxxxxxx> wrote:
UPDATE:when I ran below command it worked to netboot successfully:$ mkimage -A arm -O linux -T ramdisk -d initramfs-icmm.ext4.gz uRamdisk(then i used uRamdisk file with bootz)this just add uboot header.(if im not mistaken)please enlighten me why the output of agl build did not work out of the bux?or sth. is wrong with my way of using it.kind regardsVahidOn Mon, Oct 7, 2019 at 12:45 PM Vahid Gharaee <vgharaee@xxxxxxxxx> wrote:Dear Jan,Dear Stephane,sorry for the late reply.This is my u-boot env:---------------------fdt_addr=0x18000000
fdt_file=imx6solo-icmm1010.dtb
fileaddr=12c00000
image_name=zImage
initrd_addr=0x12c00000
initrd_file=initramfs-icmm.ext4.gz
ipaddr=192.168.10.2
loadaddr=0x12000000netboot_bootargs=setenv bootargs console=ttymxc2,115200 root=/dev/ram0 rootwait=0 rwnetboot_loadbootscript=echo Booting from netboot ...; run netboot_bootargs; tftp ${loadaddr} ${image_name};tftp ${fdt_addr} ${fdt_file};tftp ${initrd_addr} ${initrd_file};bootz ${loadaddr} ${initrd_addr} ${fdt_addr};
--------------------------------The U-boot log:-----------------------------------=> boot
Booting from netboot ...
Using FEC device
TFTP from server 192.168.10.1; our IP address is 192.168.10.2
Filename 'zImage'.
Load address: 0x12000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
######################################################
4.1 MiB/s
done
Bytes transferred = 7468976 (71f7b0 hex)
Using FEC device
TFTP from server 192.168.10.1; our IP address is 192.168.10.2
Filename 'imx6solo-icmm1010.dtb'.
Load address: 0x18000000
Loading: ###
3.2 MiB/s
done
Bytes transferred = 37028 (90a4 hex)
Using FEC device
TFTP from server 192.168.10.1; our IP address is 192.168.10.2
Filename 'initramfs-icmm.ext4.gz'.
Load address: 0x12c00000
Loading: #################################################################
###################################################
4.2 MiB/s
done
Bytes transferred = 1702876 (19fbdc hex)
Kernel image @ 0x12000000 [ 0x000000 - 0x71f7b0 ]
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid------------------------------------------------------------------------------------------------------all 3 files (kernel, ramdisk, dt) came from agl successful build. and my boardboots normal with sd card.but with ramdisk... it fails.(also nbd runs with no error.)Where did I make mistake?appreciate your help.VahidOn Tue, Oct 1, 2019 at 9:17 AM Jan-Simon Moeller <jsmoeller@xxxxxxxxxxxxxxxxxxx> wrote:Paste the full boot log after bootz, pls.wrong image means usually kernel 'image' format invalid.Usual issues:Used correct addresses ??bootz 0x00kernel 0x00initrd 0x00fdtCan you exlude any overlap of the ranges due to size?Best,jsVahid Gharaee <vgharaee@xxxxxxxxx> schrieb am Di., 1. Okt. 2019, 06:49:sorry for typo:[..bootz says ..][..app with qt or ...]_______________________________________________On Tue, Oct 1, 2019 at 6:10 AM Vahid Gharaee <vgharaee@xxxxxxxxx> wrote:Thanks for the info.I have tftp and tried netboot.After uploading kernel, dt and init-ram-disk into ram in boot stage boots says "wrong image". I thought maybe init ram disk image is not ready for imx yet. Now that you're saying it should work, I'll investigate further to find problem.Another question is: when NBD push the ext4 rootfs, supposed everything working, how can we debug? I mean with the nfs we actually had a folder on our host and we could install and debug app with at or.... , But now what could we do with just a *.ext4 that NBD is serving to Target ?Thank you for your supportVahidOn Tue, Oct 1, 2019, 00:26 Stephane Desneux <stephane.desneux@xxxxxxx> wrote:Exactly.
And even if there's no TFTP (or no ethernet driver in uboot), it's still
possible to cheat: for example, you can build with agl-netboot feature and
you'll get a kernel image, a dtb, an initramfs and a rootfs. You can put
everything but the rootfs on a sdcard and boot from it 'as usual' then let the
initramfs mount the rootfs through NBD: set the nbd.xxx variables accordingly in
the kernel command line and don't forget to serve your rootfs ext4 file with a
nbd server).
Please keep us posted on your progress: I'm sure many people would be interested
with this netboot feature :)
HTH
---
Stephane Desneux - CTO - IoT.bzh
stephane.desneux@xxxxxxx - www.iot.bzh
On 30/09/2019 22:20, Jan-Simon Moeller wrote:
> Does the u-boot of your board do tftp? If yes, the answer is yes.
>
> best,
> js
>
> Vahid Gharaee <vgharaee@xxxxxxxxx <mailto:vgharaee@xxxxxxxxx>> schrieb am Mo.,
> 30. Sep. 2019, 11:21:
>
> Dear Stephane, Community,
>
> does the netboot works for imx6 ?
>
> kind regards
> vahid
>
>
> On Sat, Aug 3, 2019 at 12:32 PM Vahid Gharaee <vgharaee@xxxxxxxxx
> <mailto:vgharaee@xxxxxxxxx>> wrote:
>
>
> Thank you very much for your prompt reply.
> i'm gonna try netboot
> vahid
>
> On Sat, Aug 3, 2019 at 12:18 PM Stephane Desneux
> <stephane.desneux@xxxxxxx> wrote:
>
> Hi Vahid,
>
> No, you can't use NFS because extended attributes are not handled at
> filesystem
> level but they are required to use SMACK.
>
> That's why we added support for netboot through NBD (network block
> device at
> kernel level, filesystem agnostic).
>
> The goal is to have the rootfs mounted on a device named /dev/nbd0.
> On server
> side, a daemon is responsible for pushing the required blocks.
>
> The chain is something like this:
>
> [--------- target ----------] [-----
> server ------]
>
> ext4 FS -> block device (nbd0) -> nbd-client --(tcp)--> nbd-server
> -> ext4 image
>
>
> To enable the NBD feature, you'll have to add the 'agl-netboot'
> feature at
> aglsetup time.
>
> Check this README:
>
> https://git.automotivelinux.org/AGL/meta-agl/tree/meta-netboot/README
>
> You can also find an example script to be run on server side (it's
> suited for
> the AGL docker container which is a debian):
>
> https://git.automotivelinux.org/AGL/docker-worker-generator/tree/INSTALL/tools/scripts_netboot/run_xnbd_server
>
> Hope this helps.
> ---
> Stephane Desneux - CTO - IoT.bzh
> stephane.desneux@xxxxxxx - www.iot.bzh
>
> On 03/08/2019 09:16, Vahid Gharaee wrote:
> > Dear all,
> >
> > Could anyone tell me if it's possible to run AGL over NFS?
> > I mean, because SMACK is used, I could not use NFS.
> > I need NFS to debug more easily.
> >
> > Thank you in advanced.
> > Vahid
> >
> > _______________________________________________
> > automotive-discussions mailing list
> > automotive-discussions@xxxxxxxxxxxxxxxxxxxxxxxxx
> <mailto:automotive-discussions@xxxxxxxxxxxxxxxxxxxxxxxxx>
> >
> https://lists.linuxfoundation.org/mailman/listinfo/automotive-discussions
> >
>
> _______________________________________________
> automotive-discussions mailing list
> automotive-discussions@xxxxxxxxxxxxxxxxxxxxxxxxx
> <mailto:automotive-discussions@xxxxxxxxxxxxxxxxxxxxxxxxx>
> https://lists.linuxfoundation.org/mailman/listinfo/automotive-discussions
>
automotive-discussions mailing list
automotive-discussions@xxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/automotive-discussions
_______________________________________________ automotive-discussions mailing list automotive-discussions@xxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/automotive-discussions