Merge lp:~tom-leiming/debian-installer/trusty-for-generating-netboot-tarball-v1 into lp:~ubuntu-core-dev/debian-installer/trusty-proposed

Proposed by Ming Lei
Status: Merged
Merged at revision: 2032
Proposed branch: lp:~tom-leiming/debian-installer/trusty-for-generating-netboot-tarball-v1
Merge into: lp:~ubuntu-core-dev/debian-installer/trusty-proposed
Diff against target: 155 lines (+57/-8)
5 files modified
build/boot/arm64/grub/grub-efi.cfg (+7/-0)
build/config/arm64/generic/netboot.cfg (+32/-2)
build/util/efi-image (+7/-1)
debian/changelog (+6/-0)
debian/control (+5/-5)
To merge this branch: bzr merge lp:~tom-leiming/debian-installer/trusty-for-generating-netboot-tarball-v1
Reviewer Review Type Date Requested Status
Adam Conrad Pending
Steve Langasek Pending
Review via email: mp+294319@code.launchpad.net

Description of the change

For generating grub.efi and netboot.tar.gz on arm64/trusty

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=== added directory 'build/boot/arm64'
2=== added directory 'build/boot/arm64/grub'
3=== added file 'build/boot/arm64/grub/grub-efi.cfg'
4--- build/boot/arm64/grub/grub-efi.cfg 1970-01-01 00:00:00 +0000
5+++ build/boot/arm64/grub/grub-efi.cfg 2016-05-11 02:19:32 +0000
6@@ -0,0 +1,7 @@
7+set menu_color_normal=cyan/blue
8+set menu_color_highlight=white/blue
9+menuentry 'Install' {
10+ set background_color=black
11+ linux /ubuntu-installer/arm64/linux --- quiet
12+ initrd /ubuntu-installer/arm64/initrd.gz
13+}
14
15=== modified file 'build/config/arm64/generic/netboot.cfg'
16--- build/config/arm64/generic/netboot.cfg 2015-06-02 20:49:49 +0000
17+++ build/config/arm64/generic/netboot.cfg 2016-05-11 02:19:32 +0000
18@@ -1,11 +1,19 @@
19 MEDIA_TYPE = netboot image
20-TARGET = $(TEMP_INITRD) $(TEMP_KERNEL) all-generic
21+TARGET = $(NETBOOT_DIR) $(NETBOOT_TAR) all-generic
22 EXTRANAME = $(MEDIUM)/
23 INITRD_FS = initramfs
24
25 MANIFEST-INITRD = "netboot initrd"
26 MANIFEST-KERNEL = "kernel image to netboot"
27
28+NETBOOT_DIR_TARGETS = $(TEMP_INITRD) $(TEMP_KERNEL)
29+MANIFEST-NETBOOT_DIR = "PXE boot directory for tftp server"
30+MANIFEST-NETBOOT_TAR = "tarball of PXE boot directory"
31+GRUB_EFI=y
32+GRUB_PLATFORM=arm64-efi
33+GRUB_EFI_NAME=aa64
34+GRUB_FONT = /usr/share/grub/ascii.pf2
35+
36 generic:
37 mkdir -p $(SOME_DEST)/$(EXTRANAME)/
38 cp $(TEMP_KERNEL) $(SOME_DEST)/$(EXTRANAME)/vmlinuz
39@@ -37,4 +45,26 @@
40 update-manifest $(INSTALL_PATH)/uInitrd "initrd for X-Gene Boards"
41 update-manifest $(INSTALL_PATH)/apm-mustang.dtb "Device Tree file for APM X-Gene Mustang Board"
42
43-all-generic: generic xgene
44+arm64_grub_efi:
45+ifeq ($(GRUB_EFI),y)
46+ efi-image $(TEMP_GRUB_EFI) arm64-efi aa64 $(NETBOOT_PATH)
47+endif
48+
49+arch_netboot_dir: arm64_grub_efi
50+ -rm -f $(TEMP_NETBOOT_DIR)
51+ mkdir -p $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)
52+ cp $(TEMP_KERNEL) $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/linux
53+ cp $(TEMP_INITRD) $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/initrd.gz
54+
55+ if [ "$(GRUB_EFI)" = y ]; then \
56+ set -e; \
57+ mkdir -p $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/grub/arm64-efi; \
58+ cp -a $(TEMP_GRUB_EFI)/bootnetaa64.efi $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH); \
59+ cp -a $(GRUB_FONT) $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/grub/font.pf2; \
60+ cp -a $(TEMP_GRUB_EFI)/boot/grub/arm64-efi/* \
61+ $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/grub/arm64-efi/; \
62+ cp -f boot/arm64/grub/grub-efi.cfg \
63+ $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/grub/grub.cfg; \
64+ fi
65+
66+all-generic: generic xgene arch_netboot_dir
67
68=== modified file 'build/util/efi-image'
69--- build/util/efi-image 2012-10-15 20:03:40 +0000
70+++ build/util/efi-image 2016-05-11 02:19:32 +0000
71@@ -22,13 +22,14 @@
72 # it exists.
73
74 if [ -z "$1" ] || [ -z "$2" ]; then
75- echo "usage: $0 OUTPUT-DIRECTORY GRUB-PLATFORM EFI-NAME"
76+ echo "usage: $0 OUTPUT-DIRECTORY GRUB-PLATFORM EFI-NAME [NETBOOT-PREFIX]"
77 exit 1
78 fi
79
80 outdir="$1"
81 platform="$2"
82 efi_name="$3"
83+netboot_prefix="$4"
84
85 memdisk_img=
86 workdir=
87@@ -144,6 +145,11 @@
88 search iso9660 configfile normal memdisk tar part_msdos fat
89 fi
90
91+[ -z "$netboot_prefix" ] || \
92+grub-mkimage -O "$platform" \
93+ -o "$outdir/bootnet$efi_name.efi" -p "$netboot_prefix/grub" \
94+ search configfile normal efinet tftp net
95+
96 # Stuff it into a FAT filesystem, making it as small as possible. 24KiB
97 # headroom seems to be enough; (x+31)/32*32 rounds up to multiple of 32.
98 size=$(( $(stat -c %s "$workdir/boot$efi_name.efi") / 1024 ))
99
100=== modified file 'debian/changelog'
101--- debian/changelog 2016-05-02 17:29:58 +0000
102+++ debian/changelog 2016-05-11 02:19:32 +0000
103@@ -1,3 +1,9 @@
104+debian-installer (20101020ubuntu318.39) trusty; urgency=medium
105+
106+ * generate grub.efi and netboot.tar.gz for trusty on ARM64
107+
108+ -- Ming Lei <ming.lei@canonical.com> Wed, 11 May 2016 09:44:07 +0800
109+
110 debian-installer (20101020ubuntu318.38) trusty; urgency=medium
111
112 * Enable lts-xenial builds (LP: #1568918)
113
114=== modified file 'debian/control'
115--- debian/control 2014-02-10 19:47:21 +0000
116+++ debian/control 2016-05-11 02:19:32 +0000
117@@ -9,7 +9,7 @@
118 Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-core-dev/debian-installer/ubuntu
119 Build-Conflicts: libnewt-pic [mipsel]
120 # NOTE: Do not edit the next line by hand. See comment below.
121-Build-Depends: debhelper (>= 7.0.0), apt, apt-utils, gnupg, ubuntu-keyring, dctrl-tools, wget, bc, debiandoc-sgml, xsltproc, docbook-xml, docbook-xsl, libbogl-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], lsb-release, glibc-pic, libslang2-pic (>= 2.0.6-4), libnewt-pic (>= 0.52.2-11.3) [!mipsel], libnewt-dev (>= 0.52.2-11.3) [mipsel], libgcc1 [i386 amd64], cramfsprogs [powerpc ia64 mips mipsel armeb armel], genext2fs (>= 1.3-7.1), e2fsprogs, mklibs (>= 0.1.25), genisoimage (>= 9:1.1.10-1ubuntu2) [!s390 !s390x], genromfs [sparc sparc64], hfsutils [powerpc], dosfstools (>= 3.0.9-1ubuntu2) [i386 ia64 m68k amd64 armel armhf], cpio, devio [armeb armel], parted [armel armhf], slugimage (>= 0.10+r58-6) [armeb armel], u-boot-tools [arm64 armel armhf], syslinux (>= 2:4.02) [i386 amd64], palo [hppa], elilo [ia64], yaboot [powerpc], aboot (>= 0.9b-2) [alpha], silo [sparc], sparc-utils [sparc sparc64], genisovh [mips], tip22 [mips], colo [mipsel], sibyl [mips mipsel], atari-bootstrap [m68k], vmelilo [m68k], m68k-vme-tftplilo [m68k], amiboot [m68k], emile [m68k], emile-bootblocks [m68k], u-boot [armel armhf], shim-signed [amd64], tofrodos [i386 amd64 kfreebsd-i386 kfreebsd-amd64], mtools [i386 ia64 m68k amd64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 armel armhf], po4a [i386 amd64], python3 (>= 3.1) [i386 amd64], module-init-tools [i386 arm64 armeb armel armhf amd64 alpha hppa ia64 m68k mips mipsel powerpc ppc64el s390 sh4 sparc sparc64], bf-utf-source [!s390 !s390x], mkvmlinuz [powerpc], openssl, makefs [kfreebsd-i386 kfreebsd-amd64], grub-pc (>= 1.98~20100101-1) [kfreebsd-i386 kfreebsd-amd64 hurd-i386], xorriso [kfreebsd-i386 kfreebsd-amd64 hurd-i386 ppc64el], grub-efi-amd64-bin (>= 2.00) [amd64], grub-common [amd64], debian-ports-archive-keyring [sh4 sparc64], grub-ieee1275-bin [ppc64el]
122+Build-Depends: debhelper (>= 7.0.0), apt, apt-utils, gnupg, ubuntu-keyring, dctrl-tools, wget, bc, debiandoc-sgml, xsltproc, docbook-xml, docbook-xsl, libbogl-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], lsb-release, glibc-pic, libslang2-pic (>= 2.0.6-4), libnewt-pic (>= 0.52.2-11.3) [!mipsel], libnewt-dev (>= 0.52.2-11.3) [mipsel], libgcc1 [i386 amd64], cramfsprogs [powerpc ia64 mips mipsel armeb armel], genext2fs (>= 1.3-7.1), e2fsprogs, mklibs (>= 0.1.25), genisoimage (>= 9:1.1.10-1ubuntu2) [!s390 !s390x], genromfs [sparc sparc64], hfsutils [powerpc], dosfstools (>= 3.0.9-1ubuntu2) [i386 ia64 m68k amd64 armel armhf arm64], cpio, devio [armeb armel], parted [armel armhf], slugimage (>= 0.10+r58-6) [armeb armel], u-boot-tools [arm64 armel armhf], syslinux (>= 2:4.02) [i386 amd64], palo [hppa], elilo [ia64], yaboot [powerpc], aboot (>= 0.9b-2) [alpha], silo [sparc], sparc-utils [sparc sparc64], genisovh [mips], tip22 [mips], colo [mipsel], sibyl [mips mipsel], atari-bootstrap [m68k], vmelilo [m68k], m68k-vme-tftplilo [m68k], amiboot [m68k], emile [m68k], emile-bootblocks [m68k], u-boot [armel armhf], shim-signed [amd64], tofrodos [i386 amd64 kfreebsd-i386 kfreebsd-amd64], mtools [i386 ia64 m68k amd64 arm64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 armel armhf], po4a [i386 amd64], python3 (>= 3.1) [i386 amd64], module-init-tools [i386 arm64 armeb armel armhf amd64 alpha hppa ia64 m68k mips mipsel powerpc ppc64el s390 sh4 sparc sparc64], bf-utf-source [!s390 !s390x], mkvmlinuz [powerpc], openssl, makefs [kfreebsd-i386 kfreebsd-amd64], grub-pc (>= 1.98~20100101-1) [kfreebsd-i386 kfreebsd-amd64 hurd-i386], xorriso [kfreebsd-i386 kfreebsd-amd64 hurd-i386 ppc64el], grub-efi-amd64-bin (>= 2.00) [amd64], grub-efi-arm64-bin [arm64], grub-common [amd64 arm64], debian-ports-archive-keyring [sh4 sparc64], grub-ieee1275-bin [ppc64el]
123 # This package has the worst Build-Depends in Debian, so it deserves some
124 # explanation. Note that this comment can also be used to generate a
125 # Build-Depends line, by running the debian/genbuilddeps program.
126@@ -82,7 +82,7 @@
127 # default.)
128 # - hfsutils [powerpc]
129 # For making bootable HFS USB sticks for powerpc.
130-# - dosfstools (>= 3.0.9-1ubuntu2) [i386 ia64 m68k amd64 armel armhf]
131+# - dosfstools (>= 3.0.9-1ubuntu2) [i386 ia64 m68k amd64 armel armhf arm64]
132 # For creating FAT filesystems with mkfs.msdos.
133 # Of course i386/amd64 use this for floppies, CDs etc.
134 # ia64 uses it for floppies (?)
135@@ -148,7 +148,7 @@
136 # - tofrodos [i386 amd64 kfreebsd-i386 kfreebsd-amd64]
137 # For todos, used on files that need to be accessible from
138 # DOS.
139-# - mtools [i386 ia64 m68k amd64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 armel armhf]
140+# - mtools [i386 ia64 m68k amd64 arm64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 armel armhf]
141 # mcopy is used to put files onto FAT filesystems w/o
142 # mounting them.
143 # - po4a [i386 amd64]
144@@ -174,9 +174,9 @@
145 # Used as the CD-ROM's bootloader
146 # - xorriso [kfreebsd-i386 kfreebsd-amd64 hurd-i386 ppc64el]
147 # Used by grub-pc/grub-ieee1275-bin to create the CD-ROM images
148-# - grub-efi-amd64-bin (>= 2.00) [amd64]
149+# - grub-efi-amd64-bin (>= 2.00) [amd64], grub-efi-arm64-bin [arm64]
150 # EFI bootloader support.
151-# - grub-common [amd64]
152+# - grub-common [amd64 arm64]
153 # For the GRUB font.
154 # - debian-ports-archive-keyring [sh4 sparc64]
155 # Used for architectures hosted on debian-ports.org

Subscribers

People subscribed via source and target branches