summaryrefslogtreecommitdiffstats
path: root/meta-netboot/README
blob: 7efa22650565bccfd06ff30067367957c62d37fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
meta-netboot
============

This layer contains some recipes and configuration adjustments to allow network boot through NBD (network block device).

Content and usage
-----------------

This layer creates a new supplementary initrd image which can be downloaded through TFTP with the kernel.
At boot time, the init script will try to mount the rootfs based on the following kernel command line parameters:

* nbd.server: IP address to reach the NBD server
* nbd.dev: nbd device to use (default: /dev/nbd0)
* nbd.debug: activate debug mode (init script is then interruptible)

For nbd v2:

* nbd.port: TCP port on which server is listening (default: 10809)

For nbd v3:

* nbd.namev3: The name of the image served by nbd-server.


The layer meta-netboot contains recipes for the following components:
* busybox: activate the built-in NBD client
* initramfs-netboot: contains the init script started by the kernel: basically, this script mounts the real root filesystem, then pivot_root on it and finally exec systemd.
* initramfs-netboot-image: image to specify for building the initrd

To enable the build of the netboot initrd and ext4 rootfs, add the following line in conf/local.conf:

INHERIT += "netboot"


Server side
-----------

On the server side (assuming that the build dir is stored in $BUILD) we can run:

* a TFTP server, for example tftpd-hpa started with $BUILD/tmp/deploy/images as the TFTP dir:

  /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure $BUILD/tmp/deploy/images

* a NBD server, for example xnbd-server, used to expose the whole ext4 rootfs as a network block device:

  xnbd-server --target --lport 10809 $BUILD/tmp/deploy/images/$MACHINE/agl-demo-platform-$MACHINE.ext4


Target side
-----------

On the target board, a specific setup should also be done.\
For Renesas Gen3 board, u-boot is updated and environment is more like :

------------------------------------------------------------------
setenv bootargs_console 'console=ttySC0,115200 ignore_loglevel'
setenv bootargs_extra 'rw rootfstype=ext4 rootwait rootdelay=2'
setenv bootargs_root 'root=/dev/ram0 ramdisk_size=16384 ip=dhcp'
setenv bootargs_video 'vmalloc=384M video=HDMI-A-1:1920x1080-32@60'
setenv serverip '<your_serverip>'
setenv 'bootdaddr' '0x48000000'
setenv 'bootdfile' 'Image-r8a7795-h3ulcb.dtb'
setenv 'bootdload_net' 'tftp ${bootdaddr} h3ulcb/${bootdfile}'
setenv 'bootkaddr' '0x48080000'
setenv 'bootkfile' 'Image'
setenv 'bootkload_net' 'tftp ${bootkaddr} h3ulcb/${bootkfile}'
setenv 'bootiaddr' '0x5C3F9520'
setenv 'bootifile' 'initramfs-netboot-image-h3ulcb.ext4.gz'
setenv 'bootiload_net' 'tftp ${bootiaddr} h3ulcb/${bootifile}'
setenv 'load_net' 'run bootkload_net; run bootdload_net; run bootiload_net; setenv initrd_size ${filesize}'

setenv 'bootcmd' 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root} ${bootargs_extra} nbd.server=${serverip}; run load_net; booti ${bootkaddr} ${bootiaddr}:${initrd_size} ${bootdaddr}'
------------------------------------------------------------------
"gu">## agl-profile-telematics N.N. ## agl-profile-hud N.N. ## agl-profile-graphical This profile contains a basic graphical system with wayland/weston.\ It is used as a base for the more targeted profiles: * agl-profile-graphical-html5 * agl-profile-graphical-qt5 Part of this layer are the following images: * agl-image-weston ### agl-image-weston Pure wayland + weston image but with all AGL service APIs. ## agl-profile-graphical-html5 This profile contains all components to build a html5 / web-based system and should be used as a base layer for further projects.\ All AGL APIs are included. ## agl-profile-graphical-qt5 This profile is used as base for all projects that build on qt5 like the agl-demo-platform.\ Part of this layer are the ffollowing images: * agl-image-graphical-qt5 * agl-image-graphical-qt5-crosssdk\ (THIS IS THE SDK TARGET WE AIM TO USE FOR AGL-DEMO-PLATFORM IN THE END) All AGL APIs are included. ### agl-image-graphical-qt5 Image with wayland/weston and the qt5 packages installed. ### agl-image-graphical-qt5-crosssdk SDK based on agl-image-graphical-qt5 suitable for development under qt5. ## agl-demo-platform This layer builds on-top of agl-profile-graphical-qt5 and builds the full AGL demonstrator image.\ It hosts these images: * agl-demo-platform * agl-demo-platform-crosssdk * agl-demo-platform-qa TLDR: ```tree meta-agl/meta-agl-profile-core/recipes-platform |-- images | |-- agl-image-boot.bb | |-- agl-image-boot.inc | |-- agl-image-minimal-crosssdk.bb | |-- agl-image-minimal-qa.bb | |-- agl-image-minimal.bb | `-- agl-image-minimal.inc `-- packagegroups |-- packagegroup-agl-core-boot.bb |-- packagegroup-agl-core-connectivity.bb |-- packagegroup-agl-core-multimedia.bb |-- packagegroup-agl-core-navigation.bb |-- packagegroup-agl-core-os-commonlibs.bb |-- packagegroup-agl-core-security.bb |-- packagegroup-agl-core-services.bb |-- packagegroup-agl-image-boot.bb `-- packagegroup-agl-image-minimal.bb meta-agl/meta-agl-profile-graphical/recipes-platform |-- images | |-- agl-image-weston.bb | `-- agl-image-weston.inc `-- packagegroups |-- packagegroup-agl-graphical-services.bb `-- packagegroup-agl-image-weston.bb meta-agl/meta-agl-profile-graphical-html5/recipes-platform |-- images | |-- agl-demo-platform-html5-crosssdk.bb | |-- agl-demo-platform-html5.bb | `-- agl-demo-platform-html5.inc `-- packagegroups `-- packagegroup-agl-demo-platform-html5.bb meta-agl/meta-agl-profile-graphical-qt5/recipes-platform |-- images | |-- agl-image-graphical-qt5-crosssdk.bb | |-- agl-image-graphical-qt5.bb | `-- agl-image-graphical-qt5.inc `-- packagegroups |-- packagegroup-agl-demo-qt-examples.bb |-- packagegroup-agl-profile-graphical-qt5.bb `-- packagegroup-qt5-toolchain-target.bbappend ```