<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>12982</bug_id>
          
          <creation_ts>2018-11-06 19:03:55 +0000</creation_ts>
          <short_desc>Add booting an NFS root file system for testimage</short_desc>
          <delta_ts>2026-10-29 15:05:57 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>2.7</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>ACCEPTED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>6.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Armin Kuster">akuster</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>adrian.freihofer</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>paul</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>82036</commentid>
    <comment_count>0</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2018-11-06 19:03:55 +0000</bug_when>
    <thetext>I would like to see the ability to select NFS as the method for booting a MACHINE and have it do the right thing. I see this benefiting real hardware targets in a lab scenario.

Some use cases:
1) NFS on local build system
2) NFS on shared file system 
3) NFS on remote system
4) NFS using native NFS server like nfs-genesha
4) NFS via SDK/eSDK</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82071</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2018-11-08 15:42:00 +0000</bug_when>
    <thetext>One of the existing manual test which could be automated: http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/lib/oeqa/manual/sdk.json</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82556</commentid>
    <comment_count>2</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2018-12-20 16:34:52 +0000</bug_when>
    <thetext>Looking at this from NFS side quickly caused a too many scenarios so I started from the Machine side. 

I have a few u-boot based arm boards that can now boot from mmc or over nfs. I now need to add tftp and/or pxe boot support for the kernel.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83058</commentid>
    <comment_count>3</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2019-02-21 15:08:24 +0000</bug_when>
    <thetext>Well here is what I have done so far and where I went a bit mental. I a doing all my work in a BSP I maintain.

NFS:
https://github.com/akuster/meta-odroid/blob/master-next/classes/image_types_nfs.bbclass

# NFS_LOCATION: 
#   local: NFS mount on this machine
#   remote: NFS exported from a remote system not mounted on this system
#
# NFS_EXPORT_DIR - location where to copy things to
# NFS_SERVERIP - your remote NFS server host
# NFS_SERVERIP_USER - User account on remote NFS server
# NFS_SERVERIP_PSWDFILE - Password used for NFS_SERVERIP_USER on NFS_SERVERIP
# NFS_MACHINE_NAME - main filename used as the common mounted dir from machine
#
# NFS_DEST_DIR -  Name of where new builds are copied too.
#
# SSHPASS - where to find the sshpass binary, defaults to the systme one

It uses NFS_EXPORT_DIR/NFS_MACHINE_NAME to be symlinked your last build image that is copied over to where NFS is being hosted.

I have not done the NATIVE which should be what we have now with QEMU.


I went mental here:

NETBOOT: 

Basic same idea for local and remote as above. I need to doc it and currently is  supports TFTP.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83059</commentid>
    <comment_count>4</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2019-02-21 15:11:37 +0000</bug_when>
    <thetext>I also have some u-boot glue, I have had u-boot env config class.

If one configs TFTP and NFS U-boot parms , it will create the correct values so that u-boot will tftp the kernel and nfs mount the right rootfs.


https://github.com/akuster/meta-odroid/blob/master-next/classes/uboot-boot-scr.bbclass

# UBOOT_FDT_FILE: default device tree. e.g., &quot;KERNEL_DEVICETREE&quot;
#
# UBOOT_FDT_LOADADDR: default Device tree load address, e.g., &quot;0x01000000&quot;
#
# UBOOT_INITRD_NAME: default initrd image name, e.g., &quot;uInitrd&quot;
#
# UBOOT_INITRD_ADDR: default initrd image load address, e.g., &quot;0x2000000&quot;
#
# UBOOT_CONSOLE: default console, e.g.,  &quot;ttyttySAC2,115200&quot;
#
# UBOOT_LOAD_CMD: default partition, e.g., &quot;load&quot;
#
# UBOOT_BOOTARGS: 
#
# UBOOT_BOOTDEV: default boot device #
#
# UBOOT_BOOTPART: default boot partition #
# 
# UBOOT_BOOTTYPE: default mmc
#
# UBOOT_ROOTDEV: default root device #
#
# UBOOT_ROOTPART: default root device #
#
# UBOOT_ROOTTYPE:  default mmcblk1p
#
# UBOOT_FILE_TITLE: default partition, e.g., &quot;UBOOT-CONFIG&quot;
#
# UBOOT_EXTRA_ENV: default add extra env vars , e.g., &quot;vout,&apos;vga&apos;&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83060</commentid>
    <comment_count>5</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2019-02-21 15:12:39 +0000</bug_when>
    <thetext>I also added a power-controller class to power cycle a network powered device.

https://github.com/akuster/meta-odroid/blob/master-next/classes/power-contoller.bbclass

needs more doc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83061</commentid>
    <comment_count>6</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2019-02-21 15:15:56 +0000</bug_when>
    <thetext>example local.conf

NETBOOT = &quot;tftp&quot;
UBOOT_NETBOOT = &quot;tftp&quot;
NETBOOT_DIR = &quot;/tftpboot/&quot;
NETBOOT_LOCATION = &quot;remote&quot;

NETBOOT_SERVERIP =&quot;192.168.9.51&quot;
NETBOOT_RUSER =&quot;akuster&quot;
NETBOOT_PSWDFILE = &quot;/home/akuster/tftpboot/.pswd&quot;


NFS_ROOT = &quot;/srv/oe/&quot;
UBOOT_IPADDR_odroid-c2 =&quot;192.168.9.20&quot;
UBOOT_ETHADDR_odroid-c2 = &quot;42:ae:30:69:fa:c8&quot;
UBOOT_SERVERIP =&quot;192.168.9.51&quot;
UBOOT_GATEWATIP = &quot;192.168.9.1&quot;
UBOOT_NETMASK =&quot;255.255.255.000&quot;
UBOOT_BOOT_TYPE = &quot; nfs&quot;

NFS_LOCATION = &quot;remote&quot;
NFS_EXPORT_DIR = &quot;/srv/oe/&quot;
IMAGE_FSTYPES_append = &quot; nfs&quot;

NFS_SERVERIP =&quot;192.168.9.51&quot;
NFS_SERVERIP_PSWDFILE = &quot;/home/akuster/tftpboot/.pswd&quot;
NFS_SERVERIP_USER =&quot;akuster&quot;


INHERIT += &quot;power-contoller&quot;

PWR_CNTL_NODE_odroid-c2 ?= &quot;p61&quot;

PWR_CNTL_TYPE = &quot;ipower&quot;
PWR_CNTL_SERVER_IP_ipower = &quot;192.168.9.30&quot;
PWR_CNTL_CMD_ipower = &quot;wget -O/dev/null -q --http-user=admin --http-password=12345678 &quot;
NETBOOT_AUTO = &quot;1&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87049</commentid>
    <comment_count>7</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2020-04-16 13:15:41 +0000</bug_when>
    <thetext>Armin said in email that this should be 3.2M3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89652</commentid>
    <comment_count>8</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-03-18 15:04:35 +0000</bug_when>
    <thetext>3.3 development is closed, move to 3.4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97128</commentid>
    <comment_count>9</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-10-30 15:37:28 +0000</bug_when>
    <thetext>Build move to 5.0 -- ../Randy</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98848</commentid>
    <comment_count>10</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-04-25 01:13:57 +0000</bug_when>
    <thetext>Bulk move of 5.0 medium importance issues to 5.99.
Move to 5.1 if you want to actively work on an issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98889</commentid>
    <comment_count>11</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-04-25 01:23:52 +0000</bug_when>
    <thetext>Build move to 5.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101802</commentid>
    <comment_count>12</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-05-01 14:07:05 +0000</bug_when>
    <thetext>Bulk move of all unassigned 5.2 medium importance bugs to 5.3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107235</commentid>
    <comment_count>13</comment_count>
    <who name="Paul Barker">paul</who>
    <bug_when>2026-10-29 15:05:57 +0000</bug_when>
    <thetext>Adrian, could you check if this has already been done?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>