Merge lp:~dannf/debian-installer/arm64-cleanup into lp:~ubuntu-core-dev/debian-installer/ubuntu

Proposed by dann frazier
Status: Rejected
Rejected by: Mathieu Trudel-Lapierre
Proposed branch: lp:~dannf/debian-installer/arm64-cleanup
Merge into: lp:~ubuntu-core-dev/debian-installer/ubuntu
Diff against target: 639 lines (+433/-18) (has conflicts)
18 files modified
build/Makefile (+22/-0)
build/boot/README.device-tree (+2/-0)
build/boot/arm64/grub/grub-efi.cfg (+3/-0)
build/config/arm64.cfg (+93/-5)
build/config/arm64/cdrom.cfg (+3/-0)
build/config/arm64/cdrom/grub.cfg (+8/-0)
build/config/arm64/device-tree.cfg (+4/-0)
build/config/arm64/generic.cfg (+0/-7)
build/config/arm64/netboot.cfg (+37/-0)
build/config/dir (+2/-0)
build/pkg-lists/cdrom/arm64.cfg (+11/-0)
build/pkg-lists/cdrom/grub/arm64.cfg (+2/-0)
build/pkg-lists/device-tree/arm64.cfg (+1/-0)
build/pkg-lists/device-tree/common (+1/-0)
build/util/efi-image (+7/-1)
build/util/grub-gencfg (+210/-0)
debian/changelog (+22/-0)
debian/control (+5/-5)
Text conflict in build/config/arm64.cfg
Conflict: can't delete build/config/arm64/generic because it is not empty.  Not deleting.
Conflict because build/config/arm64/generic is not versioned, but has versioned children.  Versioned directory.
Contents conflict in build/config/arm64/generic/netboot.cfg
Text conflict in debian/changelog
To merge this branch: bzr merge lp:~dannf/debian-installer/arm64-cleanup
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre Disapprove
Scott Moser Pending
Review via email: mp+249738@code.launchpad.net

Description of the change

This is a series of cleanups for the arm64 netboot build. Quick highlights:
 - Use mklibs
 - Get rid of "generic" in directory hiearchy
 - Rename "xgene" to "xgene-uboot"
 - Provide all available dtbs
 - Add a netboot tarball (will add grub/uboot-pxe confs later)
 - Generally more in-line w/ Debian

I strongly recommend reviewing each commit individually, esp. since files are getting moved around. I've tried to keep a commit per functional change.

To post a comment you must log in.
Revision history for this message
dann frazier (dannf) wrote :

@Scott - I've requested your review here because this will require corresponding changes to the maas-images simple stream:

netboot/generic/vmlinuz -> netboot/vmlinuz
netboot/generic/initrd.gz -> netboot/initrd.gz
netboot/generic/xgene/uImage -> netboot/xgene-uboot/uImage
netboot/generic/xgene/uInitrd -> netboot/xgene-uboot/uInitrd
netboot/generic/xgene/apm-mustang.dtb -> device-tree/apm-mustang.dtb

2048. By dann frazier

arm64: Create a netboot tarball

As we start adding more content to the netboot directory - like configuration
files and bootloaders for PXE - it will become a pain to have to download each
file individually. Follow other architectures and generate netboot.tar.gz.

Revision history for this message
dann frazier (dannf) wrote :
2049. By dann frazier

Cleanup unused MANIFEST entries

Now that we're generating a netboot tarball, the MANIFEST entries for the
individual components are unused.

2050. By dann frazier

arm64: Add netboot mini.iso (from Debian)

2051. By dann frazier

Include a useful grub.cfg for arm64 (from Debian)

2052. By dann frazier

arm64: Build cdrom flavor (from Debian)

2053. By dann frazier

Use grub-gencfg for cdrom image as well

2054. By dann frazier

netboot bits

2055. By dann frazier

Fix typo in build-deps

Revision history for this message
Sebastien Bacher (seb128) wrote :

I didn't review that one bug the summary lists merge conflicts, those might need to be resolved?

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Rejecting; I asked dann and it looks like this is included in another merge (https://code.launchpad.net/~dannf/debian-installer/arm64-grubimages/+merge/253282)

review: Disapprove

Unmerged revisions

2055. By dann frazier

Fix typo in build-deps

2054. By dann frazier

netboot bits

2053. By dann frazier

Use grub-gencfg for cdrom image as well

2052. By dann frazier

arm64: Build cdrom flavor (from Debian)

2051. By dann frazier

Include a useful grub.cfg for arm64 (from Debian)

2050. By dann frazier

arm64: Add netboot mini.iso (from Debian)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'build/Makefile'
2--- build/Makefile 2015-01-22 12:10:03 +0000
3+++ build/Makefile 2015-03-19 23:51:04 +0000
4@@ -414,6 +414,14 @@
5
6 # These files are used to build special kernel images for some
7 # subarchitectures. Move them out of the way.
8+ #
9+ # Merge note on the last if:
10+ # On Debian, the first two if statements have the side-effect of
11+ # moving the dtb files under $(TEMP)/lib. The device-tree
12+ # media type expects this and will look for the dtbs there.
13+ # Ubuntu installs dtbs into a different path (under
14+ # /lib/firmware), so we need to simulate that side-effect
15+ # here.
16 $(foreach VERSION,$(KERNELVERSION), \
17 if [ -d $(TREE)/usr/lib/kernel-image-$(VERSION) ]; then \
18 mv $(TREE)/usr/lib/kernel-image-$(VERSION) \
19@@ -422,6 +430,10 @@
20 if [ -d $(TREE)/usr/lib/linux-image-$(VERSION) ]; then \
21 mv $(TREE)/usr/lib/linux-image-$(VERSION) \
22 $(TEMP)/lib; \
23+ fi; \
24+ if [ -d $(TREE)/lib/firmware/$(VERSION)/device-tree ]; then \
25+ cp -a $(TREE)/lib/firmware/$(VERSION)/device-tree \
26+ $(TEMP)/lib; \
27 fi;)
28 endif
29 endif
30@@ -763,6 +775,16 @@
31 update-manifest $@ $(MANIFEST-KERNEL)
32 endif
33
34+$(DTBS): $(TEMP_KERNEL)
35+ mkdir -p $(SOME_DEST)/$(EXTRANAME)
36+ set -ex ; for dtb in $(TEMP_DTBS)/*.dtb ; do \
37+ tgt=$(SOME_DEST)/$(EXTRANAME)$$(basename $$dtb); \
38+ cp $$dtb $$tgt ; \
39+ update-manifest $$tgt "Device Tree Blob: $$(basename $$dtb)";\
40+ done
41+ cp boot/README.device-tree $@
42+ update-manifest $@ "Device Tree Blobs README"
43+
44 # bootable images
45 $(BOOT): $(TEMP_BOOT)
46 install -m 644 -D $(TEMP_BOOT)$(GZIPPED) $@
47
48=== added file 'build/boot/README.device-tree'
49--- build/boot/README.device-tree 1970-01-01 00:00:00 +0000
50+++ build/boot/README.device-tree 2015-03-19 23:51:04 +0000
51@@ -0,0 +1,2 @@
52+This directory contains all of the device-tree files shipped by the Ubuntu
53+kernel package.
54
55=== added directory 'build/boot/arm64'
56=== added directory 'build/boot/arm64/grub'
57=== added file 'build/boot/arm64/grub/grub-efi.cfg'
58--- build/boot/arm64/grub/grub-efi.cfg 1970-01-01 00:00:00 +0000
59+++ build/boot/arm64/grub/grub-efi.cfg 2015-03-19 23:51:04 +0000
60@@ -0,0 +1,3 @@
61+set menu_color_normal=cyan/blue
62+set menu_color_highlight=white/blue
63+
64
65=== modified file 'build/config/arm64.cfg'
66--- build/config/arm64.cfg 2015-03-12 09:35:57 +0000
67+++ build/config/arm64.cfg 2015-03-19 23:51:04 +0000
68@@ -1,14 +1,102 @@
69-SUBARCH_SUPPORTED = generic
70-
71-MKLIBS = mklibs-copy
72+MEDIUM_SUPPORTED = cdrom netboot device-tree
73
74 KERNELMAJOR = 2.6
75+<<<<<<< TREE
76 KERNELVERSION = 3.19.0-9
77+=======
78+KERNELVERSION = 3.18.0-13-generic
79+>>>>>>> MERGE-SOURCE
80 KERNEL_FLAVOUR = di
81 KERNELIMAGEVERSION = $(KERNELVERSION)
82-KERNELNAME = $(foreach ver,$(KERNELVERSION),vmlinuz-$(ver))
83+KERNELNAME = vmlinuz
84
85-VERSIONED_SYSTEM_MAP = t
86+GRUB_EFI=y
87+GRUB_PLATFORM=arm64-efi
88+GRUB_EFI_NAME=aa64
89+GRUB_FONT = /usr/share/grub/ascii.pf2
90
91 arch_boot_screens:
92 arch_tree:
93+
94+# Extract GRUB EFI files.
95+.PHONY: arm64_grub_efi
96+arm64_grub_efi:
97+ifeq ($(GRUB_EFI),y)
98+ efi-image $(TEMP_GRUB_EFI) arm64-efi aa64 $(NETBOOT_PATH)
99+endif
100+
101+
102+# Supply GRUB EFI configuration.
103+.PHONY: arch_cd_info_dir
104+arch_cd_info_dir: arm64_grub_efi
105+ -rm -f $(TEMP_CD_INFO_DIR)/*
106+ mkdir -p $(TEMP_CD_INFO_DIR)
107+
108+ if [ "$(GRUB_EFI)" = y ]; then \
109+ set -e; \
110+ mkdir -p $(TEMP_CD_INFO_DIR)/grub/arm64-efi; \
111+ cp -a $(TEMP_GRUB_EFI)/efi.img $(TEMP_CD_INFO_DIR)/grub/; \
112+ grub-gencfg \
113+ KERNEL /%install%/vmlinuz \
114+ INITRD /%install%/initrd.gz \
115+ HEADER boot/arm64/grub/grub-efi.cfg \
116+ > $(TEMP_CD_INFO_DIR)/grub/grub.cfg; \
117+ cp -a $(GRUB_FONT) $(TEMP_CD_INFO_DIR)/grub/font.pf2; \
118+ cp -a $(TEMP_GRUB_EFI)/boot/grub/arm64-efi/* \
119+ $(TEMP_CD_INFO_DIR)/grub/arm64-efi/; \
120+ fi
121+
122+.PHONY: arch_miniiso
123+arch_miniiso: arm64_grub_efi
124+ -rm -f $(TEMP_CD_TREE)/*
125+ mkdir -p $(TEMP_CD_TREE)
126+
127+ ln -f $(TEMP_KERNEL) $(TEMP_CD_TREE)/linux
128+ ln -f $(TEMP_INITRD) $(TEMP_CD_TREE)/initrd.gz
129+
130+ mkdir -p $(TEMP_CD_TREE)/.disk
131+ echo "Debian GNU/Linux $(DEBIAN_VERSION) $(ARCH) - netboot mini.iso $(BUILD_DATE)"\
132+ > $(TEMP_CD_TREE)/.disk/info
133+
134+ if [ "$(GRUB_EFI)" = y ]; then \
135+ set -e; \
136+ mkdir -p $(TEMP_CD_TREE)/boot/grub/arm64-efi; \
137+ cp -a $(TEMP_GRUB_EFI)/efi.img $(TEMP_CD_TREE)/boot/grub/; \
138+ grub-gencfg \
139+ KERNEL /linux \
140+ INITRD /initrd.gz \
141+ HEADER boot/arm64/grub/grub-efi.cfg \
142+ > $(TEMP_CD_TREE)/boot/grub/grub.cfg; \
143+ cp -a $(GRUB_FONT) $(TEMP_CD_TREE)/boot/grub/font.pf2; \
144+ cp -a $(TEMP_GRUB_EFI)/boot/grub/arm64-efi/* \
145+ $(TEMP_CD_TREE)/boot/grub/arm64-efi/; \
146+ fi
147+
148+ if [ "$(GRUB_EFI)" = y ]; then \
149+ xorriso -as mkisofs -r -J -c boot.cat \
150+ -boot-load-size 4 -boot-info-table \
151+ -eltorito-alt-boot \
152+ --efi-boot boot/grub/efi.img -no-emul-boot \
153+ -o $(TEMP_MINIISO) $(TEMP_CD_TREE); \
154+ fi
155+
156+.PHONY: arch_netboot_dir
157+arch_netboot_dir: arm64_grub_efi
158+ -rm -f $(TEMP_NETBOOT_DIR)
159+ mkdir -p $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)
160+ cp $(TEMP_KERNEL) $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/linux
161+ cp $(TEMP_INITRD) $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/initrd.gz
162+
163+ if [ "$(GRUB_EFI)" = y ]; then \
164+ set -e; \
165+ mkdir -p $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/grub/arm64-efi; \
166+ cp -a $(TEMP_GRUB_EFI)/bootnetaa64.efi $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH); \
167+ cp -a $(GRUB_FONT) $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/grub/font.pf2; \
168+ cp -a $(TEMP_GRUB_EFI)/boot/grub/arm64-efi/* \
169+ $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/grub/arm64-efi/; \
170+ grub-gencfg \
171+ KERNEL /$(NETBOOT_PATH)/linux \
172+ INITRD /$(NETBOOT_PATH)/initrd.gz \
173+ HEADER boot/arm64/grub/grub-efi.cfg \
174+ > $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/grub/grub.cfg; \
175+ fi
176
177=== added directory 'build/config/arm64/cdrom'
178=== added file 'build/config/arm64/cdrom.cfg'
179--- build/config/arm64/cdrom.cfg 1970-01-01 00:00:00 +0000
180+++ build/config/arm64/cdrom.cfg 2015-03-19 23:51:04 +0000
181@@ -0,0 +1,3 @@
182+FLAVOUR_SUPPORTED = grub
183+
184+MEDIA_TYPE = CD-ROM
185
186=== added file 'build/config/arm64/cdrom/grub.cfg'
187--- build/config/arm64/cdrom/grub.cfg 1970-01-01 00:00:00 +0000
188+++ build/config/arm64/cdrom/grub.cfg 2015-03-19 23:51:04 +0000
189@@ -0,0 +1,8 @@
190+MEDIA_TYPE = CD-ROM
191+TARGET = $(INITRD) $(KERNEL) $(DEBIAN_CD_INFO)
192+
193+MANIFEST-KERNEL = "kernel for use with EFI to build a CD"
194+MANIFEST-INITRD = "initrd for use with EFI to build a CD"
195+MANIFEST-DEBIAN_CD_INFO = "EFI config files for CD"
196+
197+TYPE = cdrom/grub
198
199=== added file 'build/config/arm64/device-tree.cfg'
200--- build/config/arm64/device-tree.cfg 1970-01-01 00:00:00 +0000
201+++ build/config/arm64/device-tree.cfg 2015-03-19 23:51:04 +0000
202@@ -0,0 +1,4 @@
203+MEDIA_TYPE = device-tree blobs
204+
205+TARGET = $(DTBS)
206+EXTRANAME = $(MEDIUM)/
207
208=== removed file 'build/config/arm64/generic.cfg'
209--- build/config/arm64/generic.cfg 2014-01-27 14:09:42 +0000
210+++ build/config/arm64/generic.cfg 1970-01-01 00:00:00 +0000
211@@ -1,7 +0,0 @@
212-MEDIUM_SUPPORTED = netboot
213-
214-# The version of the kernel to use.
215-KERNELVERSION := $(KERNELVERSION)-generic
216-# we use non-versioned filenames in the generic kernel udeb
217-KERNELNAME = vmlinuz
218-VERSIONED_SYSTEM_MAP =
219
220=== renamed file 'build/config/arm64/generic/netboot.cfg' => 'build/config/arm64/generic/netboot.cfg.THIS'
221=== added file 'build/config/arm64/netboot.cfg'
222--- build/config/arm64/netboot.cfg 1970-01-01 00:00:00 +0000
223+++ build/config/arm64/netboot.cfg 2015-03-19 23:51:04 +0000
224@@ -0,0 +1,37 @@
225+MEDIA_TYPE = netboot image
226+
227+NETBOOT_DIR_TARGETS = $(TEMP_INITRD) $(TEMP_KERNEL)
228+TARGET = $(NETBOOT_DIR) $(NETBOOT_TAR) $(MINIISO)
229+EXTRANAME = $(MEDIUM)/
230+
231+MANIFEST-NETBOOT_DIR = "PXE boot directory for tftp server"
232+MANIFEST-NETBOOT_TAR = "tarball of PXE boot directory"
233+MANIFEST-MINIISO = "tiny CD image that boots the netboot installer"
234+
235+.PHONY: arch_netboot_dir
236+arch_netboot_dir:
237+ -rm -f $(TEMP_NETBOOT_DIR)
238+ mkdir -p $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)
239+ cp $(TEMP_KERNEL) $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/linux
240+ cp $(TEMP_INITRD) $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/initrd.gz
241+
242+ if [ "$(GRUB_EFI)" = y ]; then \
243+ set -e; \
244+ mkdir -p $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/grub/arm64-efi; \
245+ cp -a $(TEMP_GRUB_EFI)/bootnetaa64.efi $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH); \
246+ cp -a $(GRUB_FONT) $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/grub/font.pf2; \
247+ cp -a $(TEMP_GRUB_EFI)/boot/grub/arm64-efi/* \
248+ $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/grub/arm64-efi/; \
249+ grub-gencfg \
250+ KERNEL /$(NETBOOT_PATH)/linux \
251+ INITRD /$(NETBOOT_PATH)/initrd.gz \
252+ HEADER boot/arm64/grub/grub-efi.cfg \
253+ > $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/grub/grub.cfg; \
254+ fi
255+
256+ # Generate images for X-Gene systems using U-Boot.
257+ # They don't currently support bootz.
258+ $(eval XU_INSTALL_PATH=$(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/xgene-uboot)
259+ mkdir -p $(XU_INSTALL_PATH)
260+ mkimage -A arm -O linux -T kernel -C none -a 0x80000 -e 0x80000 -n "Ubuntu kernel" -d $(TEMP_KERNEL) $(XU_INSTALL_PATH)/uImage
261+ mkimage -A arm -O linux -T ramdisk -C none -a 0x0 -e 0x0 -n "debian-installer ramdisk" -d $(TEMP_INITRD) $(XU_INSTALL_PATH)/uInitrd
262
263=== modified file 'build/config/dir'
264--- build/config/dir 2010-08-25 22:06:28 +0000
265+++ build/config/dir 2015-03-19 23:51:04 +0000
266@@ -62,6 +62,7 @@
267 # The files we may want to have in dest/
268 INITRD = $(SOME_DEST)/$(EXTRANAME)initrd.gz
269 KERNEL = $(foreach name,$(KERNELNAME),$(SOME_DEST)/$(EXTRANAME)$(name))
270+DTBS = $(SOME_DEST)/$(EXTRANAME)README
271 BOOT = $(SOME_DEST)/$(EXTRANAME)boot.img$(GZIPPED)
272 ROOT = $(SOME_DEST)/$(EXTRANAME)root.img$(GZIPPED)
273 EXTRA = $(SOME_DEST)/$(EXTRANAME).img$(GZIPPED)
274@@ -76,6 +77,7 @@
275 TEMP_INITRD = $(TEMP)/initrd.gz
276 TEMP_UDEB_LIST = $(TEMP)/udeb.list
277 TEMP_KERNEL = $(foreach name,$(KERNELNAME),$(TEMP)/$(name))
278+TEMP_DTBS = $(TEMP)/lib
279 TEMP_BOOT = $(TEMP)/boot.img
280 TEMP_ROOT = $(TEMP)/root.img
281 TEMP_MINIISO = $(TEMP)/mini.iso
282
283=== added file 'build/pkg-lists/cdrom/arm64.cfg'
284--- build/pkg-lists/cdrom/arm64.cfg 1970-01-01 00:00:00 +0000
285+++ build/pkg-lists/cdrom/arm64.cfg 2015-03-19 23:51:04 +0000
286@@ -0,0 +1,11 @@
287+fat-modules-${kernel:Version}
288+storage-core-modules-${kernel:Version}
289+input-modules-${kernel:Version}
290+console-setup-udeb
291+usb-modules-${kernel:Version} ?
292+#serial-modules-${kernel:Version}
293+usb-serial-modules-${kernel:Version} ?
294+uinput-modules-${kernel:Version} ?
295+
296+# also support MMC/SD cards
297+mmc-modules-${kernel:Version} ?
298
299=== added directory 'build/pkg-lists/cdrom/grub'
300=== added file 'build/pkg-lists/cdrom/grub/arm64.cfg'
301--- build/pkg-lists/cdrom/grub/arm64.cfg 1970-01-01 00:00:00 +0000
302+++ build/pkg-lists/cdrom/grub/arm64.cfg 2015-03-19 23:51:04 +0000
303@@ -0,0 +1,2 @@
304+# This image is based on the regular cdrom image, and gets all the packages
305+# from that one too.
306
307=== added directory 'build/pkg-lists/device-tree'
308=== added file 'build/pkg-lists/device-tree/arm64.cfg'
309--- build/pkg-lists/device-tree/arm64.cfg 1970-01-01 00:00:00 +0000
310+++ build/pkg-lists/device-tree/arm64.cfg 2015-03-19 23:51:04 +0000
311@@ -0,0 +1,1 @@
312+# Empty
313
314=== added file 'build/pkg-lists/device-tree/common'
315--- build/pkg-lists/device-tree/common 1970-01-01 00:00:00 +0000
316+++ build/pkg-lists/device-tree/common 2015-03-19 23:51:04 +0000
317@@ -0,0 +1,1 @@
318+#include "kernel"
319
320=== modified file 'build/util/efi-image'
321--- build/util/efi-image 2012-10-15 20:03:40 +0000
322+++ build/util/efi-image 2015-03-19 23:51:04 +0000
323@@ -22,13 +22,14 @@
324 # it exists.
325
326 if [ -z "$1" ] || [ -z "$2" ]; then
327- echo "usage: $0 OUTPUT-DIRECTORY GRUB-PLATFORM EFI-NAME"
328+ echo "usage: $0 OUTPUT-DIRECTORY GRUB-PLATFORM EFI-NAME [NETBOOT-PREFIX]"
329 exit 1
330 fi
331
332 outdir="$1"
333 platform="$2"
334 efi_name="$3"
335+netboot_prefix="$4"
336
337 memdisk_img=
338 workdir=
339@@ -144,6 +145,11 @@
340 search iso9660 configfile normal memdisk tar part_msdos fat
341 fi
342
343+[ -z "$netboot_prefix" ] || \
344+grub-mkimage -O "$platform" \
345+ -o "$outdir/bootnet$efi_name.efi" -p "$netboot_prefix/grub" \
346+ search configfile normal efinet tftp net
347+
348 # Stuff it into a FAT filesystem, making it as small as possible. 24KiB
349 # headroom seems to be enough; (x+31)/32*32 rounds up to multiple of 32.
350 size=$(( $(stat -c %s "$workdir/boot$efi_name.efi") / 1024 ))
351
352=== added file 'build/util/grub-gencfg'
353--- build/util/grub-gencfg 1970-01-01 00:00:00 +0000
354+++ build/util/grub-gencfg 2015-03-19 23:51:04 +0000
355@@ -0,0 +1,210 @@
356+#!/usr/bin/perl
357+
358+# Invoke as:
359+#
360+# ./gen-grub-cfg KEY1 VAL1 KEY2 VAL2 ... -- COMMAND LINE
361+#
362+# Keys are:
363+# KERNEL Normal kernel to use (required)
364+# INITRD Normal initrd to use (required)
365+# INITRD_GTK Graphical installer initrd (optional)
366+#
367+# KERNEL64 Alternative kernel for optional 64-bit entries
368+# INITRD64 Alternative initrd for optional 64-bit entries
369+# INITRD64_GTK Alternative graphical initrd for optional 64-bit entries
370+#
371+# THEME_PATH Path (in boot env) where themes are kept
372+# HEADER Local path to file cat include as a header
373+#
374+# At least KERNEL and INITRD must be given.
375+#
376+# Unsupported:
377+# DEBIAN_VERSION
378+# BUILD_DATE
379+#
380+# TODO: Theme generation from template
381+#
382+# When invoked as:
383+#
384+# ./gen-grub-cfg \
385+# KERNEL "/%install%/vmlinuz" \
386+# KERNEL64 "/%install-amd%/vmlinuz" \
387+# INITRD "/%install%/initrd.gz" \
388+# INITRD64 "/%install-amd%/initrd.gz" \
389+# INITRD_GTK "/%install%/gtk/initrd.gz" \
390+# INITRD64_GTK "/%install-amd%/gtk/initrd.gz" \
391+# THEME_PATH "/boot/grub/theme/" \
392+# HEADER "build/boot/x86/grub/grub-efi.cfg" \
393+# -- vga=788
394+#
395+# Will reproduce something similar to
396+# debian-testing-amd64-netinst.iso::/boot/grub/grub.cfg weekly build
397+# circa 2014-09-27.
398+
399+use warnings;
400+use strict;
401+
402+my %VARS;
403+
404+while (@ARGV) {
405+ my $key=shift;
406+ last if $key eq "--";
407+
408+ my $value=shift;
409+ $VARS{$key}=$value;
410+}
411+
412+my @OPTS = @ARGV;
413+
414+die "No kernel?" unless $VARS{KERNEL};
415+die "No initrd?" unless $VARS{INITRD};
416+
417+my $graphical = defined $VARS{INITRD_GTK};
418+my $sixtyfour = defined $VARS{KERNEL64} && defined $VARS{INITRD64}
419+ && (!$graphical || defined $VARS{INITRD64_GTK});
420+my $themed = defined $VARS{THEME_PATH};
421+
422+my @menu_number = (1);
423+
424+sub print_indented ($)
425+{
426+ my ($text) = @_;
427+ foreach ( split "\n", $text ) {
428+ my $i = 1;
429+ print " " while ( $i++ < $#menu_number );
430+ print "$_";
431+ print "\n";
432+ }
433+}
434+
435+sub menu_theme ()
436+{
437+ my $name = join "-", @menu_number;
438+}
439+sub print_set_theme ($)
440+{
441+ my ($theme) = @_;
442+ return unless $themed;
443+
444+ print_indented("set theme=$VARS{THEME_PATH}$theme\n");
445+}
446+
447+sub start_submenu ($)
448+{
449+ my ($title) = @_;
450+
451+ print_indented("submenu '$title' {\n");
452+
453+ my $theme = menu_theme();
454+ push @menu_number, 1;
455+
456+ print_indented("set menu_color_normal=cyan/blue\n");
457+ print_indented("set menu_color_highlight=white/blue\n");
458+ print_set_theme($theme);
459+}
460+sub end_submenu ()
461+{
462+ pop @menu_number;
463+ $menu_number[$#menu_number]++;
464+ print_indented("}\n");
465+}
466+
467+sub menuentry ($;%)
468+{
469+ my ($title,%xattr) = @_;
470+
471+ $xattr{SixtyFour} ||= 0;
472+ $xattr{Graphical} ||= 0;
473+
474+ $xattr{Expert} ||= 0;
475+ $xattr{Auto} ||= 0;
476+ $xattr{Rescue} ||= 0;
477+ $xattr{Speach} ||= 0;
478+
479+ $xattr{Quiet} = !$xattr{Expert} unless defined $xattr{Quiet};
480+
481+ return if $xattr{Graphical} && !$graphical;
482+ return if $xattr{SixtyFour} && !$sixtyfour;
483+
484+ die "automated expert?" if $xattr{Expert} && $xattr{Auto};
485+
486+ my $kernel = $xattr{SixtyFour} ? $VARS{KERNEL64} : $VARS{KERNEL};
487+ my $initrd = $xattr{Graphical} ? $VARS{INITRD_GTK} : $VARS{INITRD};
488+ $initrd = $xattr{Graphical} ? $VARS{INITRD64_GTK} : $VARS{INITRD64}
489+ if $xattr{SixtyFour};
490+
491+ die "no kernel" unless $kernel;
492+ die "no initrd" unless $initrd;
493+
494+ my @cmdline;
495+ # Ordering here is to allow diffing against previous versions of this file.
496+ push @cmdline, "desktop=$xattr{Desktop}" if $xattr{Desktop};
497+ push @cmdline, "priority=low" if $xattr{Expert};
498+ push @cmdline, ("auto=true", "priority=critical") if $xattr{Auto};
499+ push @cmdline, @OPTS;
500+ push @cmdline, "rescue/enable=true" if $xattr{Rescue};
501+ push @cmdline, "speakup.synth=soft" if $xattr{Speach};
502+ push @cmdline, "--";
503+ push @cmdline, "quiet" if $xattr{Quiet};
504+
505+ my $cmdline = join(" ", @cmdline);
506+
507+ print_indented (<<EOE);
508+menuentry '$title' {
509+ set background_color=black
510+ linux $kernel $cmdline
511+ initrd $initrd
512+}
513+EOE
514+}
515+
516+if ( defined $VARS{HEADER} )
517+{
518+ open(HEADER, "<$VARS{HEADER}") or die "open header: $!";
519+ print <HEADER> or die "write header: $!";
520+ close(HEADER) or die "close header: $!";
521+}
522+
523+print_set_theme(menu_theme());
524+push @menu_number, 1;
525+
526+menuentry("Install");
527+menuentry("Graphical install", Graphical => 1);
528+
529+start_submenu("Advanced options ..."); {
530+ menuentry("... Expert install", Expert => 1);
531+ menuentry("... Rescue mode", Rescue => 1);
532+ menuentry("... Automated install", Auto => 1);
533+ menuentry("... Graphical expert install", Graphical => 1, Expert => 1);
534+ menuentry("... Graphical rescue mode", Graphical => 1, Rescue => 1);
535+ menuentry("... Graphical automated install", Graphical => 1, Auto => 1);
536+
537+ start_submenu("... Desktop environment menu ..."); {
538+
539+ foreach ( ["GNOME", "gnome"], ["KDE", "kde"], ["LXDE", "lxde"] ) {
540+ my ($desktop,$opt) = @{$_};
541+
542+ my $one = sub { my ($title, %xargs) = @_;
543+ $xargs{Desktop} = $opt;
544+ menuentry($title, %xargs);
545+ };
546+ start_submenu("... $desktop desktop boot menu ..."); {
547+ $one->("... Install");
548+ $one->("... Graphical install", Graphical => 1);
549+
550+ start_submenu("... $desktop advanced options ..."); {
551+ $one->("... Expert install", Expert => 1);
552+ $one->("... Automated install", Auto => 1);
553+ $one->("... Graphical expert install", Graphical => 1, Expert => 1);
554+ $one->("... Graphical automated install", Graphical => 1, Auto => 1);
555+ } end_submenu(); # $desktop advanced
556+
557+ $one->("... Install with speech synthesis", Speach => 1);
558+ $one->("... Install with speech synthesis", Graphical => 1, Speach => 1);
559+ $one->("... 64 bit speech install", SixtyFour => 1, Graphical => 1, Speach => 1)
560+ if $sixtyfour;
561+ } end_submenu(); # $desktop submenu
562+ } # Desktop loop
563+ } end_submenu(); # Desktop submenu
564+} end_submenu(); # Advanced
565+menuentry('Install with speech synthesis', Graphical => $graphical, Speach => 1);
566
567=== modified file 'debian/changelog'
568--- debian/changelog 2015-03-12 09:35:57 +0000
569+++ debian/changelog 2015-03-19 23:51:04 +0000
570@@ -1,3 +1,4 @@
571+<<<<<<< TREE
572 debian-installer (20101020ubuntu369) vivid; urgency=medium
573
574 * Move master kernels to 3.19.0-9.
575@@ -35,6 +36,27 @@
576
577 -- Adam Conrad <adconrad@ubuntu.com> Thu, 19 Feb 2015 01:30:45 -0700
578
579+=======
580+debian-installer (20101020ubuntu364) UNRELEASED; urgency=medium
581+
582+ * arm64: Use mklibs instead of cargo-culting mklibs-copy. This
583+ currently reduces the initrd.gz by just under 1M and drops
584+ an unnecessary delta against Debian.
585+ * arm64: kernel and System.map aren't versioned, correct config.
586+ No functional change.
587+ * arm64: Stop calling "generic" a subarchitecture
588+ * arm64: Rename netboot/xgene -> netboot/xgene-uboot
589+ * Add device-tree medium infrastructure (from Debian)
590+ * arm64: Enable device-tree medium
591+ * arm64/xgene-uboot: apm-mustang.dtb is now in the device-tree directory,
592+ so we can drop it from the xgene-uboot directory.
593+ * arm64: Create a netboot tarball
594+ * arm64: Add netboot mini.iso (from Debian)
595+ * arm64: Build cdrom flavor (from Debian)
596+
597+ -- dann frazier <dannf@ubuntu.com> Wed, 11 Feb 2015 15:19:16 -0700
598+
599+>>>>>>> MERGE-SOURCE
600 debian-installer (20101020ubuntu363) vivid; urgency=medium
601
602 * Move master kernels to 3.18.0-13.
603
604=== modified file 'debian/control'
605--- debian/control 2014-10-30 08:19:25 +0000
606+++ debian/control 2015-03-19 23:51:04 +0000
607@@ -82,7 +82,7 @@
608 # default.)
609 # - hfsutils [powerpc]
610 # For making bootable HFS USB sticks for powerpc.
611-# - dosfstools (>= 3.0.9-1ubuntu2) [i386 ia64 m68k amd64 armel armhf]
612+# - dosfstools (>= 3.0.9-1ubuntu2) [i386 ia64 m68k amd64 armel armhf arm64]
613 # For creating FAT filesystems with mkfs.msdos.
614 # Of course i386/amd64 use this for floppies, CDs etc.
615 # ia64 uses it for floppies (?)
616@@ -151,7 +151,7 @@
617 # - tofrodos [i386 amd64 kfreebsd-i386 kfreebsd-amd64]
618 # For todos, used on files that need to be accessible from
619 # DOS.
620-# - mtools [i386 ia64 m68k amd64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 armel armhf]
621+# - mtools [i386 ia64 m68k amd64 arm64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 armel armhf]
622 # mcopy is used to put files onto FAT filesystems w/o
623 # mounting them.
624 # - po4a [i386 amd64]
625@@ -175,11 +175,11 @@
626 # Used to create an UFS1 filesystem from a directory tree.
627 # - grub-pc (>= 1.98~20100101-1) [kfreebsd-i386 kfreebsd-amd64 hurd-i386]
628 # Used as the CD-ROM's bootloader
629-# - xorriso [kfreebsd-i386 kfreebsd-amd64 hurd-i386 ppc64el]
630+# - xorriso [arm64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 ppc64el]
631 # Used by grub-pc/grub-ieee1275-bin to create the CD-ROM images
632-# - grub-efi-amd64-bin (>= 2.00) [amd64]
633+# - grub-efi-amd64-bin (>= 2.00) [amd64], grub-efi-arm64-bin [arm64],
634 # EFI bootloader support.
635-# - grub-common [amd64]
636+# - grub-common [amd64 arm64]
637 # For the GRUB font.
638 # - debian-ports-archive-keyring [sh4 sparc64]
639 # Used for architectures hosted on debian-ports.org

Subscribers

People subscribed via source and target branches