On Mon, Aug 22, 2011, Mattias Backman wrote:
> Sorry, that was unclear. Yes, the hwpack still transports the files
> and they will still be installed on target. The change is only about
> allowing the startfiles.cfg to specifiy the files relative to the
> chroot and not be contrained to /boot on the target system.
>
> Fow hwpacks v2, I'm thinking that we could pick the files from the deb
> and not install it, but I have yet to make sure that it would work.
Ok, we're in agreement them
In terms of implementation, could we just check whether the filename is
an absolute pathname in startfiles.cfg, and if it is use it relative to
the chroot_dir, if not fallback to 'boot' + filename? That way,
hwpack filenames would be required to have '/usr/lib/foo' or
'/boot/foo' and we would fall back to '/boot/foo' if filename is 'foo'.
I think it would be a matter of changing:
filename = os.path.join(bin_dir, file_data[1])
to:
if file_data[1][0] == '/':
filename = file_data[1]
else:
filename = os.path.join(bin_dir, file_data[1])
and would force the hwpack to carry the filename that it ships rather
than the linaro-image-tools code.
On Mon, Aug 22, 2011, Mattias Backman wrote:
> Sorry, that was unclear. Yes, the hwpack still transports the files
> and they will still be installed on target. The change is only about
> allowing the startfiles.cfg to specifiy the files relative to the
> chroot and not be contrained to /boot on the target system.
>
> Fow hwpacks v2, I'm thinking that we could pick the files from the deb
> and not install it, but I have yet to make sure that it would work.
Ok, we're in agreement them
In terms of implementation, could we just check whether the filename is
an absolute pathname in startfiles.cfg, and if it is use it relative to
the chroot_dir, if not fallback to 'boot' + filename? That way,
hwpack filenames would be required to have '/usr/lib/foo' or
'/boot/foo' and we would fall back to '/boot/foo' if filename is 'foo'.
I think it would be a matter of changing: join(bin_ dir, file_data[1])
filename = os.path.
to: join(bin_ dir, file_data[1])
if file_data[1][0] == '/':
filename = file_data[1]
else:
filename = os.path.
and would force the hwpack to carry the filename that it ships rather
than the linaro-image-tools code.
--
Loïc Minier