Merge lp:~sergiusens/livecd-rootfs/snappyDevicePart into lp:livecd-rootfs

Proposed by Sergio Schvezov
Status: Merged
Merged at revision: 1171
Proposed branch: lp:~sergiusens/livecd-rootfs/snappyDevicePart
Merge into: lp:livecd-rootfs
Diff against target: 58 lines (+14/-19)
1 file modified
live-build/ubuntu-core/hooks/500-move-kernel-to-device-tar.binary (+14/-19)
To merge this branch: bzr merge lp:~sergiusens/livecd-rootfs/snappyDevicePart
Reviewer Review Type Date Requested Status
Ubuntu Core Development Team Pending
Review via email: mp+264158@code.launchpad.net

Commit message

Using versioned kernel and initrd for generating assets and removing uneeded files from the device part

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'live-build/ubuntu-core/hooks/500-move-kernel-to-device-tar.binary'
2--- live-build/ubuntu-core/hooks/500-move-kernel-to-device-tar.binary 2015-06-25 11:36:42 +0000
3+++ live-build/ubuntu-core/hooks/500-move-kernel-to-device-tar.binary 2015-07-08 14:46:59 +0000
4@@ -14,41 +14,36 @@
5
6 # cp files, we can't simply use tar --transform as it changes the symlink target
7 (
8- cd binary/boot/filesystem.dir
9+ cd binary/boot/filesystem.dir
10
11- # for compatibility with current grub/u-d-f
12- cp -ar --parent boot/vmlinu?-* boot/initrd.img-* boot/abi-* boot/System.map-* $TMPDIR/system/
13- if [ -e vmlinu? ] && [ -e initrd.img ]; then
14- cp -ar --parent vmlinu? initrd.img $TMPDIR/system
15- fi
16 cp -ar --parent lib/modules/ $TMPDIR/system/
17 cp -ar --parent lib/firmware/ $TMPDIR/system/
18
19 # new assets handling
20- # FIXME:
21- # - how to keep version information (and do we care)
22 if [ -f boot/vmlinu?-*.signed ]; then
23- cp -ar boot/vmlinu?-*.signed $TMPDIR/assets/vmlinuz
24+ kernel=boot/vmlinu?-*.signed
25 else
26- cp -ar boot/vmlinu?-* $TMPDIR/assets/vmlinuz
27+ kernel=boot/vmlinu?-*
28 fi
29- cp -ar boot/initrd.img-* $TMPDIR/assets/initrd.img
30+
31+ initrd=boot/initrd.img-*
32+
33+ cp -ar "$initrd" $TMPDIR/assets/
34+ cp -ar "$kernel" $TMPDIR/assets/
35 cp -ar boot/abi-* boot/System.map-* $TMPDIR/assets/
36
37 dtbs=$(find lib/firmware -type d -name 'device-tree' -print0)
38 if [ -n "$dtbs" ]; then
39 mv "$dtbs" $TMPDIR/assets/dtbs
40 fi
41-)
42
43-# create hardware.yaml for u-boot
44-# this assumes armh == u-boot
45-# and all others grub
46-(
47-# common bits
48+ # create hardware.yaml
49+ # this assumes armh == u-boot
50+ # and all others grub
51+ # common bits
52 cat > $TMPDIR/hardware.yaml << EOF
53-kernel: assets/vmlinuz
54-initrd: assets/initrd.img
55+kernel: assets/$(basename "$kernel")
56+initrd: assets/$(basename "$initrd")
57 partition-layout: system-AB
58 EOF
59

Subscribers

People subscribed via source and target branches