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

Re: Support for sunxi-based ARM systems in d-i



On Mon, May 05, 2014 at 05:19:01PM +0100, Ian Campbell wrote:
> On Mon, 2014-05-05 at 17:25 +0200, Karsten Merker wrote:
> > On Thu, May 01, 2014 at 08:36:52AM +0100, Ian Campbell wrote:
> > > On Wed, 2014-04-30 at 22:26 +0200, Karsten Merker wrote:
> > 
> > > > diff --git a/functions b/functions
> > > > index 02f7381..3322eb0 100644
> > > > --- a/functions
> > > > +++ b/functions
> > > > @@ -582,13 +582,17 @@ case "$method" in
> > > >  		fi
> > > >  		if [ -n "$boot_kernel_path" ]; then
> > > >  			boot_kernel_path="$boot_mnt_dir/$boot_kernel_path"
> > > > -			# don't mv the original kernel
> > > > +			# If we have built a modified version of the kernel
> > > > +			# (uImage, machine-id prepended, etc.), then move
> > > > +			# this modified version to its destination and make
> > > > +			# a backup copy of the previous modified version.
> > > > +			# Otherwise just copy the original kernel to its
> > > > +			# destination.
> > > >  			if [ "$kernel" != "$kfile" ]; then
> > > >  				backup_and_install "$kernel" \
> > > >  					"$boot_kernel_path"
> > > >  			else
> > > > -				# TODO add support for kernel symlink
> > > > -				:
> > > > +				cp -f "$kernel" "$boot_kernel_path"
> > > 
> > > Are these symlinks not created automatically by the kernel package?

# dpkg -l |grep linux-image
# dpkg -l |grep flash-kernel
#  ls -l /boot/vmlinu* /boot/initrd* /vmlinu* /initrd*
ls: cannot access /boot/vmlinu*: No such file or directory
ls: cannot access /boot/initrd*: No such file or directory
ls: cannot access /vmlinu*: No such file or directory
ls: cannot access /initrd*: No such file or directory
# apt-get install linux-image-3.13-1-armmp
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  linux-doc-3.13 debian-kernel-handbook fdutils
The following NEW packages will be installed:
  linux-image-3.13-1-armmp
0 upgraded, 1 newly installed, 0 to remove and 48 not upgraded.
Need to get 0 B/20.7 MB of archives.
After this operation, 81.7 MB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package linux-image-3.13-1-armmp.
(Reading database ... 71579 files and directories currently installed.)
Preparing to unpack .../linux-image-3.13-1-armmp_3.13.10-1_armhf.deb ...
Unpacking linux-image-3.13-1-armmp (3.13.10-1) ...
Setting up linux-image-3.13-1-armmp (3.13.10-1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-3.13-1-armmp
# ls -l /boot/vmlinu* /boot/initrd* /vmlinu* /initrd*
-rw-r--r-- 1 root root 10839775 May  5 20:15 /boot/initrd.img-3.13-1-armmp
-rw-r--r-- 1 root root  2708312 Apr 20 03:34 /boot/vmlinuz-3.13-1-armmp
lrwxrwxrwx 1 root root       29 May  5 20:15 /initrd.img -> /boot/initrd.img-3.13-1-armmp
lrwxrwxrwx 1 root root       25 May  5 20:15 /vmlinuz -> boot/vmlinuz-3.13-1-armmp

> > > > The original TODO remarks speak of symlinking, but this would
> > > > only work if the destination of the link is on the same
> > > > filesystem as the link itself, as the bootloader could not resolve
> > > > a cross-filesystem symlink.  This would in particular fail when
> > > > using a Boot-Device entry to mount a seperate firmware boot
> > > > partition, so I simply copy the kernel to its target position.
> > > 
> > > I think it would be fine to assume that no separate firmware boot
> > > partition was being used in this mode, at least until such a platform
> > > turns up (sunxi doesn't want/need it AFAIK).
> > 
> > That is of course a valid design decision, but as it would break
> > the currently documented/expected behaviour of the Boot-Device
> > keyword in flash-kernel for a part of the use cases,
> 
> I was talking specifically about the case where Boot-Device wasn't used,
> nothing should change when it is, because you have to copy things in
> that case.
> 
> > I'd
> > personally prefer copying to symlinking.  A compromise could be
> > to use copying when Boot-Device is defined and to use symlinking
> > otherwise.  Would that be acceptable to you?
> 
> Yes, but I'm not sure why either is necessary on this platform, can you
> really not just use the vmlinuz/initrd.img symlinks which the Debian
> kernel packages create? IOW I don't think you need to set
> Boot-{Kernel,Initrd}-Path on this platform either, and then you avoid
> this can of worms too.

As can be seen above, the kernel package does not create symlinks in
/boot. It creates symlinks in /, but as it is possible (and sometimes even
necessary, e.g. with encrypted root) to have /boot on a seperate filesystem,
these are unusable in a boot script.

Regards,
Karsten
-- 
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.


Reply to: