diff --git a/lib/compilation-prepare.sh b/lib/compilation-prepare.sh index 36222c6377..a452e56c8d 100644 --- a/lib/compilation-prepare.sh +++ b/lib/compilation-prepare.sh @@ -87,7 +87,11 @@ compilation_prepare() process_patch_file "${SRC}/patch/misc/bootsplash-5.8.10-0001-Revert-vgacon-remove-software-scrollback-support.patch" "applying" process_patch_file "${SRC}/patch/misc/bootsplash-5.8.10-0002-Revert-fbcon-remove-now-unusued-softback_lines-curso.patch" "applying" - process_patch_file "${SRC}/patch/misc/bootsplash-5.8.10-0003-Revert-fbcon-remove-soft-scrollback-code.patch" "applying" + if linux-version compare "${version}" ge 5.10; then + process_patch_file "${SRC}/patch/misc/bootsplash-5.10.y-0003-Revert-fbcon-remove-soft-scrollback-code.patch" "applying" + else + process_patch_file "${SRC}/patch/misc/bootsplash-5.8.10-0003-Revert-fbcon-remove-soft-scrollback-code.patch" "applying" + fi process_patch_file "${SRC}/patch/misc/0001-bootsplash.patch" "applying" process_patch_file "${SRC}/patch/misc/0002-bootsplash.patch" "applying" diff --git a/patch/misc/bootsplash-5.10.y-0003-Revert-fbcon-remove-soft-scrollback-code.patch b/patch/misc/bootsplash-5.10.y-0003-Revert-fbcon-remove-soft-scrollback-code.patch new file mode 100644 index 0000000000..b752d31edf --- /dev/null +++ b/patch/misc/bootsplash-5.10.y-0003-Revert-fbcon-remove-soft-scrollback-code.patch @@ -0,0 +1,500 @@ +diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c +index b30a667663ef..fbf10e62bcde 100644 +--- a/drivers/video/fbdev/core/fbcon.c ++++ b/drivers/video/fbdev/core/fbcon.c +@@ -122,7 +122,12 @@ + /* logo_shown is an index to vc_cons when >= 0; otherwise follows FBCON_LOGO + enums. */ + static int logo_shown = FBCON_LOGO_CANSHOW; +-/* console mappings */ ++/* Software scrollback */ ++static int fbcon_softback_size = 32768; ++static unsigned long softback_buf, softback_curr; ++static unsigned long softback_in; ++static unsigned long softback_top, softback_end; ++static int softback_lines;/* console mappings */ + static int first_fb_vc; + static int last_fb_vc = MAX_NR_CONSOLES - 1; + static int fbcon_is_default = 1; +@@ -161,8 +166,12 @@ + + static const struct consw fb_con; + ++#define CM_SOFTBACK (8) ++ + #define advance_row(p, delta) (unsigned short *)((unsigned long)(p) + (delta) * vc->vc_size_row) + ++static int fbcon_set_origin(struct vc_data *); ++ + static int fbcon_cursor_noblink; + + #define divides(a, b) ((!(a) || (b)%(a)) ? 0 : 1) +@@ -363,6 +372,18 @@ + return color; + } + ++static void fbcon_update_softback(struct vc_data *vc) ++{ ++ int l = fbcon_softback_size / vc->vc_size_row; ++ ++ if (l > 5) ++ softback_end = softback_buf + l * vc->vc_size_row; ++ else ++ /* Smaller scrollback makes no sense, and 0 would screw ++ the operation totally */ ++ softback_top = 0; ++} ++ + static void fb_flashcursor(struct work_struct *work) + { + struct fb_info *info = container_of(work, struct fb_info, queue); +@@ -449,7 +470,13 @@ + } + + if (!strncmp(options, "scrollback:", 11)) { +- pr_warn("Ignoring scrollback size option\n"); ++ options += 11; ++ if (*options) { ++ fbcon_softback_size = simple_strtoul(options, &options, 0); ++ if (*options == 'k' || *options == 'K') { ++ fbcon_softback_size *= 1024; ++ } ++ } + continue; + } + +@@ -994,6 +1021,31 @@ + + set_blitting_type(vc, info); + ++ if (info->fix.type != FB_TYPE_TEXT) { ++ if (fbcon_softback_size) { ++ if (!softback_buf) { ++ softback_buf = ++ (unsigned long) ++ kvmalloc(fbcon_softback_size, ++ GFP_KERNEL); ++ if (!softback_buf) { ++ fbcon_softback_size = 0; ++ softback_top = 0; ++ } ++ } ++ } else { ++ if (softback_buf) { ++ kvfree((void *) softback_buf); ++ softback_buf = 0; ++ softback_top = 0; ++ } ++ } ++ if (softback_buf) ++ softback_in = softback_top = softback_curr = ++ softback_buf; ++ softback_lines = 0; ++ } ++ + /* Setup default font */ + if (!p->fontdata && !vc->vc_font.data) { + if (!fontname[0] || !(font = find_font(fontname))) +@@ -1167,6 +1219,9 @@ + if (logo) + fbcon_prepare_logo(vc, info, cols, rows, new_cols, new_rows); + ++ if (vc == svc && softback_buf) ++ fbcon_update_softback(vc); ++ + if (ops->rotate_font && ops->rotate_font(info, vc)) { + ops->rotate = FB_ROTATE_UR; + set_blitting_type(vc, info); +@@ -1329,6 +1384,7 @@ + { + struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; + struct fbcon_ops *ops = info->fbcon_par; ++ int y; + int c = scr_readw((u16 *) vc->vc_pos); + + ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms); +@@ -1343,6 +1399,15 @@ + + ops->cursor_flash = (mode == CM_ERASE) ? 0 : 1; + ++ if (mode & CM_SOFTBACK) { ++ mode &= ~CM_SOFTBACK; ++ y = softback_lines; ++ } else { ++ if (softback_lines) ++ fbcon_set_origin(vc); ++ y = 0; ++ } ++ + ops->cursor(vc, info, mode, 0, get_color(vc, info, c, 1), + get_color(vc, info, c, 0)); + } +@@ -1414,6 +1479,8 @@ + + if (con_is_visible(vc)) { + update_screen(vc); ++ if (softback_buf) ++ fbcon_update_softback(vc); + } + } + +@@ -1551,6 +1618,99 @@ + scrollback_current = 0; + } + ++static void fbcon_redraw_softback(struct vc_data *vc, struct fbcon_display *p, ++ long delta) ++{ ++ int count = vc->vc_rows; ++ unsigned short *d, *s; ++ unsigned long n; ++ int line = 0; ++ ++ d = (u16 *) softback_curr; ++ if (d == (u16 *) softback_in) ++ d = (u16 *) vc->vc_origin; ++ n = softback_curr + delta * vc->vc_size_row; ++ softback_lines -= delta; ++ if (delta < 0) { ++ if (softback_curr < softback_top && n < softback_buf) { ++ n += softback_end - softback_buf; ++ if (n < softback_top) { ++ softback_lines -= ++ (softback_top - n) / vc->vc_size_row; ++ n = softback_top; ++ } ++ } else if (softback_curr >= softback_top ++ && n < softback_top) { ++ softback_lines -= ++ (softback_top - n) / vc->vc_size_row; ++ n = softback_top; ++ } ++ } else { ++ if (softback_curr > softback_in && n >= softback_end) { ++ n += softback_buf - softback_end; ++ if (n > softback_in) { ++ n = softback_in; ++ softback_lines = 0; ++ } ++ } else if (softback_curr <= softback_in && n > softback_in) { ++ n = softback_in; ++ softback_lines = 0; ++ } ++ } ++ if (n == softback_curr) ++ return; ++ softback_curr = n; ++ s = (u16 *) softback_curr; ++ if (s == (u16 *) softback_in) ++ s = (u16 *) vc->vc_origin; ++ while (count--) { ++ unsigned short *start; ++ unsigned short *le; ++ unsigned short c; ++ int x = 0; ++ unsigned short attr = 1; ++ ++ start = s; ++ le = advance_row(s, 1); ++ do { ++ c = scr_readw(s); ++ if (attr != (c & 0xff00)) { ++ attr = c & 0xff00; ++ if (s > start) { ++ fbcon_putcs(vc, start, s - start, ++ line, x); ++ x += s - start; ++ start = s; ++ } ++ } ++ if (c == scr_readw(d)) { ++ if (s > start) { ++ fbcon_putcs(vc, start, s - start, ++ line, x); ++ x += s - start + 1; ++ start = s + 1; ++ } else { ++ x++; ++ start++; ++ } ++ } ++ s++; ++ d++; ++ } while (s < le); ++ if (s > start) ++ fbcon_putcs(vc, start, s - start, line, x); ++ line++; ++ if (d == (u16 *) softback_end) ++ d = (u16 *) softback_buf; ++ if (d == (u16 *) softback_in) ++ d = (u16 *) vc->vc_origin; ++ if (s == (u16 *) softback_end) ++ s = (u16 *) softback_buf; ++ if (s == (u16 *) softback_in) ++ s = (u16 *) vc->vc_origin; ++ } ++} ++ + static void fbcon_redraw_move(struct vc_data *vc, struct fbcon_display *p, + int line, int count, int dy) + { +@@ -1690,6 +1850,31 @@ + } + } + ++static inline void fbcon_softback_note(struct vc_data *vc, int t, ++ int count) ++{ ++ unsigned short *p; ++ ++ if (vc->vc_num != fg_console) ++ return; ++ p = (unsigned short *) (vc->vc_origin + t * vc->vc_size_row); ++ ++ while (count) { ++ scr_memcpyw((u16 *) softback_in, p, vc->vc_size_row); ++ count--; ++ p = advance_row(p, 1); ++ softback_in += vc->vc_size_row; ++ if (softback_in == softback_end) ++ softback_in = softback_buf; ++ if (softback_in == softback_top) { ++ softback_top += vc->vc_size_row; ++ if (softback_top == softback_end) ++ softback_top = softback_buf; ++ } ++ } ++ softback_curr = softback_in; ++} ++ + static bool fbcon_scroll(struct vc_data *vc, unsigned int t, unsigned int b, + enum con_scroll dir, unsigned int count) + { +@@ -1712,6 +1897,8 @@ + case SM_UP: + if (count > vc->vc_rows) /* Maximum realistic size */ + count = vc->vc_rows; ++ if (softback_top) ++ fbcon_softback_note(vc, t, count); + if (logo_shown >= 0) + goto redraw_up; + switch (p->scrollmode) { +@@ -2080,6 +2267,17 @@ + info = registered_fb[con2fb_map[vc->vc_num]]; + ops = info->fbcon_par; + ++ if (bootsplash_would_render_now()) ++ bootsplash_render_full(info); ++ ++ if (softback_top) { ++ if (softback_lines) ++ fbcon_set_origin(vc); ++ softback_top = softback_curr = softback_in = softback_buf; ++ softback_lines = 0; ++ fbcon_update_softback(vc); ++ } ++ + if (logo_shown >= 0) { + struct vc_data *conp2 = vc_cons[logo_shown].d; + +@@ -2415,6 +2613,9 @@ + int cnt; + char *old_data = NULL; + ++ if (con_is_visible(vc) && softback_lines) ++ fbcon_set_origin(vc); ++ + resize = (w != vc->vc_font.width) || (h != vc->vc_font.height); + if (p->userfont) + old_data = vc->vc_font.data; +@@ -2440,6 +2641,8 @@ + cols /= w; + rows /= h; + vc_resize(vc, cols, rows); ++ if (con_is_visible(vc) && softback_buf) ++ fbcon_update_softback(vc); + } else if (con_is_visible(vc) + && vc->vc_mode == KD_TEXT) { + fbcon_clear_margins(vc, 0); +@@ -2598,7 +2801,19 @@ + + static u16 *fbcon_screen_pos(const struct vc_data *vc, int offset) + { +- return (u16 *) (vc->vc_origin + offset); ++ unsigned long p; ++ int line; ++ ++ if (vc->vc_num != fg_console || !softback_lines) ++ return (u16 *) (vc->vc_origin + offset); ++ line = offset / vc->vc_size_row; ++ if (line >= softback_lines) ++ return (u16 *) (vc->vc_origin + offset - ++ softback_lines * vc->vc_size_row); ++ p = softback_curr + offset; ++ if (p >= softback_end) ++ p += softback_buf - softback_end; ++ return (u16 *) p; + } + + static unsigned long fbcon_getxy(struct vc_data *vc, unsigned long pos, +@@ -2612,7 +2827,22 @@ + + x = offset % vc->vc_cols; + y = offset / vc->vc_cols; ++ if (vc->vc_num == fg_console) ++ y += softback_lines; ++ ret = pos + (vc->vc_cols - x) * 2; ++ } else if (vc->vc_num == fg_console && softback_lines) { ++ unsigned long offset = pos - softback_curr; ++ ++ if (pos < softback_curr) ++ offset += softback_end - softback_buf; ++ offset /= 2; ++ x = offset % vc->vc_cols; ++ y = offset / vc->vc_cols; + ret = pos + (vc->vc_cols - x) * 2; ++ if (ret == softback_end) ++ ret = softback_buf; ++ if (ret == softback_in) ++ ret = vc->vc_origin; + } else { + /* Should not happen */ + x = y = 0; +@@ -2640,9 +2870,109 @@ + a = ((a) & 0x88ff) | (((a) & 0x7000) >> 4) | + (((a) & 0x0700) << 4); + scr_writew(a, p++); ++ if (p == (u16 *) softback_end) ++ p = (u16 *) softback_buf; ++ if (p == (u16 *) softback_in) ++ p = (u16 *) vc->vc_origin; + } + } + ++static void fbcon_scrolldelta(struct vc_data *vc, int lines) ++{ ++ struct fb_info *info = registered_fb[con2fb_map[fg_console]]; ++ struct fbcon_ops *ops = info->fbcon_par; ++ struct fbcon_display *disp = &fb_display[fg_console]; ++ int offset, limit, scrollback_old; ++ ++ if (softback_top) { ++ if (vc->vc_num != fg_console) ++ return; ++ if (vc->vc_mode != KD_TEXT || !lines) ++ return; ++ if (logo_shown >= 0) { ++ struct vc_data *conp2 = vc_cons[logo_shown].d; ++ ++ if (conp2->vc_top == logo_lines ++ && conp2->vc_bottom == conp2->vc_rows) ++ conp2->vc_top = 0; ++ if (logo_shown == vc->vc_num) { ++ unsigned long p, q; ++ int i; ++ ++ p = softback_in; ++ q = vc->vc_origin + ++ logo_lines * vc->vc_size_row; ++ for (i = 0; i < logo_lines; i++) { ++ if (p == softback_top) ++ break; ++ if (p == softback_buf) ++ p = softback_end; ++ p -= vc->vc_size_row; ++ q -= vc->vc_size_row; ++ scr_memcpyw((u16 *) q, (u16 *) p, ++ vc->vc_size_row); ++ } ++ softback_in = softback_curr = p; ++ update_region(vc, vc->vc_origin, ++ logo_lines * vc->vc_cols); ++ } ++ logo_shown = FBCON_LOGO_CANSHOW; ++ } ++ fbcon_cursor(vc, CM_ERASE | CM_SOFTBACK); ++ fbcon_redraw_softback(vc, disp, lines); ++ fbcon_cursor(vc, CM_DRAW | CM_SOFTBACK); ++ return; ++ } ++ ++ if (!scrollback_phys_max) ++ return; ++ ++ scrollback_old = scrollback_current; ++ scrollback_current -= lines; ++ if (scrollback_current < 0) ++ scrollback_current = 0; ++ else if (scrollback_current > scrollback_max) ++ scrollback_current = scrollback_max; ++ if (scrollback_current == scrollback_old) ++ return; ++ ++ if (fbcon_is_inactive(vc, info)) ++ return; ++ ++ fbcon_cursor(vc, CM_ERASE); ++ ++ offset = disp->yscroll - scrollback_current; ++ limit = disp->vrows; ++ switch (disp->scrollmode) { ++ case SCROLL_WRAP_MOVE: ++ info->var.vmode |= FB_VMODE_YWRAP; ++ break; ++ case SCROLL_PAN_MOVE: ++ case SCROLL_PAN_REDRAW: ++ limit -= vc->vc_rows; ++ info->var.vmode &= ~FB_VMODE_YWRAP; ++ break; ++ } ++ if (offset < 0) ++ offset += limit; ++ else if (offset >= limit) ++ offset -= limit; ++ ++ ops->var.xoffset = 0; ++ ops->var.yoffset = offset * vc->vc_font.height; ++ ops->update_start(info); ++ ++ if (!scrollback_current) ++ fbcon_cursor(vc, CM_DRAW); ++} ++ ++static int fbcon_set_origin(struct vc_data *vc) ++{ ++ if (softback_lines) ++ fbcon_scrolldelta(vc, softback_lines); ++ return 0; ++} ++ + void fbcon_suspended(struct fb_info *info) + { + struct vc_data *vc = NULL; +@@ -2703,6 +3033,8 @@ + + fbcon_set_palette(vc, color_table); + update_screen(vc); ++ if (softback_buf) ++ fbcon_update_softback(vc); + } + } + +@@ -3113,6 +3445,8 @@ + .con_font_default = fbcon_set_def_font, + .con_font_copy = fbcon_copy_font, + .con_set_palette = fbcon_set_palette, ++ .con_scrolldelta = fbcon_scrolldelta, ++ .con_set_origin = fbcon_set_origin, + .con_invert_region = fbcon_invert_region, + .con_screen_pos = fbcon_screen_pos, + .con_getxy = fbcon_getxy, +@@ -3346,6 +3680,9 @@ + } + #endif + ++ kvfree((void *)softback_buf); ++ softback_buf = 0UL; ++ + for_each_registered_fb(i) { + int pending = 0; + diff --git a/patch/misc/general-packaging-5.10.y.patch b/patch/misc/general-packaging-5.10.y.patch index 32b9bf2869..7809b2120a 100644 --- a/patch/misc/general-packaging-5.10.y.patch +++ b/patch/misc/general-packaging-5.10.y.patch @@ -12,10 +12,32 @@ index 5858d6e44..e81b8a6fc 100644 all: Image.gz diff --git a/scripts/package/builddeb b/scripts/package/builddeb -index 6df3c9f..d33e1f3 100755 +index 1b11f8993..c21d931ea 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb -@@ -46,9 +46,46 @@ +@@ -26,29 +26,61 @@ if_enabled_echo() { + + create_package() { + local pname="$1" pdir="$2" +- local dpkg_deb_opts + + mkdir -m 755 -p "$pdir/DEBIAN" + mkdir -p "$pdir/usr/share/doc/$pname" + cp debian/copyright "$pdir/usr/share/doc/$pname/" + cp debian/changelog "$pdir/usr/share/doc/$pname/changelog.Debian" +- gzip -n -9 "$pdir/usr/share/doc/$pname/changelog.Debian" ++ gzip -9 "$pdir/usr/share/doc/$pname/changelog.Debian" + sh -c "cd '$pdir'; find . -type f ! -path './DEBIAN/*' -printf '%P\0' \ + | xargs -r0 md5sum > DEBIAN/md5sums" + + # Fix ownership and permissions +- if [ "$DEB_RULES_REQUIRES_ROOT" = "no" ]; then +- dpkg_deb_opts="--root-owner-group" +- else +- chown -R root:root "$pdir" +- fi ++ chown -R root:root "$pdir" + chmod -R go-w "$pdir" # in case we are in a restrictive umask environment like 0077 chmod -R a+rX "$pdir" @@ -63,7 +85,16 @@ index 6df3c9f..d33e1f3 100755 } deploy_kernel_headers () { -@@ -105,9 +142,15 @@ +@@ -60,7 +92,7 @@ deploy_kernel_headers () { + cd $srctree + find . arch/$SRCARCH -maxdepth 1 -name Makefile\* + find include scripts -type f -o -type l +- find arch/$SRCARCH -name Kbuild.platforms -o -name Platform ++ find arch/$SRCARCH -name module.lds -o -name Kbuild.platforms -o -name Platform + find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f + ) > debian/hdrsrcfiles + +@@ -105,9 +137,15 @@ deploy_libc_headers () { } version=$KERNELRELEASE @@ -82,7 +113,7 @@ index 6df3c9f..d33e1f3 100755 dbg_packagename=$packagename-dbg if [ "$ARCH" = "um" ] ; then -@@ -118,6 +161,15 @@ +@@ -118,6 +156,15 @@ fi # XXX: have each arch Makefile export a variable of the canonical image install # path instead case $ARCH in @@ -98,7 +129,7 @@ index 6df3c9f..d33e1f3 100755 um) installed_image_path="usr/bin/linux-$version" ;; -@@ -131,13 +183,17 @@ +@@ -131,13 +178,17 @@ esac BUILD_DEBUG=$(if_enabled_echo CONFIG_DEBUG_INFO Yes) # Setup the directory structure @@ -118,7 +149,7 @@ index 6df3c9f..d33e1f3 100755 cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map" cp $KCONFIG_CONFIG "$tmpdir/usr/share/doc/$packagename/config" gzip "$tmpdir/usr/share/doc/$packagename/config" -@@ -181,6 +237,21 @@ +@@ -181,6 +232,21 @@ if is_enabled CONFIG_MODULES; then fi fi @@ -140,7 +171,7 @@ index 6df3c9f..d33e1f3 100755 # Install the maintainer scripts # Note: hook scripts under /etc/kernel are also executed by official Debian # kernel packages, as well as kernel packages built using make-kpkg. -@@ -190,7 +261,7 @@ +@@ -190,7 +256,7 @@ debhookdir=${KDEB_HOOKDIR:-/etc/kernel} for script in postinst postrm preinst prerm ; do mkdir -p "$tmpdir$debhookdir/$script.d" cat < "$tmpdir/DEBIAN/$script" @@ -149,7 +180,7 @@ index 6df3c9f..d33e1f3 100755 set -e -@@ -206,14 +277,72 @@ +@@ -206,14 +272,72 @@ EOF chmod 755 "$tmpdir/DEBIAN/$script" done @@ -228,27 +259,47 @@ index 6df3c9f..d33e1f3 100755 fi create_package "$packagename" "$tmpdir" +diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian +index 60a2a63a5..7c6197efa 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian -@@ -94,13 +94,10 @@ +@@ -94,16 +94,18 @@ else packageversion=$version-$revision fi sourcename=$KDEB_SOURCENAME -- --if [ "$ARCH" = "um" ] ; then -- packagename=user-mode-linux --else -- packagename=linux-image --fi -- +packagename=linux-image-$BRANCH$LOCALVERSION +kernel_headers_packagename=linux-headers-$BRANCH$LOCALVERSION +dtb_packagename=linux-dtb-$BRANCH$LOCALVERSION ++dbg_packagename=$packagename-dbg ++debarch= +image_name= - debarch= - set_debarch ++set_debarch -@@ -184,6 +181,11 @@ + if [ "$ARCH" = "um" ] ; then +- packagename=user-mode-linux +-else +- packagename=linux-image ++ packagename=user-mode-linux-$version + fi + +-debarch= +-set_debarch +- + email=${DEBEMAIL-$EMAIL} + + # use email string directly if it contains +@@ -174,16 +176,28 @@ Source: $sourcename + Section: kernel + Priority: optional + Maintainer: $maintainer +-Rules-Requires-Root: no + Build-Depends: bc, rsync, kmod, cpio, bison, flex | flex:native $extra_build_depends + Homepage: https://www.kernel.org/ + +-Package: $packagename-$version ++Package: $packagename + Architecture: $debarch + Description: Linux kernel, version $version This package contains the Linux kernel, modules and corresponding other files, version: $version. @@ -256,15 +307,57 @@ index 6df3c9f..d33e1f3 100755 +Architecture: $debarch +Description: Linux DTB, version $version + This package contains device blobs from the Linux kernel, version $version ++ ++Package: $kernel_headers_packagename ++Architecture: $debarch ++Depends: make, gcc, libc6-dev, bison, flex, libssl-dev ++Description: Linux kernel headers for $version on $debarch ++ This package provides kernel header files for $version on $debarch ++ . ++ This is useful for people who need to build external modules + Package: linux-libc-dev Section: devel Provides: linux-kernel-headers -@@ -199,6 +201,7 @@ +@@ -194,22 +208,10 @@ Description: Linux support headers for userspace development + Multi-Arch: same + EOF - Package: linux-headers-$version +-if is_enabled CONFIG_MODULES; then +-cat <> debian/control +- +-Package: linux-headers-$version +-Architecture: $debarch +-Description: Linux kernel headers for $version on $debarch +- This package provides kernel header files for $version on $debarch +- . +- This is useful for people who need to build external modules +-EOF +-fi +- + if is_enabled CONFIG_DEBUG_INFO; then + cat <> debian/control + +-Package: linux-image-$version-dbg ++Package: $dbg_packagename + Section: debug Architecture: $debarch -+Depends: make, gcc, libc6-dev, bison, flex, libssl-dev - Description: Linux kernel headers for $version on $debarch - This package provides kernel header files for $version on $debarch - . + Description: Linux kernel debugging symbols for $version +@@ -223,15 +225,11 @@ cat < debian/rules + + srctree ?= . + +-build-indep: +-build-arch: ++build: + \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \ + KBUILD_BUILD_VERSION=${revision} -f \$(srctree)/Makefile + +-build: build-arch +- +-binary-indep: +-binary-arch: build-arch ++binary-arch: + \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \ + KBUILD_BUILD_VERSION=${revision} -f \$(srctree)/Makefile intdeb-pkg +