Network booting to Kodi / LibreElec / CoreElec

edited September 2019 in AML-S805X-AC
This is my guide so far, getting my "fries" LaFrite 1G to boot to Kodi
Why am I doing this?
  • Because I didn't read the spec sheet and thought there was an SD-card slot. 
  • Also turns out the USB pendrive support isn't great (I haven't updated the uBoot to a newer revision)
  • Because out-of-the-box, PXE support is there ( Woohoo!  :):smiley: )
  • Also, it's quicker for me to change something on my server, from my notebook and try again.
What is not working yet or as expected:
  • Video (displays white when playing files. interface seems fine)
  • Audio on LaFrite
    • works with an external USB soundcard
  • IR
    • seems to double press and do strange things
    • I'm running MS remotes from late 2000's. Work fine with external MS IR puck
  • Suspend (reboots)
  • Network MAC address after Kernel load is different to PXE
  • second rule / static assign needed for DHCP
Server setup:
  • Linux (I'm using LinuxMint, so please adjust accordingly if not Debian based)
  • tftp-hpa (root of tftp is @ /var/lib/tftpboot)
  • isc-DHCP
  • NFS server
  • IP address
  • Wireshark -- Very helpful to debug (set filter in the capture setup for "ether host XX:XX:XX:XX:XX:XX" <-- the MAC address)

File sources:
DHCP Server config sections:
  • # LaFriteLoungePXE
    host LoungeFritePXE {
    filename "LaFrite/pxelinux.cfg";
     hardware ethernet 18:66:c7:9d:06:b0;
  • # LaFriteLoungeOS
    host LoungeFriteOS {
     hardware ethernet 02:db:01:47:35:88;
TFTP Directory layout (/var/lib/tftpboot):
./LaFrite <-- Directory. Make sure root has RW
./LaFrite/CoreElec <-- Directory. Make sure root has RW
./LaFrite/CoreElec/SYSTEM <-- extracted from CoreElec/LibreElec image
./LaFrite/CoreElec/KERNEL <-- extracted from CoreElec/LibreElec  image
./LaFrite/CoreElec/uEnv.ini <-- extracted from CoreElec/LibreElec  image
./LaFrite/meson-gxl-s805x-libretech-ac.dtb <-- downloaded DTB file
./LaFrite/1866c79d06b0 <-- Directory created by LibreElec/CoreElec as storage
./LaFrite/pxelinux.cfg <-- Directory containing files specific to each device
./LaFrite/pxelinux.cfg/01-18-66-c7-9d-06-b0 <-- the actual file. Note the match to the MAC in DHCP. Can also be called default-arm if you don't want to be specific

PXELinux file contents:

  • DEFAULT Kodi

    LABEL Kodi
    FDT meson-gxl-s805x-libretech-ac.dtb
    APPEND ip=dhcp boot=NFS= disk=NFS= overlay ssh

NFS Exports config: /export/LaFrite,insecure,async,no_root_squash,nohide)
^-- note the only allows access (because it is insecure) to IPs ending 0 to 15
FSTAB map for NFS export: 

/var/lib/tftpboot/LaFrite /export/LaFrite bind bind 0


  • edited September 2019
    Reserve for updates

    • Initial writeup
    2019-09-21 #2:
    • Update to use @thor image : AMLGX audio options appear. Video is working (after reseting settings). Signs of progress...
  • Looks like a good guide, I've been thinking about this approach so I don't have to keep flashing a USB drive ;)
  • Any updates with this?  I started something similar.  I'm installing DRBL (diskless remote boot linux) server, and the same tftpd-hpa package.  Will let you know if I come up with anything (doubtful haha).
  • I followed your guide a bit, i'm on Linux Mint 19.  My steps were:
    apt install tftp-hpa tftpd-hpa
    systemctl enable tftpd-hpa
    systemctl start tftpd-hpa
    touch /var/lib/tftpboot/tempfile
    tftp localhost
    #At the tftp> prompt then
    get tempfile
    #Back to the regular prompt
    #check for existence of the tempfile file that we copied with the get command.
    #Instead of running my own dhcp instance on my rig I thought it'd be better to use my router.  I went to my DHCP server settings and found some options that listed "Option 128(tftp server ip):" i set it to my computer's ip address.  Then set "Option 67(boot file name):" to 'LaFrite/pxelinux.cfg'

    #Then it was time to set up my tftp directory
    cd /var/lib/tftpboot
    mkdir LaFrite
    cd LaFrite

    #And now I'm sort of stuck.  I'm looking for syslinux, but does it need  to be architecture specific?  ie. arm64?
  • Hi
    You do not need syslinux as it seems to be already built into the bootloader. You just need a syslinux/pxelinux config file pointing to all the right files.

    Wireshark will be very useful on the server, unless you have a managed switch that can allow you to mirror the La Frite network port for the purpose of sniffing with Wireshark. It really is a helpful tool to test network booting, particularly to watch the initial conversations between server and device.

    Another place to check, is whether your DHCP is making the correct offer information (setting the boot server and boot file to use).
    Also, check with a tftp client that you can get to pxelinux.cfg/default or pxelinux.cfg/XX-XX-XX-XX-XX-XX or similar syslinux type file.

    Something that is also a gotcha for me is checking the /etc/default/tftpd-hpa is setup right and all the files/folders have the right permissions. Another thing I found was don't symlink as ttpd runs a chroot and can break links -- in fact, just don't link if at all possible. I found that even if I got links working, when the NFS portion kicks in, things break again.
  • Roger that.  I'm confident that the tftp server is working correctly, and my dhcp, however, which files should i be hosting on my tftp server again?  I keep finding guides for x86_x64 that don't really seem to apply.  I'll install wireshark for sure once i actually start trying to send whichever files i'm placing in the directory.   Thanks for the reply.
  • Only the syslinux/pxelinux config file, the KERNEL and dtb files are a must. For simplicity I made an NFS export to the tftp directory and stuck the SYSTEM there and where it also mounts the R/W storage (directory that is based on the mac address)
  • edited August 2020
    Hey, repitah. Also, I can say that you can use a special server and it's not necessary to use Linux OS, even Windows can be a very good variant. I've been using it for 2 years and I've never had any issues at all so I know what I'm talking about. When I was trying to find a suitable server, I was looking for a cheap variant with specs which will be similar to the expensive ones and after some time I managed to find the site where I purchased bare metal server. I even compared prices and I can say that I'm paying 100$ but other sites have a higher price by approximatively 15 percent. 


Sign In or Register to comment.