Lintian fixups
Change-Id: I62fec9df1d4a7392da0672e63c3413609c5bdb57
diff --git a/debian/changelog b/debian/changelog
index e325a1b..9286f3c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,11 @@
-linux-mtk (1.0) animal; urgency=high
+linux-mtk (1.0-1) mendel-chef; urgency=medium
+
+ * Lintian fixups
+
+ -- Coral Projects <coral-support@google.com> Mon, 15 Apr 2019 15:42:27 -0700
+
+linux-mtk (1.0) mendel-animal; urgency=high
* Initial Release.
- -- AIY Projects <support-aiyprojects@google.com> Fri, 14 Dec 2018 14:41:08 -0800
+ -- Coral Projects <coral-support@google.com> Fri, 14 Dec 2018 14:41:08 -0800
diff --git a/debian/control b/debian/control
index 2dab338..503d27f 100644
--- a/debian/control
+++ b/debian/control
@@ -1,5 +1,5 @@
Source: linux-mtk
-Maintainer: AIY Projects <support-aiyprojects@google.com>
+Maintainer: Coral Projects <coral-support@google.com>
Build-Depends:
bc,
boot-keys,
@@ -10,29 +10,36 @@
gcc-aarch64-linux-gnu,
gcc-arm-linux-gnueabihf,
liblz4-tool,
+ libssl-dev,
libssl-dev:native,
python,
u-boot-mkimage
Section: misc
Priority: optional
+Standards-Version: 3.9.8
Package: linux-image-4.4.22-mtk
Section: misc
Priority: optional
Architecture: arm64 armhf
-Depends: kmod, ${perl:Depends}
+Depends: kmod, ${misc:Depends}
Description: Linux kernel image for the Excelsior board
+ Linux Image, modules, System map, config, and device tree blobs for
+ the Excelsior board.
Package: linux-headers-4.4.22-mtk
Section: misc
Priority: optional
Architecture: arm64 armhf
-Depends: ${perl:Depends},
- linux-kbuild-4.4.22-mtk [${Arch}]
+Depends: ${misc:Depends},
+ linux-kbuild-4.4.22-mtk [${Arch}]
Description: Linux kernel headers for the Excelsior board
+ Kernel and userspace headers for the 4.4.22-mtk Linux kernel.
Package: linux-kbuild-4.4.22-mtk
Section: misc
Priority: optional
Architecture: arm64 armhf
+Depends: ${misc:Depends}
Description: Linux kernel build tools for the Excelsior board
+ Support tools for building modules against the 4.4.22-mtk Linux kernel.
diff --git a/debian/linux-image-4.4.22-mtk.postinst b/debian/linux-image-4.4.22-mtk.postinst
index e8dee7d..8763152 100644
--- a/debian/linux-image-4.4.22-mtk.postinst
+++ b/debian/linux-image-4.4.22-mtk.postinst
@@ -22,4 +22,6 @@
--arg=$image_path /etc/kernel/postinst.d
fi
+#DEBHELPER#
+
exit 0
diff --git a/debian/linux-image-4.4.22-mtk.postrm b/debian/linux-image-4.4.22-mtk.postrm
index 9bccc8f..b24b4a1 100644
--- a/debian/linux-image-4.4.22-mtk.postrm
+++ b/debian/linux-image-4.4.22-mtk.postrm
@@ -28,4 +28,6 @@
rmdir /lib/modules/$version || true
fi
+#DEBHELPER#
+
exit 0
diff --git a/debian/linux-image-4.4.22-mtk.preinst b/debian/linux-image-4.4.22-mtk.preinst
index 472c797..7ebed7e 100644
--- a/debian/linux-image-4.4.22-mtk.preinst
+++ b/debian/linux-image-4.4.22-mtk.preinst
@@ -18,4 +18,6 @@
--arg=$image_path /etc/kernel/preinst.d
fi
+#DEBHELPER#
+
exit 0
diff --git a/debian/linux-image-4.4.22-mtk.prerm b/debian/linux-image-4.4.22-mtk.prerm
index 630a80d..bd98381 100644
--- a/debian/linux-image-4.4.22-mtk.prerm
+++ b/debian/linux-image-4.4.22-mtk.prerm
@@ -14,4 +14,6 @@
--arg=$image_path /etc/kernel/prerm.d
fi
+#DEBHELPER#
+
exit 0
diff --git a/debian/rules b/debian/rules
index 36bd1fc..776c1bd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -46,7 +46,7 @@
cp arch/$(ARCH)/boot/Image $(DESTDIR)/boot/vmlinuz-$(VERSION)
cp System.map $(DESTDIR)/boot/System.map-$(VERSION)
cp .config $(DESTDIR)/boot/config-$(VERSION)
- install -p -m 655 boot.img $(DESTDIR)/boot
+ install -p -m 755 boot.img $(DESTDIR)/boot
install -d $(DESTDIR_HEADERS)/usr/src/linux-headers-$(VERSION)
install -d $(DESTDIR_HEADERS)/usr/src/linux-headers-$(VERSION)/arch/arm
@@ -65,11 +65,26 @@
find $$(find arch/$(ARCH) \( -name include -o -name scripts \) -type d -print) -print; \
) | cpio -pdm $(DESTDIR_HEADERS)/usr/src/linux-headers-$(VERSION)
+
+ # Clean up any leftover x86 artifacts from the kernel build, and then build scripts
+ find $(CURDIR)/scripts -type f | xargs file | grep 'x86-' | awk '{print $$1}' | tr -d ':' | xargs rm -f
+ mkdir -p $(BUILD_DIR)/build-tools/scripts
+ $(MAKE) $(KERNEL_OPTIONS) \
+ CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)- \
+ -C $(BUILD_DIR)/build-tools/scripts -f $(CURDIR)/debian/rules.d/scripts/Makefile \
+ top_rulesdir=$(CURDIR)/debian/rules.d \
+ top_srcdir=$(CURDIR) \
+ OUTDIR=scripts \
+ install \
+ DESTDIR=$(DESTDIR_KBUILD) \
+ prefix=/usr/lib/linux-kbuild-$(VERSION)
+
install -d $(DESTDIR_HEADERS)/lib/modules/$(VERSION)
ln -s /usr/src/linux-headers-$(VERSION) $(DESTDIR_HEADERS)/lib/modules/$(VERSION)/build
+ ln -s /usr/lib/linux-kbuild-$(VERSION)/scripts $(DESTDIR_HEADERS)/usr/src/linux-headers-$(VERSION)/scripts
override_dh_systemd_enable:
dh_systemd_enable --name=linux-mtk
-override_dh_sytemd_start:
+override_dh_systemd_start:
dh_systemd_start --restart-after-upgrade linux-mtk
diff --git a/debian/rules.d/Makefile.inc b/debian/rules.d/Makefile.inc
new file mode 100644
index 0000000..48f8c2e
--- /dev/null
+++ b/debian/rules.d/Makefile.inc
@@ -0,0 +1,57 @@
+# Normalise OUTDIR to avoid triggering rebuilds
+override OUTDIR := $(patsubst ./%,%,$(OUTDIR))
+
+VPATH = $(top_rulesdir)/$(OUTDIR) $(top_srcdir)/$(OUTDIR)
+
+SHELL = /bin/sh -e
+
+CC = $(CROSS_COMPILE)gcc
+CXX = $(CROSS_COMPILE)g++
+CFLAGS := $(shell dpkg-buildflags --get CFLAGS) -Wall
+CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) \
+ -I$(top_srcdir)/$(OUTDIR) \
+ -I$(top_srcdir)/debian/build/build-tools/$(OUTDIR) \
+ -isystem $(top_srcdir)/debian/build/build-tools/include
+CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) -Wall
+LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
+
+installdir ?= $(prefix)/$(OUTDIR)
+
+all: all-local all-recursive
+clean: clean-recursive
+install: install-local install-recursive
+
+%-recursive:
+ +@list='$(SUBDIRS)'; \
+ for subdir in $$list; do \
+ echo "Making $* in $$subdir"; \
+ mkdir -p $$subdir; \
+ $(MAKE) -C $$subdir -f $(top_rulesdir)/$(OUTDIR)/$$subdir/Makefile OUTDIR=$(OUTDIR)/$$subdir $*; \
+ done
+
+all-local: $(PROGS)
+
+install-local: install-local-progs install-local-scripts install-local-data
+
+install-local-progs: $(PROGS)
+ @for p in $^; do \
+ echo " install -m755 '$$p' '$(DESTDIR)/$(installdir)'"; \
+ install -D -m755 "$$p" "$(DESTDIR)/$(installdir)/$$(basename $$p)"; \
+ done
+
+SCRIPTS_REAL = $(wildcard $(addprefix $(top_srcdir)/$(OUTDIR)/,$(SCRIPTS)))
+
+install-local-scripts: $(SCRIPTS_REAL)
+ @for p in $^; do \
+ echo " install -m755 '$$p' '$(DESTDIR)/$(installdir)'"; \
+ install -D -m755 "$$p" "$(DESTDIR)/$(installdir)/$$(basename $$p)"; \
+ done
+
+DATA_REAL = $(wildcard $(addprefix $(top_srcdir)/$(OUTDIR)/,$(DATA)))
+
+install-local-data: $(DATA_REAL)
+ @for p in $^; do \
+ echo " install -m644 '$$p' '$(DESTDIR)/$(installdir)'"; \
+ install -D -m644 "$$p" "$(DESTDIR)/$(installdir)/$$(basename $$p)"; \
+ done
+
diff --git a/debian/rules.d/scripts/Makefile b/debian/rules.d/scripts/Makefile
new file mode 100644
index 0000000..fc8c681
--- /dev/null
+++ b/debian/rules.d/scripts/Makefile
@@ -0,0 +1,44 @@
+PROGS = \
+ conmakehash \
+ extract-cert \
+ kallsyms \
+ pnmtologo \
+ recordmcount \
+ sign-file \
+ unifdef
+
+DATA = \
+ Kbuild.include \
+ Makefile.* \
+ mkversion \
+ module-common.lds
+
+SCRIPTS = \
+ checkincludes.pl \
+ checkstack.pl \
+ checkversion.pl \
+ depmod.sh \
+ gcc-*.sh \
+ gen_initramfs_list.sh \
+ headers_install.sh \
+ kernel-doc \
+ Lindent \
+ makelst \
+ mksysmap \
+ mkuboot.sh \
+ namespace.pl \
+ patch-kernel \
+ recordmcount.pl \
+ setlocalversion \
+ ver_linux
+
+SUBDIRS = \
+ basic \
+ genksyms \
+ kconfig \
+ mod
+
+include $(top_rulesdir)/Makefile.inc
+
+CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+extract-cert sign-file: LDLIBS += -lcrypto
diff --git a/debian/rules.d/scripts/basic/Makefile b/debian/rules.d/scripts/basic/Makefile
new file mode 100644
index 0000000..86b86a8
--- /dev/null
+++ b/debian/rules.d/scripts/basic/Makefile
@@ -0,0 +1,5 @@
+PROGS = \
+ bin2c \
+ fixdep
+
+include $(top_rulesdir)/Makefile.inc
diff --git a/debian/rules.d/scripts/genksyms/Makefile b/debian/rules.d/scripts/genksyms/Makefile
new file mode 100644
index 0000000..8e416da
--- /dev/null
+++ b/debian/rules.d/scripts/genksyms/Makefile
@@ -0,0 +1,13 @@
+PROGS = genksyms
+
+include $(top_rulesdir)/Makefile.inc
+
+genksyms: genksyms.o parse.tab.o lex.lex.o
+
+lex.lex.o: keywords.hash.c parse.tab.h
+
+%.c: %.c_shipped
+ ln -s $< $@
+
+%.h: %.h_shipped
+ ln -s $< $@
diff --git a/debian/rules.d/scripts/kconfig/Makefile b/debian/rules.d/scripts/kconfig/Makefile
new file mode 100644
index 0000000..b6e2521
--- /dev/null
+++ b/debian/rules.d/scripts/kconfig/Makefile
@@ -0,0 +1,13 @@
+PROGS = conf
+
+include $(top_rulesdir)/Makefile.inc
+
+conf: conf.o zconf.tab.o
+
+zconf.tab.c: zconf.hash.c zconf.lex.c
+
+%.c: %.c_shipped
+ ln -sf $< $@
+
+%.h: %.h_shipped
+ ln -sf $< $@
diff --git a/debian/rules.d/scripts/mod/Makefile b/debian/rules.d/scripts/mod/Makefile
new file mode 100644
index 0000000..e57e262
--- /dev/null
+++ b/debian/rules.d/scripts/mod/Makefile
@@ -0,0 +1,22 @@
+PROGS = \
+ modpost \
+ modpost.real-lsb-32 \
+ modpost.real-lsb-64 \
+ modpost.real-msb-32 \
+ modpost.real-msb-64
+
+include $(top_rulesdir)/Makefile.inc
+
+wrapperdir = $(top_rulesdir)/$(OUTDIR)
+
+modpost.real-%:
+ $(MAKE) -f $(wrapperdir)/Makefile.real TYPE=$* SOURCEDIR=$(top_srcdir)/scripts/mod
+
+%: %.o
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+
+modpost-opts.h: $(top_srcdir)/scripts/mod/modpost.c
+ python $(wrapperdir)/gendef.py $< > $@
+
+modpost.o: modpost.c modpost-opts.h
+ $(CC) $(CFLAGS) -I $(CURDIR) -c -o $@ $<
diff --git a/debian/rules.d/scripts/mod/Makefile.real b/debian/rules.d/scripts/mod/Makefile.real
new file mode 100644
index 0000000..489ea4f
--- /dev/null
+++ b/debian/rules.d/scripts/mod/Makefile.real
@@ -0,0 +1,23 @@
+PROGS = modpost.real-$(TYPE)
+
+include $(top_rulesdir)/Makefile.inc
+
+wrapperdir = $(top_rulesdir)/$(OUTDIR)
+CFLAGS += -I $(CURDIR)/real-$(TYPE) -I $(wrapperdir)/real-$(TYPE)
+
+modpost.real-$(TYPE): file2alias.real-$(TYPE).o modpost.real-$(TYPE).o sumversion.real-$(TYPE).o
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+
+%.real-$(TYPE).o: $(SOURCEDIR)/%.c real-$(TYPE)/devicetable-offsets.h
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+real-$(TYPE)/devicetable-offsets.s: $(SOURCEDIR)/devicetable-offsets.c
+ mkdir -p real-$(TYPE)
+ $(CC) -include $(wrapperdir)/real-$(TYPE)/types.h $(CFLAGS) -nostdinc -I$(top_srcdir)/include -S -o $@ $<
+
+real-$(TYPE)/devicetable-offsets.h: real-$(TYPE)/devicetable-offsets.s
+ echo >$@ "#define __DEVICEVTABLE_OFFSETS_H__"
+ sed -ne "/^->/{s:->#\(.*\):/* \1 */:; \
+ s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \
+ s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
+ s:->::; p;}" $< >>$@
diff --git a/debian/rules.d/scripts/mod/elfconfig.h b/debian/rules.d/scripts/mod/elfconfig.h
new file mode 100644
index 0000000..8c90ea6
--- /dev/null
+++ b/debian/rules.d/scripts/mod/elfconfig.h
@@ -0,0 +1,7 @@
+#include <endian.h>
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+#define HOST_ELFDATA ELFDATA2LSB
+#elif __BYTE_ORDER == __BIG_ENDIAN
+#define HOST_ELFDATA ELFDATA2MSB
+#endif
diff --git a/debian/rules.d/scripts/mod/gendef.py b/debian/rules.d/scripts/mod/gendef.py
new file mode 100755
index 0000000..6e1bdf4
--- /dev/null
+++ b/debian/rules.d/scripts/mod/gendef.py
@@ -0,0 +1,20 @@
+#!/usr/bin/python
+import re
+import sys
+
+for line in open(sys.argv[1]):
+ match = re.search('getopt\(argc, argv, "([\w:]*?)"\)', line)
+ if match:
+ options = match.group(1)
+ break
+else:
+ raise RuntimeError
+
+print '#define GETOPT_OPTIONS "%s"' % options
+
+print '#define GETOPT_CASE',
+for c in options:
+ if c == ':' or c == 'T':
+ continue
+ print "case '%c':" % c,
+print
diff --git a/debian/rules.d/scripts/mod/modpost.c b/debian/rules.d/scripts/mod/modpost.c
new file mode 100644
index 0000000..d574957
--- /dev/null
+++ b/debian/rules.d/scripts/mod/modpost.c
@@ -0,0 +1,136 @@
+#include <elf.h>
+#include <errno.h>
+#include <getopt.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "modpost-opts.h"
+
+int main (int argc, char *argv[])
+{
+ char const *data, *class;
+ char *list_name = NULL;
+ char *name = NULL;
+ char prog[1024];
+ unsigned char ei[EI_NIDENT];
+ int opt;
+ FILE *file;
+
+ while ((opt = getopt (argc, argv, GETOPT_OPTIONS)) != -1)
+ {
+ switch(opt)
+ {
+ GETOPT_CASE
+ break;
+ case 'T':
+ list_name = optarg;
+ break;
+ default:
+ return EXIT_FAILURE;
+ }
+ }
+
+ if (optind != argc)
+ {
+ name = argv[optind];
+ }
+ else if (list_name)
+ {
+ size_t name_len;
+ int is_stdin = strcmp (list_name, "-") == 0;
+
+ /* Read first line of list file */
+ if (is_stdin)
+ {
+ file = stdin;
+ setvbuf(stdin, NULL, _IONBF, 0); /* don't over-read */
+ }
+ else
+ {
+ file = fopen (list_name, "r");
+ if (!file)
+ {
+ fprintf (stderr, "Can't open \"%s\"\n", list_name);
+ return EXIT_FAILURE;
+ }
+ }
+ if (getline (&name, &name_len, file) < 0)
+ {
+ if (errno)
+ {
+ fprintf (stderr, "Can't read \"%s\"\n", list_name);
+ return EXIT_FAILURE;
+ }
+ else
+ {
+ /* Empty list */
+ return EXIT_SUCCESS;
+ }
+ }
+ if (!is_stdin)
+ fclose(file);
+
+ /* Remove new-line */
+ name [strcspn (name, "\n")] = 0;
+
+ /* If this came from stdin, we need to add the first name to the
+ * arguments, because the upstream modpost can't read it again.
+ */
+ if (is_stdin)
+ {
+ char **new_argv = malloc (sizeof(*argv) * (argc + 2));
+ memcpy(new_argv, argv, sizeof(*argv) * argc);
+ new_argv [argc] = name;
+ new_argv [argc + 1] = NULL;
+ argv = new_argv;
+ }
+ }
+ else
+ {
+ /* Empty list */
+ return EXIT_SUCCESS;
+ }
+
+ if (!(file = fopen (name, "r")))
+ {
+ fprintf (stderr, "Can't open \"%s\"\n", name);
+ return EXIT_FAILURE;
+ }
+
+ if (fread (ei, 1, EI_NIDENT, file) != EI_NIDENT)
+ {
+ fprintf (stderr, "Error: input truncated\n");
+ return EXIT_FAILURE;
+ }
+
+ if (memcmp (ei, ELFMAG, SELFMAG) != 0)
+ {
+ fprintf (stderr, "Error: not ELF\n");
+ return EXIT_FAILURE;
+ }
+ switch (ei[EI_DATA]) {
+ case ELFDATA2LSB:
+ data = "lsb";
+ break;
+ case ELFDATA2MSB:
+ data = "msb";
+ break;
+ default:
+ return EXIT_FAILURE;
+ }
+ switch (ei[EI_CLASS]) {
+ case ELFCLASS32:
+ class = "32";
+ break;
+ case ELFCLASS64:
+ class = "64";
+ break;
+ default:
+ return EXIT_FAILURE;
+ }
+ snprintf (prog, sizeof prog, "%s.real-%s-%s", argv[0], data, class);
+
+ return execv (prog, argv);
+}
diff --git a/debian/rules.d/scripts/mod/real-lsb-32/elfconfig.h b/debian/rules.d/scripts/mod/real-lsb-32/elfconfig.h
new file mode 100644
index 0000000..1f7a732
--- /dev/null
+++ b/debian/rules.d/scripts/mod/real-lsb-32/elfconfig.h
@@ -0,0 +1,4 @@
+#define KERNEL_ELFCLASS ELFCLASS32
+#define KERNEL_ELFDATA ELFDATA2LSB
+#define MODULE_SYMBOL_PREFIX ""
+#include "../elfconfig.h"
diff --git a/debian/rules.d/scripts/mod/real-lsb-32/types.h b/debian/rules.d/scripts/mod/real-lsb-32/types.h
new file mode 100644
index 0000000..bad6dcc
--- /dev/null
+++ b/debian/rules.d/scripts/mod/real-lsb-32/types.h
@@ -0,0 +1,3 @@
+#include "../types.h"
+typedef __u32 kernel_ulong_t;
+#define BITS_PER_LONG 32
diff --git a/debian/rules.d/scripts/mod/real-lsb-64/elfconfig.h b/debian/rules.d/scripts/mod/real-lsb-64/elfconfig.h
new file mode 100644
index 0000000..e6f519f
--- /dev/null
+++ b/debian/rules.d/scripts/mod/real-lsb-64/elfconfig.h
@@ -0,0 +1,4 @@
+#define KERNEL_ELFCLASS ELFCLASS64
+#define KERNEL_ELFDATA ELFDATA2LSB
+#define MODULE_SYMBOL_PREFIX ""
+#include "../elfconfig.h"
diff --git a/debian/rules.d/scripts/mod/real-lsb-64/types.h b/debian/rules.d/scripts/mod/real-lsb-64/types.h
new file mode 100644
index 0000000..8d7b875
--- /dev/null
+++ b/debian/rules.d/scripts/mod/real-lsb-64/types.h
@@ -0,0 +1,3 @@
+#include "../types.h"
+typedef __u64 __attribute__((aligned(8))) kernel_ulong_t;
+#define BITS_PER_LONG 64
diff --git a/debian/rules.d/scripts/mod/real-msb-32/elfconfig.h b/debian/rules.d/scripts/mod/real-msb-32/elfconfig.h
new file mode 100644
index 0000000..a9ae561
--- /dev/null
+++ b/debian/rules.d/scripts/mod/real-msb-32/elfconfig.h
@@ -0,0 +1,4 @@
+#define KERNEL_ELFCLASS ELFCLASS32
+#define KERNEL_ELFDATA ELFDATA2MSB
+#define MODULE_SYMBOL_PREFIX ""
+#include "../elfconfig.h"
diff --git a/debian/rules.d/scripts/mod/real-msb-32/types.h b/debian/rules.d/scripts/mod/real-msb-32/types.h
new file mode 100644
index 0000000..bad6dcc
--- /dev/null
+++ b/debian/rules.d/scripts/mod/real-msb-32/types.h
@@ -0,0 +1,3 @@
+#include "../types.h"
+typedef __u32 kernel_ulong_t;
+#define BITS_PER_LONG 32
diff --git a/debian/rules.d/scripts/mod/real-msb-64/elfconfig.h b/debian/rules.d/scripts/mod/real-msb-64/elfconfig.h
new file mode 100644
index 0000000..844d22f
--- /dev/null
+++ b/debian/rules.d/scripts/mod/real-msb-64/elfconfig.h
@@ -0,0 +1,4 @@
+#define KERNEL_ELFCLASS ELFCLASS64
+#define KERNEL_ELFDATA ELFDATA2MSB
+#define MODULE_SYMBOL_PREFIX ""
+#include "../elfconfig.h"
diff --git a/debian/rules.d/scripts/mod/real-msb-64/types.h b/debian/rules.d/scripts/mod/real-msb-64/types.h
new file mode 100644
index 0000000..8d7b875
--- /dev/null
+++ b/debian/rules.d/scripts/mod/real-msb-64/types.h
@@ -0,0 +1,3 @@
+#include "../types.h"
+typedef __u64 __attribute__((aligned(8))) kernel_ulong_t;
+#define BITS_PER_LONG 64
diff --git a/debian/rules.d/scripts/mod/types.h b/debian/rules.d/scripts/mod/types.h
new file mode 100644
index 0000000..aba3827
--- /dev/null
+++ b/debian/rules.d/scripts/mod/types.h
@@ -0,0 +1,9 @@
+/* Minimal definitions for mod_devicetable.h and devicetable-offsets.c */
+typedef unsigned char __u8;
+typedef unsigned short __u16;
+typedef unsigned int __u32;
+typedef unsigned long long __u64;
+typedef struct {
+ __u8 b[16];
+} uuid_le;
+#define offsetof(a,b) __builtin_offsetof(a,b)
diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
new file mode 100644
index 0000000..c652cac
--- /dev/null
+++ b/debian/source/lintian-overrides
@@ -0,0 +1 @@
+linux-mtk source: file-without-copyright-information *