Re: trying to understand how the /boot/loader symlink is supposed to work.



On Tue, Jan 30, 2018 at 10:14 AM, Davis Roman <davis roman84 gmail com> wrote:
I had checked out my ostree repository into a directory on my host directory
however I probably should have shown what it looks like on my target
instead:

root@target:/boot# tree
.
|-- loader -> loader.0
|-- loader.0
|   |-- entries
|   |   |-- ostree-poky-0.conf
|   |   `-- ostree-poky-1.conf
|   `-- uEnv.txt
`-- ostree
    `--
poky-0f4de6813eb21e874a48b6a880e77c325b7f269a74b7a195045c8031234e6a08
        |-- boot.itb
        |-- loader -> boot/loader.0
        |-- loader.0
        `-- loader.1

We use u-boot on our ARM devices at Endless. Our image builder has this snippet:

  mkdir -p "${BOOT}"/loader.0
  ln -s loader.0 "${BOOT}"/loader
  # Empty uEnv.txt otherwise ostree gets upset
  > "${BOOT}"/loader/uEnv.txt
  ln -s loader/uEnv.txt "${BOOT}"/uEnv.txt

This is done prior to calling "ostree admin deploy". We've had that
forever and I don't recall all the reasons for it. Looking at the
ostree code in src/libostree/ostree-bootloader-uboot.c, I think what
happens is that the configuration gets put into loader.N/uEnv.txt
simulating what's done with the BLS entries. To work, I believe you
need the toplevel uEnv.txt -> loader/uEnv.txt symlink so u-boot finds
the uEnv.txt file corresponding to the current booting deployment.

--
Dan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]