From 7f542ad93158142ff48dcc1b16ac0c0505a26605 Mon Sep 17 00:00:00 2001 From: Changhyeok Bae Date: Wed, 13 Dec 2017 10:43:39 +0000 Subject: harfbuzz: Rename .bbappend to match new version from meta-openembedded Bug-AGL: SPEC-1181 Change-Id: I8ddf3f2b8a56fa5ba80081eaa4e31a124be18246 Signed-off-by: Changhyeok Bae --- meta-agl-bsp/recipes-graphics/harfbuzz/harfbuzz_1.4.1.bbappend | 4 ---- meta-agl-bsp/recipes-graphics/harfbuzz/harfbuzz_1.4.8.bbappend | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 meta-agl-bsp/recipes-graphics/harfbuzz/harfbuzz_1.4.1.bbappend create mode 100644 meta-agl-bsp/recipes-graphics/harfbuzz/harfbuzz_1.4.8.bbappend (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/recipes-graphics/harfbuzz/harfbuzz_1.4.1.bbappend b/meta-agl-bsp/recipes-graphics/harfbuzz/harfbuzz_1.4.1.bbappend deleted file mode 100644 index db50df5d9..000000000 --- a/meta-agl-bsp/recipes-graphics/harfbuzz/harfbuzz_1.4.1.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -# 2017-09-13 hotfix for harfbuzz build -# Reference https://www.mail-archive.com/yocto@yoctoproject.org/msg36472.html - -acpaths = "-I ${STAGING_DATADIR_NATIVE}/aclocal/" diff --git a/meta-agl-bsp/recipes-graphics/harfbuzz/harfbuzz_1.4.8.bbappend b/meta-agl-bsp/recipes-graphics/harfbuzz/harfbuzz_1.4.8.bbappend new file mode 100644 index 000000000..db50df5d9 --- /dev/null +++ b/meta-agl-bsp/recipes-graphics/harfbuzz/harfbuzz_1.4.8.bbappend @@ -0,0 +1,4 @@ +# 2017-09-13 hotfix for harfbuzz build +# Reference https://www.mail-archive.com/yocto@yoctoproject.org/msg36472.html + +acpaths = "-I ${STAGING_DATADIR_NATIVE}/aclocal/" -- cgit 1.2.3-korg From 8b6137f46f677e19940d6b5f257bf04dbb723f32 Mon Sep 17 00:00:00 2001 From: Changhyeok Bae Date: Wed, 13 Dec 2017 11:23:55 +0000 Subject: linux-yocto_4.4: Remove the bbappend rocko (Yocto 2.4) is not supported linux-yocto-4.4 and those commits are already applied in upstream 4.12. Bug-AGL: SPEC-1181 Change-Id: Ic3c39c919cc488e5eb1ef3f4cd3c3db653c3c0f7 Signed-off-by: Changhyeok Bae --- ...x-notification-of-groups-with-inode-mount.patch | 206 ----- ...01-mm-larger-stack-guard-gap-between-vmas.patch | 900 --------------------- ...w-stack-to-grow-up-to-address-space-limit.patch | 51 -- ...mm-fix-new-crash-in-unmapped_area_topdown.patch | 52 -- .../recipes-kernel/linux/linux-yocto_4.4.bbappend | 14 - 5 files changed, 1223 deletions(-) delete mode 100644 meta-agl-bsp/recipes-kernel/linux/linux-yocto/0001-fanotify-fix-notification-of-groups-with-inode-mount.patch delete mode 100644 meta-agl-bsp/recipes-kernel/linux/linux-yocto/4.4-0001-mm-larger-stack-guard-gap-between-vmas.patch delete mode 100644 meta-agl-bsp/recipes-kernel/linux/linux-yocto/4.4-0002-Allow-stack-to-grow-up-to-address-space-limit.patch delete mode 100644 meta-agl-bsp/recipes-kernel/linux/linux-yocto/4.4-0003-mm-fix-new-crash-in-unmapped_area_topdown.patch delete mode 100644 meta-agl-bsp/recipes-kernel/linux/linux-yocto_4.4.bbappend (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-yocto/0001-fanotify-fix-notification-of-groups-with-inode-mount.patch b/meta-agl-bsp/recipes-kernel/linux/linux-yocto/0001-fanotify-fix-notification-of-groups-with-inode-mount.patch deleted file mode 100644 index c50c152a1..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux-yocto/0001-fanotify-fix-notification-of-groups-with-inode-mount.patch +++ /dev/null @@ -1,206 +0,0 @@ -From 8edc6e1688fc8f02c8c1f53a2ec4928cb1055f4d Mon Sep 17 00:00:00 2001 -From: Jan Kara -Date: Thu, 13 Nov 2014 15:19:33 -0800 -Subject: [PATCH] fanotify: fix notification of groups with inode & mount marks - -fsnotify() needs to merge inode and mount marks lists when notifying -groups about events so that ignore masks from inode marks are reflected -in mount mark notifications and groups are notified in proper order -(according to priorities). - -Currently the sorting of the lists done by fsnotify_add_inode_mark() / -fsnotify_add_vfsmount_mark() and fsnotify() differed which resulted -ignore masks not being used in some cases. - -Fix the problem by always using the same comparison function when -sorting / merging the mark lists. - -Thanks to Heinrich Schuchardt for improvements of my patch. - -Link: https://bugzilla.kernel.org/show_bug.cgi?id=87721 -Signed-off-by: Jan Kara -Reported-by: Heinrich Schuchardt -Tested-by: Heinrich Schuchardt -Signed-off-by: Andrew Morton -Signed-off-by: Linus Torvalds ---- - fs/notify/fsnotify.c | 36 +++++++++++++++++++++--------------- - fs/notify/fsnotify.h | 4 ++++ - fs/notify/inode_mark.c | 8 +++----- - fs/notify/mark.c | 36 ++++++++++++++++++++++++++++++++++++ - fs/notify/vfsmount_mark.c | 8 +++----- - 5 files changed, 67 insertions(+), 25 deletions(-) - -diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c -index 9d3e9c5..89326ac 100644 ---- a/fs/notify/fsnotify.c -+++ b/fs/notify/fsnotify.c -@@ -229,8 +229,16 @@ int fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is, - &fsnotify_mark_srcu); - } - -+ /* -+ * We need to merge inode & vfsmount mark lists so that inode mark -+ * ignore masks are properly reflected for mount mark notifications. -+ * That's why this traversal is so complicated... -+ */ - while (inode_node || vfsmount_node) { -- inode_group = vfsmount_group = NULL; -+ inode_group = NULL; -+ inode_mark = NULL; -+ vfsmount_group = NULL; -+ vfsmount_mark = NULL; - - if (inode_node) { - inode_mark = hlist_entry(srcu_dereference(inode_node, &fsnotify_mark_srcu), -@@ -244,21 +252,19 @@ int fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is, - vfsmount_group = vfsmount_mark->group; - } - -- if (inode_group > vfsmount_group) { -- /* handle inode */ -- ret = send_to_group(to_tell, inode_mark, NULL, mask, -- data, data_is, cookie, file_name); -- /* we didn't use the vfsmount_mark */ -- vfsmount_group = NULL; -- } else if (vfsmount_group > inode_group) { -- ret = send_to_group(to_tell, NULL, vfsmount_mark, mask, -- data, data_is, cookie, file_name); -- inode_group = NULL; -- } else { -- ret = send_to_group(to_tell, inode_mark, vfsmount_mark, -- mask, data, data_is, cookie, -- file_name); -+ if (inode_group && vfsmount_group) { -+ int cmp = fsnotify_compare_groups(inode_group, -+ vfsmount_group); -+ if (cmp > 0) { -+ inode_group = NULL; -+ inode_mark = NULL; -+ } else if (cmp < 0) { -+ vfsmount_group = NULL; -+ vfsmount_mark = NULL; -+ } - } -+ ret = send_to_group(to_tell, inode_mark, vfsmount_mark, mask, -+ data, data_is, cookie, file_name); - - if (ret && (mask & ALL_FSNOTIFY_PERM_EVENTS)) - goto out; -diff --git a/fs/notify/fsnotify.h b/fs/notify/fsnotify.h -index 9c0898c..3b68b0a 100644 ---- a/fs/notify/fsnotify.h -+++ b/fs/notify/fsnotify.h -@@ -12,6 +12,10 @@ extern void fsnotify_flush_notify(struct fsnotify_group *group); - /* protects reads of inode and vfsmount marks list */ - extern struct srcu_struct fsnotify_mark_srcu; - -+/* compare two groups for sorting of marks lists */ -+extern int fsnotify_compare_groups(struct fsnotify_group *a, -+ struct fsnotify_group *b); -+ - extern void fsnotify_set_inode_mark_mask_locked(struct fsnotify_mark *fsn_mark, - __u32 mask); - /* add a mark to an inode */ -diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c -index e849714..dfbf544 100644 ---- a/fs/notify/inode_mark.c -+++ b/fs/notify/inode_mark.c -@@ -194,6 +194,7 @@ int fsnotify_add_inode_mark(struct fsnotify_mark *mark, - { - struct fsnotify_mark *lmark, *last = NULL; - int ret = 0; -+ int cmp; - - mark->flags |= FSNOTIFY_MARK_FLAG_INODE; - -@@ -219,11 +220,8 @@ int fsnotify_add_inode_mark(struct fsnotify_mark *mark, - goto out; - } - -- if (mark->group->priority < lmark->group->priority) -- continue; -- -- if ((mark->group->priority == lmark->group->priority) && -- (mark->group < lmark->group)) -+ cmp = fsnotify_compare_groups(lmark->group, mark->group); -+ if (cmp < 0) - continue; - - hlist_add_before_rcu(&mark->i.i_list, &lmark->i.i_list); -diff --git a/fs/notify/mark.c b/fs/notify/mark.c -index d90deaa..34c38fa 100644 ---- a/fs/notify/mark.c -+++ b/fs/notify/mark.c -@@ -210,6 +210,42 @@ void fsnotify_set_mark_ignored_mask_locked(struct fsnotify_mark *mark, __u32 mas - } - - /* -+ * Sorting function for lists of fsnotify marks. -+ * -+ * Fanotify supports different notification classes (reflected as priority of -+ * notification group). Events shall be passed to notification groups in -+ * decreasing priority order. To achieve this marks in notification lists for -+ * inodes and vfsmounts are sorted so that priorities of corresponding groups -+ * are descending. -+ * -+ * Furthermore correct handling of the ignore mask requires processing inode -+ * and vfsmount marks of each group together. Using the group address as -+ * further sort criterion provides a unique sorting order and thus we can -+ * merge inode and vfsmount lists of marks in linear time and find groups -+ * present in both lists. -+ * -+ * A return value of 1 signifies that b has priority over a. -+ * A return value of 0 signifies that the two marks have to be handled together. -+ * A return value of -1 signifies that a has priority over b. -+ */ -+int fsnotify_compare_groups(struct fsnotify_group *a, struct fsnotify_group *b) -+{ -+ if (a == b) -+ return 0; -+ if (!a) -+ return 1; -+ if (!b) -+ return -1; -+ if (a->priority < b->priority) -+ return 1; -+ if (a->priority > b->priority) -+ return -1; -+ if (a < b) -+ return 1; -+ return -1; -+} -+ -+/* - * Attach an initialized mark to a given group and fs object. - * These marks may be used for the fsnotify backend to determine which - * event types should be delivered to which group. -diff --git a/fs/notify/vfsmount_mark.c b/fs/notify/vfsmount_mark.c -index ac851e8..faefa72 100644 ---- a/fs/notify/vfsmount_mark.c -+++ b/fs/notify/vfsmount_mark.c -@@ -153,6 +153,7 @@ int fsnotify_add_vfsmount_mark(struct fsnotify_mark *mark, - struct mount *m = real_mount(mnt); - struct fsnotify_mark *lmark, *last = NULL; - int ret = 0; -+ int cmp; - - mark->flags |= FSNOTIFY_MARK_FLAG_VFSMOUNT; - -@@ -178,11 +179,8 @@ int fsnotify_add_vfsmount_mark(struct fsnotify_mark *mark, - goto out; - } - -- if (mark->group->priority < lmark->group->priority) -- continue; -- -- if ((mark->group->priority == lmark->group->priority) && -- (mark->group < lmark->group)) -+ cmp = fsnotify_compare_groups(lmark->group, mark->group); -+ if (cmp < 0) - continue; - - hlist_add_before_rcu(&mark->m.m_list, &lmark->m.m_list); --- -1.8.3.1 - diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-yocto/4.4-0001-mm-larger-stack-guard-gap-between-vmas.patch b/meta-agl-bsp/recipes-kernel/linux/linux-yocto/4.4-0001-mm-larger-stack-guard-gap-between-vmas.patch deleted file mode 100644 index e9fafad74..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux-yocto/4.4-0001-mm-larger-stack-guard-gap-between-vmas.patch +++ /dev/null @@ -1,900 +0,0 @@ -From 3982d0807e02909957990f194c5ed2ffb6ab6c35 Mon Sep 17 00:00:00 2001 -From: Hugh Dickins -Date: Mon, 19 Jun 2017 04:03:24 -0700 -Subject: [PATCH 1/3] mm: larger stack guard gap, between vmas - -commit 1be7107fbe18eed3e319a6c3e83c78254b693acb upstream. - -Stack guard page is a useful feature to reduce a risk of stack smashing -into a different mapping. We have been using a single page gap which -is sufficient to prevent having stack adjacent to a different mapping. -But this seems to be insufficient in the light of the stack usage in -userspace. E.g. glibc uses as large as 64kB alloca() in many commonly -used functions. Others use constructs liks gid_t buffer[NGROUPS_MAX] -which is 256kB or stack strings with MAX_ARG_STRLEN. - -This will become especially dangerous for suid binaries and the default -no limit for the stack size limit because those applications can be -tricked to consume a large portion of the stack and a single glibc call -could jump over the guard page. These attacks are not theoretical, -unfortunatelly. - -Make those attacks less probable by increasing the stack guard gap -to 1MB (on systems with 4k pages; but make it depend on the page size -because systems with larger base pages might cap stack allocations in -the PAGE_SIZE units) which should cover larger alloca() and VLA stack -allocations. It is obviously not a full fix because the problem is -somehow inherent, but it should reduce attack space a lot. - -One could argue that the gap size should be configurable from userspace, -but that can be done later when somebody finds that the new 1MB is wrong -for some special case applications. For now, add a kernel command line -option (stack_guard_gap) to specify the stack gap size (in page units). - -Implementation wise, first delete all the old code for stack guard page: -because although we could get away with accounting one extra page in a -stack vma, accounting a larger gap can break userspace - case in point, -a program run with "ulimit -S -v 20000" failed when the 1MB gap was -counted for RLIMIT_AS; similar problems could come with RLIMIT_MLOCK -and strict non-overcommit mode. - -Instead of keeping gap inside the stack vma, maintain the stack guard -gap as a gap between vmas: using vm_start_gap() in place of vm_start -(or vm_end_gap() in place of vm_end if VM_GROWSUP) in just those few -places which need to respect the gap - mainly arch_get_unmapped_area(), -and and the vma tree's subtree_gap support for that. - -Original-patch-by: Oleg Nesterov -Original-patch-by: Michal Hocko -Signed-off-by: Hugh Dickins -Acked-by: Michal Hocko -Tested-by: Helge Deller # parisc -Signed-off-by: Linus Torvalds -[wt: backport to 4.11: adjust context] -[wt: backport to 4.9: adjust context ; kernel doc was not in admin-guide] -[wt: backport to 4.4: adjust context ; drop ppc hugetlb_radix changes] -Signed-off-by: Willy Tarreau -[gkh: minor build fixes for 4.4] -Signed-off-by: Greg Kroah-Hartman ---- - Documentation/kernel-parameters.txt | 7 ++ - arch/arc/mm/mmap.c | 2 +- - arch/arm/mm/mmap.c | 4 +- - arch/frv/mm/elf-fdpic.c | 2 +- - arch/mips/mm/mmap.c | 2 +- - arch/parisc/kernel/sys_parisc.c | 15 ++-- - arch/powerpc/mm/slice.c | 2 +- - arch/s390/mm/mmap.c | 4 +- - arch/sh/mm/mmap.c | 4 +- - arch/sparc/kernel/sys_sparc_64.c | 4 +- - arch/sparc/mm/hugetlbpage.c | 2 +- - arch/tile/mm/hugetlbpage.c | 2 +- - arch/x86/kernel/sys_x86_64.c | 4 +- - arch/x86/mm/hugetlbpage.c | 2 +- - arch/xtensa/kernel/syscall.c | 2 +- - fs/hugetlbfs/inode.c | 2 +- - fs/proc/task_mmu.c | 4 - - include/linux/mm.h | 53 ++++++------- - mm/gup.c | 5 -- - mm/memory.c | 38 --------- - mm/mmap.c | 149 +++++++++++++++++++++--------------- - 21 files changed, 149 insertions(+), 160 deletions(-) - -diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt -index c360f80..9738c8b 100644 ---- a/Documentation/kernel-parameters.txt -+++ b/Documentation/kernel-parameters.txt -@@ -3576,6 +3576,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted. - spia_pedr= - spia_peddr= - -+ stack_guard_gap= [MM] -+ override the default stack gap protection. The value -+ is in page units and it defines how many pages prior -+ to (for stacks growing down) resp. after (for stacks -+ growing up) the main stack are reserved for no other -+ mapping. Default value is 256 pages. -+ - stacktrace [FTRACE] - Enabled the stack tracer on boot up. - -diff --git a/arch/arc/mm/mmap.c b/arch/arc/mm/mmap.c -index 2e06d56..cf4ae69 100644 ---- a/arch/arc/mm/mmap.c -+++ b/arch/arc/mm/mmap.c -@@ -64,7 +64,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, - - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c -index 407dc78..c469c06 100644 ---- a/arch/arm/mm/mmap.c -+++ b/arch/arm/mm/mmap.c -@@ -89,7 +89,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, - - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -@@ -140,7 +140,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, - addr = PAGE_ALIGN(addr); - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -diff --git a/arch/frv/mm/elf-fdpic.c b/arch/frv/mm/elf-fdpic.c -index 836f147..efa59f1 100644 ---- a/arch/frv/mm/elf-fdpic.c -+++ b/arch/frv/mm/elf-fdpic.c -@@ -74,7 +74,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi - addr = PAGE_ALIGN(addr); - vma = find_vma(current->mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - goto success; - } - -diff --git a/arch/mips/mm/mmap.c b/arch/mips/mm/mmap.c -index 5c81fdd..025cb31 100644 ---- a/arch/mips/mm/mmap.c -+++ b/arch/mips/mm/mmap.c -@@ -92,7 +92,7 @@ static unsigned long arch_get_unmapped_area_common(struct file *filp, - - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c -index 5aba01a..4dda73c 100644 ---- a/arch/parisc/kernel/sys_parisc.c -+++ b/arch/parisc/kernel/sys_parisc.c -@@ -88,7 +88,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, - unsigned long len, unsigned long pgoff, unsigned long flags) - { - struct mm_struct *mm = current->mm; -- struct vm_area_struct *vma; -+ struct vm_area_struct *vma, *prev; - unsigned long task_size = TASK_SIZE; - int do_color_align, last_mmap; - struct vm_unmapped_area_info info; -@@ -115,9 +115,10 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, - else - addr = PAGE_ALIGN(addr); - -- vma = find_vma(mm, addr); -+ vma = find_vma_prev(mm, addr, &prev); - if (task_size - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma)) && -+ (!prev || addr >= vm_end_gap(prev))) - goto found_addr; - } - -@@ -141,7 +142,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, - const unsigned long len, const unsigned long pgoff, - const unsigned long flags) - { -- struct vm_area_struct *vma; -+ struct vm_area_struct *vma, *prev; - struct mm_struct *mm = current->mm; - unsigned long addr = addr0; - int do_color_align, last_mmap; -@@ -175,9 +176,11 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, - addr = COLOR_ALIGN(addr, last_mmap, pgoff); - else - addr = PAGE_ALIGN(addr); -- vma = find_vma(mm, addr); -+ -+ vma = find_vma_prev(mm, addr, &prev); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma)) && -+ (!prev || addr >= vm_end_gap(prev))) - goto found_addr; - } - -diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c -index 0f432a7..6ad12b2 100644 ---- a/arch/powerpc/mm/slice.c -+++ b/arch/powerpc/mm/slice.c -@@ -105,7 +105,7 @@ static int slice_area_is_free(struct mm_struct *mm, unsigned long addr, - if ((mm->task_size - len) < addr) - return 0; - vma = find_vma(mm, addr); -- return (!vma || (addr + len) <= vma->vm_start); -+ return (!vma || (addr + len) <= vm_start_gap(vma)); - } - - static int slice_low_has_vma(struct mm_struct *mm, unsigned long slice) -diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c -index f2b6b1d..126c4a9 100644 ---- a/arch/s390/mm/mmap.c -+++ b/arch/s390/mm/mmap.c -@@ -97,7 +97,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, - addr = PAGE_ALIGN(addr); - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && addr >= mmap_min_addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -@@ -135,7 +135,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, - addr = PAGE_ALIGN(addr); - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && addr >= mmap_min_addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -diff --git a/arch/sh/mm/mmap.c b/arch/sh/mm/mmap.c -index 6777177..7df7d59 100644 ---- a/arch/sh/mm/mmap.c -+++ b/arch/sh/mm/mmap.c -@@ -63,7 +63,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, - - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -@@ -113,7 +113,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, - - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c -index c690c8e..7f0f7c01 100644 ---- a/arch/sparc/kernel/sys_sparc_64.c -+++ b/arch/sparc/kernel/sys_sparc_64.c -@@ -118,7 +118,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi - - vma = find_vma(mm, addr); - if (task_size - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -@@ -181,7 +181,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, - - vma = find_vma(mm, addr); - if (task_size - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -diff --git a/arch/sparc/mm/hugetlbpage.c b/arch/sparc/mm/hugetlbpage.c -index da11424..ffa842b 100644 ---- a/arch/sparc/mm/hugetlbpage.c -+++ b/arch/sparc/mm/hugetlbpage.c -@@ -115,7 +115,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, - addr = ALIGN(addr, HPAGE_SIZE); - vma = find_vma(mm, addr); - if (task_size - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - if (mm->get_unmapped_area == arch_get_unmapped_area) -diff --git a/arch/tile/mm/hugetlbpage.c b/arch/tile/mm/hugetlbpage.c -index c034dc3..c97ee6c 100644 ---- a/arch/tile/mm/hugetlbpage.c -+++ b/arch/tile/mm/hugetlbpage.c -@@ -232,7 +232,7 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, - addr = ALIGN(addr, huge_page_size(h)); - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - if (current->mm->get_unmapped_area == arch_get_unmapped_area) -diff --git a/arch/x86/kernel/sys_x86_64.c b/arch/x86/kernel/sys_x86_64.c -index 10e0272..136ad7c 100644 ---- a/arch/x86/kernel/sys_x86_64.c -+++ b/arch/x86/kernel/sys_x86_64.c -@@ -143,7 +143,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, - addr = PAGE_ALIGN(addr); - vma = find_vma(mm, addr); - if (end - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -@@ -186,7 +186,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, - addr = PAGE_ALIGN(addr); - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c -index 42982b2..39bdaf3 100644 ---- a/arch/x86/mm/hugetlbpage.c -+++ b/arch/x86/mm/hugetlbpage.c -@@ -144,7 +144,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, - addr = ALIGN(addr, huge_page_size(h)); - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - if (mm->get_unmapped_area == arch_get_unmapped_area) -diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c -index 83cf496..3aaaae1 100644 ---- a/arch/xtensa/kernel/syscall.c -+++ b/arch/xtensa/kernel/syscall.c -@@ -87,7 +87,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, - /* At this point: (!vmm || addr < vmm->vm_end). */ - if (TASK_SIZE - len < addr) - return -ENOMEM; -- if (!vmm || addr + len <= vmm->vm_start) -+ if (!vmm || addr + len <= vm_start_gap(vmm)) - return addr; - addr = vmm->vm_end; - if (flags & MAP_SHARED) -diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c -index 595ebdb..a17da8b5 100644 ---- a/fs/hugetlbfs/inode.c -+++ b/fs/hugetlbfs/inode.c -@@ -191,7 +191,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, - addr = ALIGN(addr, huge_page_size(h)); - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c -index d598b9c..cb7020c 100644 ---- a/fs/proc/task_mmu.c -+++ b/fs/proc/task_mmu.c -@@ -295,11 +295,7 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid) - - /* We don't show the stack guard page in /proc/maps */ - start = vma->vm_start; -- if (stack_guard_page_start(vma, start)) -- start += PAGE_SIZE; - end = vma->vm_end; -- if (stack_guard_page_end(vma, end)) -- end -= PAGE_SIZE; - - seq_setwidth(m, 25 + sizeof(void *) * 6 - 1); - seq_printf(m, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu ", -diff --git a/include/linux/mm.h b/include/linux/mm.h -index f0ffa01..55f950a 100644 ---- a/include/linux/mm.h -+++ b/include/linux/mm.h -@@ -1278,39 +1278,11 @@ int clear_page_dirty_for_io(struct page *page); - - int get_cmdline(struct task_struct *task, char *buffer, int buflen); - --/* Is the vma a continuation of the stack vma above it? */ --static inline int vma_growsdown(struct vm_area_struct *vma, unsigned long addr) --{ -- return vma && (vma->vm_end == addr) && (vma->vm_flags & VM_GROWSDOWN); --} -- - static inline bool vma_is_anonymous(struct vm_area_struct *vma) - { - return !vma->vm_ops; - } - --static inline int stack_guard_page_start(struct vm_area_struct *vma, -- unsigned long addr) --{ -- return (vma->vm_flags & VM_GROWSDOWN) && -- (vma->vm_start == addr) && -- !vma_growsdown(vma->vm_prev, addr); --} -- --/* Is the vma a continuation of the stack vma below it? */ --static inline int vma_growsup(struct vm_area_struct *vma, unsigned long addr) --{ -- return vma && (vma->vm_start == addr) && (vma->vm_flags & VM_GROWSUP); --} -- --static inline int stack_guard_page_end(struct vm_area_struct *vma, -- unsigned long addr) --{ -- return (vma->vm_flags & VM_GROWSUP) && -- (vma->vm_end == addr) && -- !vma_growsup(vma->vm_next, addr); --} -- - int vma_is_stack_for_task(struct vm_area_struct *vma, struct task_struct *t); - - extern unsigned long move_page_tables(struct vm_area_struct *vma, -@@ -2012,6 +1984,7 @@ void page_cache_async_readahead(struct address_space *mapping, - pgoff_t offset, - unsigned long size); - -+extern unsigned long stack_guard_gap; - /* Generic expand stack which grows the stack according to GROWS{UP,DOWN} */ - extern int expand_stack(struct vm_area_struct *vma, unsigned long address); - -@@ -2040,6 +2013,30 @@ static inline struct vm_area_struct * find_vma_intersection(struct mm_struct * m - return vma; - } - -+static inline unsigned long vm_start_gap(struct vm_area_struct *vma) -+{ -+ unsigned long vm_start = vma->vm_start; -+ -+ if (vma->vm_flags & VM_GROWSDOWN) { -+ vm_start -= stack_guard_gap; -+ if (vm_start > vma->vm_start) -+ vm_start = 0; -+ } -+ return vm_start; -+} -+ -+static inline unsigned long vm_end_gap(struct vm_area_struct *vma) -+{ -+ unsigned long vm_end = vma->vm_end; -+ -+ if (vma->vm_flags & VM_GROWSUP) { -+ vm_end += stack_guard_gap; -+ if (vm_end < vma->vm_end) -+ vm_end = -PAGE_SIZE; -+ } -+ return vm_end; -+} -+ - static inline unsigned long vma_pages(struct vm_area_struct *vma) - { - return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; -diff --git a/mm/gup.c b/mm/gup.c -index 4b0b7e7..b599526 100644 ---- a/mm/gup.c -+++ b/mm/gup.c -@@ -312,11 +312,6 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma, - /* mlock all present pages, but do not fault in new pages */ - if ((*flags & (FOLL_POPULATE | FOLL_MLOCK)) == FOLL_MLOCK) - return -ENOENT; -- /* For mm_populate(), just skip the stack guard page. */ -- if ((*flags & FOLL_POPULATE) && -- (stack_guard_page_start(vma, address) || -- stack_guard_page_end(vma, address + PAGE_SIZE))) -- return -ENOENT; - if (*flags & FOLL_WRITE) - fault_flags |= FAULT_FLAG_WRITE; - if (nonblocking) -diff --git a/mm/memory.c b/mm/memory.c -index 76dcee3..e6fa134 100644 ---- a/mm/memory.c -+++ b/mm/memory.c -@@ -2662,40 +2662,6 @@ out_release: - } - - /* -- * This is like a special single-page "expand_{down|up}wards()", -- * except we must first make sure that 'address{-|+}PAGE_SIZE' -- * doesn't hit another vma. -- */ --static inline int check_stack_guard_page(struct vm_area_struct *vma, unsigned long address) --{ -- address &= PAGE_MASK; -- if ((vma->vm_flags & VM_GROWSDOWN) && address == vma->vm_start) { -- struct vm_area_struct *prev = vma->vm_prev; -- -- /* -- * Is there a mapping abutting this one below? -- * -- * That's only ok if it's the same stack mapping -- * that has gotten split.. -- */ -- if (prev && prev->vm_end == address) -- return prev->vm_flags & VM_GROWSDOWN ? 0 : -ENOMEM; -- -- return expand_downwards(vma, address - PAGE_SIZE); -- } -- if ((vma->vm_flags & VM_GROWSUP) && address + PAGE_SIZE == vma->vm_end) { -- struct vm_area_struct *next = vma->vm_next; -- -- /* As VM_GROWSDOWN but s/below/above/ */ -- if (next && next->vm_start == address + PAGE_SIZE) -- return next->vm_flags & VM_GROWSUP ? 0 : -ENOMEM; -- -- return expand_upwards(vma, address + PAGE_SIZE); -- } -- return 0; --} -- --/* - * We enter with non-exclusive mmap_sem (to exclude vma changes, - * but allow concurrent faults), and pte mapped but not yet locked. - * We return with mmap_sem still held, but pte unmapped and unlocked. -@@ -2715,10 +2681,6 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma, - if (vma->vm_flags & VM_SHARED) - return VM_FAULT_SIGBUS; - -- /* Check if we need to add a guard page to the stack */ -- if (check_stack_guard_page(vma, address) < 0) -- return VM_FAULT_SIGSEGV; -- - /* Use the zero-page for reads */ - if (!(flags & FAULT_FLAG_WRITE) && !mm_forbids_zeropage(mm)) { - entry = pte_mkspecial(pfn_pte(my_zero_pfn(address), -diff --git a/mm/mmap.c b/mm/mmap.c -index 455772a..5e043dd 100644 ---- a/mm/mmap.c -+++ b/mm/mmap.c -@@ -288,6 +288,7 @@ SYSCALL_DEFINE1(brk, unsigned long, brk) - unsigned long retval; - unsigned long newbrk, oldbrk; - struct mm_struct *mm = current->mm; -+ struct vm_area_struct *next; - unsigned long min_brk; - bool populate; - -@@ -332,7 +333,8 @@ SYSCALL_DEFINE1(brk, unsigned long, brk) - } - - /* Check against existing mmap mappings. */ -- if (find_vma_intersection(mm, oldbrk, newbrk+PAGE_SIZE)) -+ next = find_vma(mm, oldbrk); -+ if (next && newbrk + PAGE_SIZE > vm_start_gap(next)) - goto out; - - /* Ok, looks good - let it rip. */ -@@ -355,10 +357,22 @@ out: - - static long vma_compute_subtree_gap(struct vm_area_struct *vma) - { -- unsigned long max, subtree_gap; -- max = vma->vm_start; -- if (vma->vm_prev) -- max -= vma->vm_prev->vm_end; -+ unsigned long max, prev_end, subtree_gap; -+ -+ /* -+ * Note: in the rare case of a VM_GROWSDOWN above a VM_GROWSUP, we -+ * allow two stack_guard_gaps between them here, and when choosing -+ * an unmapped area; whereas when expanding we only require one. -+ * That's a little inconsistent, but keeps the code here simpler. -+ */ -+ max = vm_start_gap(vma); -+ if (vma->vm_prev) { -+ prev_end = vm_end_gap(vma->vm_prev); -+ if (max > prev_end) -+ max -= prev_end; -+ else -+ max = 0; -+ } - if (vma->vm_rb.rb_left) { - subtree_gap = rb_entry(vma->vm_rb.rb_left, - struct vm_area_struct, vm_rb)->rb_subtree_gap; -@@ -451,7 +465,7 @@ static void validate_mm(struct mm_struct *mm) - anon_vma_unlock_read(anon_vma); - } - -- highest_address = vma->vm_end; -+ highest_address = vm_end_gap(vma); - vma = vma->vm_next; - i++; - } -@@ -620,7 +634,7 @@ void __vma_link_rb(struct mm_struct *mm, struct vm_area_struct *vma, - if (vma->vm_next) - vma_gap_update(vma->vm_next); - else -- mm->highest_vm_end = vma->vm_end; -+ mm->highest_vm_end = vm_end_gap(vma); - - /* - * vma->vm_prev wasn't known when we followed the rbtree to find the -@@ -866,7 +880,7 @@ again: remove_next = 1 + (end > next->vm_end); - vma_gap_update(vma); - if (end_changed) { - if (!next) -- mm->highest_vm_end = end; -+ mm->highest_vm_end = vm_end_gap(vma); - else if (!adjust_next) - vma_gap_update(next); - } -@@ -909,7 +923,7 @@ again: remove_next = 1 + (end > next->vm_end); - else if (next) - vma_gap_update(next); - else -- mm->highest_vm_end = end; -+ VM_WARN_ON(mm->highest_vm_end != vm_end_gap(vma)); - } - if (insert && file) - uprobe_mmap(insert); -@@ -1741,7 +1755,7 @@ unsigned long unmapped_area(struct vm_unmapped_area_info *info) - - while (true) { - /* Visit left subtree if it looks promising */ -- gap_end = vma->vm_start; -+ gap_end = vm_start_gap(vma); - if (gap_end >= low_limit && vma->vm_rb.rb_left) { - struct vm_area_struct *left = - rb_entry(vma->vm_rb.rb_left, -@@ -1752,7 +1766,7 @@ unsigned long unmapped_area(struct vm_unmapped_area_info *info) - } - } - -- gap_start = vma->vm_prev ? vma->vm_prev->vm_end : 0; -+ gap_start = vma->vm_prev ? vm_end_gap(vma->vm_prev) : 0; - check_current: - /* Check if current node has a suitable gap */ - if (gap_start > high_limit) -@@ -1779,8 +1793,8 @@ check_current: - vma = rb_entry(rb_parent(prev), - struct vm_area_struct, vm_rb); - if (prev == vma->vm_rb.rb_left) { -- gap_start = vma->vm_prev->vm_end; -- gap_end = vma->vm_start; -+ gap_start = vm_end_gap(vma->vm_prev); -+ gap_end = vm_start_gap(vma); - goto check_current; - } - } -@@ -1844,7 +1858,7 @@ unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info) - - while (true) { - /* Visit right subtree if it looks promising */ -- gap_start = vma->vm_prev ? vma->vm_prev->vm_end : 0; -+ gap_start = vma->vm_prev ? vm_end_gap(vma->vm_prev) : 0; - if (gap_start <= high_limit && vma->vm_rb.rb_right) { - struct vm_area_struct *right = - rb_entry(vma->vm_rb.rb_right, -@@ -1857,7 +1871,7 @@ unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info) - - check_current: - /* Check if current node has a suitable gap */ -- gap_end = vma->vm_start; -+ gap_end = vm_start_gap(vma); - if (gap_end < low_limit) - return -ENOMEM; - if (gap_start <= high_limit && gap_end - gap_start >= length) -@@ -1883,7 +1897,7 @@ check_current: - struct vm_area_struct, vm_rb); - if (prev == vma->vm_rb.rb_right) { - gap_start = vma->vm_prev ? -- vma->vm_prev->vm_end : 0; -+ vm_end_gap(vma->vm_prev) : 0; - goto check_current; - } - } -@@ -1921,7 +1935,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, - unsigned long len, unsigned long pgoff, unsigned long flags) - { - struct mm_struct *mm = current->mm; -- struct vm_area_struct *vma; -+ struct vm_area_struct *vma, *prev; - struct vm_unmapped_area_info info; - - if (len > TASK_SIZE - mmap_min_addr) -@@ -1932,9 +1946,10 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, - - if (addr) { - addr = PAGE_ALIGN(addr); -- vma = find_vma(mm, addr); -+ vma = find_vma_prev(mm, addr, &prev); - if (TASK_SIZE - len >= addr && addr >= mmap_min_addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma)) && -+ (!prev || addr >= vm_end_gap(prev))) - return addr; - } - -@@ -1957,7 +1972,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, - const unsigned long len, const unsigned long pgoff, - const unsigned long flags) - { -- struct vm_area_struct *vma; -+ struct vm_area_struct *vma, *prev; - struct mm_struct *mm = current->mm; - unsigned long addr = addr0; - struct vm_unmapped_area_info info; -@@ -1972,9 +1987,10 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, - /* requesting a specific address */ - if (addr) { - addr = PAGE_ALIGN(addr); -- vma = find_vma(mm, addr); -+ vma = find_vma_prev(mm, addr, &prev); - if (TASK_SIZE - len >= addr && addr >= mmap_min_addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma)) && -+ (!prev || addr >= vm_end_gap(prev))) - return addr; - } - -@@ -2099,21 +2115,19 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr, - * update accounting. This is shared with both the - * grow-up and grow-down cases. - */ --static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, unsigned long grow) -+static int acct_stack_growth(struct vm_area_struct *vma, -+ unsigned long size, unsigned long grow) - { - struct mm_struct *mm = vma->vm_mm; - struct rlimit *rlim = current->signal->rlim; -- unsigned long new_start, actual_size; -+ unsigned long new_start; - - /* address space limit tests */ - if (!may_expand_vm(mm, grow)) - return -ENOMEM; - - /* Stack limit test */ -- actual_size = size; -- if (size && (vma->vm_flags & (VM_GROWSUP | VM_GROWSDOWN))) -- actual_size -= PAGE_SIZE; -- if (actual_size > READ_ONCE(rlim[RLIMIT_STACK].rlim_cur)) -+ if (size > READ_ONCE(rlim[RLIMIT_STACK].rlim_cur)) - return -ENOMEM; - - /* mlock limit tests */ -@@ -2151,17 +2165,30 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns - int expand_upwards(struct vm_area_struct *vma, unsigned long address) - { - struct mm_struct *mm = vma->vm_mm; -+ struct vm_area_struct *next; -+ unsigned long gap_addr; - int error = 0; - - if (!(vma->vm_flags & VM_GROWSUP)) - return -EFAULT; - - /* Guard against wrapping around to address 0. */ -- if (address < PAGE_ALIGN(address+4)) -- address = PAGE_ALIGN(address+4); -- else -+ address &= PAGE_MASK; -+ address += PAGE_SIZE; -+ if (!address) - return -ENOMEM; - -+ /* Enforce stack_guard_gap */ -+ gap_addr = address + stack_guard_gap; -+ if (gap_addr < address) -+ return -ENOMEM; -+ next = vma->vm_next; -+ if (next && next->vm_start < gap_addr) { -+ if (!(next->vm_flags & VM_GROWSUP)) -+ return -ENOMEM; -+ /* Check that both stack segments have the same anon_vma? */ -+ } -+ - /* We must make sure the anon_vma is allocated. */ - if (unlikely(anon_vma_prepare(vma))) - return -ENOMEM; -@@ -2206,7 +2233,7 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address) - if (vma->vm_next) - vma_gap_update(vma->vm_next); - else -- mm->highest_vm_end = address; -+ mm->highest_vm_end = vm_end_gap(vma); - spin_unlock(&mm->page_table_lock); - - perf_event_mmap(vma); -@@ -2227,6 +2254,8 @@ int expand_downwards(struct vm_area_struct *vma, - unsigned long address) - { - struct mm_struct *mm = vma->vm_mm; -+ struct vm_area_struct *prev; -+ unsigned long gap_addr; - int error; - - address &= PAGE_MASK; -@@ -2234,6 +2263,17 @@ int expand_downwards(struct vm_area_struct *vma, - if (error) - return error; - -+ /* Enforce stack_guard_gap */ -+ gap_addr = address - stack_guard_gap; -+ if (gap_addr > address) -+ return -ENOMEM; -+ prev = vma->vm_prev; -+ if (prev && prev->vm_end > gap_addr) { -+ if (!(prev->vm_flags & VM_GROWSDOWN)) -+ return -ENOMEM; -+ /* Check that both stack segments have the same anon_vma? */ -+ } -+ - /* We must make sure the anon_vma is allocated. */ - if (unlikely(anon_vma_prepare(vma))) - return -ENOMEM; -@@ -2289,28 +2329,25 @@ int expand_downwards(struct vm_area_struct *vma, - return error; - } - --/* -- * Note how expand_stack() refuses to expand the stack all the way to -- * abut the next virtual mapping, *unless* that mapping itself is also -- * a stack mapping. We want to leave room for a guard page, after all -- * (the guard page itself is not added here, that is done by the -- * actual page faulting logic) -- * -- * This matches the behavior of the guard page logic (see mm/memory.c: -- * check_stack_guard_page()), which only allows the guard page to be -- * removed under these circumstances. -- */ -+/* enforced gap between the expanding stack and other mappings. */ -+unsigned long stack_guard_gap = 256UL< -Debugged-by: Linus Torvalds -Signed-off-by: Hugh Dickins -Acked-by: Michal Hocko -Signed-off-by: Linus Torvalds -Signed-off-by: Greg Kroah-Hartman ---- - mm/mmap.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/mm/mmap.c b/mm/mmap.c -index fcf4c88..0990f8b 100644 ---- a/mm/mmap.c -+++ b/mm/mmap.c -@@ -1771,7 +1771,8 @@ check_current: - /* Check if current node has a suitable gap */ - if (gap_start > high_limit) - return -ENOMEM; -- if (gap_end >= low_limit && gap_end - gap_start >= length) -+ if (gap_end >= low_limit && -+ gap_end > gap_start && gap_end - gap_start >= length) - goto found; - - /* Visit right subtree if it looks promising */ -@@ -1874,7 +1875,8 @@ check_current: - gap_end = vm_start_gap(vma); - if (gap_end < low_limit) - return -ENOMEM; -- if (gap_start <= high_limit && gap_end - gap_start >= length) -+ if (gap_start <= high_limit && -+ gap_end > gap_start && gap_end - gap_start >= length) - goto found; - - /* Visit left subtree if it looks promising */ --- -2.1.4 - diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-yocto_4.4.bbappend b/meta-agl-bsp/recipes-kernel/linux/linux-yocto_4.4.bbappend deleted file mode 100644 index 45c170661..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux-yocto_4.4.bbappend +++ /dev/null @@ -1,14 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto:" - -# Backported fix for CVE-2017-1000364 -SRC_URI_append_core2-32-intel-common = "\ - file://4.4-0001-mm-larger-stack-guard-gap-between-vmas.patch \ - file://4.4-0002-Allow-stack-to-grow-up-to-address-space-limit.patch \ - file://4.4-0003-mm-fix-new-crash-in-unmapped_area_topdown.patch \ -" - -SRC_URI_append_corei7-64-intel-common = "\ - file://4.4-0001-mm-larger-stack-guard-gap-between-vmas.patch \ - file://4.4-0002-Allow-stack-to-grow-up-to-address-space-limit.patch \ - file://4.4-0003-mm-fix-new-crash-in-unmapped_area_topdown.patch \ -" -- cgit 1.2.3-korg From aa8c4324b8fa708b284273340eb6870feb2ef303 Mon Sep 17 00:00:00 2001 From: Changhyeok Bae Date: Wed, 13 Dec 2017 13:29:45 +0000 Subject: mesa: Arrange the recipe Bug-AGL: SPEC-1181 Change-Id: I84044c6cbfaaf7481ea35af6576d616bfbd16008 Signed-off-by: Changhyeok Bae --- .../0001-Use-llvm_prefix-variable-directly.patch | 25 ---------------------- meta-agl-bsp/recipes-graphics/mesa/mesa_%.bbappend | 4 ---- 2 files changed, 29 deletions(-) delete mode 100644 meta-agl-bsp/recipes-graphics/mesa/mesa/0001-Use-llvm_prefix-variable-directly.patch (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/recipes-graphics/mesa/mesa/0001-Use-llvm_prefix-variable-directly.patch b/meta-agl-bsp/recipes-graphics/mesa/mesa/0001-Use-llvm_prefix-variable-directly.patch deleted file mode 100644 index 4f1905492..000000000 --- a/meta-agl-bsp/recipes-graphics/mesa/mesa/0001-Use-llvm_prefix-variable-directly.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0b316ee830765eb1d68cdece5fd4c991e9fba96c Mon Sep 17 00:00:00 2001 -From: Changhyeok Bae -Date: Sat, 8 Jul 2017 15:22:09 +0900 -Subject: [PATCH] Use $llvm_prefix variable directly - ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index ac110e8..d094ca6 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -896,7 +896,7 @@ fi - - if test -z "$LLVM_CONFIG"; then - if test -n "$llvm_prefix"; then -- AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no], ["$llvm_prefix/bin"]) -+ AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no], ["$llvm_prefix"]) - else - AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no]) - fi --- -1.9.1 - diff --git a/meta-agl-bsp/recipes-graphics/mesa/mesa_%.bbappend b/meta-agl-bsp/recipes-graphics/mesa/mesa_%.bbappend index 13273792b..49e527707 100644 --- a/meta-agl-bsp/recipes-graphics/mesa/mesa_%.bbappend +++ b/meta-agl-bsp/recipes-graphics/mesa/mesa_%.bbappend @@ -1,7 +1,3 @@ -FILESEXTRAPATHS_prepend_qemux86-64 := "${THISDIR}/${BPN}:" -SRC_URI_append_qemux86-64 = " file://0001-Use-llvm_prefix-variable-directly.patch" -EXTRA_OECONF_qemux86-64 = "--enable-shared-glapi --with-llvm-prefix=${STAGING_BINDIR_CROSS}" - # The gallium-llvm is recommended as software 3D graphics renderer GALLIUM_LLVM = "gallium-llvm" PACKAGECONFIG_append_qemux86 = " gallium ${GALLIUM_LLVM}" -- cgit 1.2.3-korg From abb4dcda7434f9ad712265c32019cbe34c484438 Mon Sep 17 00:00:00 2001 From: Changhyeok Bae Date: Fri, 29 Dec 2017 04:34:42 +0000 Subject: meta-agl-bsp/classes: Remove bbclass files 1. Remove sdcard_image-rpi 2. image: Convert vmdk/vdi/qcow2 to strict CONVERSION_CMD types (From Poky rev: 9d07c736e39a9aa922630b4241eda185a19a11ea) (From OE-Core rev: 929ba563f1bc7195c4981b8e139c432b2cc388ea) Bug-AGL: SPEC-1181 Change-Id: Ic184ff75526b9a0e67bd9d5175e094e81d23081d Signed-off-by: Changhyeok Bae --- meta-agl-bsp/classes/image-vm.bbclass | 181 -------- meta-agl-bsp/classes/image.bbclass | 624 -------------------------- meta-agl-bsp/classes/sdcard_image-rpi.bbclass | 184 -------- 3 files changed, 989 deletions(-) delete mode 100644 meta-agl-bsp/classes/image-vm.bbclass delete mode 100644 meta-agl-bsp/classes/image.bbclass delete mode 100644 meta-agl-bsp/classes/sdcard_image-rpi.bbclass (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/classes/image-vm.bbclass b/meta-agl-bsp/classes/image-vm.bbclass deleted file mode 100644 index ec8f0cb8f..000000000 --- a/meta-agl-bsp/classes/image-vm.bbclass +++ /dev/null @@ -1,181 +0,0 @@ -# image-vm.bbclass -# (loosly based off image-live.bbclass Copyright (C) 2004, Advanced Micro Devices, Inc.) -# -# Create an image which can be placed directly onto a harddisk using dd and then -# booted. -# -# This uses syslinux. extlinux would have been nice but required the ext2/3 -# partition to be mounted. grub requires to run itself as part of the install -# process. -# -# The end result is a 512 boot sector populated with an MBR and partition table -# followed by an msdos fat16 partition containing syslinux and a linux kernel -# completed by the ext2/3 rootfs. -# -# We have to push the msdos parition table size > 16MB so fat 16 is used as parted -# won't touch fat12 partitions. - -inherit live-vm-common - -do_bootdirectdisk[depends] += "dosfstools-native:do_populate_sysroot \ - virtual/kernel:do_deploy \ - syslinux:do_populate_sysroot \ - syslinux-native:do_populate_sysroot \ - parted-native:do_populate_sysroot \ - mtools-native:do_populate_sysroot \ - ${PN}:do_image_${VM_ROOTFS_TYPE} \ - " - -IMAGE_TYPEDEP_vmdk = "${VM_ROOTFS_TYPE}" -IMAGE_TYPEDEP_vmdk.xz = "${VM_ROOTFS_TYPE}" -IMAGE_TYPEDEP_vdi = "${VM_ROOTFS_TYPE}" -IMAGE_TYPEDEP_qcow2 = "${VM_ROOTFS_TYPE}" -IMAGE_TYPEDEP_hdddirect = "${VM_ROOTFS_TYPE}" -IMAGE_TYPES_MASKED += "vmdk vmdk.xz vdi qcow2 hdddirect" - -VM_ROOTFS_TYPE ?= "ext4" -ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${VM_ROOTFS_TYPE}" - -# Used by bootloader -LABELS_VM ?= "boot" -ROOT_VM ?= "root=/dev/sda2" -# Using an initramfs is optional. Enable it by setting INITRD_IMAGE_VM. -INITRD_IMAGE_VM ?= "" -INITRD_VM ?= "${@'${IMGDEPLOYDIR}/${INITRD_IMAGE_VM}-${MACHINE}.cpio.gz' if '${INITRD_IMAGE_VM}' else ''}" -do_bootdirectdisk[depends] += "${@'${INITRD_IMAGE_VM}:do_image_complete' if '${INITRD_IMAGE_VM}' else ''}" - -BOOTDD_VOLUME_ID ?= "boot" -BOOTDD_EXTRA_SPACE ?= "16384" - -DISK_SIGNATURE ?= "${DISK_SIGNATURE_GENERATED}" -DISK_SIGNATURE[vardepsexclude] = "DISK_SIGNATURE_GENERATED" - -build_boot_dd() { - HDDDIR="${S}/hdd/boot" - HDDIMG="${S}/hdd.image" - IMAGE=${IMGDEPLOYDIR}/${IMAGE_NAME}.hdddirect - - populate_kernel $HDDDIR - - if [ "${PCBIOS}" = "1" ]; then - syslinux_hddimg_populate $HDDDIR - fi - if [ "${EFI}" = "1" ]; then - efi_hddimg_populate $HDDDIR - fi - - BLOCKS=`du -bks $HDDDIR | cut -f 1` - BLOCKS=`expr $BLOCKS + ${BOOTDD_EXTRA_SPACE}` - - # Remove it since mkdosfs would fail when it exists - rm -f $HDDIMG - mkdosfs -n ${BOOTDD_VOLUME_ID} -S 512 -C $HDDIMG $BLOCKS - mcopy -i $HDDIMG -s $HDDDIR/* ::/ - - if [ "${PCBIOS}" = "1" ]; then - syslinux_hdddirect_install $HDDIMG - fi - chmod 644 $HDDIMG - - ROOTFSBLOCKS=`du -Lbks ${ROOTFS} | cut -f 1` - TOTALSIZE=`expr $BLOCKS + $ROOTFSBLOCKS` - END1=`expr $BLOCKS \* 1024` - END2=`expr $END1 + 512` - END3=`expr \( $ROOTFSBLOCKS \* 1024 \) + $END1` - - echo $ROOTFSBLOCKS $TOTALSIZE $END1 $END2 $END3 - rm -rf $IMAGE - dd if=/dev/zero of=$IMAGE bs=1024 seek=$TOTALSIZE count=1 - - parted $IMAGE mklabel msdos - parted $IMAGE mkpart primary fat16 0 ${END1}B - parted $IMAGE unit B mkpart primary ext2 ${END2}B ${END3}B - parted $IMAGE set 1 boot on - - parted $IMAGE print - - awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | sed 's/\(..\)\(..\)\(..\)\(..\)/\\x\4\\x\3\\x\2\\x\1/')\" }" | \ - dd of=$IMAGE bs=1 seek=440 conv=notrunc - - OFFSET=`expr $END2 / 512` - if [ "${PCBIOS}" = "1" ]; then - dd if=${STAGING_DATADIR}/syslinux/mbr.bin of=$IMAGE conv=notrunc - fi - - dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512 - dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512 - - cd ${IMGDEPLOYDIR} - - ln -sf ${IMAGE_NAME}.hdddirect ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect -} - -python do_bootdirectdisk() { - validate_disk_signature(d) - set_live_vm_vars(d, 'VM') - if d.getVar("PCBIOS") == "1": - bb.build.exec_func('build_syslinux_cfg', d) - if d.getVar("EFI") == "1": - bb.build.exec_func('build_efi_cfg', d) - bb.build.exec_func('build_boot_dd', d) -} - -def generate_disk_signature(): - import uuid - - signature = str(uuid.uuid4())[:8] - - if signature != '00000000': - return signature - else: - return 'ffffffff' - -def validate_disk_signature(d): - import re - - disk_signature = d.getVar("DISK_SIGNATURE") - - if not re.match(r'^[0-9a-fA-F]{8}$', disk_signature): - bb.fatal("DISK_SIGNATURE '%s' must be an 8 digit hex string" % disk_signature) - -DISK_SIGNATURE_GENERATED := "${@generate_disk_signature()}" - -run_qemu_img (){ - type="$1" - qemu-img convert -O $type ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect ${IMGDEPLOYDIR}/${IMAGE_NAME}.$type - - ln -sf ${IMAGE_NAME}.$type ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type -} -create_vmdk_image () { - run_qemu_img vmdk -} - -create_vmdkxz_image () { - run_qemu_img vmdk - xz -f ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} --check=${XZ_INTEGRITY_CHECK} ${IMGDEPLOYDIR}/${IMAGE_NAME}.vmdk - ln -sf ${IMAGE_NAME}.vmdk.xz ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.vmdk.xz - rm -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.vmdk -} - -create_vdi_image () { - run_qemu_img vdi -} - -create_qcow2_image () { - run_qemu_img qcow2 -} - -python do_vmimg() { - if bb.utils.contains('IMAGE_FSTYPES', 'vmdk.xz', True, False, d): - bb.build.exec_func('create_vmdkxz_image', d) - if bb.utils.contains('IMAGE_FSTYPES', 'vmdk', True, False, d): - bb.build.exec_func('create_vmdk_image', d) - if 'vdi' in d.getVar('IMAGE_FSTYPES', True): - bb.build.exec_func('create_vdi_image', d) - if 'qcow2' in d.getVar('IMAGE_FSTYPES', True): - bb.build.exec_func('create_qcow2_image', d) -} - -addtask bootdirectdisk before do_vmimg -addtask vmimg after do_bootdirectdisk before do_image_complete -do_vmimg[depends] += "qemu-native:do_populate_sysroot" diff --git a/meta-agl-bsp/classes/image.bbclass b/meta-agl-bsp/classes/image.bbclass deleted file mode 100644 index ccaffce60..000000000 --- a/meta-agl-bsp/classes/image.bbclass +++ /dev/null @@ -1,624 +0,0 @@ -inherit rootfs_${IMAGE_PKGTYPE} - -# Only Linux SDKs support populate_sdk_ext, fall back to populate_sdk_base -# in the non-Linux SDK_OS case, such as mingw32 -SDKEXTCLASS ?= "${@['populate_sdk_base', 'populate_sdk_ext']['linux' in d.getVar("SDK_OS")]}" -inherit ${SDKEXTCLASS} - -TOOLCHAIN_TARGET_TASK += "${PACKAGE_INSTALL}" -TOOLCHAIN_TARGET_TASK_ATTEMPTONLY += "${PACKAGE_INSTALL_ATTEMPTONLY}" -POPULATE_SDK_POST_TARGET_COMMAND += "rootfs_sysroot_relativelinks; " - -LICENSE = "MIT" -PACKAGES = "" -DEPENDS += "${MLPREFIX}qemuwrapper-cross depmodwrapper-cross" -RDEPENDS += "${PACKAGE_INSTALL} ${LINGUAS_INSTALL}" -RRECOMMENDS += "${PACKAGE_INSTALL_ATTEMPTONLY}" - -INHIBIT_DEFAULT_DEPS = "1" - -TESTIMAGECLASS = "${@base_conditional('TEST_IMAGE', '1', 'testimage-auto', '', d)}" -inherit ${TESTIMAGECLASS} - -# IMAGE_FEATURES may contain any available package group -IMAGE_FEATURES ?= "" -IMAGE_FEATURES[type] = "list" -IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs empty-root-password allow-empty-password post-install-logging" - -# Generate companion debugfs? -IMAGE_GEN_DEBUGFS ?= "0" - -# rootfs bootstrap install -ROOTFS_BOOTSTRAP_INSTALL = "run-postinsts" - -# These packages will be removed from a read-only rootfs after all other -# packages have been installed -ROOTFS_RO_UNNEEDED = "update-rc.d base-passwd shadow ${VIRTUAL-RUNTIME_update-alternatives} ${ROOTFS_BOOTSTRAP_INSTALL}" - -# packages to install from features -FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" -FEATURE_INSTALL[vardepvalue] = "${FEATURE_INSTALL}" -FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" -FEATURE_INSTALL_OPTIONAL[vardepvalue] = "${FEATURE_INSTALL_OPTIONAL}" - -# Define some very basic feature package groups -FEATURE_PACKAGES_package-management = "${ROOTFS_PKGMANAGE}" -SPLASH ?= "psplash" -FEATURE_PACKAGES_splash = "${SPLASH}" - -IMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("IMAGE_FEATURES", d)}' - -def check_image_features(d): - valid_features = (d.getVarFlag('IMAGE_FEATURES', 'validitems') or "").split() - valid_features += d.getVarFlags('COMPLEMENTARY_GLOB').keys() - for var in d: - if var.startswith("PACKAGE_GROUP_"): - bb.warn("PACKAGE_GROUP is deprecated, please use FEATURE_PACKAGES instead") - valid_features.append(var[14:]) - elif var.startswith("FEATURE_PACKAGES_"): - valid_features.append(var[17:]) - valid_features.sort() - - features = set(oe.data.typed_value('IMAGE_FEATURES', d)) - for feature in features: - if feature not in valid_features: - if bb.utils.contains('EXTRA_IMAGE_FEATURES', feature, True, False, d): - raise bb.parse.SkipRecipe("'%s' in IMAGE_FEATURES (added via EXTRA_IMAGE_FEATURES) is not a valid image feature. Valid features: %s" % (feature, ' '.join(valid_features))) - else: - raise bb.parse.SkipRecipe("'%s' in IMAGE_FEATURES is not a valid image feature. Valid features: %s" % (feature, ' '.join(valid_features))) - -IMAGE_INSTALL ?= "" -IMAGE_INSTALL[type] = "list" -export PACKAGE_INSTALL ?= "${IMAGE_INSTALL} ${ROOTFS_BOOTSTRAP_INSTALL} ${FEATURE_INSTALL}" -PACKAGE_INSTALL_ATTEMPTONLY ?= "${FEATURE_INSTALL_OPTIONAL}" - -IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete" - -# Images are generally built explicitly, do not need to be part of world. -EXCLUDE_FROM_WORLD = "1" - -USE_DEVFS ?= "1" -USE_DEPMOD ?= "1" - -PID = "${@os.getpid()}" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -LDCONFIGDEPEND ?= "ldconfig-native:do_populate_sysroot" -LDCONFIGDEPEND_libc-uclibc = "" -LDCONFIGDEPEND_libc-musl = "" - -# This is needed to have depmod data in PKGDATA_DIR, -# but if you're building small initramfs image -# e.g. to include it in your kernel, you probably -# don't want this dependency, which is causing dependency loop -KERNELDEPMODDEPEND ?= "virtual/kernel:do_packagedata" - -do_rootfs[depends] += " \ - makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND} \ - virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot \ - ${KERNELDEPMODDEPEND} \ -" -do_rootfs[recrdeptask] += "do_packagedata" - -def rootfs_command_variables(d): - return ['ROOTFS_POSTPROCESS_COMMAND','ROOTFS_PREPROCESS_COMMAND','ROOTFS_POSTINSTALL_COMMAND','ROOTFS_POSTUNINSTALL_COMMAND','OPKG_PREPROCESS_COMMANDS','OPKG_POSTPROCESS_COMMANDS','IMAGE_POSTPROCESS_COMMAND', - 'IMAGE_PREPROCESS_COMMAND','RPM_PREPROCESS_COMMANDS','RPM_POSTPROCESS_COMMANDS','DEB_PREPROCESS_COMMANDS','DEB_POSTPROCESS_COMMANDS'] - -python () { - variables = rootfs_command_variables(d) + sdk_command_variables(d) - for var in variables: - if d.getVar(var, False): - d.setVarFlag(var, 'func', '1') -} - -def rootfs_variables(d): - from oe.rootfs import variable_depends - variables = ['IMAGE_DEVICE_TABLE','IMAGE_DEVICE_TABLES','BUILD_IMAGES_FROM_FEEDS','IMAGE_TYPES_MASKED','IMAGE_ROOTFS_ALIGNMENT','IMAGE_OVERHEAD_FACTOR','IMAGE_ROOTFS_SIZE','IMAGE_ROOTFS_EXTRA_SPACE', - 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS', - 'MULTILIBRE_ALLOW_REP','MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS', - 'PACKAGE_ARCHS','PACKAGE_CLASSES','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS', - 'CONVERSIONTYPES', 'IMAGE_GEN_DEBUGFS', 'ROOTFS_RO_UNNEEDED', 'IMGDEPLOYDIR', 'PACKAGE_EXCLUDE_COMPLEMENTARY'] - variables.extend(rootfs_command_variables(d)) - variables.extend(variable_depends(d)) - return " ".join(variables) - -do_rootfs[vardeps] += "${@rootfs_variables(d)}" - -do_build[depends] += "virtual/kernel:do_deploy" - -def build_live(d): - if bb.utils.contains("IMAGE_FSTYPES", "live", "live", "0", d) == "0": # live is not set but hob might set iso or hddimg - d.setVar('NOISO', bb.utils.contains('IMAGE_FSTYPES', "iso", "0", "1", d)) - d.setVar('NOHDD', bb.utils.contains('IMAGE_FSTYPES', "hddimg", "0", "1", d)) - if d.getVar('NOISO') == "0" or d.getVar('NOHDD') == "0": - return "image-live" - return "" - return "image-live" - -IMAGE_TYPE_live = "${@build_live(d)}" -inherit ${IMAGE_TYPE_live} - -IMAGE_TYPE_vm = '${@bb.utils.contains_any("IMAGE_FSTYPES", ["vmdk", "vmdk.xz", "vdi", "qcow2", "hdddirect"], "image-vm", "", d)}' - -inherit ${IMAGE_TYPE_vm} - -IMAGE_TYPE_container = '${@bb.utils.contains("IMAGE_FSTYPES", "container", "image-container", "", d)}' -inherit ${IMAGE_TYPE_container} - -def build_uboot(d): - if 'u-boot' in (d.getVar('IMAGE_FSTYPES') or ''): - return "image_types_uboot" - else: - return "" - -IMAGE_TYPE_uboot = "${@build_uboot(d)}" -inherit ${IMAGE_TYPE_uboot} - -IMAGE_TYPE_wic = "image_types_wic" -inherit ${IMAGE_TYPE_wic} - -python () { - def extraimage_getdepends(task): - deps = "" - for dep in (d.getVar('EXTRA_IMAGEDEPENDS') or "").split(): - deps += " %s:%s" % (dep, task) - return deps - - d.appendVarFlag('do_image', 'depends', extraimage_getdepends('do_populate_lic')) - d.appendVarFlag('do_image_complete', 'depends', extraimage_getdepends('do_populate_sysroot')) - - deps = " " + imagetypes_getdepends(d) - d.appendVarFlag('do_rootfs', 'depends', deps) - - #process IMAGE_FEATURES, we must do this before runtime_mapping_rename - #Check for replaces image features - features = set(oe.data.typed_value('IMAGE_FEATURES', d)) - remain_features = features.copy() - for feature in features: - replaces = set((d.getVar("IMAGE_FEATURES_REPLACES_%s" % feature) or "").split()) - remain_features -= replaces - - #Check for conflict image features - for feature in remain_features: - conflicts = set((d.getVar("IMAGE_FEATURES_CONFLICTS_%s" % feature) or "").split()) - temp = conflicts & remain_features - if temp: - bb.fatal("%s contains conflicting IMAGE_FEATURES %s %s" % (d.getVar('PN'), feature, ' '.join(list(temp)))) - - d.setVar('IMAGE_FEATURES', ' '.join(sorted(list(remain_features)))) - - check_image_features(d) - initramfs_image = d.getVar('INITRAMFS_IMAGE') or "" - if initramfs_image != "": - d.appendVarFlag('do_build', 'depends', " %s:do_bundle_initramfs" % d.getVar('PN')) - d.appendVarFlag('do_bundle_initramfs', 'depends', " %s:do_image_complete" % initramfs_image) -} - -IMAGE_CLASSES += "image_types" -inherit ${IMAGE_CLASSES} - -IMAGE_POSTPROCESS_COMMAND ?= "" - -# some default locales -IMAGE_LINGUAS ?= "de-de fr-fr en-gb" - -LINGUAS_INSTALL ?= "${@" ".join(map(lambda s: "locale-base-%s" % s, d.getVar('IMAGE_LINGUAS').split()))}" - -# Prefer image, but use the fallback files for lookups if the image ones -# aren't yet available. -PSEUDO_PASSWD = "${IMAGE_ROOTFS}:${STAGING_DIR_NATIVE}" - -inherit rootfs-postcommands - -PACKAGE_EXCLUDE ??= "" -PACKAGE_EXCLUDE[type] = "list" - -fakeroot python do_rootfs () { - from oe.rootfs import create_rootfs - from oe.manifest import create_manifest - import logging - - logger = d.getVar('BB_TASK_LOGGER', False) - if logger: - logcatcher = bb.utils.LogCatcher() - logger.addHandler(logcatcher) - else: - logcatcher = None - - # NOTE: if you add, remove or significantly refactor the stages of this - # process then you should recalculate the weightings here. This is quite - # easy to do - just change the MultiStageProgressReporter line temporarily - # to pass debug=True as the last parameter and you'll get a printout of - # the weightings as well as a map to the lines where next_stage() was - # called. Of course this isn't critical, but it helps to keep the progress - # reporting accurate. - stage_weights = [1, 203, 354, 186, 65, 4228, 1, 353, 49, 330, 382, 23, 1] - progress_reporter = bb.progress.MultiStageProgressReporter(d, stage_weights) - progress_reporter.next_stage() - - # Handle package exclusions - excl_pkgs = d.getVar("PACKAGE_EXCLUDE").split() - inst_pkgs = d.getVar("PACKAGE_INSTALL").split() - inst_attempt_pkgs = d.getVar("PACKAGE_INSTALL_ATTEMPTONLY").split() - - d.setVar('PACKAGE_INSTALL_ORIG', ' '.join(inst_pkgs)) - d.setVar('PACKAGE_INSTALL_ATTEMPTONLY', ' '.join(inst_attempt_pkgs)) - - for pkg in excl_pkgs: - if pkg in inst_pkgs: - bb.warn("Package %s, set to be excluded, is in %s PACKAGE_INSTALL (%s). It will be removed from the list." % (pkg, d.getVar('PN'), inst_pkgs)) - inst_pkgs.remove(pkg) - - if pkg in inst_attempt_pkgs: - bb.warn("Package %s, set to be excluded, is in %s PACKAGE_INSTALL_ATTEMPTONLY (%s). It will be removed from the list." % (pkg, d.getVar('PN'), inst_pkgs)) - inst_attempt_pkgs.remove(pkg) - - d.setVar("PACKAGE_INSTALL", ' '.join(inst_pkgs)) - d.setVar("PACKAGE_INSTALL_ATTEMPTONLY", ' '.join(inst_attempt_pkgs)) - - # Ensure we handle package name remapping - # We have to delay the runtime_mapping_rename until just before rootfs runs - # otherwise, the multilib renaming could step in and squash any fixups that - # may have occurred. - pn = d.getVar('PN') - runtime_mapping_rename("PACKAGE_INSTALL", pn, d) - runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", pn, d) - runtime_mapping_rename("BAD_RECOMMENDATIONS", pn, d) - - # Generate the initial manifest - create_manifest(d) - - progress_reporter.next_stage() - - # generate rootfs - create_rootfs(d, progress_reporter=progress_reporter, logcatcher=logcatcher) - - progress_reporter.finish() -} -do_rootfs[dirs] = "${TOPDIR}" -do_rootfs[cleandirs] += "${S} ${IMGDEPLOYDIR}" -do_rootfs[umask] = "022" -addtask rootfs before do_build after do_prepare_recipe_sysroot - -fakeroot python do_image () { - from oe.utils import execute_pre_post_process - - pre_process_cmds = d.getVar("IMAGE_PREPROCESS_COMMAND") - - execute_pre_post_process(d, pre_process_cmds) -} -do_image[dirs] = "${TOPDIR}" -do_image[umask] = "022" -addtask do_image after do_rootfs before do_build - -fakeroot python do_image_complete () { - from oe.utils import execute_pre_post_process - - post_process_cmds = d.getVar("IMAGE_POSTPROCESS_COMMAND") - - execute_pre_post_process(d, post_process_cmds) -} -do_image_complete[dirs] = "${TOPDIR}" -do_image_complete[umask] = "022" -SSTATETASKS += "do_image_complete" -SSTATE_SKIP_CREATION_task-image-complete = '1' -do_image_complete[sstate-inputdirs] = "${IMGDEPLOYDIR}" -do_image_complete[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}" -do_image_complete[stamp-extra-info] = "${MACHINE}" -addtask do_image_complete after do_image before do_build - -# Add image-level QA/sanity checks to IMAGE_QA_COMMANDS -# -# IMAGE_QA_COMMANDS += " \ -# image_check_everything_ok \ -# " -# This task runs all functions in IMAGE_QA_COMMANDS after the image -# construction has completed in order to validate the resulting image. -fakeroot python do_image_qa () { - from oe.utils import ImageQAFailed - - qa_cmds = (d.getVar('IMAGE_QA_COMMANDS') or '').split() - qamsg = "" - - for cmd in qa_cmds: - try: - bb.build.exec_func(cmd, d) - except oe.utils.ImageQAFailed as e: - qamsg = qamsg + '\tImage QA function %s failed: %s\n' % (e.name, e.description) - except bb.build.FuncFailed as e: - qamsg = qamsg + '\tImage QA function %s failed' % e.name - if e.logfile: - qamsg = qamsg + ' (log file is located at %s)' % e.logfile - qamsg = qamsg + '\n' - - if qamsg: - imgname = d.getVar('IMAGE_NAME') - bb.fatal("QA errors found whilst validating image: %s\n%s" % (imgname, qamsg)) -} -addtask do_image_qa after do_image_complete before do_build - -def setup_debugfs_variables(d): - d.appendVar('IMAGE_ROOTFS', '-dbg') - d.appendVar('IMAGE_LINK_NAME', '-dbg') - d.appendVar('IMAGE_NAME','-dbg') - d.setVar('IMAGE_BUILDING_DEBUGFS', 'true') - debugfs_image_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS') - if debugfs_image_fstypes: - d.setVar('IMAGE_FSTYPES', debugfs_image_fstypes) - -python setup_debugfs () { - setup_debugfs_variables(d) -} - -python () { - vardeps = set() - # We allow CONVERSIONTYPES to have duplicates. That avoids breaking - # derived distros when OE-core or some other layer independently adds - # the same type. There is still only one command for each type, but - # presumably the commands will do the same when the type is the same, - # even when added in different places. - # - # Without de-duplication, gen_conversion_cmds() below - # would create the same compression command multiple times. - ctypes = set(d.getVar('CONVERSIONTYPES').split()) - old_overrides = d.getVar('OVERRIDES', False) - - def _image_base_type(type): - basetype = type - for ctype in ctypes: - if type.endswith("." + ctype): - basetype = type[:-len("." + ctype)] - break - - if basetype != type: - # New base type itself might be generated by a conversion command. - basetype = _image_base_type(basetype) - - return basetype - - basetypes = {} - alltypes = d.getVar('IMAGE_FSTYPES').split() - typedeps = {} - - if d.getVar('IMAGE_GEN_DEBUGFS') == "1": - debugfs_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS').split() - for t in debugfs_fstypes: - alltypes.append("debugfs_" + t) - - def _add_type(t): - baset = _image_base_type(t) - input_t = t - if baset not in basetypes: - basetypes[baset]= [] - if t not in basetypes[baset]: - basetypes[baset].append(t) - debug = "" - if t.startswith("debugfs_"): - t = t[8:] - debug = "debugfs_" - deps = (d.getVar('IMAGE_TYPEDEP_' + t) or "").split() - vardeps.add('IMAGE_TYPEDEP_' + t) - if baset not in typedeps: - typedeps[baset] = set() - deps = [debug + dep for dep in deps] - for dep in deps: - if dep not in alltypes: - alltypes.append(dep) - _add_type(dep) - basedep = _image_base_type(dep) - typedeps[baset].add(basedep) - - if baset != input_t: - _add_type(baset) - - for t in alltypes[:]: - _add_type(t) - - d.appendVarFlag('do_image', 'vardeps', ' '.join(vardeps)) - - maskedtypes = (d.getVar('IMAGE_TYPES_MASKED') or "").split() - maskedtypes = [dbg + t for t in maskedtypes for dbg in ("", "debugfs_")] - - for t in basetypes: - vardeps = set() - cmds = [] - subimages = [] - realt = t - - if t in maskedtypes: - continue - - localdata = bb.data.createCopy(d) - debug = "" - if t.startswith("debugfs_"): - setup_debugfs_variables(localdata) - debug = "setup_debugfs " - realt = t[8:] - localdata.setVar('OVERRIDES', '%s:%s' % (realt, old_overrides)) - localdata.setVar('type', realt) - # Delete DATETIME so we don't expand any references to it now - # This means the task's hash can be stable rather than having hardcoded - # date/time values. It will get expanded at execution time. - # Similarly TMPDIR since otherwise we see QA stamp comparision problems - localdata.delVar('DATETIME') - localdata.delVar('TMPDIR') - - image_cmd = localdata.getVar("IMAGE_CMD") - vardeps.add('IMAGE_CMD_' + realt) - if image_cmd: - cmds.append("\t" + image_cmd) - else: - bb.fatal("No IMAGE_CMD defined for IMAGE_FSTYPES entry '%s' - possibly invalid type name or missing support class" % t) - cmds.append(localdata.expand("\tcd ${IMGDEPLOYDIR}")) - - # Since a copy of IMAGE_CMD_xxx will be inlined within do_image_xxx, - # prevent a redundant copy of IMAGE_CMD_xxx being emitted as a function. - d.delVarFlag('IMAGE_CMD_' + realt, 'func') - - rm_tmp_images = set() - def gen_conversion_cmds(bt): - for ctype in sorted(ctypes): - if bt.endswith("." + ctype): - type = bt[0:-len(ctype) - 1] - if type.startswith("debugfs_"): - type = type[8:] - # Create input image first. - gen_conversion_cmds(type) - localdata.setVar('type', type) - cmd = "\t" + (localdata.getVar("CONVERSION_CMD_" + ctype) or localdata.getVar("COMPRESS_CMD_" + ctype)) - if cmd not in cmds: - cmds.append(cmd) - vardeps.add('CONVERSION_CMD_' + ctype) - vardeps.add('COMPRESS_CMD_' + ctype) - subimage = type + "." + ctype - if subimage not in subimages: - subimages.append(subimage) - if type not in alltypes: - rm_tmp_images.add(localdata.expand("${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}")) - - for bt in basetypes[t]: - gen_conversion_cmds(bt) - - localdata.setVar('type', realt) - if t not in alltypes: - rm_tmp_images.add(localdata.expand("${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}")) - else: - subimages.append(realt) - - # Clean up after applying all conversion commands. Some of them might - # use the same input, therefore we cannot delete sooner without applying - # some complex dependency analysis. - for image in sorted(rm_tmp_images): - cmds.append("\trm " + image) - - after = 'do_image' - for dep in typedeps[t]: - after += ' do_image_%s' % dep.replace("-", "_").replace(".", "_") - - t = t.replace("-", "_").replace(".", "_") - - d.setVar('do_image_%s' % t, '\n'.join(cmds)) - d.setVarFlag('do_image_%s' % t, 'func', '1') - d.setVarFlag('do_image_%s' % t, 'fakeroot', '1') - d.setVarFlag('do_image_%s' % t, 'prefuncs', debug + 'set_image_size') - d.setVarFlag('do_image_%s' % t, 'postfuncs', 'create_symlinks') - d.setVarFlag('do_image_%s' % t, 'subimages', ' '.join(subimages)) - d.appendVarFlag('do_image_%s' % t, 'vardeps', ' '.join(vardeps)) - d.appendVarFlag('do_image_%s' % t, 'vardepsexclude', 'DATETIME') - - bb.debug(2, "Adding type %s before %s, after %s" % (t, 'do_image_complete', after)) - bb.build.addtask('do_image_%s' % t, 'do_image_complete', after, d) -} - -# -# Compute the rootfs size -# -def get_rootfs_size(d): - import subprocess - - rootfs_alignment = int(d.getVar('IMAGE_ROOTFS_ALIGNMENT')) - overhead_factor = float(d.getVar('IMAGE_OVERHEAD_FACTOR')) - rootfs_req_size = int(d.getVar('IMAGE_ROOTFS_SIZE')) - rootfs_extra_space = eval(d.getVar('IMAGE_ROOTFS_EXTRA_SPACE')) - rootfs_maxsize = d.getVar('IMAGE_ROOTFS_MAXSIZE') - image_fstypes = d.getVar('IMAGE_FSTYPES') or '' - initramfs_fstypes = d.getVar('INITRAMFS_FSTYPES') or '' - initramfs_maxsize = d.getVar('INITRAMFS_MAXSIZE') - - output = subprocess.check_output(['du', '-ks', - d.getVar('IMAGE_ROOTFS')]) - size_kb = int(output.split()[0]) - base_size = size_kb * overhead_factor - base_size = max(base_size, rootfs_req_size) + rootfs_extra_space - - if base_size != int(base_size): - base_size = int(base_size + 1) - else: - base_size = int(base_size) - - base_size += rootfs_alignment - 1 - base_size -= base_size % rootfs_alignment - - # Do not check image size of the debugfs image. This is not supposed - # to be deployed, etc. so it doesn't make sense to limit the size - # of the debug. - if (d.getVar('IMAGE_BUILDING_DEBUGFS') or "") == "true": - return base_size - - # Check the rootfs size against IMAGE_ROOTFS_MAXSIZE (if set) - if rootfs_maxsize: - rootfs_maxsize_int = int(rootfs_maxsize) - if base_size > rootfs_maxsize_int: - bb.fatal("The rootfs size %d(K) overrides IMAGE_ROOTFS_MAXSIZE: %d(K)" % \ - (base_size, rootfs_maxsize_int)) - - # Check the initramfs size against INITRAMFS_MAXSIZE (if set) - if image_fstypes == initramfs_fstypes != '' and initramfs_maxsize: - initramfs_maxsize_int = int(initramfs_maxsize) - if base_size > initramfs_maxsize_int: - bb.error("The initramfs size %d(K) overrides INITRAMFS_MAXSIZE: %d(K)" % \ - (base_size, initramfs_maxsize_int)) - bb.error("You can set INITRAMFS_MAXSIZE a larger value. Usually, it should") - bb.fatal("be less than 1/2 of ram size, or you may fail to boot it.\n") - return base_size - -python set_image_size () { - rootfs_size = get_rootfs_size(d) - d.setVar('ROOTFS_SIZE', str(rootfs_size)) - d.setVarFlag('ROOTFS_SIZE', 'export', '1') -} - -# -# Create symlinks to the newly created image -# -python create_symlinks() { - - deploy_dir = d.getVar('IMGDEPLOYDIR') - img_name = d.getVar('IMAGE_NAME') - link_name = d.getVar('IMAGE_LINK_NAME') - manifest_name = d.getVar('IMAGE_MANIFEST') - taskname = d.getVar("BB_CURRENTTASK") - subimages = (d.getVarFlag("do_" + taskname, 'subimages', False) or "").split() - imgsuffix = d.getVarFlag("do_" + taskname, 'imgsuffix') or d.expand("${IMAGE_NAME_SUFFIX}.") - - if not link_name: - return - for type in subimages: - dst = os.path.join(deploy_dir, link_name + "." + type) - src = img_name + imgsuffix + type - if os.path.exists(os.path.join(deploy_dir, src)): - bb.note("Creating symlink: %s -> %s" % (dst, src)) - if os.path.islink(dst): - os.remove(dst) - os.symlink(src, dst) - else: - bb.note("Skipping symlink, source does not exist: %s -> %s" % (dst, src)) -} - -MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${libexecdir}|${sysconfdir}|${nonarch_base_libdir}/udev|/lib/modules/[^/]*/modules.*|" -MULTILIB_CHECK_FILE = "${WORKDIR}/multilib_check.py" -MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib" - -do_fetch[noexec] = "1" -do_unpack[noexec] = "1" -do_patch[noexec] = "1" -do_configure[noexec] = "1" -do_compile[noexec] = "1" -do_install[noexec] = "1" -deltask do_populate_sysroot -do_package[noexec] = "1" -deltask do_package_qa -do_packagedata[noexec] = "1" -do_package_write_ipk[noexec] = "1" -do_package_write_deb[noexec] = "1" -do_package_write_rpm[noexec] = "1" - -# Allow the kernel to be repacked with the initramfs and boot image file as a single file -do_bundle_initramfs[depends] += "virtual/kernel:do_bundle_initramfs" -do_bundle_initramfs[nostamp] = "1" -do_bundle_initramfs[noexec] = "1" -do_bundle_initramfs () { - : -} -addtask bundle_initramfs after do_image_complete diff --git a/meta-agl-bsp/classes/sdcard_image-rpi.bbclass b/meta-agl-bsp/classes/sdcard_image-rpi.bbclass deleted file mode 100644 index c22a6f880..000000000 --- a/meta-agl-bsp/classes/sdcard_image-rpi.bbclass +++ /dev/null @@ -1,184 +0,0 @@ -inherit image_types -inherit linux-raspberrypi-base - -# -# Create an image that can by written onto a SD card using dd. -# -# The disk layout used is: -# -# 0 -> IMAGE_ROOTFS_ALIGNMENT - reserved for other data -# IMAGE_ROOTFS_ALIGNMENT -> BOOT_SPACE - bootloader and kernel -# BOOT_SPACE -> SDIMG_SIZE - rootfs -# - -# Default Free space = 1.3x -# Use IMAGE_OVERHEAD_FACTOR to add more space -# <---------> -# 4MiB 40MiB SDIMG_ROOTFS -# <-----------------------> <----------> <----------------------> -# ------------------------ ------------ ------------------------ -# | IMAGE_ROOTFS_ALIGNMENT | BOOT_SPACE | ROOTFS_SIZE | -# ------------------------ ------------ ------------------------ -# ^ ^ ^ ^ -# | | | | -# 0 4MiB 4MiB + 40MiB 4MiB + 40Mib + SDIMG_ROOTFS - -# This image depends on the rootfs image -IMAGE_TYPEDEP_rpi-sdimg = "${SDIMG_ROOTFS_TYPE}" - -# Set kernel and boot loader -IMAGE_BOOTLOADER ?= "bcm2835-bootfiles" - -# Set initramfs extension -KERNEL_INITRAMFS ?= "" - -# Kernel image name -SDIMG_KERNELIMAGE_raspberrypi ?= "kernel.img" -SDIMG_KERNELIMAGE_raspberrypi2 ?= "kernel7.img" -SDIMG_KERNELIMAGE_raspberrypi3-64 ?= "kernel8.img" - -# Boot partition volume id -BOOTDD_VOLUME_ID ?= "${MACHINE}" - -# Boot partition size [in KiB] (will be rounded up to IMAGE_ROOTFS_ALIGNMENT) -BOOT_SPACE ?= "40960" - -# Set alignment to 4MB [in KiB] -IMAGE_ROOTFS_ALIGNMENT = "4096" - -# Use an uncompressed ext3 by default as rootfs -SDIMG_ROOTFS_TYPE ?= "ext3" -SDIMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.${SDIMG_ROOTFS_TYPE}" - -IMAGE_DEPENDS_rpi-sdimg = " \ - parted-native \ - mtools-native \ - dosfstools-native \ - virtual/kernel:do_deploy \ - ${IMAGE_BOOTLOADER} \ - ${@bb.utils.contains('KERNEL_IMAGETYPE', 'uImage', 'u-boot', '',d)} \ - " - -# SD card image name -SDIMG = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.rpi-sdimg" - -# Compression method to apply to SDIMG after it has been created. Supported -# compression formats are "gzip", "bzip2" or "xz". The original .rpi-sdimg file -# is kept and a new compressed file is created if one of these compression -# formats is chosen. If SDIMG_COMPRESSION is set to any other value it is -# silently ignored. -#SDIMG_COMPRESSION ?= "" - -# Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS. -FATPAYLOAD ?= "" - -IMAGE_CMD_rpi-sdimg () { - - # Align partitions - BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1) - BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT}) - SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE) - - echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS $ROOTFS_SIZE KiB" - - # Check if we are building with device tree support - DTS="${@get_dts(d)}" - - # Initialize sdcard image file - dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE} - - # Create partition table - parted -s ${SDIMG} mklabel msdos - # Create boot partition and mark it as bootable - parted -s ${SDIMG} unit KiB mkpart primary fat32 ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) - parted -s ${SDIMG} set 1 boot on - # Create rootfs partition to the end of disk - parted -s ${SDIMG} -- unit KiB mkpart primary ext2 $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) -1s - parted ${SDIMG} print - - # Create a vfat image with boot files - BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') - rm -f ${WORKDIR}/boot.img - mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ - if test -n "${DTS}"; then - # Device Tree Overlays are assumed to be suffixed by '-overlay.dtb' (4.1.x) or by '.dtbo' (4.4.9+) string and will be put in a dedicated folder - DT_OVERLAYS="${@split_overlays(d, 0)}" - DT_ROOT="${@split_overlays(d, 1)}" - - # Copy board device trees to root folder - for DTB in ${DT_ROOT}; do - DTB_BASE_NAME=`basename ${DTB} .dtb` - - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::${DTB_BASE_NAME}.dtb - done - - # Copy device tree overlays to dedicated folder - mmd -i ${WORKDIR}/boot.img overlays - for DTB in ${DT_OVERLAYS}; do - DTB_EXT=${DTB##*.} - DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` - - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.${DTB_EXT} ::overlays/${DTB_BASE_NAME}.${DTB_EXT} - done - fi - case "${KERNEL_IMAGETYPE}" in - "uImage") - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_KERNELIMAGE} - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage - mcopy -o -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/boot.scr ::boot.scr - ;; - *) - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::${SDIMG_KERNELIMAGE} - ;; - esac - - if [ -n ${FATPAYLOAD} ] ; then - echo "Copying payload into VFAT" - for entry in ${FATPAYLOAD} ; do - # add the || true to stop aborting on vfat issues like not supporting .~lock files - mcopy -i ${WORKDIR}/boot.img -s -v ${IMAGE_ROOTFS}$entry :: || true - done - fi - - # Add stamp file - echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info - mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}/image-version-info :: - - # Burn Partitions - dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync - # If SDIMG_ROOTFS_TYPE is a .xz file use xzcat - if echo "${SDIMG_ROOTFS_TYPE}" | egrep -q "*\.xz" - then - xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync - else - dd if=${SDIMG_ROOTFS} of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync - fi - - # Optionally apply compression - case "${SDIMG_COMPRESSION}" in - "gzip") - gzip -k9 "${SDIMG}" - ;; - "bzip2") - bzip2 -k9 "${SDIMG}" - ;; - "xz") - xz -k "${SDIMG}" - ;; - esac -} - -ROOTFS_POSTPROCESS_COMMAND += " rpi_generate_sysctl_config ; " - -rpi_generate_sysctl_config() { - # systemd sysctl config - test -d ${IMAGE_ROOTFS}${sysconfdir}/sysctl.d && \ - echo "vm.min_free_kbytes = 8192" > ${IMAGE_ROOTFS}${sysconfdir}/sysctl.d/rpi-vm.conf - - # sysv sysctl config - IMAGE_SYSCTL_CONF="${IMAGE_ROOTFS}${sysconfdir}/sysctl.conf" - test -e ${IMAGE_ROOTFS}${sysconfdir}/sysctl.conf && \ - sed -e "/vm.min_free_kbytes/d" -i ${IMAGE_SYSCTL_CONF} - echo "" >> ${IMAGE_SYSCTL_CONF} && echo "vm.min_free_kbytes = 8192" >> ${IMAGE_SYSCTL_CONF} -} -- cgit 1.2.3-korg From 7889287080b49c5fac08e4a8816a920ea2ea7846 Mon Sep 17 00:00:00 2001 From: Changhyeok Bae Date: Fri, 29 Dec 2017 08:24:41 +0000 Subject: Change image type to wic.vmdk vmdk image type is changed to wic.vmdk in upstream. (From Poky rev: 9d07c736e39a9aa922630b4241eda185a19a11ea) (From OE-Core rev: 929ba563f1bc7195c4981b8e139c432b2cc388ea) Bug-AGL: SPEC-1181 Change-Id: I94fab8ce4d075776b5f72d1c270a333d6b34a4b7 Signed-off-by: Changhyeok Bae --- README-AGL.md | 4 ++-- meta-agl-bsp/conf/include/agl_qemux86-64.inc | 3 ++- meta-agl/conf/include/agl-devel.inc | 2 +- meta-netboot/classes/netboot.bbclass | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'meta-agl-bsp') diff --git a/README-AGL.md b/README-AGL.md index bb6e8aa63..146d6ff16 100644 --- a/README-AGL.md +++ b/README-AGL.md @@ -173,7 +173,7 @@ To build an image from 'meta-agl' > $ bitbake agl-demo-platform - If you want to run QEMU directly as VM in Virtual Box or your other favorite VM software then add this line to your "conf/local.conf" file. - > IMAGE_FSTYPES += "vmdk" + > IMAGE_FSTYPES += "wic.vmdk" 5. Run in the emulator > $ runqemu agl-image-ivi qemux86-64 @@ -194,7 +194,7 @@ To build an image from 'meta-agl' > $ runqemu agl-image-ivi qemux86-64 bootparams="uvesafb.mode_option=1280x720-32" serial **Or use the virtual disk in Virtual Box from this location:** - > tmp/deploy/images/qemux86-64/agl-demo-platform-qemux86-64.vmdk + > tmp/deploy/images/qemux86-64/agl-demo-platform-qemux86-64.wic.vmdk 6. Some weston samples are available from weston terminal (click top left icon). Check the folder `/opt/AGL/ALS2016`. diff --git a/meta-agl-bsp/conf/include/agl_qemux86-64.inc b/meta-agl-bsp/conf/include/agl_qemux86-64.inc index 3ad9c513f..165deae41 100644 --- a/meta-agl-bsp/conf/include/agl_qemux86-64.inc +++ b/meta-agl-bsp/conf/include/agl_qemux86-64.inc @@ -21,7 +21,8 @@ APPEND += "quiet" DISTRO_FEATURES_append = " sota" # Image support -AGL_EXTRA_IMAGE_FSTYPES = "vmdk.xz" +AGL_EXTRA_IMAGE_FSTYPES = "wic.vmdk" +IMAGE_BOOT_FILES_sota = "u-boot-qemux86-64.rom" # Root device ROOT_VM = "root=PARTUUID=${DISK_SIGNATURE}-02" diff --git a/meta-agl/conf/include/agl-devel.inc b/meta-agl/conf/include/agl-devel.inc index c24143593..fd11ade75 100644 --- a/meta-agl/conf/include/agl-devel.inc +++ b/meta-agl/conf/include/agl-devel.inc @@ -4,7 +4,7 @@ IMAGE_INSTALL_append = " \ packagegroup-agl-devel \ " -IMAGE_INSTALL_append = "${@bb.utils.contains_any('IMAGE_FSTYPES', [ 'vmdk', 'vmdk.xz' ], ' open-vm-tools vboxguestdrivers', '', d)}" +IMAGE_INSTALL_append = "${@bb.utils.contains('IMAGE_FSTYPES', 'wic.vmdk', ' open-vm-tools vboxguestdrivers', '', d)}" # disable install of debug files in SDK # initial value: SDKIMAGE_FEATURES="dev-pkgs dbg-pkgs staticdev-pkgs" diff --git a/meta-netboot/classes/netboot.bbclass b/meta-netboot/classes/netboot.bbclass index 1cdfd5f84..363e6bcc9 100644 --- a/meta-netboot/classes/netboot.bbclass +++ b/meta-netboot/classes/netboot.bbclass @@ -1,7 +1,7 @@ # Enable network bootable image and initrd/initramfs python () { - if (bb.utils.contains_any("IMAGE_FSTYPES",["live","vmdk","vmdk.xz"],True,False,d)): + if (bb.utils.contains_any("IMAGE_FSTYPES",["live","wic.vmdk"],True,False,d)): # typical case for Minnowboard Max d.setVar("INITRD_IMAGE","initramfs-netboot-image") d.setVar("INITRD_IMAGE_LIVE",d.getVar("INITRD_IMAGE",True)) -- cgit 1.2.3-korg From c14d627fb8c3460d576f4380e3e872d7170056d6 Mon Sep 17 00:00:00 2001 From: Changhyeok Bae Date: Fri, 29 Dec 2017 12:50:56 +0000 Subject: linux-firmware: Remove duplicated lines Some lines are already applied in upstream poky. Bug-AGL: SPEC-1181 Change-Id: I64e0e3180d72c125b16a42df53be1a5196d75bb7 Signed-off-by: Changhyeok Bae --- .../recipes-kernel/linux-firmware/linux-firmware_git.bbappend | 5 ----- 1 file changed, 5 deletions(-) (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/meta-intel/recipes-kernel/linux-firmware/linux-firmware_git.bbappend b/meta-agl-bsp/meta-intel/recipes-kernel/linux-firmware/linux-firmware_git.bbappend index a34159cad..824f39359 100644 --- a/meta-agl-bsp/meta-intel/recipes-kernel/linux-firmware/linux-firmware_git.bbappend +++ b/meta-agl-bsp/meta-intel/recipes-kernel/linux-firmware/linux-firmware_git.bbappend @@ -1,8 +1,3 @@ -LICENSE_${PN}-ibt-license = "Firmware-ibt_firmware" -LICENSE_${PN}-ibt-11-5 = "Firmware-ibt_firmware" -FILES_${PN}-ibt-license = "/lib/firmware/LICENCE.ibt_firmware" FILES_${PN}-ibt = "/lib/firmware/intel" RDEPENDS_${PN}-ibt += "${PN}-ibt-license" - -PACKAGES =+ " ${PN}-ibt-license ${PN}-ibt " -- cgit 1.2.3-korg From 4376c06b87108d6f34bf1bea57e67fbfbd67f893 Mon Sep 17 00:00:00 2001 From: Changhyeok Bae Date: Fri, 29 Dec 2017 13:19:28 +0000 Subject: u-boot-ota: Fix build error with gcc7 This patch came from https://github.com/advancedtelematic/meta-updater-qemux86-64/commit/d535ae698ef2643d4b6ecb72a85376b1966ab723 Bug-AGL: SPEC-1181 Change-Id: I57a0cb265cda915aa0c82aca797a6f6b45101ed1 Signed-off-by: Changhyeok Bae --- .../u-boot-ota/0002-fixup-build-with-gcc7.patch | 101 +++++++++++++++++++++ .../recipes-bsp/u-boot/u-boot-ota_2015.07.bb | 1 + 2 files changed, 102 insertions(+) create mode 100644 meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-fixup-build-with-gcc7.patch (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-fixup-build-with-gcc7.patch b/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-fixup-build-with-gcc7.patch new file mode 100644 index 000000000..fc7933ea0 --- /dev/null +++ b/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-fixup-build-with-gcc7.patch @@ -0,0 +1,101 @@ +From eea58226f0b604d3047c495985197113838d3a7a Mon Sep 17 00:00:00 2001 +From: Trevor Woerner +Date: Tue, 20 Jun 2017 13:25:20 -0400 +Subject: [PATCH] fix build for gcc7 + +| In file included from .../include/linux/compiler.h:54:0, +| from .../include/uapi/linux/stddef.h:1, +| from .../include/linux/stddef.h:4, +| from .../include/uapi/linux/posix_types.h:4, +| from .../include/uapi/linux/types.h:13, +| from .../include/linux/types.h:5, +| from .../include/linux/mod_devicetable.h:11, +| from .../scripts/mod/devicetable-offsets.c:2: +| .../include/linux/compiler-gcc.h:121:1: fatal error: linux/compiler-gcc7.h: No such file or directory +| #include gcc_header(__GNUC__) + +Upstream-Status: Pending + +Signed-off-by: Trevor Woerner +Signed-off-by: Fabio Berton +Signed-off-by: Leon Anavi +--- + include/linux/compiler-gcc7.h | 66 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 66 insertions(+) + create mode 100644 include/linux/compiler-gcc7.h + +diff --git a/include/linux/compiler-gcc7.h b/include/linux/compiler-gcc7.h +new file mode 100644 +index 0000000..cdd1cc2 +--- /dev/null ++++ b/include/linux/compiler-gcc7.h +@@ -0,0 +1,66 @@ ++#ifndef __LINUX_COMPILER_H ++#error "Please don't include directly, include instead." ++#endif ++ ++#define __used __attribute__((__used__)) ++#define __must_check __attribute__((warn_unused_result)) ++#define __compiler_offsetof(a, b) __builtin_offsetof(a, b) ++ ++/* Mark functions as cold. gcc will assume any path leading to a call ++ to them will be unlikely. This means a lot of manual unlikely()s ++ are unnecessary now for any paths leading to the usual suspects ++ like BUG(), printk(), panic() etc. [but let's keep them for now for ++ older compilers] ++ ++ Early snapshots of gcc 4.3 don't support this and we can't detect this ++ in the preprocessor, but we can live with this because they're unreleased. ++ Maketime probing would be overkill here. ++ ++ gcc also has a __attribute__((__hot__)) to move hot functions into ++ a special section, but I don't see any sense in this right now in ++ the kernel context */ ++#define __cold __attribute__((__cold__)) ++ ++#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) ++ ++#ifndef __CHECKER__ ++# define __compiletime_warning(message) __attribute__((warning(message))) ++# define __compiletime_error(message) __attribute__((error(message))) ++#endif /* __CHECKER__ */ ++ ++/* ++ * Mark a position in code as unreachable. This can be used to ++ * suppress control flow warnings after asm blocks that transfer ++ * control elsewhere. ++ * ++ * Early snapshots of gcc 4.5 don't support this and we can't detect ++ * this in the preprocessor, but we can live with this because they're ++ * unreleased. Really, we need to have autoconf for the kernel. ++ */ ++#define unreachable() __builtin_unreachable() ++ ++/* Mark a function definition as prohibited from being cloned. */ ++#define __noclone __attribute__((__noclone__)) ++ ++/* ++ * Tell the optimizer that something else uses this function or variable. ++ */ ++#define __visible __attribute__((externally_visible)) ++ ++/* ++ * GCC 'asm goto' miscompiles certain code sequences: ++ * ++ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 ++ * ++ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. ++ * Fixed in GCC 4.8.2 and later versions. ++ * ++ * (asm goto is automatically volatile - the naming reflects this.) ++ */ ++#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) ++ ++#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP ++#define __HAVE_BUILTIN_BSWAP32__ ++#define __HAVE_BUILTIN_BSWAP64__ ++#define __HAVE_BUILTIN_BSWAP16__ ++#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ +-- +2.7.4 + diff --git a/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota_2015.07.bb b/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota_2015.07.bb index 37abc5a50..7ef3cacd4 100644 --- a/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota_2015.07.bb +++ b/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota_2015.07.bb @@ -14,6 +14,7 @@ SRC_URI = "\ file://0001-Set-up-environment-for-OSTree-integration.patch \ file://0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch \ file://0001-fixup-build-with-gcc6.patch \ + file://0002-fixup-build-with-gcc7.patch \ " S = "${WORKDIR}/git" -- cgit 1.2.3-korg From 244448ea802febb7bbbfe0ea8fb03216866dc36c Mon Sep 17 00:00:00 2001 From: Changhyeok Bae Date: Sat, 30 Dec 2017 14:58:01 +0000 Subject: linux-ti-staging: Remove linux-dtb.inc WARNING: You are using the linux-dtb.inc which is deprecated. You can safely remove it as the Device Tree support is automatically enabled when KERNEL_DEVICETREE is set. Bug-AGL: SPEC-1181 Signed-off-by: Changhyeok Bae --- meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend | 2 -- 1 file changed, 2 deletions(-) (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend b/meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend index 283e8b778..02161415f 100644 --- a/meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend +++ b/meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend @@ -1,4 +1,2 @@ -require recipes-kernel/linux/linux-dtb.inc - require recipes-kernel/linux/linux-agl.inc require recipes-kernel/linux/linux-agl-4.9.inc -- cgit 1.2.3-korg From 14b74c62591657eaf57a752c370555b640958059 Mon Sep 17 00:00:00 2001 From: Kotaro Hashimoto Date: Wed, 31 Jan 2018 18:52:34 +0900 Subject: dragonboard-410c: update 96boards-tools recipe Update 96boards-tools recipe for dragonboard-410c. This tool is for to resize the rootfs on the first boot. This recipe is ported from meta-96boards layer(branch rocko). https://github.com/96boards/meta-96boards/ Bug-AGL: SPEC-1181 Change-Id: I92372c65e0a5d65a8bdbf8ef33d8176c6039e63b Signed-off-by: Kotaro Hashimoto --- .../96boards-tools/96boards-tools_0.11.bb | 32 ++++++++++++++++++++++ .../96boards-tools/96boards-tools_0.7.bb | 27 ------------------ 2 files changed, 32 insertions(+), 27 deletions(-) create mode 100644 meta-agl-bsp/meta-qcom/recipes-bsp/96boards-tools/96boards-tools_0.11.bb delete mode 100644 meta-agl-bsp/meta-qcom/recipes-bsp/96boards-tools/96boards-tools_0.7.bb (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/meta-qcom/recipes-bsp/96boards-tools/96boards-tools_0.11.bb b/meta-agl-bsp/meta-qcom/recipes-bsp/96boards-tools/96boards-tools_0.11.bb new file mode 100644 index 000000000..5c3583526 --- /dev/null +++ b/meta-agl-bsp/meta-qcom/recipes-bsp/96boards-tools/96boards-tools_0.11.bb @@ -0,0 +1,32 @@ +SUMMARY = "Useful bits an pieces to make 96Boards more standard across the board" +HOMEPAGE = "https://github.com/96boards/96boards-tools" +SECTION = "devel" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" + +SRCREV = "395b5994a5fa52f9db10f480fce74e9acdbe3318" +SRC_URI = "git://github.com/96boards/96boards-tools;branch=master;protocol=https" + +S = "${WORKDIR}/git" + +inherit systemd allarch update-rc.d + +do_install () { + install -d ${D}${sysconfdir}/udev/rules.d + install -m 0755 ${S}/*.rules ${D}${sysconfdir}/udev/rules.d/ + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${S}/resize-disk ${D}${sysconfdir}/init.d/ + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${S}/resize-helper.service ${D}${systemd_unitdir}/system + + install -d ${D}${sbindir} + install -m 0755 ${S}/resize-helper ${D}${sbindir} +} + +INITSCRIPT_NAME = "resize-disk" +INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ." + +SYSTEMD_SERVICE_${PN} = "resize-helper.service" +RDEPENDS_${PN} += "e2fsprogs-resize2fs gptfdisk parted util-linux udev" diff --git a/meta-agl-bsp/meta-qcom/recipes-bsp/96boards-tools/96boards-tools_0.7.bb b/meta-agl-bsp/meta-qcom/recipes-bsp/96boards-tools/96boards-tools_0.7.bb deleted file mode 100644 index 36a983198..000000000 --- a/meta-agl-bsp/meta-qcom/recipes-bsp/96boards-tools/96boards-tools_0.7.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "Useful bits an pieces to make 96Boards more standard across the board" -HOMEPAGE = "https://github.com/96boards/96boards-tools" -SECTION = "devel" - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" - -SRCREV = "193f355823d9dc38f370759153ac950a2833b0e2" -SRC_URI = "git://github.com/96boards/96boards-tools;branch=master;protocol=https" - -S = "${WORKDIR}/git" - -inherit systemd allarch - -do_install () { - install -d ${D}${sysconfdir}/udev/rules.d - install -m 0755 ${S}/*.rules ${D}${sysconfdir}/udev/rules.d/ - - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${S}/resize-helper.service ${D}${systemd_unitdir}/system - - install -d ${D}${sbindir} - install -m 0755 ${S}/resize-helper ${D}${sbindir} -} - -SYSTEMD_SERVICE_${PN} = "resize-helper.service" -RDEPENDS_${PN} += "e2fsprogs-resize2fs gptfdisk parted util-linux udev" -- cgit 1.2.3-korg From 7400ba3c4dd4829bce05481d146d9d83c937c41c Mon Sep 17 00:00:00 2001 From: Kotaro Hashimoto Date: Wed, 31 Jan 2018 18:53:28 +0900 Subject: linux-linaro-qcomlt: update to kernel 4.14 Update linux-linaro-qcomlt to kernel 4.14. Bug-AGL: SPEC-1181 Change-Id: I7555ecd901ac454db5f2251cf0b79473537b2739 Signed-off-by: Kotaro Hashimoto --- .../meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bbappend | 3 +++ .../meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.9.bbappend | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bbappend delete mode 100644 meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.9.bbappend (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bbappend b/meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bbappend new file mode 100644 index 000000000..0b2b99d4d --- /dev/null +++ b/meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +require recipes-kernel/linux/linux-agl.inc diff --git a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.9.bbappend b/meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.9.bbappend deleted file mode 100644 index 17c8f3f0d..000000000 --- a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.9.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -require recipes-kernel/linux/linux-agl.inc -require recipes-kernel/linux/linux-agl-4.9.inc -- cgit 1.2.3-korg From 95fbe983a8d658764eb31ddccc179ff309022e84 Mon Sep 17 00:00:00 2001 From: Kotaro Hashimoto Date: Wed, 31 Jan 2018 18:57:10 +0900 Subject: most: remove skb_put_data patch from SRC_URI skb_put_data was introduced to linux/skbuff.h since Linux kernel 4.13. Bug-AGL: SPEC-1181 Change-Id: I209842b160abff3f4cbd2859a5643dab2678b83f Signed-off-by: Kotaro Hashimoto --- meta-agl-bsp/meta-qcom/recipes-kernel/most/most.bbappend | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 meta-agl-bsp/meta-qcom/recipes-kernel/most/most.bbappend (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/meta-qcom/recipes-kernel/most/most.bbappend b/meta-agl-bsp/meta-qcom/recipes-kernel/most/most.bbappend new file mode 100644 index 000000000..6b4444a4e --- /dev/null +++ b/meta-agl-bsp/meta-qcom/recipes-kernel/most/most.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI_remove = " \ + file://0001-src-most-net-add-skb_put_data-function.patch \ + " -- cgit 1.2.3-korg From f58451c088856360256397acb49c98ed2ad87252 Mon Sep 17 00:00:00 2001 From: Ronan Le Martret Date: Wed, 17 Jan 2018 17:40:19 +0100 Subject: Add gcc7 support for rcar gen3 Change-Id: Ib398ff5e880cb26a4ba5ee9895e236a97e0a4e17 Signed-off-by: Ronan Le Martret --- .../u-boot/u-boot/0001-fixup-build-with-gcc6.patch | 86 ---------------------- .../u-boot/u-boot/0001-fixup-build-with-gcc7.patch | 86 ++++++++++++++++++++++ .../recipes-bsp/u-boot/u-boot_2015.04.bbappend | 2 +- 3 files changed, 87 insertions(+), 87 deletions(-) delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot/0001-fixup-build-with-gcc6.patch create mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot/0001-fixup-build-with-gcc7.patch (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot/0001-fixup-build-with-gcc6.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot/0001-fixup-build-with-gcc6.patch deleted file mode 100644 index df1f786c6..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot/0001-fixup-build-with-gcc6.patch +++ /dev/null @@ -1,86 +0,0 @@ -From ba619c7ec7820e80d1b5b520440fdb81c31c0baf Mon Sep 17 00:00:00 2001 -From: Ronan Le Martret -Date: Fri, 14 Oct 2016 09:03:11 +0200 -Subject: [PATCH] fix gcc6 build - -Signed-off-by: ronan ---- - include/linux/compiler-gcc6.h | 66 +++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 66 insertions(+) - create mode 100644 include/linux/compiler-gcc6.h - -diff --git a/include/linux/compiler-gcc6.h b/include/linux/compiler-gcc6.h -new file mode 100644 -index 0000000..a3d00d8 ---- /dev/null -+++ b/include/linux/compiler-gcc6.h -@@ -0,0 +1,66 @@ -+#ifndef __LINUX_COMPILER_H -+#error "Please don't include directly, include instead." -+#endif -+ -+#define __used __attribute__((__used__)) -+#define __must_check __attribute__((warn_unused_result)) -+#define __compiler_offsetof(a, b) __builtin_offsetof(a, b) -+ -+/* Mark functions as cold. gcc will assume any path leading to a call -+ to them will be unlikely. This means a lot of manual unlikely()s -+ are unnecessary now for any paths leading to the usual suspects -+ like BUG(), printk(), panic() etc. [but let's keep them for now for -+ older compilers] -+ -+ Early snapshots of gcc 4.3 don't support this and we can't detect this -+ in the preprocessor, but we can live with this because they're unreleased. -+ Maketime probing would be overkill here. -+ -+ gcc also has a __attribute__((__hot__)) to move hot functions into -+ a special section, but I don't see any sense in this right now in -+ the kernel context */ -+#define __cold __attribute__((__cold__)) -+ -+#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) -+ -+#ifndef __CHECKER__ -+# define __compiletime_warning(message) __attribute__((warning(message))) -+# define __compiletime_error(message) __attribute__((error(message))) -+#endif /* __CHECKER__ */ -+ -+/* -+ * Mark a position in code as unreachable. This can be used to -+ * suppress control flow warnings after asm blocks that transfer -+ * control elsewhere. -+ * -+ * Early snapshots of gcc 4.5 don't support this and we can't detect -+ * this in the preprocessor, but we can live with this because they're -+ * unreleased. Really, we need to have autoconf for the kernel. -+ */ -+#define unreachable() __builtin_unreachable() -+ -+/* Mark a function definition as prohibited from being cloned. */ -+#define __noclone __attribute__((__noclone__)) -+ -+/* -+ * Tell the optimizer that something else uses this function or variable. -+ */ -+#define __visible __attribute__((externally_visible)) -+ -+/* -+ * GCC 'asm goto' miscompiles certain code sequences: -+ * -+ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 -+ * -+ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. -+ * Fixed in GCC 4.8.2 and later versions. -+ * -+ * (asm goto is automatically volatile - the naming reflects this.) -+ */ -+#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) -+ -+#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP -+#define __HAVE_BUILTIN_BSWAP32__ -+#define __HAVE_BUILTIN_BSWAP64__ -+#define __HAVE_BUILTIN_BSWAP16__ -+#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ --- -2.6.6 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot/0001-fixup-build-with-gcc7.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot/0001-fixup-build-with-gcc7.patch new file mode 100644 index 000000000..a286ba680 --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot/0001-fixup-build-with-gcc7.patch @@ -0,0 +1,86 @@ +From ba619c7ec7820e80d1b5b520440fdb81c31c0baf Mon Sep 17 00:00:00 2001 +From: Ronan Le Martret +Date: Fri, 14 Oct 2016 09:03:11 +0200 +Subject: [PATCH] fix gcc7 build + +Signed-off-by: ronan +--- + include/linux/compiler-gcc7.h | 66 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 66 insertions(+) + create mode 100644 include/linux/compiler-gcc7.h + +diff --git a/include/linux/compiler-gcc7.h b/include/linux/compiler-gcc7.h +new file mode 100644 +index 0000000..a3d00d8 +--- /dev/null ++++ b/include/linux/compiler-gcc7.h +@@ -0,0 +1,66 @@ ++#ifndef __LINUX_COMPILER_H ++#error "Please don't include directly, include instead." ++#endif ++ ++#define __used __attribute__((__used__)) ++#define __must_check __attribute__((warn_unused_result)) ++#define __compiler_offsetof(a, b) __builtin_offsetof(a, b) ++ ++/* Mark functions as cold. gcc will assume any path leading to a call ++ to them will be unlikely. This means a lot of manual unlikely()s ++ are unnecessary now for any paths leading to the usual suspects ++ like BUG(), printk(), panic() etc. [but let's keep them for now for ++ older compilers] ++ ++ Early snapshots of gcc 4.3 don't support this and we can't detect this ++ in the preprocessor, but we can live with this because they're unreleased. ++ Maketime probing would be overkill here. ++ ++ gcc also has a __attribute__((__hot__)) to move hot functions into ++ a special section, but I don't see any sense in this right now in ++ the kernel context */ ++#define __cold __attribute__((__cold__)) ++ ++#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) ++ ++#ifndef __CHECKER__ ++# define __compiletime_warning(message) __attribute__((warning(message))) ++# define __compiletime_error(message) __attribute__((error(message))) ++#endif /* __CHECKER__ */ ++ ++/* ++ * Mark a position in code as unreachable. This can be used to ++ * suppress control flow warnings after asm blocks that transfer ++ * control elsewhere. ++ * ++ * Early snapshots of gcc 4.5 don't support this and we can't detect ++ * this in the preprocessor, but we can live with this because they're ++ * unreleased. Really, we need to have autoconf for the kernel. ++ */ ++#define unreachable() __builtin_unreachable() ++ ++/* Mark a function definition as prohibited from being cloned. */ ++#define __noclone __attribute__((__noclone__)) ++ ++/* ++ * Tell the optimizer that something else uses this function or variable. ++ */ ++#define __visible __attribute__((externally_visible)) ++ ++/* ++ * GCC 'asm goto' miscompiles certain code sequences: ++ * ++ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 ++ * ++ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. ++ * Fixed in GCC 4.8.2 and later versions. ++ * ++ * (asm goto is automatically volatile - the naming reflects this.) ++ */ ++#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) ++ ++#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP ++#define __HAVE_BUILTIN_BSWAP32__ ++#define __HAVE_BUILTIN_BSWAP64__ ++#define __HAVE_BUILTIN_BSWAP16__ ++#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ +-- +2.6.6 + diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot_2015.04.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot_2015.04.bbappend index b50c1da6f..6f30fa18e 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot_2015.04.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot_2015.04.bbappend @@ -1,7 +1,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot:" SRC_URI_append = " \ - file://0001-fixup-build-with-gcc6.patch \ + file://0001-fixup-build-with-gcc7.patch \ " do_deploy_prepend() { -- cgit 1.2.3-korg From 0da5edbf53198249bbb2d842731698188108e315 Mon Sep 17 00:00:00 2001 From: Ronan Le Martret Date: Thu, 18 Jan 2018 09:24:32 +0100 Subject: Fix gcc7 issue Change-Id: Id36993962b2b25624a581ec92743ea7633f99e98 Signed-off-by: Ronan Le Martret --- meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bbappend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bbappend index 135b2a430..9dbdfc527 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bbappend @@ -3,7 +3,7 @@ inherit pythonnative DEPENDS += " python-pycrypto-native" #Need for gcc 6.2 -CFLAGS += " -fno-strict-aliasing -Wno-unused-variable -Wno-shift-negative-value" +CFLAGS += " -fno-strict-aliasing -Wno-unused-variable -Wno-shift-negative-value -Wno-implicit-fallthrough" SRC_URI_append = " \ file://default_bold.c \ -- cgit 1.2.3-korg From 39cbf076db914a81756f590af160edb41dd4f39c Mon Sep 17 00:00:00 2001 From: Ronan Le Martret Date: Thu, 18 Jan 2018 10:07:45 +0100 Subject: Fix kernel gcc7 issue Change-Id: Iad0345ed3b70c555970d4d00e6008376b70903fa Signed-off-by: Ronan Le Martret --- ...ve-up-on-gcc-ilog2-constant-optimizations.patch | 127 +++++++++++++++++++++ .../linux/linux-renesas_4.9.bbappend | 1 + 2 files changed, 128 insertions(+) create mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0001-give-up-on-gcc-ilog2-constant-optimizations.patch (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0001-give-up-on-gcc-ilog2-constant-optimizations.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0001-give-up-on-gcc-ilog2-constant-optimizations.patch new file mode 100644 index 000000000..67b455da6 --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0001-give-up-on-gcc-ilog2-constant-optimizations.patch @@ -0,0 +1,127 @@ +From 474c90156c8dcc2fa815e6716cc9394d7930cb9c Mon Sep 17 00:00:00 2001 +From: Linus Torvalds +Date: Thu, 2 Mar 2017 12:17:22 -0800 +Subject: [PATCH] give up on gcc ilog2() constant optimizations + +gcc-7 has an "optimization" pass that completely screws up, and +generates the code expansion for the (impossible) case of calling +ilog2() with a zero constant, even when the code gcc compiles does not +actually have a zero constant. + +And we try to generate a compile-time error for anybody doing ilog2() on +a constant where that doesn't make sense (be it zero or negative). So +now gcc7 will fail the build due to our sanity checking, because it +created that constant-zero case that didn't actually exist in the source +code. + +There's a whole long discussion on the kernel mailing about how to work +around this gcc bug. The gcc people themselevs have discussed their +"feature" in + + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785 + +but it's all water under the bridge, because while it looked at one +point like it would be solved by the time gcc7 was released, that was +not to be. + +So now we have to deal with this compiler braindamage. + +And the only simple approach seems to be to just delete the code that +tries to warn about bad uses of ilog2(). + +So now "ilog2()" will just return 0 not just for the value 1, but for +any non-positive value too. + +It's not like I can recall anybody having ever actually tried to use +this function on any invalid value, but maybe the sanity check just +meant that such code never made it out in public. + +Reported-by: Laura Abbott +Cc: John Stultz , +Cc: Thomas Gleixner +Cc: Ard Biesheuvel +Signed-off-by: Linus Torvalds +--- + include/linux/log2.h | 13 ++----------- + tools/include/linux/log2.h | 13 ++----------- + 2 files changed, 4 insertions(+), 22 deletions(-) + +diff --git a/include/linux/log2.h b/include/linux/log2.h +index ef3d4f67118c..c373295f359f 100644 +--- a/include/linux/log2.h ++++ b/include/linux/log2.h +@@ -16,12 +16,6 @@ + #include + + /* +- * deal with unrepresentable constant logarithms +- */ +-extern __attribute__((const, noreturn)) +-int ____ilog2_NaN(void); +- +-/* + * non-constant log of base 2 calculators + * - the arch may override these in asm/bitops.h if they can be implemented + * more efficiently than using fls() and fls64() +@@ -85,7 +79,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) + #define ilog2(n) \ + ( \ + __builtin_constant_p(n) ? ( \ +- (n) < 1 ? ____ilog2_NaN() : \ ++ (n) < 2 ? 0 : \ + (n) & (1ULL << 63) ? 63 : \ + (n) & (1ULL << 62) ? 62 : \ + (n) & (1ULL << 61) ? 61 : \ +@@ -148,10 +142,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) + (n) & (1ULL << 4) ? 4 : \ + (n) & (1ULL << 3) ? 3 : \ + (n) & (1ULL << 2) ? 2 : \ +- (n) & (1ULL << 1) ? 1 : \ +- (n) & (1ULL << 0) ? 0 : \ +- ____ilog2_NaN() \ +- ) : \ ++ 1 ) : \ + (sizeof(n) <= 4) ? \ + __ilog2_u32(n) : \ + __ilog2_u64(n) \ +diff --git a/tools/include/linux/log2.h b/tools/include/linux/log2.h +index 41446668ccce..d5677d39c1e4 100644 +--- a/tools/include/linux/log2.h ++++ b/tools/include/linux/log2.h +@@ -13,12 +13,6 @@ + #define _TOOLS_LINUX_LOG2_H + + /* +- * deal with unrepresentable constant logarithms +- */ +-extern __attribute__((const, noreturn)) +-int ____ilog2_NaN(void); +- +-/* + * non-constant log of base 2 calculators + * - the arch may override these in asm/bitops.h if they can be implemented + * more efficiently than using fls() and fls64() +@@ -78,7 +72,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) + #define ilog2(n) \ + ( \ + __builtin_constant_p(n) ? ( \ +- (n) < 1 ? ____ilog2_NaN() : \ ++ (n) < 2 ? 0 : \ + (n) & (1ULL << 63) ? 63 : \ + (n) & (1ULL << 62) ? 62 : \ + (n) & (1ULL << 61) ? 61 : \ +@@ -141,10 +135,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) + (n) & (1ULL << 4) ? 4 : \ + (n) & (1ULL << 3) ? 3 : \ + (n) & (1ULL << 2) ? 2 : \ +- (n) & (1ULL << 1) ? 1 : \ +- (n) & (1ULL << 0) ? 0 : \ +- ____ilog2_NaN() \ +- ) : \ ++ 1 ) : \ + (sizeof(n) <= 4) ? \ + __ilog2_u32(n) : \ + __ilog2_u64(n) \ +-- +2.13.6 + diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.9.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.9.bbappend index 339e3b5bc..ec39aa075 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.9.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.9.bbappend @@ -6,4 +6,5 @@ SRC_URI_append = "\ file://0001-mm-larger-stack-guard-gap-between-vmas.patch \ file://0002-Allow-stack-to-grow-up-to-address-space-limit.patch \ file://0003-mm-fix-new-crash-in-unmapped_area_topdown.patch \ + file://0001-give-up-on-gcc-ilog2-constant-optimizations.patch \ " -- cgit 1.2.3-korg From 511f7ee40552cccc44a387eb93c9681c2243147e Mon Sep 17 00:00:00 2001 From: Ronan Le Martret Date: Thu, 18 Jan 2018 17:48:16 +0100 Subject: Fix gst omx version Change-Id: I2f98d01a1060003258fd421c5708ec24a284241a Signed-off-by: Ronan Le Martret --- meta-agl-bsp/conf/include/agl_h3ulcb.inc | 2 ++ meta-agl-bsp/conf/include/agl_m3ulcb.inc | 2 ++ 2 files changed, 4 insertions(+) (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/conf/include/agl_h3ulcb.inc b/meta-agl-bsp/conf/include/agl_h3ulcb.inc index e38cdc70f..f384bcbe3 100644 --- a/meta-agl-bsp/conf/include/agl_h3ulcb.inc +++ b/meta-agl-bsp/conf/include/agl_h3ulcb.inc @@ -30,6 +30,8 @@ PREFERRED_VERSION_gstreamer1.0-plugins-good = "1.6.3" PREFERRED_VERSION_gstreamer1.0-plugins-ugly = "1.6.3" PREFERRED_VERSION_gstreamer1.0-plugins-vspfilter = "1.0%" +PREFERRED_VERSION_gstreamer1.0-omx ?= "1.2.0" + MACHINE_FEATURES_append = " multimedia" DISTRO_FEATURES_append = " use_eva_pkg" diff --git a/meta-agl-bsp/conf/include/agl_m3ulcb.inc b/meta-agl-bsp/conf/include/agl_m3ulcb.inc index 808f74e3b..de47c1f3c 100644 --- a/meta-agl-bsp/conf/include/agl_m3ulcb.inc +++ b/meta-agl-bsp/conf/include/agl_m3ulcb.inc @@ -33,6 +33,8 @@ PREFERRED_VERSION_gstreamer1.0-plugins-good = "1.6.3" PREFERRED_VERSION_gstreamer1.0-plugins-ugly = "1.6.3" PREFERRED_VERSION_gstreamer1.0-plugins-vspfilter = "1.0%" +PREFERRED_VERSION_gstreamer1.0-omx ?= "1.2.0" + MACHINE_FEATURES_append = " multimedia" DISTRO_FEATURES_append = " use_eva_pkg" -- cgit 1.2.3-korg From 3f962c7d202055777dd0238f12dbcf70f09ac07d Mon Sep 17 00:00:00 2001 From: José Bollo Date: Wed, 24 Jan 2018 11:18:02 +0100 Subject: Rename smack OVERRIDE to with-lsm-smack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using the OVERRIDE "smack" came with the use of the layer meta-intel-iot-security. When switching to meta-security, it conflicts with the package name 'smack' that provide the smack user library. Yocto was reporting the following error: ERROR: .../meta-security/recipes-security/smack/smack_1.3.0.bb: QA Issue: Recipe .../meta-security/recipes-security/smack/smack_1.3.0.bb has PN of "smack" which is in OVERRIDES, this can result in unexpected behaviour. [pn-overrides] Change-Id: Id71b283bf1ce5682bd94bf96595eb32506acb1d5 Signed-off-by: José Bollo --- .../recipes-kernel/linux/linux-fslc-imx_%.bbappend | 2 +- meta-agl-bsp/recipes-kernel/linux/linux-agl-4.9.inc | 2 +- meta-agl-bsp/recipes-kernel/linux/linux-agl.inc | 2 +- meta-app-framework/conf/include/agl-appfw-smack.inc | 2 +- meta-app-framework/recipes-core/af-main/af-main_1.0.bb | 8 ++++---- meta-app-framework/recipes-core/base-files/base-files_%.bbappend | 8 ++++---- .../recipes-core/security-manager/security-manager_%.bbappend | 2 +- meta-app-framework/recipes-kernel/linux/linux-%.bbappend | 2 +- meta-app-framework/recipes-kernel/linux/linux-yocto_4.12.bbappend | 2 +- templates/feature/agl-appfw-smack/50_bblayers.conf.inc | 5 +++-- 10 files changed, 18 insertions(+), 17 deletions(-) (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend index 5d5549f0a..3da7180e6 100644 --- a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend +++ b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend @@ -13,6 +13,6 @@ KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/cgroup.cfg" #------------------------------------------------------------------------- # smack patches for handling bluetooth -SRC_URI_append_smack = "\ +SRC_URI_append_with-lsm-smack = "\ file://0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch \ " diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.9.inc b/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.9.inc index 3235ff4d1..c4ebf4d46 100644 --- a/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.9.inc +++ b/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.9.inc @@ -3,6 +3,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/linux-4.9:" #------------------------------------------------------------------------- # smack patches for handling bluetooth -SRC_URI_append_smack = "\ +SRC_URI_append_with-lsm-smack = "\ file://0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch \ " diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc b/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc index db37ab2f5..b6f9604a5 100644 --- a/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc +++ b/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc @@ -67,7 +67,7 @@ SRC_URI_append_virtualmachine = " file://vbox-vmware-sata.cfg" KERNEL_CONFIG_FRAGMENTS_append_virtualmachine = " ${WORKDIR}/vbox-vmware-sata.cfg" # Enable support for smack -KERNEL_CONFIG_FRAGMENTS_append_smack = "\ +KERNEL_CONFIG_FRAGMENTS_append_with-lsm-smack = "\ ${WORKDIR}/audit.cfg \ ${WORKDIR}/smack.cfg \ ${WORKDIR}/smack-default-lsm.cfg \ diff --git a/meta-app-framework/conf/include/agl-appfw-smack.inc b/meta-app-framework/conf/include/agl-appfw-smack.inc index b77a5d17c..95092a9ce 100644 --- a/meta-app-framework/conf/include/agl-appfw-smack.inc +++ b/meta-app-framework/conf/include/agl-appfw-smack.inc @@ -1,5 +1,5 @@ # enable security features (smack, cynara) - required by Application Framework -OVERRIDES .= ":smack" +OVERRIDES .= ":with-lsm-smack" DISTRO_FEATURES_append = " smack dbus-cynara xattr" # use tar-native to support SMACK extended attributes independently of host config diff --git a/meta-app-framework/recipes-core/af-main/af-main_1.0.bb b/meta-app-framework/recipes-core/af-main/af-main_1.0.bb index 8ac661527..69df39eae 100644 --- a/meta-app-framework/recipes-core/af-main/af-main_1.0.bb +++ b/meta-app-framework/recipes-core/af-main/af-main_1.0.bb @@ -14,7 +14,7 @@ DEPENDS = "openssl libxml2 xmlsec1 systemd libzip json-c systemd security-manage DEPENDS_class-native = "openssl libxml2 xmlsec1 libzip json-c" RDEPENDS_${PN}_class-target += "af-binder-tools" -PACKAGE_WRITE_DEPS_append_smack = " smack-userspace-native libcap-native" +PACKAGE_WRITE_DEPS_append_with-lsm-smack = " smack-userspace-native libcap-native" EXTRA_OECMAKE_class-native = "\ -DUSE_LIBZIP=1 \ @@ -46,8 +46,8 @@ GROUPADD_PARAM_${PN} = "-r ${afm_name}" FILES_${PN} += "\ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_user_unitdir}/afm-user-daemon.service', '', d)} \ " -RDEPENDS_${PN}_append_smack = " smack-userspace bash" -DEPENDS_append_smack = " smack-userspace-native" +RDEPENDS_${PN}_append_with-lsm-smack = " smack-userspace bash" +DEPENDS_append_with-lsm-smack = " smack-userspace-native" # short hacks here SRC_URI += "\ @@ -90,7 +90,7 @@ pkg_postinst_${PN}() { chown ${afm_name}:${afm_name} $D${afm_datadir}/icons } -pkg_postinst_${PN}_append_smack() { +pkg_postinst_${PN}_append_with-lsm-smack() { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then chsmack -a 'System::Shared' -t $D${systemd_units_root}/system chsmack -a 'System::Shared' -t $D${systemd_units_root}/system/afm-user-session@.target.wants diff --git a/meta-app-framework/recipes-core/base-files/base-files_%.bbappend b/meta-app-framework/recipes-core/base-files/base-files_%.bbappend index 636bcc4df..249f32156 100644 --- a/meta-app-framework/recipes-core/base-files/base-files_%.bbappend +++ b/meta-app-framework/recipes-core/base-files/base-files_%.bbappend @@ -1,5 +1,5 @@ -RDEPENDS_${PN}_append_smack = " smack-userspace" -PACKAGE_WRITE_DEPS_append_smack = " smack-userspace-native" +RDEPENDS_${PN}_append_with-lsm-smack = " smack-userspace" +PACKAGE_WRITE_DEPS_append_with-lsm-smack = " smack-userspace-native" do_install_append() { install -d ${D}/${sysconfdir}/skel/app-data @@ -13,7 +13,7 @@ do_install_append() { ln -s ../../var/local ${D}/usr/local } -do_install_append_smack () { +do_install_append_with-lsm-smack () { install -d ${D}/${sysconfdir}/smack/accesses.d cat > ${D}/${sysconfdir}/smack/accesses.d/default-access-domains-no-user < Date: Thu, 8 Feb 2018 18:10:25 +0100 Subject: Remove porter machine Change-Id: I5378836e8f00d25f4842f3cb28ad586dfa2097bb Signed-off-by: ronan --- .../u-boot/0001-Autoload-uEnv.txt-on-boot.patch | 27 - .../0001-Add-hibernation-image-area.patch | 101 -- .../0001-Add-rcar-sdhi-DMA-support.patch | 650 --------- ...02-Add-Hibernation-swsusp-command-support.patch | 909 ------------ .../0002-Enable-swsusp-DMA-support.patch | 95 -- ...Add-Hibernation-swsuspmem-command-support.patch | 1058 -------------- .../0003-Add-hibernation-image-area.patch | 91 -- .../0004-Add-porter-board-Hibernation-code.patch | 1352 ----------------- .../recipes-bsp/u-boot/u-boot_2013.01.01.bbappend | 13 - .../wayland/weston-ini-conf.bbappend | 4 - .../wayland/weston-ini-conf/lvds-off.cfg | 3 - .../gles-module/gles-kernel-module.bbappend | 7 - ...01-Add-gles-hibernation-code-for-M2W-only.patch | 38 - .../recipes-kernel/linux/linux-renesas_%.bbappend | 45 - ...-do-not-double-free-fe-tuner_priv-in-r820.patch | 30 - ...-remove-redundant-initializations-in-r820.patch | 52 - ...-avoid-potential-memcpy-buffer-overflow-i.patch | 33 - .../recipes-kernel/linux/linux/cfg_mac_80211.cfg | 2 - .../linux/linux/disable_delay_printk.patch | 17 - .../recipes-kernel/linux/linux/hciattach.cfg | 9 - .../0001-Add-Hibernation-kernel-base-code.patch | 853 ----------- .../0001-Add-shdmac-hibernation-code.patch | 110 -- ...-Add-Hibernation-arch-code-Only-R-CAR-M2W.patch | 1529 -------------------- ...002-Fix-Black-blink-correction-of-display.patch | 88 -- .../0003-Add-hibernation-image-area.patch | 32 - .../0003-Add-sata-hibernation-code.patch | 56 - .../0004-Add-firmware-hibernation-code.patch | 25 - .../0005-Add-rcar-dma-hibernation-code.patch | 113 -- .../0006-Add-rcar-du-hibernation-code.patch | 127 -- .../0007-Add-rcar-i2c-hibernation-code.patch | 69 - .../0008-Add-rcar-mmc-hibernation-code.patch | 414 ------ .../0009-Add-hibernation-store-area.patch | 62 - .../0010-Add-rcar-eth-hibernation-code.patch | 238 --- .../0011-Add-rcar-pci-hibernation-code.patch | 375 ----- .../0012-Add-rcar-gpio-hibernation-code.patch | 230 --- .../0013-Add-rcar-spi-hibernation-code.patch | 168 --- .../0014-Add-rcar-sci-hibernation-code.patch | 41 - .../0015-Add-rcar-usbphy-hibernation-code.patch | 83 -- .../linux/linux/hibernation/hibernation.cfg | 10 - .../recipes-kernel/linux/linux/pppd-rcar.cfg | 6 - .../recipes-kernel/linux/linux/ra2x00.cfg | 2 - ...ix-for-memory-corruption-during-hibernate.patch | 155 -- .../mmngr-module/mmngr-kernel-module.bbappend | 4 - .../files/0001-Add-s3ctl-hibernation-code.patch | 101 -- .../s3ctl-module/s3ctl-kernel-module.bbappend | 4 - ...-Fix-Wformat-security-issue-in-named-open.patch | 26 - .../libuiomux/libuiomux_git.bbappend | 2 - .../machine/porter-nogfx/50_bblayers.conf.inc | 5 - templates/machine/porter-nogfx/50_local.conf.inc | 3 - templates/machine/porter/50_bblayers.conf.inc | 5 - templates/machine/porter/50_local.conf.inc | 3 - templates/machine/porter/50_setup.sh | 14 - 52 files changed, 9489 deletions(-) delete mode 100644 meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/0001-Autoload-uEnv.txt-on-boot.patch delete mode 100644 meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0001-Add-hibernation-image-area.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0001-Add-rcar-sdhi-DMA-support.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0002-Add-Hibernation-swsusp-command-support.patch delete mode 100644 meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0002-Enable-swsusp-DMA-support.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0003-Add-Hibernation-swsuspmem-command-support.patch delete mode 100644 meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0003-Add-hibernation-image-area.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0004-Add-porter-board-Hibernation-code.patch delete mode 100644 meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot_2013.01.01.bbappend delete mode 100644 meta-agl-bsp/meta-renesas/recipes-graphics/wayland/weston-ini-conf.bbappend delete mode 100644 meta-agl-bsp/meta-renesas/recipes-graphics/wayland/weston-ini-conf/lvds-off.cfg delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/gles-module/gles-kernel-module.bbappend delete mode 100644 meta-agl-bsp/meta-renesas/recipes-kernel/gles-module/gles-kernel-module/hibernation/0001-Add-gles-hibernation-code-for-M2W-only.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux-renesas_%.bbappend delete mode 100644 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/0001-media-r820t-do-not-double-free-fe-tuner_priv-in-r820.patch delete mode 100644 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/0002-media-r820t-remove-redundant-initializations-in-r820.patch delete mode 100644 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/0003-media-r820t-avoid-potential-memcpy-buffer-overflow-i.patch delete mode 100644 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/cfg_mac_80211.cfg delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/disable_delay_printk.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hciattach.cfg delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0001-Add-Hibernation-kernel-base-code.patch delete mode 100644 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0001-Add-shdmac-hibernation-code.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0002-Add-Hibernation-arch-code-Only-R-CAR-M2W.patch delete mode 100644 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0002-Fix-Black-blink-correction-of-display.patch delete mode 100644 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0003-Add-hibernation-image-area.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0003-Add-sata-hibernation-code.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0004-Add-firmware-hibernation-code.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0005-Add-rcar-dma-hibernation-code.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0006-Add-rcar-du-hibernation-code.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0007-Add-rcar-i2c-hibernation-code.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0008-Add-rcar-mmc-hibernation-code.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0009-Add-hibernation-store-area.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0010-Add-rcar-eth-hibernation-code.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0011-Add-rcar-pci-hibernation-code.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0012-Add-rcar-gpio-hibernation-code.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0013-Add-rcar-spi-hibernation-code.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0014-Add-rcar-sci-hibernation-code.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0015-Add-rcar-usbphy-hibernation-code.patch delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/hibernation.cfg delete mode 100755 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/pppd-rcar.cfg delete mode 100644 meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/ra2x00.cfg delete mode 100644 meta-agl-bsp/meta-renesas/recipes-kernel/mmngr-module/files/0001-Fix-for-memory-corruption-during-hibernate.patch delete mode 100644 meta-agl-bsp/meta-renesas/recipes-kernel/mmngr-module/mmngr-kernel-module.bbappend delete mode 100644 meta-agl-bsp/meta-renesas/recipes-kernel/s3ctl-module/files/0001-Add-s3ctl-hibernation-code.patch delete mode 100644 meta-agl-bsp/meta-renesas/recipes-kernel/s3ctl-module/s3ctl-kernel-module.bbappend delete mode 100644 meta-agl-bsp/meta-renesas/recipes-multimedia/libuiomux/files/0001-Fix-Wformat-security-issue-in-named-open.patch delete mode 100644 meta-agl-bsp/meta-renesas/recipes-multimedia/libuiomux/libuiomux_git.bbappend delete mode 100644 templates/machine/porter-nogfx/50_bblayers.conf.inc delete mode 100644 templates/machine/porter-nogfx/50_local.conf.inc delete mode 100644 templates/machine/porter/50_bblayers.conf.inc delete mode 100644 templates/machine/porter/50_local.conf.inc delete mode 100644 templates/machine/porter/50_setup.sh (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/0001-Autoload-uEnv.txt-on-boot.patch b/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/0001-Autoload-uEnv.txt-on-boot.patch deleted file mode 100644 index a485d7a60..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/0001-Autoload-uEnv.txt-on-boot.patch +++ /dev/null @@ -1,27 +0,0 @@ -From bd56666d27f765113749c2e55eda97b67a659b2b Mon Sep 17 00:00:00 2001 -From: Anton Gerasimov -Date: Wed, 2 Nov 2016 15:17:16 +0100 -Subject: [PATCH] Autoload uEnv.txt on boot - ---- - include/configs/porter.h | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/include/configs/porter.h b/include/configs/porter.h -index 45e6556..19dab74 100644 ---- a/include/configs/porter.h -+++ b/include/configs/porter.h -@@ -151,6 +151,10 @@ - #define CONFIG_EXTRA_ENV_SETTINGS \ - "bootm_low=0x40e00000\0" \ - "bootm_size=0x100000\0" \ -+ "bootcmd=if fatload mmc 1:1 0x50000000 uEnv.txt; then env import -t 0x50000000 ${filesize}; run bootcmd; fi;\0" -+ -+/* Shell scripting features */ -+#define CONFIG_SYS_HUSH_PARSER - - /* SH Ether */ - #define CONFIG_NET_MULTI --- -2.7.4 - diff --git a/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0001-Add-hibernation-image-area.patch b/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0001-Add-hibernation-image-area.patch deleted file mode 100644 index 95fc3b247..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0001-Add-hibernation-image-area.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 0b5f63c7224cb5c9a00397f0e0ef4a16aa58e516 Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Fri, 9 Jun 2017 20:43:06 +0900 -Subject: [PATCH 1/3] Add hibernation image area - -0x40000000 <-> 0x77FFFFFF : kernel -0x78000000 <-> 0x7FFFFFFF : hibernation image area -and Enable sdhi DMA support - -Signed-off-by: Yuichi Kusakabe ---- - arch/arm/include/asm/arch-rmobile/r8a7791.h | 3 +++ - arch/arm/include/asm/armv7.h | 3 +++ - include/configs/porter.h | 24 ++++++++++++------------ - 3 files changed, 18 insertions(+), 12 deletions(-) - -diff --git a/arch/arm/include/asm/arch-rmobile/r8a7791.h b/arch/arm/include/asm/arch-rmobile/r8a7791.h -index c964f13..9e08da4 100644 ---- a/arch/arm/include/asm/arch-rmobile/r8a7791.h -+++ b/arch/arm/include/asm/arch-rmobile/r8a7791.h -@@ -147,6 +147,8 @@ - - #define DBSC3_0_DBADJ2 0xE67900C8 - #define DBSC3_1_DBADJ2 0xE67A00C8 -+#define DBSC3_0_DBCALTR 0xE67900F8 -+#define DBSC3_1_DBCALTR 0xE67A00F8 - - #define CCI_400_MAXOT_1 0xF0091110 - #define CCI_400_MAXOT_2 0xF0092110 -@@ -154,6 +156,7 @@ - #define CCI_400_QOSCNTL_2 0xF009210C - - #define MXI_BASE 0xFE960000 -+#define MXI_VIN_QOS 0xFE96020C - #define MXI_QOS_BASE 0xFE960300 - - #define SYS_AXI_SYX64TO128_BASE 0xFF800300 -diff --git a/arch/arm/include/asm/armv7.h b/arch/arm/include/asm/armv7.h -index aad5bf7..0d4d612 100644 ---- a/arch/arm/include/asm/armv7.h -+++ b/arch/arm/include/asm/armv7.h -@@ -31,6 +31,9 @@ - #define MIDR_CORTEX_A9_R1P3 0x411FC093 - #define MIDR_CORTEX_A9_R2P10 0x412FC09A - -+/* valid bits in CBAR register / PERIPHBASE value */ -+#define CBAR_MASK 0xFFFF8000 -+ - /* Cortex-A15 revisions */ - #define MIDR_CORTEX_A15_R0P0 0x410FC0F0 - -diff --git a/include/configs/porter.h b/include/configs/porter.h -index 5567c7c..f652bab 100644 ---- a/include/configs/porter.h -+++ b/include/configs/porter.h -@@ -91,14 +91,14 @@ - - /* MEMORY */ - #define PORTER_SDRAM_BASE 0x40000000 --#define PORTER_SDRAM_SIZE 0x48000000 -+#define PORTER_SDRAM_SIZE 0x80000000 - #define PORTER_UBOOT_SDRAM_SIZE 0x40000000 - - #define CONFIG_SYS_LONGHELP - #define CONFIG_SYS_PROMPT "=> " --#define CONFIG_SYS_CBSIZE 512 --#define CONFIG_SYS_PBSIZE 512 --#define CONFIG_SYS_MAXARGS 32 -+#define CONFIG_SYS_CBSIZE 256 -+#define CONFIG_SYS_PBSIZE 256 -+#define CONFIG_SYS_MAXARGS 16 - #define CONFIG_SYS_BARGSIZE 512 - #define CONFIG_SYS_BAUDRATE_TABLE { 38400, 115200 } - -@@ -205,15 +205,15 @@ - #define CONFIG_USB_HOST_ETHER /* Enable USB Ethernet adapters */ - #define CONFIG_USB_ETHER_ASIX /* Asix, or whatever driver(s) you want */ - --#define CONFIG_ARMV7_LPAE /* 64-bit MMU descriptors */ --#define CONFIG_SYS_ARM_CACHE_WRITEALLOC /* Make memory operations faster */ -- --#define CONFIG_SYS_ARCH_TIMER /* Init arch timer */ --#define CONFIG_VE_ENABLED /* Virtualization Extensions are enabled*/ --#define CONFIG_SYS_HZ_CLOCK CONFIG_SYS_CLK_FREQ -+#define CONFIG_ARMV7_LPAE /* 64-bit MMU descriptors */ -+#define CONFIG_SYS_ARM_CACHE_WRITEALLOC /* Make memory operations faster */ -+#define CONFIG_SYS_ARCH_TIMER /* Init arch timer */ -+#define CONFIG_SYS_HZ_CLOCK CONFIG_SYS_CLK_FREQ - -+#if 1 - #define CONFIG_SH_DMA --#define CONFIG_SH_SYS_DMAL_BASE 0xE6700000 --#define CONFIG_SH_SYS_DMAL_NCH 15 -+#define CONFIG_SH_SYS_DMAL_BASE 0xE6700000 -+#define CONFIG_SH_SYS_DMAL_NCH 15 -+#endif - - #endif /* __PORTER_H */ --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0001-Add-rcar-sdhi-DMA-support.patch b/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0001-Add-rcar-sdhi-DMA-support.patch deleted file mode 100755 index c5226d4a2..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0001-Add-rcar-sdhi-DMA-support.patch +++ /dev/null @@ -1,650 +0,0 @@ -From 0aae8f3fefc67bc07b7e4e42f885ef661f0921ab Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Fri, 19 May 2017 14:25:38 +0900 -Subject: [PATCH 1/4] Add rcar-sdhi DMA support - -Signed-off-by: Yuichi Kusakabe ---- - drivers/dma/Makefile | 1 + - drivers/dma/sh_dma.c | 306 ++++++++++++++++++++++++++++++++++++++++++++++++++ - drivers/mmc/sh_sdhi.c | 158 +++++++++++++++++++++++++- - drivers/mmc/sh_sdhi.h | 5 + - include/sh_dma.h | 58 ++++++++++ - 5 files changed, 524 insertions(+), 4 deletions(-) - create mode 100644 drivers/dma/sh_dma.c - create mode 100644 include/sh_dma.h - -diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile -index 5d864b5..1129fc3 100644 ---- a/drivers/dma/Makefile -+++ b/drivers/dma/Makefile -@@ -29,6 +29,7 @@ COBJS-$(CONFIG_FSLDMAFEC) += MCD_tasksInit.o MCD_dmaApi.o MCD_tasks.o - COBJS-$(CONFIG_APBH_DMA) += apbh_dma.o - COBJS-$(CONFIG_FSL_DMA) += fsl_dma.o - COBJS-$(CONFIG_OMAP3_DMA) += omap3_dma.o -+COBJS-$(CONFIG_SH_DMA) += sh_dma.o - - COBJS := $(COBJS-y) - SRCS := $(COBJS:.o=.c) -diff --git a/drivers/dma/sh_dma.c b/drivers/dma/sh_dma.c -new file mode 100644 -index 0000000..0af2480 ---- /dev/null -+++ b/drivers/dma/sh_dma.c -@@ -0,0 +1,306 @@ -+/* -+ * SH SYS-DMA driver -+ * -+ * Copyright (C) 2014 Cogent Embedded, Inc. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+struct sh_dma { -+ u32 base; -+ u32 mask; -+ u32 nch; -+ struct list_head list; -+}; -+ -+struct sh_dma_chan { -+ struct sh_dma *dma; -+ u32 base; -+ u32 num; -+ u32 ts; -+ u32 bs; -+ u32 rounds; -+}; -+ -+#define SH_DMA_MAX_TC 0x1000000 -+#define SH_DMA_MAX_CHAN 32 -+#define SH_DMA_CHAN_OFFSET 0x8000 -+#define SH_DMA_CHAN_SIZE 0x80 -+ -+/* Global registers */ -+#define SH_DMAISTA 0x20 -+#define SH_DMASEC 0x30 -+#define SH_DMAOR 0x60 -+#define SH_DMACHCL 0x80 -+#define SH_DMADPSEC 0xA0 -+ -+/* DMA operation register bits */ -+#define SH_DMAOR_DME (0x1 << 0) -+ -+/* Channel registers */ -+#define SH_DMASAR 0x00 -+#define SH_DMADAR 0x04 -+#define SH_DMATCR 0x08 -+#define SH_DMACHCR 0x0C -+#define SH_DMATSR 0x28 -+#define SH_DMATCRB 0x18 -+#define SH_DMATSRB 0x38 -+#define SH_DMACHCRB 0x1C -+#define SH_DMARS 0x40 -+#define SH_DMABUFCR 0x48 -+#define SH_DMADPBASE 0x50 -+#define SH_DMADPCR 0x54 -+#define SH_DMAFIXSAR 0x10 -+#define SH_DMAFIXDAR 0x14 -+#define SH_DMAFIXDPBASE 0x60 -+ -+/* Channel control register bits */ -+#define SH_DMACHCR_SM(v) (((v) & 0x3) << 12) -+#define SH_DMACHCR_SM_MASK (0x3 << 12) -+#define SH_DMACHCR_DM(v) (((v) & 0x3) << 14) -+#define SH_DMACHCR_DM_MASK (0x3 << 14) -+#define SH_DMACHCR_TS_1 (0x0 << 3 | 0x0 << 20) -+#define SH_DMACHCR_TS_2 (0x1 << 3 | 0x0 << 20) -+#define SH_DMACHCR_TS_4 (0x2 << 3 | 0x0 << 20) -+#define SH_DMACHCR_TS_8 (0x3 << 3 | 0x1 << 20) -+#define SH_DMACHCR_TS_16 (0x3 << 3 | 0x0 << 20) -+#define SH_DMACHCR_TS_32 (0x0 << 3 | 0x1 << 20) -+#define SH_DMACHCR_TS_64 (0x1 << 3 | 0x1 << 20) -+#define SH_DMACHCR_TS_MASK (0x3 << 3 | 0x3 << 20) -+#define SH_DMACHCR_RS_AUTO (0x4 << 8) -+#define SH_DMACHCR_RS_SEL (0x8 << 8) -+#define SH_DMACHCR_RS_MASK (0xf << 8) -+#define SH_DMACHCR_CAE (0x1 << 31) -+#define SH_DMACHCR_TE (0x1 << 1) -+#define SH_DMACHCR_DE (0x1 << 0) -+ -+#define sh_dma_writel(d, r, v) writel((v), (d)->base + (r)) -+#define sh_dma_readl(d, r) readl((d)->base + (r)) -+#define sh_dma_writew(d, r, v) writew((v), (d)->base + (r)) -+#define sh_dma_readw(d, r) readw((d)->base + (r)) -+ -+static LIST_HEAD(sh_dma_list); -+ -+struct sh_dma *sh_dma_add(u32 base, u32 nch) -+{ -+ struct list_head *entry; -+ struct sh_dma *dma; -+ u32 mask; -+ -+ if (nch > SH_DMA_MAX_CHAN) -+ return NULL; -+ -+ mask = (1 << nch) - 1; -+ list_for_each(entry, &sh_dma_list) { -+ dma = list_entry(entry, struct sh_dma, list); -+ if (dma->base == base) { -+ if (nch > dma->nch) { -+ mask &= ~((1 << dma->nch) - 1); -+ sh_dma_writel(dma, SH_DMACHCL, mask); -+ dma->nch = nch; -+ } -+ return dma; -+ } -+ } -+ -+ dma = malloc(sizeof(*dma)); -+ if (!dma) -+ return NULL; -+ -+ dma->base = base; -+ dma->mask = 0; -+ dma->nch = nch; -+ sh_dma_writel(dma, SH_DMACHCL, mask); -+ sh_dma_writew(dma, SH_DMAOR, SH_DMAOR_DME); -+ list_add(&dma->list, &sh_dma_list); -+ return dma; -+} -+ -+void sh_dma_chan_src(struct sh_dma_chan *chan, u32 src) -+{ -+ sh_dma_writel(chan, SH_DMASAR, src); -+} -+ -+void sh_dma_chan_dst(struct sh_dma_chan *chan, u32 dst) -+{ -+ sh_dma_writel(chan, SH_DMADAR, dst); -+} -+ -+void sh_dma_chan_cfg(struct sh_dma_chan *chan, u8 midrid, u8 sm, u8 dm) -+{ -+ u32 val; -+ -+ sh_dma_writew(chan, SH_DMARS, midrid); -+ val = sh_dma_readl(chan, SH_DMACHCR); -+ val &= ~(SH_DMACHCR_RS_MASK | -+ SH_DMACHCR_SM_MASK | SH_DMACHCR_DM_MASK); -+ val |= midrid ? SH_DMACHCR_RS_SEL : SH_DMACHCR_RS_AUTO; -+ val |= SH_DMACHCR_SM(sm) | SH_DMACHCR_DM(dm); -+ sh_dma_writel(chan, SH_DMACHCR, val); -+} -+ -+void sh_dma_chan_start(struct sh_dma_chan *chan, u32 ts, u8 bs) -+{ -+ u32 val; -+ -+ if (!ts) -+ return; -+ -+ val = (ts + (1 << bs) - 1) >> bs; -+ val = val < SH_DMA_MAX_TC ? val : 0x0; -+ sh_dma_writel(chan, SH_DMATCR, val); -+ -+ chan->ts = ts; -+ chan->bs = bs; -+ chan->rounds = val; -+ -+ val = sh_dma_readl(chan, SH_DMACHCR); -+ -+ val &= ~(SH_DMACHCR_TE | SH_DMACHCR_TS_MASK); -+ val |= SH_DMACHCR_DE; -+ switch (bs) { -+ default: -+ case 0: -+ val |= SH_DMACHCR_TS_1; -+ break; -+ case 1: -+ val |= SH_DMACHCR_TS_2; -+ break; -+ case 2: -+ val |= SH_DMACHCR_TS_4; -+ break; -+ case 3: -+ val |= SH_DMACHCR_TS_8; -+ break; -+ case 4: -+ val |= SH_DMACHCR_TS_16; -+ break; -+ case 5: -+ val |= SH_DMACHCR_TS_32; -+ break; -+ case 6: -+ val |= SH_DMACHCR_TS_64; -+ break; -+ } -+ -+ sh_dma_writel(chan, SH_DMACHCR, val); -+} -+ -+void sh_dma_chan_stop(struct sh_dma_chan *chan) -+{ -+ u32 val; -+ -+ chan->ts = 0; -+ chan->bs = 0; -+ chan->rounds = 0; -+ -+ val = sh_dma_readl(chan, SH_DMACHCR); -+ val &= ~(SH_DMACHCR_CAE | SH_DMACHCR_TE | SH_DMACHCR_DE); -+ sh_dma_writel(chan, SH_DMACHCR, val); -+ do { -+ val = sh_dma_readl(chan, SH_DMACHCR); -+ } while (val & SH_DMACHCR_DE); -+} -+ -+int sh_dma_chan_wait(struct sh_dma_chan *chan) -+{ -+ u32 val; -+ u32 timeout = 10000000; -+ int retval = 0; -+ -+ do { -+ val = sh_dma_readl(chan, SH_DMACHCR); -+ val &= SH_DMACHCR_CAE | SH_DMACHCR_TE | SH_DMACHCR_DE; -+ if (val == (SH_DMACHCR_TE | SH_DMACHCR_DE)) -+ break; -+ -+ if (!timeout) -+ return -ETIMEDOUT; -+ -+ timeout--; -+ udelay(1); -+ } while (1); -+ -+ if (!(val & SH_DMACHCR_DE)) -+ return chan->ts ? -EINTR : 0; -+ -+ if (val & SH_DMACHCR_CAE) { -+ retval = -EFAULT; -+ goto out; -+ } -+ -+ val = chan->rounds < SH_DMA_MAX_TC ? chan->rounds : SH_DMA_MAX_TC; -+ val = chan->rounds - val; -+ if (val) { -+ puts("abnormal end\n"); -+ sh_dma_chan_start(chan, val << chan->bs, 0); -+ return -EAGAIN; -+ } -+ -+out: -+ sh_dma_chan_stop(chan); -+ return retval; -+} -+ -+void sh_dma_chan_clr(struct sh_dma_chan *chan) -+{ -+ chan->ts = 0; -+ chan->bs = 0; -+ chan->rounds = 0; -+ -+ sh_dma_writel(chan->dma, SH_DMACHCL, 1 << chan->num); -+} -+ -+struct sh_dma_chan *sh_dma_chan_init(struct sh_dma *dma, int ch) -+{ -+ struct sh_dma_chan *chan; -+ u32 mask; -+ -+ if (ch < 0) { -+ if (!~dma->mask) -+ return NULL; -+ -+ ch = ffz(dma->mask); -+ } -+ -+ if (!dma || ch > dma->nch) -+ return NULL; -+ -+ mask = 1 << ch; -+ if (dma->mask & mask) -+ return NULL; -+ -+ chan = malloc(sizeof(*chan)); -+ if (!chan) -+ return NULL; -+ -+ dma->mask |= mask; -+ chan->dma = dma; -+ chan->base = dma->base + SH_DMA_CHAN_OFFSET + ch * SH_DMA_CHAN_SIZE; -+ chan->num = ch; -+ sh_dma_chan_clr(chan); -+ -+ return chan; -+} -+ -+void sh_dma_chan_release(struct sh_dma_chan *chan) -+{ -+ struct sh_dma *dma = chan->dma; -+ -+ dma->mask &= ~(1 << chan->num); -+ free(chan); -+} -diff --git a/drivers/mmc/sh_sdhi.c b/drivers/mmc/sh_sdhi.c -index ddad43a..80dc7a8 100644 ---- a/drivers/mmc/sh_sdhi.c -+++ b/drivers/mmc/sh_sdhi.c -@@ -17,7 +17,6 @@ - #include - #include - #include --#include - #include - #include - -@@ -33,6 +32,111 @@ - - #define DRIVER_NAME "sh-sdhi" - -+#ifdef CONFIG_SH_DMA -+ -+#ifdef CONFIG_SYS_DCACHE_OFF -+static inline void sh_sdhi_invalidate_dcache(u32 addr, int len) { } -+#else /* CONFIG_SYS_DCACHE_OFF */ -+#define DCACHE_LINE_MASK (ARCH_DMA_MINALIGN - 1) -+ -+static void sh_sdhi_invalidate_dcache(u32 addr, int len) -+{ -+ u32 start, end; -+ -+ start = addr & ~DCACHE_LINE_MASK; -+ if (start != addr) { -+ end = start + ARCH_DMA_MINALIGN; -+ flush_dcache_range(start, end); -+ -+ len -= end - addr; -+ start = end; -+ } -+ -+ if (len >= ARCH_DMA_MINALIGN) { -+ end = (start + len) & ~DCACHE_LINE_MASK; -+ invalidate_dcache_range(start, end); -+ -+ len &= DCACHE_LINE_MASK; -+ start = end; -+ } -+ -+ if (len > 0) { -+ end = start + ARCH_DMA_MINALIGN; -+ flush_dcache_range(start, end); -+ } -+} -+#endif /* CONFIG_SYS_DCACHE_OFF */ -+ -+static void sh_sdhi_dma_init(struct sdhi_host *host) -+{ -+ struct sh_dma *dma; -+ -+ dma = sh_dma_add(CONFIG_SH_SYS_DMAL_BASE, CONFIG_SH_SYS_DMAL_NCH); -+ if (!dma) -+ return; -+ -+ host->dma_rx = sh_dma_chan_init(dma, 1); -+ if (!host->dma_rx) -+ return; -+ -+ sh_dma_chan_cfg(host->dma_rx, SH_DMA_SDHI0_RX, -+ SH_DMA_AM_FIX, SH_DMA_AM_INC); -+ sh_dma_chan_src(host->dma_rx, -+ host->addr + (SDHI_BUF0 << host->bus_shift) + -+ 0x2000); -+} -+ -+static void sh_sdhi_dma_release(struct sdhi_host *host) -+{ -+ if (host->dma_rx) { -+ sh_dma_chan_release(host->dma_rx); -+ host->dma_rx = NULL; -+ } -+} -+ -+static void sh_sdhi_start_dma_rx(struct sdhi_host *host, -+ struct mmc_data *data) -+{ -+ int ret; -+ u32 blocksize = data->blocksize; -+ sh_sdhi_dma_init(host); -+ sdhi_writew(host, SDHI_SD_DMACR, 0xa0); -+ sdhi_writew(host, SDHI_CC_EXT_MODE, (1 << 1)); -+ -+ sh_sdhi_invalidate_dcache((u32)data->dest, blocksize); -+ -+ sh_dma_chan_dst(host->dma_rx, (u32)data->dest); -+ -+ /* sh_sdhi_bitset(BUF_ACC_DMAREN, &host->regs->ce_buf_acc); */ -+ -+ /* MMCIF is capable to transfer only 4 bytes at a time, -+ * provide size order as a param */ -+ blocksize = sdhi_readw(host, SDHI_SIZE); -+ sh_dma_chan_start(host->dma_rx, blocksize, 1); -+ -+ do { -+ ret = sh_dma_chan_wait(host->dma_rx); -+ } while (ret == -EAGAIN); -+ sdhi_writew(host, SDHI_CC_EXT_MODE, 0x0); -+ sh_dma_chan_clr(host->dma_rx); -+ sh_sdhi_dma_release(host); -+} -+ -+static void sdhi_dma_transfer(struct sdhi_host *host, -+ struct mmc_data *data) -+{ -+ sh_sdhi_start_dma_rx(host, data); -+} -+ -+ -+#else /* CONFIG_SH_DMA */ -+static inline void sh_sdhi_dma_init(struct sdhi_host *host) { } -+static inline void sh_sdhi_dma_release(struct sdhi_host *host) { } -+static inline void sh_sdhi_start_dma_rx(struct sdhi_host *host, -+ struct mmc_data *data) { } -+ -+#endif /* CONFIG_SH_DMA */ -+ - static void *mmc_priv(struct mmc *mmc) - { - return (void *)mmc->priv; -@@ -253,7 +357,9 @@ static int sdhi_single_read(struct sdhi_host *host, struct mmc_data *data) - { - int ch = host->ch; - long time; -+#ifndef CONFIG_SH_DMA - unsigned short blocksize, i; -+#endif - unsigned short *p = (unsigned short *)data->dest; - - if ((unsigned long)p & 0x00000001) { -@@ -272,10 +378,14 @@ static int sdhi_single_read(struct sdhi_host *host, struct mmc_data *data) - return sdhi_error_manage(host); - - g_wait_int[ch] = 0; -+#ifdef CONFIG_SH_DMA -+ sdhi_dma_transfer(host, data); -+#else - blocksize = sdhi_readw(host, SDHI_SIZE); - for (i = 0; i < blocksize / 2; i++) - *p++ = sdhi_readw(host, SDHI_BUF0); - -+#endif - time = sdhi_wait_interrupt_flag(host); - if (time == 0 || g_sd_error[ch] != 0) - return sdhi_error_manage(host); -@@ -537,7 +647,6 @@ static int sdhi_start_cmd(struct sdhi_host *host, - ; - - sdhi_writew(host, SDHI_CMD, (unsigned short)(opc & CMD_MASK)); -- - g_wait_int[host->ch] = 0; - sdhi_writew(host, SDHI_INFO1_MASK, - ~INFO1M_RESP_END & sdhi_readw(host, SDHI_INFO1_MASK)); -@@ -546,7 +655,6 @@ static int sdhi_start_cmd(struct sdhi_host *host, - INFO2M_END_ERROR | INFO2M_TIMEOUT | - INFO2M_RESP_TIMEOUT | INFO2M_ILA) & - sdhi_readw(host, SDHI_INFO2_MASK)); -- - time = sdhi_wait_interrupt_flag(host); - if (time == 0) - return sdhi_error_manage(host); -@@ -578,7 +686,6 @@ static int sdhi_start_cmd(struct sdhi_host *host, - } - if (host->data) - ret = sdhi_data_trans(host, data, opc); -- - pr_debug("ret = %d, resp = %08x, %08x, %08x, %08x\n", - ret, cmd->response[0], cmd->response[1], - cmd->response[2], cmd->response[3]); -@@ -697,3 +804,46 @@ int sdhi_mmc_init(unsigned long addr, int ch) - return ret; - } - -+ -+int sdhi_warmup_sdio(struct mmc *mmc) -+{ -+ struct mmc_cmd cmd; -+ int err; -+ int32_t ocr; -+ -+ udelay(10); -+ -+ mmc->bus_width = 1; -+ mmc->clock = mmc->f_min; -+ sdhi_set_ios(mmc); -+ udelay(10); -+ -+ cmd.cmdidx = MMC_CMD_GO_IDLE_STATE; -+ cmd.resp_type = MMC_RSP_NONE; -+ cmd.cmdarg = 0; -+ err = sdhi_request(mmc, &cmd, NULL); -+ if (err) -+ goto err_out; -+ cmd.cmdidx = 0x5; -+ cmd.resp_type = MMC_RSP_R4; -+ cmd.cmdarg = 0; -+ err = sdhi_request(mmc, &cmd, NULL); -+ if (err) -+ goto err_out; -+ ocr = cmd.response[0]; -+ ocr |= (1 << 24); -+ cmd.cmdidx = 0x05; -+ cmd.resp_type = MMC_RSP_R4; -+ cmd.cmdarg = ocr; -+ err = sdhi_request(mmc, &cmd, NULL); -+ if (err) -+ goto err_out; -+ printf("SDIO OCR:%08x\n", cmd.response[0]); -+ return 0; -+err_out: -+ printf("cmd: CMD%02d err = %d, resp = %08x, %08x, %08x, %08x\n", -+ err, cmd.cmdidx, cmd.response[0], cmd.response[1], -+ cmd.response[2], cmd.response[3]); -+ return err; -+} -+ -diff --git a/drivers/mmc/sh_sdhi.h b/drivers/mmc/sh_sdhi.h -index 4deded2..7b5d421 100644 ---- a/drivers/mmc/sh_sdhi.h -+++ b/drivers/mmc/sh_sdhi.h -@@ -15,6 +15,8 @@ - #ifndef _SH_SDHI_H_ - #define _SH_SDHI_H_ - -+#include -+ - #define SDHI_CMD (0x0000 >> 1) - #define SDHI_PORTSEL (0x0004 >> 1) - #define SDHI_ARG0 (0x0008 >> 1) -@@ -181,6 +183,9 @@ struct sdhi_host { - unsigned int power_mode; - int ch; - int bus_shift; -+#ifdef CONFIG_SH_DMA -+ struct sh_dma_chan *dma_rx; -+#endif - }; - - static unsigned short g_wait_int[CONFIG_MMC_SH_SDHI_NR_CHANNEL]; -diff --git a/include/sh_dma.h b/include/sh_dma.h -new file mode 100644 -index 0000000..3f35c3a ---- /dev/null -+++ b/include/sh_dma.h -@@ -0,0 +1,58 @@ -+#ifndef __SH_DMA_H__ -+#define __SH_DMA_H__ -+ -+#include -+#include -+ -+#define SH_DMA_MMCIF0_RX 0xD2 -+#define SH_DMA_SDHI0_RX 0xCE -+ -+/* Address mode */ -+#define SH_DMA_AM_FIX 0 -+#define SH_DMA_AM_INC 1 -+#define SH_DMA_AM_DEC 2 -+ -+struct sh_dma; -+struct sh_dma_chan; -+ -+#ifdef CONFIG_SH_DMA -+struct sh_dma *sh_dma_add(u32 base, u32 nch); -+struct sh_dma_chan *sh_dma_chan_init(struct sh_dma *dma, int ch); -+void sh_dma_chan_release(struct sh_dma_chan *chan); -+ -+void sh_dma_chan_src(struct sh_dma_chan *chan, u32 src); -+void sh_dma_chan_dst(struct sh_dma_chan *chan, u32 dst); -+void sh_dma_chan_cfg(struct sh_dma_chan *chan, u8 midrid, u8 sm, u8 dm); -+void sh_dma_chan_start(struct sh_dma_chan *chan, u32 ts, u8 bs); -+void sh_dma_chan_stop(struct sh_dma_chan *chan); -+int sh_dma_chan_wait(struct sh_dma_chan *chan); -+void sh_dma_chan_clr(struct sh_dma_chan *chan); -+#else -+static inline struct sh_dma *sh_dma_add(u32 base, u32 nch) -+{ -+ return NULL; -+} -+ -+static inline struct sh_dma_chan *sh_dma_chan_init(struct sh_dma *dma, -+ int ch) -+{ -+ return NULL; -+} -+ -+static inline void sh_dma_chan_release(struct sh_dma_chan *chan) { } -+static inline void sh_dma_chan_src(struct sh_dma_chan *chan, u32 src) { } -+static inline void sh_dma_chan_dst(struct sh_dma_chan *chan, u32 dst) { } -+static inline void sh_dma_chan_cfg(struct sh_dma_chan *chan, -+ u8 midrid, u8 sm, u8 dm) { } -+static inline void sh_dma_chan_start(struct sh_dma_chan *chan, -+ u32 ts, u8 bs) { } -+static inline void sh_dma_chan_stop(struct sh_dma_chan *chan) { } -+static inline int sh_dma_chan_wait(struct sh_dma_chan *chan) -+{ -+ return -ENOSYS; -+} -+ -+static inline void sh_dma_chan_clr(struct sh_dma_chan *chan) { } -+#endif -+ -+#endif /* __SH_DMA_H__ */ --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0002-Add-Hibernation-swsusp-command-support.patch b/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0002-Add-Hibernation-swsusp-command-support.patch deleted file mode 100755 index 7c4c65658..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0002-Add-Hibernation-swsusp-command-support.patch +++ /dev/null @@ -1,909 +0,0 @@ -From 45b3abc592bd685726a6b55693ab95e4cb6065fc Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Fri, 19 May 2017 14:27:46 +0900 -Subject: [PATCH 2/4] Add Hibernation swsusp command support - -Signed-off-by: Yuichi Kusakabe ---- - common/cmd_swsusp.c | 889 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 889 insertions(+) - create mode 100644 common/cmd_swsusp.c - -diff --git a/common/cmd_swsusp.c b/common/cmd_swsusp.c -new file mode 100644 -index 0000000..ba05aa4 ---- /dev/null -+++ b/common/cmd_swsusp.c -@@ -0,0 +1,889 @@ -+/* -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include "../arch/arm/cpu/armv7/rmobile/crc32_word4.h" -+#include -+ -+/* Note for Renesas--based boards: -+ * We have the following memory split here: -+ * 0x40000000 - u_boot_lowest - used to store pfns at physical addresses -+ * u_boot_lowest - 0x8000000 - pfns are relocated, and then later put -+ * on physical addresses (swsusp_finish) -+ * 0x8000000 - 0xc0000000 - used to store pfns with physical address -+ * of 0x200000000 (long address), we have to change offset for them. -+ * Any pfn with address > 0x8000000 but less than 0x200000000 -+ * is an error. -+ * For boards which do not have memory above first GB, that will -+ * still work, as they won't have anything above 0x80000000 -+ * in their image, so for standard 2GB setup ou should put -+ * your secong GB in 0x80000000-0xC0000000 range, you can -+ * use MMU for that or if your RAM is continous, it will -+ * naturally be there. */ -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+/* #define PAGEMAP_DEBUG */ -+ -+#ifdef PAGEMAP_DEBUG -+#define SWSUSP_DEBUG_INFO -+#endif -+ -+#define SWSUSP_KEEP_IMAGE -+ -+#ifndef likely -+# define likely(x) __builtin_expect(!!(x), 1) -+# define unlikely(x) __builtin_expect(!!(x), 0) -+#endif -+ -+#define HIBERNATE_SIG "S1SUSPEND" -+#define PAGE_SIZE 4096 -+ -+/* Define depending on CONFIG_LBDAF in kernel */ -+typedef u64 sector_t; -+ -+ -+struct swsusp_header { -+ char reserved[PAGE_SIZE - 20 - sizeof(sector_t) - -+ sizeof(int) - sizeof(u32) - -+ sizeof(CRC32_WORD4_t) - sizeof(u32)]; -+ CRC32_WORD4_t comp_crc32; -+ u32 img_size; /* append */ -+ u32 crc32; -+ sector_t image; -+ unsigned int flags; -+ char orig_sig[10]; -+ char sig[10]; -+} __packed; -+ -+#define __NEW_UTS_LEN 64 -+ -+struct new_utsname { -+ char sysname[__NEW_UTS_LEN + 1]; -+ char nodename[__NEW_UTS_LEN + 1]; -+ char release[__NEW_UTS_LEN + 1]; -+ char version[__NEW_UTS_LEN + 1]; -+ char machine[__NEW_UTS_LEN + 1]; -+ char domainname[__NEW_UTS_LEN + 1]; -+}; -+ -+struct swsusp_archdata { -+ u32 nosave_backup_phys; -+ u32 nosave_begin_phys; -+ u32 nosave_end_phys; -+ void (*cpu_resume_restore_nosave)(u32, u32, u32); -+}; -+ -+struct swsusp_info { -+ struct new_utsname uts; -+ u32 version_code; -+ unsigned long num_physpages; -+ int cpus; -+ unsigned long image_pages; -+ unsigned long pages; -+ unsigned long size; -+ char archdata[1024]; -+}; -+ -+struct swap_map_page { -+ u64 entries[PAGE_SIZE / sizeof(u64) - 1]; -+ u64 next_swap; -+}; -+ -+struct swsusp_finish_context { -+ void *remap_orig_page; -+ void *remap_temp_page; -+ struct swsusp_archdata archdata; -+}; -+ -+/* Do not specially exclude any bottom area */ -+#define USED_ADDRESS_TOP (CONFIG_SYS_SDRAM_BASE) -+#define USED_ADDRESS_END (CONFIG_SYS_SDRAM_BASE) -+ -+#define PG_UB2ZERO(pg) (pg - CONFIG_SYS_SDRAM_BASE / PAGE_SIZE) -+static u32 const exclude_min_page = -+ (USED_ADDRESS_TOP) / PAGE_SIZE; -+static u32 const exclude_max_page = -+ (USED_ADDRESS_END - 1) / PAGE_SIZE; -+static u32 const exclude_min_page_ub = -+ PG_UB2ZERO((USED_ADDRESS_TOP) / PAGE_SIZE); -+static u32 const exclude_max_page_ub = -+ PG_UB2ZERO((USED_ADDRESS_END-1) / PAGE_SIZE); -+#define SF_NOCOMPRESS_MODE 2 -+ -+#define LZO_HEADER sizeof(size_t) -+ -+/* Number of pages/bytes we'll compress at one time. */ -+#define LZO_UNC_PAGES 32 -+#define LZO_UNC_SIZE (LZO_UNC_PAGES * PAGE_SIZE) -+ -+/* Number of pages/bytes we need for compressed data (worst case). */ -+#define LZO_CMP_PAGES DIV_ROUND_UP(lzo1x_worst_compress(LZO_UNC_SIZE) + \ -+ LZO_HEADER, PAGE_SIZE) -+#define LZO_CMP_SIZE (LZO_CMP_PAGES * PAGE_SIZE) -+ -+static block_dev_desc_t *swap_dev; -+static disk_partition_t swap_info; -+ -+static struct swap_map_page *meta_map; -+static u64 meta_map_next; -+static u64 meta_map_curr; -+static u64 meta_map_start; -+static int meta_idx; -+ -+#ifdef PAGEMAP_DEBUG -+static int debugout; -+static int _last_read_pages; -+#define PAGEMAP_INFO(_msg, ...) do { if (debugout == 1) \ -+ printf(_msg, ## __VA_ARGS__); } while (0) -+#endif -+ -+#define HIGHMEM_PHYS_ADDR 0x200000000ULL -+#define HIGHMEM_VA 0x80000000UL -+#define HIGHMEM_PFN (HIGHMEM_PHYS_ADDR / PAGE_SIZE) -+#define LOW_TOP 0x80000000 -+#define LOW_TOP_PFN (LOW_TOP / PAGE_SIZE) -+#define LOW_BOTTOM CONFIG_SYS_SDRAM_BASE -+#define LOW_BOTTOM_PFN (LOW_BOTTOM / PAGE_SIZE) -+#define TOP_ADDRESS 0x240000000ULL -+ -+static int get_meta(void); -+ -+static inline int pfn_is_low(u32 pfn) -+{ -+ return ((pfn >= LOW_BOTTOM_PFN) && (pfn < LOW_TOP_PFN)); -+} -+ -+static inline int pfn_is_high(u32 pfn) -+{ -+ return (pfn >= HIGHMEM_PFN); -+} -+ -+#define pfn_is_valid(p) (pfn_is_low(p) || pfn_is_high(p)) -+ -+static inline int pfn_is_excluded(u32 pfn) -+{ -+ /* Allow bottom 2 pages for exception vectors */ -+ if (pfn < (LOW_BOTTOM_PFN + 2)) -+ return 0; -+ else if (exclude_min_page >= exclude_max_page) -+ return 0; -+ else -+ return (pfn >= exclude_min_page) && (pfn <= exclude_max_page); -+} -+ -+/* PFN to zero-counted page */ -+static inline u32 pg_ub2zero(u32 pg) -+{ -+ return pg - LOW_BOTTOM_PFN; -+} -+ -+/* zero-counted page to PFN */ -+static inline u32 pg_zero2ub(u32 pg) -+{ -+ return pg + LOW_BOTTOM_PFN; -+} -+ -+/* PFN to physical address (64-bit (40-bit)) */ -+static inline u64 pg2phys(u32 page) -+{ -+ return (u64) page * PAGE_SIZE; -+} -+ -+/* PFN to virtual address */ -+static inline void *pg2addr(u32 page) -+{ -+ void *addr; -+ if (page >= HIGHMEM_PFN) -+ addr = (void *) (u32)(pg2phys(page - HIGHMEM_PFN) + HIGHMEM_VA); -+ else -+ addr = (void *) (u32)pg2phys(page); -+ -+ return addr; -+} -+ -+#ifdef CONFIG_SH_DMA -+static inline void *malloc_aligned(u32 size, u32 align) -+{ -+ return (void *)(((u32)malloc(size + align) + align - 1) & ~(align - 1)); -+} -+ -+#endif -+ -+static int page_read(u32 page, void *addr) -+{ -+ __u32 cnt; -+ int blk_per_page; -+ -+ blk_per_page = PAGE_SIZE / swap_dev->blksz; -+ cnt = swap_dev->block_read(swap_dev->dev, -+ swap_info.start + (page * blk_per_page), -+ blk_per_page, addr); -+ return cnt != blk_per_page; -+} -+ -+#ifndef SWSUSP_KEEP_IMAGE -+static int page_write(u32 page, void *addr) -+{ -+ __u32 cnt; -+ int blk_per_page; -+ -+ blk_per_page = PAGE_SIZE / swap_dev->blksz; -+ cnt = swap_dev->block_write(swap_dev->dev, -+ swap_info.start + (page * blk_per_page), -+ blk_per_page, addr); -+ return cnt != blk_per_page; -+} -+#endif -+ -+#define FAST_COPY -+void __attribute__((section(".rodata"))) -+ __attribute__((optimize("O6", "unroll-loops"))) -+swsusp_finish(void *userdata) -+{ -+ struct swsusp_finish_context *context = userdata; -+ u32 **remap_orig; -+ u32 **remap_temp; -+ int idx = 0; -+ const int lastidx = PAGE_SIZE / sizeof(u32) - 1; -+ -+ remap_orig = context->remap_orig_page; -+ remap_temp = context->remap_temp_page; -+ -+ __asm__ volatile ("" : : : "memory"); -+ for (;;) { -+ u32 *orig, *temp; -+ int count; -+ -+ /* Linked list to next page */ -+ if (idx == lastidx) { -+ remap_orig = (u32 **)remap_orig[idx]; -+ remap_temp = (u32 **)remap_temp[idx]; -+ idx = 0; -+ } -+ if (unlikely(!remap_orig || remap_orig[idx] == (u32 *)~0UL)) -+ break; -+ orig = remap_orig[idx]; -+ temp = remap_temp[idx]; -+#ifdef FAST_COPY -+ count = PAGE_SIZE / sizeof(u32) / 32; -+ __asm__ volatile ( -+ "1:\n" -+ "ldmia %[rtemp]!, {r0-r7}\n" -+ "stmia %[rorig]!, {r0-r7}\n" -+ "ldmia %[rtemp]!, {r0-r7}\n" -+ "stmia %[rorig]!, {r0-r7}\n" -+ "ldmia %[rtemp]!, {r0-r7}\n" -+ "stmia %[rorig]!, {r0-r7}\n" -+ "ldmia %[rtemp]!, {r0-r7}\n" -+ "subs %[count], %[count], #1\n" -+ "stmia %[rorig]!, {r0-r7}\n" -+ "bgt 1b\n" -+ : /* No outputs */ -+ : -+ [rorig]"h" (orig), -+ [rtemp]"h" (temp), -+ [count]"h" (count) -+ : "r0", "r1", "r2", -+ "r3", "r4", "r5", -+ "r6", "r7", "cc", "memory" -+ ); -+#else -+ count = PAGE_SIZE / sizeof(u32); -+ while (count--) -+ *orig++ = *temp++; -+#endif -+#ifdef SWSUSP_CHECK_COPY_RESULT -+ count = PAGE_SIZE / sizeof(u32); -+ orig = remap_orig[idx]; -+ temp = remap_temp[idx]; -+ __asm__ volatile ( -+ "1:\n" -+ "ldr r3, [%[rorig]]\n" -+ "ldr r4, [%[rtemp]]\n" -+ "cmp r3, r4\n" -+ "bne 2f\n" -+ "add %[rorig], %[rorig], #4\n" -+ "add %[rtemp], %[rtemp], #4\n" -+ "subs %[count], %[count], #1\n" -+ "bgt 1b\n" -+ "b 3f\n" -+ "2:b 2b\n" -+ "3:\n" -+ : -+ [rorig]"+r" (orig), -+ [rtemp]"+r" (temp), -+ [count]"+r" (count) -+ : -+ : "r3", "r4", "cc", "memory" -+ ); -+#endif -+ idx++; -+ } -+ context->archdata.cpu_resume_restore_nosave( -+ context->archdata.nosave_backup_phys, -+ context->archdata.nosave_begin_phys, -+ context->archdata.nosave_end_phys); -+} -+ -+static int raw_page_init(u64 start) -+{ -+#ifdef CONFIG_SH_DMA -+ meta_map = malloc_aligned(PAGE_SIZE, ARCH_DMA_MINALIGN); -+#else -+ meta_map = malloc(PAGE_SIZE); -+#endif -+ if (!meta_map) -+ return -1; -+ meta_map_next = 0; -+ meta_map_curr = 0; -+ meta_map_start = start; -+ return 0; -+} -+ -+static void raw_page_start(void) -+{ -+ meta_idx = ARRAY_SIZE(meta_map->entries); -+ meta_map_next = meta_map_start; -+} -+ -+static int get_meta(void) -+{ -+ if (meta_idx == ARRAY_SIZE(meta_map->entries)) { -+ if (!meta_map_next) -+ return 0; -+ if (meta_map_curr != meta_map_next) { -+#ifdef PAGEMAP_DEBUG -+ PAGEMAP_INFO("META: %d (%08x)\n", -+ (int)meta_map_next, -+ (unsigned int) -+ (meta_map_next * PAGE_SIZE)); -+#endif -+ if (page_read(meta_map_next, meta_map)) -+ return -1; -+ meta_map_curr = meta_map_next; -+ meta_map_next = meta_map->next_swap; -+ } -+ meta_idx = 0; -+ } -+#ifdef PAGEMAP_DEBUG -+ { -+ static unsigned int pre; -+ if ((pre+1) != meta_map->entries[meta_idx]) { -+ PAGEMAP_INFO("DATA-Skipped: %d->%d (%08x->%08x)\n", -+ pre, -+ (unsigned int)meta_map->entries[meta_idx], -+ pre*PAGE_SIZE, -+ (unsigned int) -+ (meta_map->entries[meta_idx] * -+ PAGE_SIZE)); -+ } -+ pre = meta_map->entries[meta_idx]; -+ _last_read_pages = pre; -+ } -+#endif -+ return 1; -+} -+ -+static int raw_page_get_next(void *buffer) -+{ -+ if (!get_meta()) -+ return 0; -+ -+ if (page_read(meta_map->entries[meta_idx++], buffer)) -+ return -1; -+ -+ return 1; -+} -+ -+static void raw_page_exit(void) -+{ -+ free(meta_map); -+ meta_map = NULL; -+} -+ -+static int image_compressed; -+static int image_pages_avail; -+static unsigned char *unc_buf; -+static unsigned char *cmp_buf; -+static int unc_offset; -+ -+static int image_page_init(int compressed) -+{ -+ if (!compressed) -+ return 1; -+ -+#ifdef CONFIG_SH_DMA -+ cmp_buf = malloc_aligned(LZO_CMP_SIZE, ARCH_DMA_MINALIGN); -+#else -+ cmp_buf = malloc(LZO_CMP_SIZE); -+#endif -+ unc_buf = malloc(LZO_UNC_SIZE); -+ if (!unc_buf || !cmp_buf) { -+ printf("not enogh memory\n"); -+ return 1; -+ } -+ image_compressed = compressed; -+ return 0; -+} -+ -+static void image_page_start(void) -+{ -+ image_pages_avail = 0; -+} -+ -+static int image_page_get_next(void *buffer) -+{ -+ if (image_compressed) { -+#ifdef CONFIG_LZO -+ if (!image_pages_avail) { -+ int ret; -+ size_t unc_len, cmp_len, cmp_avail; -+ -+ ret = raw_page_get_next(cmp_buf); -+ if (ret <= 0) -+ return ret; -+ -+ cmp_len = *(size_t *) cmp_buf; -+ cmp_avail = PAGE_SIZE; -+ -+ while (cmp_avail < cmp_len + LZO_HEADER) { -+ ret = raw_page_get_next(cmp_buf + cmp_avail); -+ if (unlikely(ret <= 0)) -+ return ret; -+ cmp_avail += PAGE_SIZE; -+ } -+ unc_len = LZO_UNC_SIZE; -+ ret = lzo1x_decompress_safe(cmp_buf + LZO_HEADER, -+ cmp_len, unc_buf, &unc_len); -+ if (unlikely(ret != LZO_E_OK)) { -+ printf("Decompression failure:\n"); -+ printf("ret = %d\n", ret); -+ printf("cmp_buf = %p\n", cmp_buf + LZO_HEADER); -+ printf("cmp_len = %zu\n", cmp_len); -+ printf("unc_len = %zu\n", unc_len); -+ return ret; -+ } -+ image_pages_avail = unc_len / PAGE_SIZE; -+ unc_offset = 0; -+ } -+ -+ memcpy(buffer, unc_buf + unc_offset, PAGE_SIZE); -+ unc_offset += PAGE_SIZE; -+ image_pages_avail--; -+ return 1; -+#else -+ printf("No LZO support in u-boot.\n"); -+ return -1; -+#endif -+ } else { -+ return raw_page_get_next(buffer); -+ } -+} -+ -+static void image_page_exit(void) -+{ -+ free(unc_buf); -+ free(cmp_buf); -+ unc_buf = cmp_buf = NULL; -+} -+ -+static void bitmap_set(u32 *bm, unsigned int bit) -+{ -+ bm[bit >> 5] |= (1 << (bit & 0x1f)); -+} -+ -+static int bitmap_is_set(u32 *bm, unsigned int bit) -+{ -+ return !!(bm[bit >> 5] & (1 << (bit & 0x1f))); -+} -+ -+static u32 *used_bitmap; -+static u32 next_free_page; -+static u32 total_pages; -+ -+static int free_page_init(void) -+{ -+ total_pages = (u32)((TOP_ADDRESS - -+ LOW_BOTTOM) / PAGE_SIZE); /* 2GB */ -+ used_bitmap = malloc(total_pages * sizeof(u32) / 32); -+ if (!used_bitmap) -+ return -1; -+ return 0; -+} -+ -+static void free_page_start(int offset) -+{ -+ memset(used_bitmap, 0, total_pages * sizeof(u32) / 32); -+ next_free_page = pg_ub2zero(offset); -+} -+ -+static void free_page_mark_used(u32 page); -+/* Returns full-address based pages */ -+static int free_page_get_next(void) -+{ -+ while (bitmap_is_set(used_bitmap, next_free_page)) -+ next_free_page++; -+ free_page_mark_used(next_free_page); -+ return pg_zero2ub(next_free_page++); -+} -+ -+static void free_page_mark_used(u32 page) -+{ -+ bitmap_set(used_bitmap, page); -+} -+ -+static void free_page_exit(void) -+{ -+ free(used_bitmap); -+ used_bitmap = NULL; -+} -+ -+int do_swsusp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -+{ -+ int ret; -+ __u32 offset = 0; -+ void *spare_page = NULL; -+ struct swsusp_header *swsusp_header; -+ struct swsusp_info *swsusp_info; -+ struct swsusp_finish_context *context; -+ int max_page; -+ int i; -+ u32 nr_pfn_pages; -+ u32 **pfn_pages = NULL; -+ u32 *remap_orig_page; -+ u32 *remap_temp_page; -+ u32 **remap_orig; -+ u32 **remap_temp; -+ int remap_idx; -+ int m; -+ void (*swsusp_finish_copy)(void *); -+ char *data_page; -+ char *stack_addr; -+ int high_page; -+#ifdef USE_CRC_32x4 -+ CRC32_WORD4_t calc_crc; -+#endif -+#ifdef PAGEMAP_DEBUG -+ int high_page_images = 0; -+ int total_remap = 0; -+ if (getenv("hybdebug") != NULL) -+ debugout = 1; -+#endif -+ /* Address hack */ -+ void *swsusp_finish_p = (void *)((u32)swsusp_finish & ~0x1); -+ -+ if (argc < 2) { -+ printf("usage: swsusp " -+ "[] []\n"); -+ return 0; -+ } -+ -+ if (argc == 4) { -+ char *ep; -+ offset = simple_strtoul(argv[3], &ep, 16); -+ if (*ep) { -+ printf("Invalid block offset\n"); -+ return 1; -+ } -+ } -+ -+ /* Allow for 32 pages of stack */ -+ max_page = gd->start_addr_sp / PAGE_SIZE - 32; -+ high_page = (((gd->relocaddr -+ + _bss_end_ofs)+(PAGE_SIZE-1)) / PAGE_SIZE) + 1; -+#define pfn_is_occupied(pfn) (page > max_page && page <= high_page) -+#ifdef PAGEMAP_DEBUG -+ PAGEMAP_INFO(" *gd->start_addr_sp:%p\n", (void *)gd->start_addr_sp); -+ PAGEMAP_INFO(" *gd->relocaddr:%p\n", (void *)gd->relocaddr); -+ PAGEMAP_INFO(" *bss_start_offset:%d bss_end_offset:%d\n", -+ (int)_bss_start_ofs, (int)_bss_end_ofs); -+ PAGEMAP_INFO(" UBOOT own memory [%p-%p]\n", -+ pg2addr(max_page), pg2addr(high_page)); -+#endif -+ -+ if (free_page_init()) -+ goto mem_err; -+ free_page_start(exclude_max_page + 1); -+ -+#ifdef CONFIG_SH_DMA -+ spare_page = malloc_aligned(PAGE_SIZE, ARCH_DMA_MINALIGN); -+#else -+ spare_page = malloc(PAGE_SIZE); -+#endif -+ if (!spare_page) -+ goto mem_err; -+ -+ ret = get_device_and_partition(argv[1], argv[2], &swap_dev, &swap_info, -+ 1); -+ if (ret < 0) -+ goto err; -+ -+ swsusp_header = spare_page; -+ if (page_read(offset, swsusp_header)) -+ goto read_err; -+ -+#ifdef SWSUSP_DEBUG_INFO -+ PAGEMAP_INFO("swssp_header:\n"); -+ PAGEMAP_INFO(" comp_crc: \n"); -+ PAGEMAP_INFO(" img_size: %d\n", swsusp_header->img_size); -+ PAGEMAP_INFO(" image(swap firest sector): %08x\n", -+ (unsigned int)swsusp_header->image); -+ PAGEMAP_INFO(" flags: %08x\n", swsusp_header->flags); -+ PAGEMAP_INFO(" orig_sig:%s\n", swsusp_header->orig_sig); -+ PAGEMAP_INFO(" sig:%s\n", swsusp_header->sig); -+#endif /* SWSUSP_DEBUG_INFO */ -+ -+ if (memcmp(HIBERNATE_SIG, swsusp_header->sig, 10)) { -+ printf("No hibernation image present\n"); -+ return 0; -+ } -+ -+#ifdef USE_CRC_32x4 -+ memset(&calc_crc, 0, sizeof(calc_crc)); -+ calc_crc32x4((u8 *)((unsigned long)offt_addr + PAGE_SIZE), -+ swsusp_header->img_size, &calc_crc); -+ -+ if (memcmp(&calc_crc, &swsusp_header->comp_crc32, -+ sizeof(CRC32_WORD4_t))) { -+ printf("Bad CRC for image, image: %08x:%08x:%08x:%08x, calc: %08x:%08x:%08x:%08x\n", -+ swsusp_header->comp_crc32.crc_w[0], -+ swsusp_header->comp_crc32.crc_w[1], -+ swsusp_header->comp_crc32.crc_w[2], -+ swsusp_header->comp_crc32.crc_w[3], -+ calc_crc.crc_w[0], calc_crc.crc_w[1], -+ calc_crc.crc_w[2], calc_crc.crc_w[3]); -+ return 0; -+ } -+#endif -+ -+ /* Overwrite header if necessary */ -+#ifndef SWSUSP_KEEP_IMAGE -+ if (memcmp(swsusp_header->sig, swsusp_header->orig_sig, 10)) { -+ memcpy(swsusp_header->sig, swsusp_header->orig_sig, 10); -+ if (page_write(offset, swsusp_header)) -+ printf("Write error resetting header\n"); -+ } -+#endif -+ -+ if (raw_page_init(swsusp_header->image)) -+ goto mem_err; -+ raw_page_start(); -+ -+ if (image_page_init(!(swsusp_header->flags & SF_NOCOMPRESS_MODE))) -+ goto mem_err; -+ image_page_start(); -+ -+ swsusp_info = spare_page; -+ if (raw_page_get_next(swsusp_info) <= 0) -+ goto read_err; -+ -+#ifdef SWSUSP_DEBUG_INFO -+ PAGEMAP_INFO("swsup_info:\n"); -+ PAGEMAP_INFO(" utsname.sysname:%s\n", swsusp_info->uts.sysname); -+ PAGEMAP_INFO(" nodename:%s\n", swsusp_info->uts.nodename); -+ PAGEMAP_INFO(" release:%s\n", swsusp_info->uts.release); -+ PAGEMAP_INFO(" version:%s\n", swsusp_info->uts.version); -+ PAGEMAP_INFO(" machine:%s\n", swsusp_info->uts.machine); -+ PAGEMAP_INFO(" vesion_code:%#08x\n", -+ (unsigned int)swsusp_info->version_code); -+ PAGEMAP_INFO(" num_physpages:%d\n", -+ (unsigned int)swsusp_info->num_physpages); -+ PAGEMAP_INFO(" pages :%d\n", -+ (unsigned int)swsusp_info->pages); -+ PAGEMAP_INFO(" size :%d\n", -+ (unsigned int)swsusp_info->size); -+#endif -+ -+ nr_pfn_pages = (swsusp_info->image_pages * 4 + PAGE_SIZE - 1) / -+ PAGE_SIZE; -+ pfn_pages = malloc(nr_pfn_pages * sizeof(u32 *)); -+ if (!pfn_pages) -+ goto mem_err; -+ memset(pfn_pages, 0, nr_pfn_pages * sizeof(u32 *)); -+ -+ /* UBOOT using memory */ -+ for (i = max_page; i <= high_page; i++) -+ free_page_mark_used(pg_ub2zero(i)); -+ -+ printf("Allocating %u bytes (nr_pfn_pages %u)\n", -+ nr_pfn_pages * PAGE_SIZE, nr_pfn_pages); -+ -+ for (i = 0; i < nr_pfn_pages; i++) { -+ u32 idx; -+#ifdef CONFIG_SH_DMA -+ pfn_pages[i] = malloc_aligned(PAGE_SIZE, ARCH_DMA_MINALIGN); -+#else -+ pfn_pages[i] = malloc(PAGE_SIZE); -+#endif -+ if (unlikely(!pfn_pages[i])) -+ goto mem_err; -+ if (unlikely(image_page_get_next(pfn_pages[i]) <= 0)) -+ goto read_err; -+ for (idx = 0; idx < PAGE_SIZE / sizeof(u32); idx++) { -+ u32 page = pfn_pages[i][idx]; -+ if (page == ~0UL) -+ break; -+ free_page_mark_used(pg_ub2zero(page)); -+ } -+ } -+ -+ printf("Loading image data pages (%lu pages)\n", -+ swsusp_info->image_pages); -+ -+ remap_orig_page = pg2addr(free_page_get_next()); -+ remap_temp_page = pg2addr(free_page_get_next()); -+ -+ remap_orig = (u32 **)remap_orig_page; -+ remap_temp = (u32 **)remap_temp_page; -+ remap_idx = 0; -+ -+ m = (swsusp_info->image_pages / 10) ? : 1; -+ for (i = 0; i < swsusp_info->image_pages; i++) { -+ u32 page = pfn_pages[i >> 10][i & 0x3ff]; -+ if (unlikely(!pfn_is_valid(page))) { -+ printf("Attempt to restore invalid address %llx\n", -+ pg2phys(page)); -+ continue; -+ } else if (unlikely(pfn_is_excluded(page))) { -+ printf("Attempt to restore excluded address %llx\n", -+ pg2phys(page)); -+ continue; -+ } else if (unlikely(pfn_is_low(page) && -+ pfn_is_occupied(page))) { -+ remap_orig[remap_idx] = pg2addr(page); -+ page = free_page_get_next(); -+ remap_temp[remap_idx] = pg2addr(page); -+ remap_idx++; -+#ifdef PAGEMAP_DEBUG -+ ++total_remap; -+#endif -+ /* If we fill our current page, allocate a new one */ -+ if (remap_idx + 1 == PAGE_SIZE / sizeof(u32)) { -+ u32 *next; -+ -+ next = pg2addr(free_page_get_next()); -+ remap_orig[remap_idx] = next; -+ remap_orig = (u32 **)next; -+ -+ next = pg2addr(free_page_get_next()); -+ remap_temp[remap_idx] = next; -+ remap_temp = (u32 **)next; -+ -+ remap_idx = 0; -+ } -+ } -+ if (image_page_get_next(pg2addr(page)) <= 0) -+ goto read_err; -+ if (!(i % m)) -+ printf("Image loading progress: %3d%%\n", 10 * i / m); -+ } -+ -+ printf("Image loading done.\n"); -+ invalidate_icache_all(); -+ -+ /* put end markers on the remap list */ -+ remap_orig[remap_idx] = (void *) ~0UL; -+ remap_temp[remap_idx] = (void *) ~0UL; -+ -+#ifdef PAGEMAP_DEBUG -+ PAGEMAP_INFO("Number of remap pages:%d\n", -+ total_remap); -+ PAGEMAP_INFO("Number of high pages:%d\n", -+ high_page_images); -+ PAGEMAP_INFO("Last read page %d (%08x)\n", -+ _last_read_pages, -+ _last_read_pages * PAGE_SIZE); -+#endif -+ remap_orig = (u32 **)remap_orig_page; -+ remap_temp = (u32 **)remap_temp_page; -+ -+ /* Make a copy of swsusp_finish in a free data page */ -+ data_page = pg2addr(free_page_get_next()); -+ memcpy(data_page, swsusp_finish_p, PAGE_SIZE); -+ swsusp_finish_copy = (void *) data_page; -+ -+ /* Setup context for swsusp_finish at the end of the data_page */ -+ context = (struct swsusp_finish_context *) (data_page + PAGE_SIZE - -+ sizeof(struct swsusp_finish_context)); -+ context->remap_orig_page = remap_orig_page; -+ context->remap_temp_page = remap_temp_page; -+ memcpy((void *)&context->archdata, (void *)swsusp_info->archdata, -+ sizeof(struct swsusp_archdata)); -+ -+ /* Get a stack pointer for swsusp_finish, growing down from context */ -+ stack_addr = (char *) context; -+ -+#ifdef CONFIG_NETCONSOLE -+ /* -+ * Stop the ethernet stack if NetConsole could have -+ * left it up -+ */ -+ eth_halt(); -+#endif -+ -+#ifdef CONFIG_USB_DEVICE -+ udc_disconnect(); -+#endif -+#ifdef PAGEMAP_DEBUG -+ PAGEMAP_INFO("Execution routine: %08x\n", -+ (u32)context->archdata.cpu_resume_restore_nosave); -+#endif -+ arch_preboot_os(); -+ cleanup_before_linux(); -+ -+ /* Copy the final data from a safe place */ -+ call_with_stack(swsusp_finish_copy, context, stack_addr); -+ -+ return 0; -+ -+mem_err: -+ printf("Not enough memory.\n"); -+ goto err; -+ -+read_err: -+ printf("Read error while restoring image.\n"); -+ -+err: -+ __asm__ volatile ( -+ "mov r0, #0\n" -+ "mcr p15, 0, r0, c7, c5, 0 @ invalidate icache\n" -+ "mcr p15, 0, r0, c7, c10, 4 @ DSB\n" -+ "mcr p15, 0, r0, c7, c5, 4 @ ISB\n" -+ : : : "r0", "memory"); -+ -+ raw_page_exit(); -+ image_page_exit(); -+ free_page_exit(); -+ if (pfn_pages) { -+ for (i = 0; i < nr_pfn_pages; i++) -+ free(pfn_pages[i]); -+ free(pfn_pages); -+ } -+ free(spare_page); -+ -+ return 1; -+} -+ -+U_BOOT_CMD(swsusp, 4, 0, do_swsusp, -+ "Restore SWSUSP hibernation image", -+ " [] []" -+); --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0002-Enable-swsusp-DMA-support.patch b/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0002-Enable-swsusp-DMA-support.patch deleted file mode 100644 index 2a525d39a..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0002-Enable-swsusp-DMA-support.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 33dfe19185b35fc61613070032836beee0f48c45 Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Fri, 9 Jun 2017 20:45:39 +0900 -Subject: [PATCH 2/3] Enable swsusp DMA support - -Signed-off-by: Yuichi Kusakabe ---- - common/cmd_swsusp.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 58 insertions(+) - -diff --git a/common/cmd_swsusp.c b/common/cmd_swsusp.c -index ba05aa4..b1d6c22 100644 ---- a/common/cmd_swsusp.c -+++ b/common/cmd_swsusp.c -@@ -226,6 +226,53 @@ static inline void *malloc_aligned(u32 size, u32 align) - return (void *)(((u32)malloc(size + align) + align - 1) & ~(align - 1)); - } - -+static int block_read(u32 page, void *addr, u32 count) -+{ -+ __u32 cnt; -+ int blk_per_page; -+ -+ blk_per_page = PAGE_SIZE / swap_dev->blksz; -+ cnt = swap_dev->block_read(swap_dev->dev, -+ swap_info.start + (page * blk_per_page), -+ count * blk_per_page, addr); -+ -+ return cnt != count * blk_per_page; -+} -+ -+static int get_block(unsigned char *buffer, u32 size) -+{ -+ int need_num_pages = size / PAGE_SIZE; -+ int read_pages = 0; -+ int count; -+ u64 start; -+ -+ do { -+ u64 prev; -+ count = 0; -+ -+ if (!get_meta()) -+ goto exit; -+ -+ prev = start = meta_map->entries[meta_idx]; -+ do { -+ count++; -+ meta_idx++; -+ if (meta_map->entries[meta_idx] - prev > 1) -+ break; -+ prev = meta_map->entries[meta_idx]; -+ } while (read_pages + count < need_num_pages && -+ meta_idx < ARRAY_SIZE(meta_map->entries)); -+ -+ if (block_read(start, buffer, count)) -+ return -1; -+ read_pages += count; -+ buffer += count * PAGE_SIZE; -+ } while (read_pages < need_num_pages); -+ -+exit: -+ return read_pages * PAGE_SIZE; -+} -+ - #endif - - static int page_read(u32 page, void *addr) -@@ -465,12 +512,23 @@ static int image_page_get_next(void *buffer) - cmp_len = *(size_t *) cmp_buf; - cmp_avail = PAGE_SIZE; - -+#ifdef CONFIG_SH_DMA -+ while (cmp_avail < cmp_len + LZO_HEADER) { -+ /* try to DMA-read whole block */ -+ ret = get_block(cmp_buf + cmp_avail, -+ cmp_len + LZO_HEADER); -+ if (unlikely(ret <= 0)) -+ return ret; -+ cmp_avail += ret; -+ } -+#else - while (cmp_avail < cmp_len + LZO_HEADER) { - ret = raw_page_get_next(cmp_buf + cmp_avail); - if (unlikely(ret <= 0)) - return ret; - cmp_avail += PAGE_SIZE; - } -+#endif - unc_len = LZO_UNC_SIZE; - ret = lzo1x_decompress_safe(cmp_buf + LZO_HEADER, - cmp_len, unc_buf, &unc_len); --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0003-Add-Hibernation-swsuspmem-command-support.patch b/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0003-Add-Hibernation-swsuspmem-command-support.patch deleted file mode 100755 index 8bfcccbbf..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0003-Add-Hibernation-swsuspmem-command-support.patch +++ /dev/null @@ -1,1058 +0,0 @@ -From 4ce00daa904a40701ab6bed44506fe97b8f1da47 Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Fri, 19 May 2017 14:48:38 +0900 -Subject: [PATCH 3/4] Add Hibernation swsuspmem command support - -Signed-off-by: Yuichi Kusakabe ---- - common/Makefile | 2 + - common/cmd_swsuspmem.c | 944 +++++++++++++++++++++++++++++++++++++++++++++ - include/swsuspmem.h | 24 ++ - lib/lzo/lzo1x_decompress.c | 12 +- - 4 files changed, 980 insertions(+), 2 deletions(-) - create mode 100644 common/cmd_swsuspmem.c - create mode 100644 include/swsuspmem.h - -diff --git a/common/Makefile b/common/Makefile -index 54fcc81..7a18486 100644 ---- a/common/Makefile -+++ b/common/Makefile -@@ -160,6 +160,8 @@ COBJS-$(CONFIG_CMD_SETEXPR) += cmd_setexpr.o - COBJS-$(CONFIG_CMD_SPI) += cmd_spi.o - COBJS-$(CONFIG_CMD_SPIBOOTLDR) += cmd_spibootldr.o - COBJS-$(CONFIG_CMD_STRINGS) += cmd_strings.o -+COBJS-$(CONFIG_CMD_SWSUSP) += cmd_swsusp.o -+COBJS-$(CONFIG_CMD_SWSUSPMEM) += cmd_swsuspmem.o - COBJS-$(CONFIG_CMD_TERMINAL) += cmd_terminal.o - COBJS-$(CONFIG_CMD_TIME) += cmd_time.o - COBJS-$(CONFIG_SYS_HUSH_PARSER) += cmd_test.o -diff --git a/common/cmd_swsuspmem.c b/common/cmd_swsuspmem.c -new file mode 100644 -index 0000000..6980aaf ---- /dev/null -+++ b/common/cmd_swsuspmem.c -@@ -0,0 +1,944 @@ -+/* -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include "../arch/arm/cpu/armv7/rmobile/crc32_word4.h" -+#include -+ -+/* Note for Renesas--based boards: -+ * We have the following memory split here: -+ * 0x40000000 - u_boot_lowest - used to store pfns at physical addresses -+ * u_boot_lowest - 0x8000000 - pfns are relocated, and then later put -+ * on physical addresses (swsusp_finish) -+ * 0x8000000 - 0xc0000000 - used to store pfns with physical address -+ * of 0x200000000 (long address), we have to change offset for them. -+ * Any pfn with address > 0x8000000 but less than 0x200000000 -+ * is an error. -+ * For boards which do not have memory above first GB, that will -+ * still work, as they won't have anything above 0x80000000 -+ * in their image, so for standard 2GB setup ou should put -+ * your secong GB in 0x80000000-0xC0000000 range, you can -+ * use MMU for that or if your RAM is continous, it will -+ * naturally be there. */ -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+/* #define PAGEMAP_DEBUG */ -+ -+#ifdef PAGEMAP_DEBUG -+#define SWSUSP_DEBUG_INFO -+#endif -+ -+#define SWSUSP_KEEP_IMAGE -+ -+#ifndef likely -+# define likely(x) __builtin_expect(!!(x), 1) -+# define unlikely(x) __builtin_expect(!!(x), 0) -+#endif -+ -+#define HIBERNATE_SIG "S1SUSPEND" -+#define PAGE_SIZE (4096) -+/* Define depending on CONFIG_LBDAF in kernel */ -+ -+typedef u64 sector_t; -+ -+struct swsusp_header { -+ char reserved[PAGE_SIZE - 20 -+ - sizeof(sector_t) - sizeof(int) - sizeof(u32) -+ - sizeof(CRC32_WORD4_t) - sizeof(u32)]; -+ CRC32_WORD4_t comp_crc32; -+ u32 img_size; /* append */ -+ u32 crc32; -+ sector_t image; -+ unsigned int flags; -+ char orig_sig[10]; -+ char sig[10]; -+} __packed; -+ -+#define __NEW_UTS_LEN 64 -+ -+struct new_utsname { -+ char sysname[__NEW_UTS_LEN + 1]; -+ char nodename[__NEW_UTS_LEN + 1]; -+ char release[__NEW_UTS_LEN + 1]; -+ char version[__NEW_UTS_LEN + 1]; -+ char machine[__NEW_UTS_LEN + 1]; -+ char domainname[__NEW_UTS_LEN + 1]; -+}; -+ -+struct swsusp_archdata { -+ u32 nosave_backup_phys; -+ u32 nosave_begin_phys; -+ u32 nosave_end_phys; -+ void (*cpu_resume_restore_nosave)(u32, u32, u32); -+}; -+ -+struct swsusp_info { -+ struct new_utsname uts; -+ u32 version_code; -+ unsigned long num_physpages; -+ int cpus; -+ unsigned long image_pages; -+ unsigned long pages; -+ unsigned long size; -+ char archdata[1024]; -+}; -+ -+struct swap_map_page { -+ u64 entries[PAGE_SIZE / sizeof(u64) - 1]; -+ u64 next_swap; -+}; -+ -+struct swsusp_finish_context { -+ void *remap_orig_page; -+ void *remap_temp_page; -+ struct swsusp_archdata archdata; -+}; -+#ifdef FTEN_SPF_SDRAM_BASE -+#define USED_ADDRESS_TOP (CONFIG_SYS_SDRAM_BASE) -+#define USED_ADDRESS_END (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_LOAD_OFFSET) -+#else -+#define USED_ADDRESS_TOP (0x40000000) -+#define USED_ADDRESS_END (0x48000000) -+#endif -+#define PG_UB2ZERO(pg) ((pg) - CONFIG_SYS_SDRAM_BASE / PAGE_SIZE) -+static u32 const exclude_min_page = -+ (USED_ADDRESS_TOP) / PAGE_SIZE; -+static u32 const exclude_max_page = -+ (USED_ADDRESS_END - 1) / PAGE_SIZE; -+static u32 const exclude_min_page_ub = -+ PG_UB2ZERO((USED_ADDRESS_TOP) / PAGE_SIZE); -+static u32 const exclude_max_page_ub = -+ PG_UB2ZERO((USED_ADDRESS_END-1) / PAGE_SIZE); -+ -+/* -+ #define SD_PLATFORM_MODE 1 -+ #define SD_CRC32_MODE 4 -+ */ -+#define SF_NOCOMPRESS_MODE 2 -+ -+#define LZO_HEADER sizeof(size_t) -+ -+/* Number of pages/bytes we'll compress at one time. */ -+#define LZO_UNC_PAGES 32 -+#define LZO_UNC_SIZE (LZO_UNC_PAGES * PAGE_SIZE) -+ -+/* Number of pages/bytes we need for compressed data (worst case). */ -+#define LZO_CMP_PAGES DIV_ROUND_UP(lzo1x_worst_compress(LZO_UNC_SIZE) + \ -+ LZO_HEADER, PAGE_SIZE) -+#define LZO_CMP_SIZE (LZO_CMP_PAGES * PAGE_SIZE) -+ -+static struct swsuspmem_hook *_hook; -+ -+#define CALL_HOOK(f, param) \ -+ do { \ -+ if (_hook != NULL) { \ -+ if (_hook->f != NULL) \ -+ _hook->f(param); \ -+ } \ -+ } while (0) -+ -+#ifdef PAGEMAP_DEBUG -+static int debugout; -+static int _last_read_pages; -+#define PAGEMAP_INFO(_msg, ...) \ -+ do { \ -+ if (debugout == 1) \ -+ printf(_msg, ## __VA_ARGS__); \ -+ } while (0) -+#endif -+ -+#define HIGHMEM_PHYS_ADDR 0x200000000ULL -+#define HIGHMEM_VA 0x80000000UL -+#define HIGHMEM_PFN (HIGHMEM_PHYS_ADDR / PAGE_SIZE) -+#define LOW_TOP 0x80000000 -+#define LOW_TOP_PFN (LOW_TOP / PAGE_SIZE) -+#define LOW_BOTTOM CONFIG_SYS_SDRAM_BASE -+#define LOW_BOTTOM_PFN (LOW_BOTTOM / PAGE_SIZE) -+#define TOP_ADDRESS 0x240000000ULL -+ -+static inline int pfn_is_low(u32 pfn) -+{ -+ return ((pfn >= LOW_BOTTOM_PFN) && (pfn < LOW_TOP_PFN)); -+} -+ -+static inline int pfn_is_high(u32 pfn) -+{ -+ return (pfn >= HIGHMEM_PFN); -+} -+ -+#define pfn_is_valid(p) (pfn_is_low(p) || pfn_is_high(p)) -+ -+static inline int pfn_is_excluded(u32 pfn) -+{ -+ /* Allow bottom 2 pages for exception vectors */ -+ if (pfn < (LOW_BOTTOM_PFN + 2)) -+ return 0; -+ else if (exclude_min_page >= exclude_max_page) -+ return 0; -+ else -+ return (pfn >= exclude_min_page) && (pfn <= exclude_max_page); -+} -+/* PFN to zero-counted page */ -+static inline u32 pg_ub2zero(u32 pg) -+{ -+ return pg - LOW_BOTTOM_PFN; -+} -+ -+/* zero-counted page to PFN */ -+static inline u32 pg_zero2ub(u32 pg) -+{ -+ return pg + LOW_BOTTOM_PFN; -+} -+ -+/* PFN to physical address (64-bit (40-bit)) */ -+static inline u64 pg2phys(u32 page) -+{ -+ return (u64) page * PAGE_SIZE; -+} -+ -+/* PFN to virtual address */ -+static inline void *pg2addr(u32 page) -+{ -+ void *addr; -+ if (page >= HIGHMEM_PFN) -+ addr = (void *) (u32)(pg2phys(page - HIGHMEM_PFN) + HIGHMEM_VA); -+ else -+ addr = (void *) (u32)pg2phys(page); -+ -+ return addr; -+} -+/* Virtual address to PFN */ -+static inline u32 addr2pg(void *addr) -+{ -+ return ((u32)(addr)) / PAGE_SIZE; -+} -+static void *offt_addr = (void *)0x44000000; -+static int page_read_mem(u64 page, void *addr) -+{ -+ memcpy(addr, (u8 *)offt_addr + page * PAGE_SIZE, PAGE_SIZE); -+ return 0; -+} -+ -+#ifndef SWSUSP_KEEP_IMAGE -+static int page_write_mem(u32 page, void *addr) -+{ -+ memcpy((u8 *)offt_addr + page * PAGE_SIZE, addr, PAGE_SIZE); -+ return 0; -+} -+#endif -+ -+#define FAST_COPY -+static void __attribute__((section(".rodata"))) -+ __attribute__((optimize("O6", "unroll-loops"))) -+swsusp_finish(void *userdata) -+{ -+ struct swsusp_finish_context *context = userdata; -+ u32 **remap_orig; -+ u32 **remap_temp; -+ int idx = 0; -+ const int lastidx = PAGE_SIZE / sizeof(u32) - 1; -+ -+ remap_orig = context->remap_orig_page; -+ remap_temp = context->remap_temp_page; -+ -+ __asm__ volatile ("" : : : "memory"); -+ for (;;) { -+ u32 *orig, *temp; -+ int count; -+ -+ /* Linked list to next page */ -+ if (idx == lastidx) { -+ remap_orig = (u32 **)remap_orig[idx]; -+ remap_temp = (u32 **)remap_temp[idx]; -+ idx = 0; -+ } -+ if (unlikely(!remap_orig || remap_orig[idx] == (u32 *)~0UL)) -+ break; -+ orig = remap_orig[idx]; -+ temp = remap_temp[idx]; -+#ifdef FAST_COPY -+ count = PAGE_SIZE / sizeof(u32) / 32; -+ __asm__ volatile ( -+ "1:\n" -+ "ldmia %[rtemp]!, {r0-r7}\n" -+ "stmia %[rorig]!, {r0-r7}\n" -+ "ldmia %[rtemp]!, {r0-r7}\n" -+ "stmia %[rorig]!, {r0-r7}\n" -+ "ldmia %[rtemp]!, {r0-r7}\n" -+ "stmia %[rorig]!, {r0-r7}\n" -+ "ldmia %[rtemp]!, {r0-r7}\n" -+ "subs %[count], %[count], #1\n" -+ "stmia %[rorig]!, {r0-r7}\n" -+ "bgt 1b\n" -+ : /* No outputs */ -+ : -+ [rorig]"h" (orig), -+ [rtemp]"h" (temp), -+ [count]"h" (count) -+ : "r0", "r1", "r2", "r3", -+ "r4", "r5", "r6", "r7", -+ "cc", "memory" -+ ); -+#else -+ count = PAGE_SIZE / sizeof(u32); -+ while (count--) -+ *orig++ = *temp++; -+#endif -+#ifdef SWSUSP_CHECK_COPY_RESULT -+ count = PAGE_SIZE / sizeof(u32); -+ orig = remap_orig[idx]; -+ temp = remap_temp[idx]; -+ __asm__ volatile ( -+ "1:\n" -+ "ldr r3, [%[rorig]]\n" -+ "ldr r4, [%[rtemp]]\n" -+ "cmp r3, r4\n" -+ "bne 2f\n" -+ "add %[rorig], %[rorig], #4\n" -+ "add %[rtemp], %[rtemp], #4\n" -+ "subs %[count], %[count], #1\n" -+ "bgt 1b\n" -+ "b 3f\n" -+ "2:b 2b\n" -+ "3:\n" -+ : -+ [rorig]"+r" (orig), -+ [rtemp]"+r" (temp), -+ [count]"+r" (count) -+ : -+ : "r3", "r4", "cc", "memory" -+ ); -+#endif -+ idx++; -+ } -+ context->archdata.cpu_resume_restore_nosave( -+ context->archdata.nosave_backup_phys, -+ context->archdata.nosave_begin_phys, -+ context->archdata.nosave_end_phys); -+} -+ -+static struct swap_map_page *meta_map; -+static u64 meta_map_next; -+static u64 meta_map_curr; -+static u64 meta_map_start; -+static int meta_idx; -+ -+static int raw_page_init(u64 start) -+{ -+ meta_map = malloc(PAGE_SIZE); -+ if (!meta_map) -+ return -1; -+ meta_map_next = 0; -+ meta_map_curr = 0; -+ meta_map_start = start; -+ return 0; -+} -+ -+static void raw_page_start(void) -+{ -+ meta_idx = ARRAY_SIZE(meta_map->entries); -+ meta_map_next = meta_map_start; -+} -+ -+static int raw_page_get_next(void *buffer) -+{ -+ if (meta_idx == ARRAY_SIZE(meta_map->entries)) { -+ if (!meta_map_next) -+ return 0; -+ if (meta_map_curr != meta_map_next) { -+#ifdef PAGEMAP_DEBUG -+ PAGEMAP_INFO("META: %d (%08x)\n", (int)meta_map_next, -+ (unsigned int)(meta_map_next -+ * PAGE_SIZE)); -+#endif -+ if (page_read_mem(meta_map_next, meta_map)) -+ return -1; -+ meta_map_curr = meta_map_next; -+ meta_map_next = meta_map->next_swap; -+ } -+ meta_idx = 0; -+ } -+#ifdef PAGEMAP_DEBUG -+ { -+ static unsigned int pre; -+ if ((pre + 1) != meta_map->entries[meta_idx]) { -+ PAGEMAP_INFO("DATA-Skiped: %d->%d (%08x->%08x)\n", -+ pre, (unsigned int)meta_map->entries[meta_idx], -+ pre * PAGE_SIZE, -+ (unsigned int)(meta_map->entries[meta_idx] -+ * PAGE_SIZE)); -+ } -+ pre = meta_map->entries[meta_idx]; -+ _last_read_pages = pre; -+ } -+#endif -+ if (page_read_mem(meta_map->entries[meta_idx++], buffer)) -+ return -1; -+ -+ return 1; -+} -+ -+static void raw_page_exit(void) -+{ -+ free(meta_map); -+ meta_map = NULL; -+} -+ -+static int image_pages_avail; -+static unsigned char *unc_buf, *cmp_buf; -+static int unc_offset; -+ -+static int image_page_init(int compressed) -+{ -+ if (!compressed) -+ return 1; -+ -+ unc_buf = malloc(LZO_UNC_SIZE); -+ cmp_buf = malloc(LZO_CMP_SIZE); -+ if (!unc_buf || !cmp_buf) { -+ printf("not enogh memory\n"); -+ return 1; -+ } -+ return 0; -+} -+ -+static void image_page_start(void) -+{ -+ image_pages_avail = 0; -+} -+ -+static int image_page_get_next(void *buffer) -+{ -+#ifdef CONFIG_LZO -+ if (!image_pages_avail) { -+ int ret; -+ size_t unc_len, cmp_len, cmp_avail; -+ -+ ret = raw_page_get_next(cmp_buf); -+ if (ret <= 0) -+ return ret; -+ -+ cmp_len = *(size_t *) cmp_buf; -+ cmp_avail = PAGE_SIZE; -+ -+ while (cmp_avail < cmp_len + LZO_HEADER) { -+ ret = raw_page_get_next(cmp_buf + cmp_avail); -+ if (unlikely(ret <= 0)) -+ return ret; -+ cmp_avail += PAGE_SIZE; -+ } -+ -+ unc_len = LZO_UNC_SIZE; -+ ret = lzo1x_decompress_safe(cmp_buf + LZO_HEADER, -+ cmp_len, unc_buf, &unc_len); -+ if (unlikely(ret != LZO_E_OK)) { -+ printf("Decompression failure: %d," -+ " cmp_buf = %p," -+ " cmp_len = %d, unc_len = %d\n", -+ ret, cmp_buf + LZO_HEADER, cmp_len, -+ unc_len); -+ return ret; -+ } -+ image_pages_avail = unc_len / PAGE_SIZE; -+ unc_offset = 0; -+ } -+ -+ memcpy(buffer, unc_buf + unc_offset, PAGE_SIZE); -+ unc_offset += PAGE_SIZE; -+ image_pages_avail--; -+ return 1; -+#else -+ printf("No LZO support in u-boot.\n"); -+ return -1; -+#endif -+} -+ -+static void image_page_exit(void) -+{ -+ free(unc_buf); -+ free(cmp_buf); -+ unc_buf = cmp_buf = NULL; -+} -+ -+static void bitmap_set(u32 *bm, unsigned int bit) -+{ -+ bm[bit >> 5] |= (1 << (bit & 0x1f)); -+} -+ -+static int bitmap_is_set(u32 *bm, unsigned int bit) -+{ -+ return !!(bm[bit >> 5] & (1 << (bit & 0x1f))); -+} -+ -+static u32 *used_bitmap; -+static u32 next_free_page; -+static u32 total_pages; -+ -+static int free_page_init(void) -+{ -+ total_pages = (u32)((TOP_ADDRESS - -+ LOW_BOTTOM) / PAGE_SIZE); /* 2GB */ -+ used_bitmap = malloc(total_pages * sizeof(u32) / 32); -+ if (!used_bitmap) -+ return -1; -+ return 0; -+} -+ -+static void free_page_start(int offset) -+{ -+ memset(used_bitmap, 0, total_pages * sizeof(u32) / 32); -+ next_free_page = pg_ub2zero(offset); -+} -+ -+static void free_page_mark_used(u32 page); -+/* Returns full-address based pages */ -+static int free_page_get_next(void) -+{ -+ while (bitmap_is_set(used_bitmap, next_free_page)) -+ next_free_page++; -+ free_page_mark_used(next_free_page); -+ return pg_zero2ub(next_free_page++); -+} -+ -+static void free_page_mark_used(u32 page) -+{ -+ bitmap_set(used_bitmap, page); -+} -+ -+static void free_page_exit(void) -+{ -+ free(used_bitmap); -+ used_bitmap = NULL; -+} -+ -+void set_swsuspmem_hook(struct swsuspmem_hook *hook) -+{ -+ _hook = hook; -+} -+ -+/* -+ * rtn = 1 : Hibernation image OK. -+ * rtn = 0 : Hibernation image NG. -+ * */ -+int do_checksnapimage(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -+{ -+ __u32 offset = 0; -+ void *spare_page = NULL; -+ struct swsusp_header *swsusp_header; -+ CRC32_WORD4_t calc_crc; -+ -+ /* Address hack */ -+ if (argc > 1) { -+ char *ep; -+ offt_addr = (void *)simple_strtoul(argv[1], &ep, 16); -+ if (*ep) { -+ printf("Invalid address\n"); -+ return 0; -+ } -+ } -+ -+ spare_page = malloc(PAGE_SIZE); -+ if (!spare_page) -+ goto mem_err; -+ -+ swsusp_header = spare_page; -+ if (page_read_mem(offset, swsusp_header)) -+ goto read_err; -+ -+#ifdef SWSUSP_DEBUG_INFO -+ PAGEMAP_INFO("swssp_header:%x\n", swsusp_header); -+ PAGEMAP_INFO(" comp_crc: \n"); -+ PAGEMAP_INFO(" img_size: %d\n", swsusp_header->img_size); -+ PAGEMAP_INFO(" image(swap firest sector): %08x\n", -+ (unsigned int)swsusp_header->image); -+ PAGEMAP_INFO(" flags: %08x\n", swsusp_header->flags); -+ PAGEMAP_INFO(" orig_sig:%s\n", swsusp_header->orig_sig); -+ PAGEMAP_INFO(" sig:%s\n", swsusp_header->sig); -+#endif /* SWSUSP_DEBUG_INFO */ -+ -+ if (memcmp(HIBERNATE_SIG, swsusp_header->sig, 10) -+ || (swsusp_header->img_size == 0) -+ || (swsusp_header->img_size > 0x03fff000)) { -+ printf("No hibernation image present\n"); -+ CALL_HOOK(err_hook, SWSUSPMEM_BROKENIMAGE); -+ return 0; -+ } -+ memset(&calc_crc, 0, sizeof(calc_crc)); -+ -+ calc_crc32x4((u8 *)((unsigned long)offt_addr + PAGE_SIZE), -+ swsusp_header->img_size, &calc_crc); -+ -+ if (memcmp(&calc_crc, &swsusp_header->comp_crc32, -+ sizeof(CRC32_WORD4_t))) { -+ printf("Bad CRC for image, image: %08x:%08x:" -+ "%08x:%08x, calc: %08x:%08x:%08x:%08x\n", -+ swsusp_header->comp_crc32.crc_w[0], -+ swsusp_header->comp_crc32.crc_w[1], -+ swsusp_header->comp_crc32.crc_w[2], -+ swsusp_header->comp_crc32.crc_w[3], -+ calc_crc.crc_w[0], calc_crc.crc_w[1], -+ calc_crc.crc_w[2], calc_crc.crc_w[3]); -+ CALL_HOOK(err_hook, SWSUSPMEM_BROKENIMAGE); -+ return 0; -+ } -+ free(spare_page); -+ printf("Hibernation image OK!.\n"); -+ -+ return 1; -+ -+mem_err: -+ printf("Not enough memory.\n"); -+ CALL_HOOK(err_hook, SWSUSPMEM_ENOMEM); -+ goto err; -+ -+read_err: -+ printf("Read error while restoring image.\n"); -+ -+err: -+ __asm__ volatile ( -+ "mov r0, #0\n" -+ "mcr p15, 0, r0, c7, c5, 0 @ invalidate icache\n" -+ "mcr p15, 0, r0, c7, c10, 4 @ DSB\n" -+ "mcr p15, 0, r0, c7, c5, 4 @ ISB\n" -+ : : : "r0", "memory"); -+ -+ free(spare_page); -+ -+ CALL_HOOK(err_hook, SWSUSPMEM_RESTOREFAIL); -+ return 0; -+} -+ -+U_BOOT_CMD(checksnapimage, 2, 2, do_checksnapimage, -+ "Check hibernation image data from memory", -+ "
]" -+); -+ -+int do_swsuspmem(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -+{ -+ __u32 offset = 0; -+ void *spare_page = NULL; -+ struct swsusp_header *swsusp_header; -+ struct swsusp_info *swsusp_info; -+ struct swsusp_finish_context *context; -+ int max_page; -+ int i; -+ u32 nr_pfn_pages; -+ u32 **pfn_pages = NULL; -+ u32 *remap_orig_page; -+ u32 *remap_temp_page; -+ u32 **remap_orig; -+ u32 **remap_temp; -+ int remap_idx; -+ void (*swsusp_finish_copy)(void *); -+ char *data_page; -+ char *stack_addr; -+ CRC32_WORD4_t calc_crc; -+ int high_page; -+ -+#ifdef PAGEMAP_DEBUG -+ int high_page_images = 0; -+ int total_remap = 0; -+ if (getenv("hybdebug") != NULL) -+ debugout = 1; -+#endif -+ /* Address hack */ -+ void *swsusp_finish_p = (void *)((u32)swsusp_finish & ~0x1); -+ if (argc > 1) { -+ char *ep; -+ offt_addr = (void *)simple_strtoul(argv[1], &ep, 16); -+ if (*ep) { -+ printf("Invalid address\n"); -+ return 1; -+ } -+ } -+ -+ /* Allow for 16 pages of stack */ -+ max_page = gd->start_addr_sp / PAGE_SIZE - 32; -+ high_page = (((gd->relocaddr + _bss_end_ofs) -+ + (PAGE_SIZE - 1)) / PAGE_SIZE) + 1; -+#define pfn_is_occupied(pfn) (page > max_page && page <= high_page) -+#ifdef PAGEMAP_DEBUG -+ PAGEMAP_INFO(" *gd->start_addr_sp:%p\n", -+ (void *)gd->start_addr_sp); -+ PAGEMAP_INFO(" *gd->relocaddr:%p\n", -+ (void *)gd->relocaddr); -+ PAGEMAP_INFO(" *bss_start_offset:%d bss_end_offset:%d\n", -+ (int)_bss_start_ofs, (int)_bss_end_ofs); -+ PAGEMAP_INFO(" UBOOT own memory [%p-%p]\n", -+ pg2addr(max_page), pg2addr(high_page)); -+#endif -+ if (free_page_init()) -+ goto mem_err; -+ free_page_start(exclude_max_page + 1); -+ -+ spare_page = malloc(PAGE_SIZE); -+ if (!spare_page) -+ goto mem_err; -+ -+ swsusp_header = spare_page; -+ if (page_read_mem(offset, swsusp_header)) -+ goto read_err; -+ -+#ifdef SWSUSP_DEBUG_INFO -+ PAGEMAP_INFO("swssp_header:\n"); -+ PAGEMAP_INFO(" comp_crc: \n"); -+ PAGEMAP_INFO(" img_size: %d\n", swsusp_header->img_size); -+ PAGEMAP_INFO(" image(swap firest sector): %08x\n", -+ (unsigned int)swsusp_header->image); -+ PAGEMAP_INFO(" flags: %08x\n", swsusp_header->flags); -+ PAGEMAP_INFO(" orig_sig:%s\n", swsusp_header->orig_sig); -+ PAGEMAP_INFO(" sig:%s\n", swsusp_header->sig); -+#endif /* SWSUSP_DEBUG_INFO */ -+ -+ if (memcmp(HIBERNATE_SIG, swsusp_header->sig, 10) -+ || (swsusp_header->img_size == 0) -+ || (swsusp_header->img_size > 0x03fff000)) { -+ printf("No hibernation image present\n"); -+ CALL_HOOK(err_hook, SWSUSPMEM_BROKENIMAGE); -+ return 0; -+ } -+ memset(&calc_crc, 0, sizeof(calc_crc)); -+ -+ calc_crc32x4((u8 *)((unsigned long)offt_addr + PAGE_SIZE), -+ swsusp_header->img_size, &calc_crc); -+ -+ if (memcmp(&calc_crc, &swsusp_header->comp_crc32, -+ sizeof(CRC32_WORD4_t))) { -+ printf("Bad CRC for image, image: %08x:%08x:" -+ "%08x:%08x, calc: %08x:%08x:%08x:%08x\n", -+ swsusp_header->comp_crc32.crc_w[0], -+ swsusp_header->comp_crc32.crc_w[1], -+ swsusp_header->comp_crc32.crc_w[2], -+ swsusp_header->comp_crc32.crc_w[3], -+ calc_crc.crc_w[0], calc_crc.crc_w[1], -+ calc_crc.crc_w[2], calc_crc.crc_w[3]); -+ CALL_HOOK(err_hook, SWSUSPMEM_BROKENIMAGE); -+ return 0; -+ } -+ -+ /* Overwrite header if necessary */ -+#ifndef SWSUSP_KEEP_IMAGE -+ if (memcmp(swsusp_header->sig, swsusp_header->orig_sig, 10)) { -+ memcpy(swsusp_header->sig, swsusp_header->orig_sig, 10); -+ if (page_write_mem(offset, swsusp_header)) -+ printf("Write error resetting header\n"); -+ } -+#endif -+ -+ if (raw_page_init(swsusp_header->image)) -+ goto mem_err; -+ raw_page_start(); -+ -+ if (image_page_init(!(swsusp_header->flags & SF_NOCOMPRESS_MODE))) -+ goto mem_err; -+ image_page_start(); -+ -+ swsusp_info = spare_page; -+ if (raw_page_get_next(swsusp_info) <= 0) -+ goto read_err; -+ -+#ifdef SWSUSP_DEBUG_INFO -+ PAGEMAP_INFO("swsup_info:\n"); -+ PAGEMAP_INFO(" utsname.sysname:%s\n", -+ swsusp_info->uts.sysname); -+ PAGEMAP_INFO(" nodename:%s\n", -+ swsusp_info->uts.nodename); -+ PAGEMAP_INFO(" release:%s\n", -+ swsusp_info->uts.release); -+ PAGEMAP_INFO(" version:%s\n", -+ swsusp_info->uts.version); -+ PAGEMAP_INFO(" machine:%s\n", -+ swsusp_info->uts.machine); -+ PAGEMAP_INFO(" vesion_code:%#08x\n", -+ (unsigned int)swsusp_info->version_code); -+ PAGEMAP_INFO(" num_physpages:%d\n", -+ (unsigned int)swsusp_info->num_physpages); -+ PAGEMAP_INFO(" pages :%d\n", -+ (unsigned int)swsusp_info->pages); -+ PAGEMAP_INFO(" size :%d\n", -+ (unsigned int)swsusp_info->size); -+#endif -+ -+ nr_pfn_pages = (swsusp_info->image_pages * 4 + PAGE_SIZE - 1) / -+ PAGE_SIZE; -+ pfn_pages = malloc(nr_pfn_pages * sizeof(u32 *)); -+ if (!pfn_pages) -+ goto mem_err; -+ memset(pfn_pages, 0, nr_pfn_pages * sizeof(u32 *)); -+ -+ /* UBOOT using memory */ -+ for (i = max_page; i <= high_page; i++) -+ free_page_mark_used(pg_ub2zero(i)); -+ -+ printf("Allocating %u bytes (nr_pfn_pages %u)\n", -+ nr_pfn_pages * PAGE_SIZE, nr_pfn_pages); -+ -+ for (i = 0; i < nr_pfn_pages; i++) { -+ u32 idx; -+ pfn_pages[i] = malloc(PAGE_SIZE); -+ memset(pfn_pages[i], 0xff, PAGE_SIZE); -+ if (unlikely(!pfn_pages[i])) -+ goto mem_err; -+ if (unlikely(image_page_get_next(pfn_pages[i]) <= 0)) -+ goto read_err; -+ for (idx = 0; idx < PAGE_SIZE / sizeof(u32); idx++) { -+ u32 page = pfn_pages[i][idx]; -+ if (page == ~0UL) /* End of list of pages */ -+ break; -+ free_page_mark_used(pg_ub2zero(page)); -+ } -+ } -+ -+ printf("Loading image data pages (%lu pages)\n", -+ swsusp_info->image_pages); -+ -+ remap_orig_page = pg2addr(free_page_get_next()); -+ remap_temp_page = pg2addr(free_page_get_next()); -+ -+ remap_orig = (u32 **)remap_orig_page; -+ remap_temp = (u32 **)remap_temp_page; -+ remap_idx = 0; -+ -+ for (i = 0; i < swsusp_info->image_pages; i++) { -+ u32 page = pfn_pages[i >> 10][i & 0x3ff]; -+ if (unlikely(!pfn_is_valid(page))) { -+ printf("Attempt to restore invalid address %llx\n", -+ pg2phys(page)); -+ continue; -+ } else if (unlikely(pfn_is_excluded(page))) { -+ printf("Attempt to restore excluded address %llx\n", -+ pg2phys(page)); -+ continue; -+ } else if (unlikely(pfn_is_low(page) && -+ pfn_is_occupied(page))) { -+ remap_orig[remap_idx] = pg2addr(page); -+ page = free_page_get_next(); -+ remap_temp[remap_idx] = pg2addr(page); -+ remap_idx++; -+#ifdef PAGEMAP_DEBUG -+ ++total_remap; -+#endif -+ /* If we fill our current page, allocate a new one */ -+ if (remap_idx + 1 == PAGE_SIZE / sizeof(u32)) { -+ u32 *next; -+ -+ next = pg2addr(free_page_get_next()); -+ remap_orig[remap_idx] = next; -+ remap_orig = (u32 **)next; -+ -+ next = pg2addr(free_page_get_next()); -+ remap_temp[remap_idx] = next; -+ remap_temp = (u32 **)next; -+ -+ remap_idx = 0; -+ } -+ } -+ if (image_page_get_next(pg2addr(page)) <= 0) -+ goto read_err; -+ } -+ -+ printf("Image loading done.\n"); -+ invalidate_icache_all(); -+ -+ CALL_HOOK(resume_boot, SWSUSPMEM_IMAGEDONE); -+ /* put end markers on the remap list */ -+ remap_orig[remap_idx] = (void *) ~0UL; -+ remap_temp[remap_idx] = (void *) ~0UL; -+ -+#ifdef PAGEMAP_DEBUG -+ PAGEMAP_INFO("Number of remap pages:%d\n", total_remap); -+ PAGEMAP_INFO("Number of high pages:%d\n", high_page_images); -+ PAGEMAP_INFO("Last read page %d (%08x)\n", -+ _last_read_pages, _last_read_pages * PAGE_SIZE); -+#endif -+ remap_orig = (u32 **)remap_orig_page; -+ remap_temp = (u32 **)remap_temp_page; -+ -+ /* Make a copy of swsusp_finish in a free data page */ -+ data_page = pg2addr(free_page_get_next()); -+ memcpy(data_page, swsusp_finish_p, PAGE_SIZE); -+ swsusp_finish_copy = (void *) data_page; -+ -+ /* Setup context for swsusp_finish at the end of the data_page */ -+ context = (struct swsusp_finish_context *) (data_page + PAGE_SIZE - -+ sizeof(struct swsusp_finish_context)); -+ context->remap_orig_page = remap_orig_page; -+ context->remap_temp_page = remap_temp_page; -+ memcpy((void *)&context->archdata, (void *)swsusp_info->archdata, -+ sizeof(struct swsusp_archdata)); -+ -+ /* Get a stack pointer for swsusp_finish, growing down from context */ -+ stack_addr = (char *) context; -+ -+#ifdef CONFIG_NETCONSOLE -+ /* -+ * Stop the ethernet stack if NetConsole could have -+ * left it up -+ */ -+ eth_halt(); -+#endif -+#ifdef CONFIG_USB_DEVICE -+ udc_disconnect(); -+#endif -+ arch_preboot_os(); -+ cleanup_before_linux(); -+ -+ CALL_HOOK(resume_boot, SWSUSPMEM_RESUME); -+ /* Copy the final data from a safe place */ -+ call_with_stack(swsusp_finish_copy, context, stack_addr); -+ -+ return 0; -+ -+mem_err: -+ printf("Not enough memory.\n"); -+ CALL_HOOK(err_hook, SWSUSPMEM_ENOMEM); -+ goto err; -+ -+read_err: -+ printf("Read error while restoring image.\n"); -+ -+err: -+ __asm__ volatile ( -+ "mov r0, #0\n" -+ "mcr p15, 0, r0, c7, c5, 0 @ invalidate icache\n" -+ "mcr p15, 0, r0, c7, c10, 4 @ DSB\n" -+ "mcr p15, 0, r0, c7, c5, 4 @ ISB\n" -+ : : : "r0", "memory"); -+ -+ raw_page_exit(); -+ image_page_exit(); -+ free_page_exit(); -+ if (pfn_pages) { -+ for (i = 0; i < nr_pfn_pages; i++) -+ free(pfn_pages[i]); -+ free(pfn_pages); -+ } -+ free(spare_page); -+ -+ CALL_HOOK(err_hook, SWSUSPMEM_RESTOREFAIL); -+ return 1; -+} -+ -+U_BOOT_CMD(swsuspmem, 2, 2, do_swsuspmem, -+ "Restore SWSUSP hibernation image from memory", -+ "
]" -+); -diff --git a/include/swsuspmem.h b/include/swsuspmem.h -new file mode 100644 -index 0000000..3b353ea ---- /dev/null -+++ b/include/swsuspmem.h -@@ -0,0 +1,24 @@ -+#ifndef _SWSUSPMEM_H_ -+#define _SWSUSPMEM_H_ -+ -+enum { SWSUSPMEM_NORM = 0, -+ SWSUSPMEM_NOIMAGE = 0x01, -+ SWSUSPMEM_BROKENIMAGE = 0x02, -+ SWSUSPMEM_ENOMEM = 0x80, -+ SWSUSPMEM_RESTOREFAIL = 0x81, -+}; -+ -+enum { SWSUSPMEM_IMAGEDONE = 0x01, -+ SWSUSPMEM_RESUME = 0x02 -+}; -+ -+struct swsuspmem_hook { -+ void (*err_hook)(int errcode); -+ void (*resume_boot)(int param); -+}; -+ -+void set_swsuspmem_hook(struct swsuspmem_hook *hook); -+void arch_preboot_os(void); -+void call_with_stack(void (*fn)(void *), -+ void *userdata, void *stack); -+#endif -diff --git a/lib/lzo/lzo1x_decompress.c b/lib/lzo/lzo1x_decompress.c -index e6ff708..ebdf10b 100644 ---- a/lib/lzo/lzo1x_decompress.c -+++ b/lib/lzo/lzo1x_decompress.c -@@ -68,13 +68,14 @@ int lzop_decompress(const unsigned char *src, size_t src_len, - unsigned char *start = dst; - const unsigned char *send = src + src_len; - u32 slen, dlen; -- size_t tmp; -+ size_t tmp, remaining; - int r; - - src = parse_header(src); - if (!src) - return LZO_E_ERROR; - -+ remaining = *dst_len; - while (src < send) { - /* read uncompressed block size */ - dlen = get_unaligned_be32(src); -@@ -93,18 +94,25 @@ int lzop_decompress(const unsigned char *src, size_t src_len, - if (slen <= 0 || slen > dlen) - return LZO_E_ERROR; - -+ /* abort if buffer ran out of room */ -+ if (dlen > remaining) -+ return LZO_E_OUTPUT_OVERRUN; -+ - /* decompress */ - tmp = dlen; - r = lzo1x_decompress_safe((u8 *) src, slen, dst, &tmp); - -- if (r != LZO_E_OK) -+ if (r != LZO_E_OK) { -+ *dst_len = dst - start; - return r; -+ } - - if (dlen != tmp) - return LZO_E_ERROR; - - src += slen; - dst += dlen; -+ remaining -= dlen; - } - - return LZO_E_INPUT_OVERRUN; --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0003-Add-hibernation-image-area.patch b/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0003-Add-hibernation-image-area.patch deleted file mode 100644 index e6682354e..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0003-Add-hibernation-image-area.patch +++ /dev/null @@ -1,91 +0,0 @@ -From eae2ee2090f8c9c140a1b766bd7312be5f0f308d Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Fri, 9 Jun 2017 20:46:54 +0900 -Subject: [PATCH 3/3] Add hibernation image area - -0x40000000 <-> 0x77FFFFFF : kernel -0x78000000 <-> 0x7FFFFFFF : hibernation image area - -Signed-off-by: Yuichi Kusakabe ---- - common/cmd_swsuspmem.c | 20 +++++++++++++------- - 1 file changed, 13 insertions(+), 7 deletions(-) - -diff --git a/common/cmd_swsuspmem.c b/common/cmd_swsuspmem.c -index 6980aaf..dbc000c 100644 ---- a/common/cmd_swsuspmem.c -+++ b/common/cmd_swsuspmem.c -@@ -116,8 +116,9 @@ struct swsusp_finish_context { - #define USED_ADDRESS_TOP (CONFIG_SYS_SDRAM_BASE) - #define USED_ADDRESS_END (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_LOAD_OFFSET) - #else --#define USED_ADDRESS_TOP (0x40000000) --#define USED_ADDRESS_END (0x48000000) -+#define CONFIG_SYS_LOAD_OFFSET 0x0 -+#define USED_ADDRESS_TOP (CONFIG_SYS_SDRAM_BASE) -+#define USED_ADDRESS_END (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_LOAD_OFFSET) - #endif - #define PG_UB2ZERO(pg) ((pg) - CONFIG_SYS_SDRAM_BASE / PAGE_SIZE) - static u32 const exclude_min_page = -@@ -157,7 +158,7 @@ static struct swsuspmem_hook *_hook; - } while (0) - - #ifdef PAGEMAP_DEBUG --static int debugout; -+static int debugout = 1; - static int _last_read_pages; - #define PAGEMAP_INFO(_msg, ...) \ - do { \ -@@ -231,7 +232,7 @@ static inline u32 addr2pg(void *addr) - { - return ((u32)(addr)) / PAGE_SIZE; - } --static void *offt_addr = (void *)0x44000000; -+static void *offt_addr = (void *)0x78000000; - static int page_read_mem(u64 page, void *addr) - { - memcpy(addr, (u8 *)offt_addr + page * PAGE_SIZE, PAGE_SIZE); -@@ -577,7 +578,7 @@ int do_checksnapimage(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) - - if (memcmp(HIBERNATE_SIG, swsusp_header->sig, 10) - || (swsusp_header->img_size == 0) -- || (swsusp_header->img_size > 0x03fff000)) { -+ || (swsusp_header->img_size > 0x05fff000)) { - printf("No hibernation image present\n"); - CALL_HOOK(err_hook, SWSUSPMEM_BROKENIMAGE); - return 0; -@@ -674,7 +675,9 @@ int do_swsuspmem(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) - /* Allow for 16 pages of stack */ - max_page = gd->start_addr_sp / PAGE_SIZE - 32; - high_page = (((gd->relocaddr + _bss_end_ofs) -- + (PAGE_SIZE - 1)) / PAGE_SIZE) + 1; -+ + (PAGE_SIZE - 1)) / PAGE_SIZE) + 1 + 0xf; -+ if (high_page > 0x7ffff) -+ high_page = 0x7ffff; - #define pfn_is_occupied(pfn) (page > max_page && page <= high_page) - #ifdef PAGEMAP_DEBUG - PAGEMAP_INFO(" *gd->start_addr_sp:%p\n", -@@ -711,7 +714,7 @@ int do_swsuspmem(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) - - if (memcmp(HIBERNATE_SIG, swsusp_header->sig, 10) - || (swsusp_header->img_size == 0) -- || (swsusp_header->img_size > 0x03fff000)) { -+ || (swsusp_header->img_size > 0x05fff000)) { - printf("No hibernation image present\n"); - CALL_HOOK(err_hook, SWSUSPMEM_BROKENIMAGE); - return 0; -@@ -830,8 +833,11 @@ int do_swsuspmem(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) - continue; - } else if (unlikely(pfn_is_low(page) && - pfn_is_occupied(page))) { -+ /* Virtual 32-bit original address */ - remap_orig[remap_idx] = pg2addr(page); -+ /* allocating new free page */ - page = free_page_get_next(); -+ /* Virtual 32-bit remap address */ - remap_temp[remap_idx] = pg2addr(page); - remap_idx++; - #ifdef PAGEMAP_DEBUG --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0004-Add-porter-board-Hibernation-code.patch b/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0004-Add-porter-board-Hibernation-code.patch deleted file mode 100755 index 1b2278b2e..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot/hibernation/0004-Add-porter-board-Hibernation-code.patch +++ /dev/null @@ -1,1352 +0,0 @@ -From 80d5c1269bd16fedce41611e45f25d156425b0c9 Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Fri, 19 May 2017 16:16:18 +0900 -Subject: [PATCH 4/4] Add porter board Hibernation code - -Signed-off-by: Yuichi Kusakabe ---- - arch/arm/cpu/armv7/Makefile | 4 + - arch/arm/cpu/armv7/arch_timer.c | 58 ++++++ - arch/arm/cpu/armv7/cache_v7.c | 14 +- - arch/arm/cpu/armv7/rmobile/Makefile | 4 + - arch/arm/cpu/armv7/rmobile/arm_arch_timer.c | 61 ++++++ - arch/arm/cpu/armv7/rmobile/crc32_word4.c | 299 ++++++++++++++++++++++++++++ - arch/arm/cpu/armv7/rmobile/crc32_word4.h | 23 +++ - arch/arm/cpu/armv7/rmobile/sh_timer.c | 209 +++++++++++++++++++ - arch/arm/include/asm/arch-rmobile/rmobile.h | 2 + - arch/arm/include/asm/armv7.h | 16 +- - arch/arm/include/asm/system.h | 136 ++++++++++++- - arch/arm/lib/Makefile | 2 + - arch/arm/lib/board.c | 2 +- - arch/arm/lib/cache-cp15.c | 123 +++++++++++- - arch/arm/lib/call_with_stack.S | 20 ++ - board/renesas/porter/porter.c | 10 + - include/configs/porter.h | 19 +- - 17 files changed, 977 insertions(+), 25 deletions(-) - create mode 100644 arch/arm/cpu/armv7/arch_timer.c - create mode 100644 arch/arm/cpu/armv7/rmobile/arm_arch_timer.c - create mode 100644 arch/arm/cpu/armv7/rmobile/crc32_word4.c - create mode 100644 arch/arm/cpu/armv7/rmobile/crc32_word4.h - create mode 100644 arch/arm/cpu/armv7/rmobile/sh_timer.c - create mode 100644 arch/arm/lib/call_with_stack.S - -diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile -index 4fdbee4..f68ce5c 100644 ---- a/arch/arm/cpu/armv7/Makefile -+++ b/arch/arm/cpu/armv7/Makefile -@@ -32,6 +32,10 @@ COBJS += cache_v7.o - COBJS += cpu.o - COBJS += syslib.o - -+ifneq ($(CONFIG_SYS_ARCH_TIMER),) -+COBJS += arch_timer.o -+endif -+ - ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA20),) - SOBJS += lowlevel_init.o - endif -diff --git a/arch/arm/cpu/armv7/arch_timer.c b/arch/arm/cpu/armv7/arch_timer.c -new file mode 100644 -index 0000000..747b6e9 ---- /dev/null -+++ b/arch/arm/cpu/armv7/arch_timer.c -@@ -0,0 +1,58 @@ -+/* -+ * (C) Copyright 2012-2014 -+ * Texas Instruments Incorporated, -+ * -+ * SPDX-License-Identifier: GPL-2.0+ -+ */ -+ -+#include -+#include -+#include -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+int timer_init(void) -+{ -+ gd->tbl = 0; -+ gd->tbu = 0; -+ -+ gd->timer_rate_hz = CONFIG_SYS_HZ_CLOCK / CONFIG_SYS_HZ; -+ -+ return 0; -+} -+ -+unsigned long long get_ticks(void) -+{ -+ ulong nowl, nowu; -+ -+ asm volatile("mrrc p15, 0, %0, %1, c14" : "=r" (nowl), "=r" (nowu)); -+ -+ gd->tbl = nowl; -+ gd->tbu = nowu; -+ -+ return (((unsigned long long)gd->tbu) << 32) | gd->tbl; -+} -+ -+ -+ulong get_timer(ulong base) -+{ -+ return lldiv(get_ticks(), gd->timer_rate_hz) - base; -+} -+ -+void __udelay(unsigned long usec) -+{ -+ unsigned long long endtime; -+ -+ endtime = lldiv((unsigned long long)usec * gd->timer_rate_hz, -+ 1000UL); -+ -+ endtime += get_ticks(); -+ -+ while (get_ticks() < endtime) -+ ; -+} -+ -+ulong get_tbclk(void) -+{ -+ return gd->timer_rate_hz; -+} -diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c -index 5f6d039..5a0bdb8 100644 ---- a/arch/arm/cpu/armv7/cache_v7.c -+++ b/arch/arm/cpu/armv7/cache_v7.c -@@ -82,7 +82,7 @@ static void v7_inval_dcache_level_setway(u32 level, u32 num_sets, - } - } - /* DSB to make sure the operation is complete */ -- CP15DSB; -+ DSB(); - } - - static void v7_clean_inval_dcache_level_setway(u32 level, u32 num_sets, -@@ -109,7 +109,7 @@ static void v7_clean_inval_dcache_level_setway(u32 level, u32 num_sets, - } - } - /* DSB to make sure the operation is complete */ -- CP15DSB; -+ DSB(); - } - - static void v7_maint_dcache_level_setway(u32 level, u32 operation) -@@ -230,7 +230,7 @@ static void v7_dcache_maint_range(u32 start, u32 stop, u32 range_op) - } - - /* DSB to make sure the operation is complete */ -- CP15DSB; -+ DSB(); - } - - /* Invalidate TLB */ -@@ -243,9 +243,9 @@ static void v7_inval_tlb(void) - /* Invalidate entire instruction TLB */ - asm volatile ("mcr p15, 0, %0, c8, c5, 0" : : "r" (0)); - /* Full system DSB - make sure that the invalidation is complete */ -- CP15DSB; -+ DSB(); - /* Full system ISB - make sure the instruction stream sees it */ -- CP15ISB; -+ ISB(); - } - - void invalidate_dcache_all(void) -@@ -356,10 +356,10 @@ void invalidate_icache_all(void) - asm volatile ("mcr p15, 0, %0, c7, c5, 6" : : "r" (0)); - - /* Full system DSB - make sure that the invalidation is complete */ -- CP15DSB; -+ DSB(); - - /* ISB - make sure the instruction stream sees it */ -- CP15ISB; -+ ISB(); - } - #else - void invalidate_icache_all(void) -diff --git a/arch/arm/cpu/armv7/rmobile/Makefile b/arch/arm/cpu/armv7/rmobile/Makefile -index b8c04c6..0a3623a 100644 ---- a/arch/arm/cpu/armv7/rmobile/Makefile -+++ b/arch/arm/cpu/armv7/rmobile/Makefile -@@ -46,6 +46,10 @@ COBJS-$(CONFIG_R8A7740) += pfc-r8a7740.o - COBJS-$(CONFIG_SH73A0) += cpu_info-sh73a0.o - COBJS-$(CONFIG_SH73A0) += pfc-sh73a0.o - COBJS_LN-$(CONFIG_TMU_TIMER) += sh_timer.o -+COBJS-$(CONFIG_SYS_ARCH_TIMER) += arm_arch_timer.o -+ifeq ($(CONFIG_CMD_SWSUSP),y) -+COBJS-y += crc32_word4.o -+endif - - COBJS := $(COBJS-y) - SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -diff --git a/arch/arm/cpu/armv7/rmobile/arm_arch_timer.c b/arch/arm/cpu/armv7/rmobile/arm_arch_timer.c -new file mode 100644 -index 0000000..a499e71 ---- /dev/null -+++ b/arch/arm/cpu/armv7/rmobile/arm_arch_timer.c -@@ -0,0 +1,61 @@ -+/* -+ * Copyright (C) 2014 Cogent Embedded Inc. -+ * -+ * Licensed under the GPL-2 or later. -+ */ -+ -+#include -+#include -+ -+#define MODEMR 0xe6160060 -+#define MD(x) (1 << (x)) -+#define CNTCR 0xe6080000 -+#define CNTFID0 0xe6080020 -+ -+void arm_arch_timer_init(void) -+{ -+ u32 mode = readl(MODEMR); -+ u32 freq; -+ -+ switch (mode & (MD(14) | MD(13))) { -+ case MD(13): -+ freq = 20; -+ break; -+ case MD(14): -+ freq = 26; -+ break; -+ case MD(13) | MD(14): -+ freq = 30; -+ break; -+ default: -+ freq = 15; -+ break; -+ } -+ -+ freq *= (1000000 / 2); -+ -+#ifdef CONFIG_VE_ENABLED -+ /* CNTVOFF has to be initialized either from non-secure Hypervisor -+ * mode or secure Monitor mode with SCR.NS==1. If TrustZone is enabled -+ * then it should be handled by the secure code -+ */ -+ asm volatile( -+ " cps 0x16\n" -+ " mrc p15, 0, r1, c1, c1, 0\n" -+ " orr r0, r1, #1\n" -+ " mcr p15, 0, r0, c1, c1, 0\n" -+ " isb\n" -+ " mov r0, #0\n" -+ " mcrr p15, 4, r0, r0, c14\n" -+ " isb\n" -+ " mcr p15, 0, r1, c1, c1, 0\n" -+ " isb\n" -+ " cps 0x13\n" -+ : : : "r0", "r1"); -+#endif -+ -+ /* Start Generic ARM timer */ -+ writel(freq, CNTFID0); -+ asm volatile("mcr p15, 0, %0, c14, c0, 0" : : "r" (freq)); -+ writel(1, CNTCR); -+} -diff --git a/arch/arm/cpu/armv7/rmobile/crc32_word4.c b/arch/arm/cpu/armv7/rmobile/crc32_word4.c -new file mode 100644 -index 0000000..b813899 ---- /dev/null -+++ b/arch/arm/cpu/armv7/rmobile/crc32_word4.c -@@ -0,0 +1,299 @@ -+/************************************************************************* -+ * crc32_word4.c: rapid CRC32 -+ * Coptright (C) FUJITSUTEN Limited, 2015 All Rights Reserved. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 -+ * as published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software Foundation, -+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+ *************************************************************************/ -+#ifdef OWNTEST -+#include -+#include -+#include -+#include -+typedef unsigned int u_int32_t; -+#else -+#include -+#endif -+ -+#include "crc32_word4.h" -+ -+#define CRC_INIT_VALUE (-1) -+#define CRC_FIX(_crc32) (~(_crc32)) -+ -+#define __HWDTPLS_OUT() -+#define MEASURE(msg) -+ -+/**** calc_crc32.c *****/ -+ -+/* -+ * CRC32ã¯ã€ISO 3309 ã§è¦ç¨‹ã•ã‚Œ -+ * ãã®ã‚µãƒ³ãƒ—ル㯠-+ * RFC 2083 :PNG(Poratble Network Graphics -+ * ã§å…¬ã«ãªã£ã¦ã„ã¾ã™ã€‚本プログラムã¯ã€RFC2083 ã§æŽ²ç¤ºã•ã‚ŒãŸ -+ * CRC32を独自ã«æœ€é©åŒ–ã—ãŸãƒ—ログラムã§ã™ã€‚ -+ */ -+const static u_int32_t CRC_Table[256] = { -+ 0x00000000 , 0x77073096 , 0xee0e612c , 0x990951ba , 0x076dc419 , 0x706af48f , 0xe963a535 , 0x9e6495a3 , -+ 0x0edb8832 , 0x79dcb8a4 , 0xe0d5e91e , 0x97d2d988 , 0x09b64c2b , 0x7eb17cbd , 0xe7b82d07 , 0x90bf1d91 , -+ 0x1db71064 , 0x6ab020f2 , 0xf3b97148 , 0x84be41de , 0x1adad47d , 0x6ddde4eb , 0xf4d4b551 , 0x83d385c7 , -+ 0x136c9856 , 0x646ba8c0 , 0xfd62f97a , 0x8a65c9ec , 0x14015c4f , 0x63066cd9 , 0xfa0f3d63 , 0x8d080df5 , -+ 0x3b6e20c8 , 0x4c69105e , 0xd56041e4 , 0xa2677172 , 0x3c03e4d1 , 0x4b04d447 , 0xd20d85fd , 0xa50ab56b , -+ 0x35b5a8fa , 0x42b2986c , 0xdbbbc9d6 , 0xacbcf940 , 0x32d86ce3 , 0x45df5c75 , 0xdcd60dcf , 0xabd13d59 , -+ 0x26d930ac , 0x51de003a , 0xc8d75180 , 0xbfd06116 , 0x21b4f4b5 , 0x56b3c423 , 0xcfba9599 , 0xb8bda50f , -+ 0x2802b89e , 0x5f058808 , 0xc60cd9b2 , 0xb10be924 , 0x2f6f7c87 , 0x58684c11 , 0xc1611dab , 0xb6662d3d , -+ 0x76dc4190 , 0x01db7106 , 0x98d220bc , 0xefd5102a , 0x71b18589 , 0x06b6b51f , 0x9fbfe4a5 , 0xe8b8d433 , -+ 0x7807c9a2 , 0x0f00f934 , 0x9609a88e , 0xe10e9818 , 0x7f6a0dbb , 0x086d3d2d , 0x91646c97 , 0xe6635c01 , -+ 0x6b6b51f4 , 0x1c6c6162 , 0x856530d8 , 0xf262004e , 0x6c0695ed , 0x1b01a57b , 0x8208f4c1 , 0xf50fc457 , -+ 0x65b0d9c6 , 0x12b7e950 , 0x8bbeb8ea , 0xfcb9887c , 0x62dd1ddf , 0x15da2d49 , 0x8cd37cf3 , 0xfbd44c65 , -+ 0x4db26158 , 0x3ab551ce , 0xa3bc0074 , 0xd4bb30e2 , 0x4adfa541 , 0x3dd895d7 , 0xa4d1c46d , 0xd3d6f4fb , -+ 0x4369e96a , 0x346ed9fc , 0xad678846 , 0xda60b8d0 , 0x44042d73 , 0x33031de5 , 0xaa0a4c5f , 0xdd0d7cc9 , -+ 0x5005713c , 0x270241aa , 0xbe0b1010 , 0xc90c2086 , 0x5768b525 , 0x206f85b3 , 0xb966d409 , 0xce61e49f , -+ 0x5edef90e , 0x29d9c998 , 0xb0d09822 , 0xc7d7a8b4 , 0x59b33d17 , 0x2eb40d81 , 0xb7bd5c3b , 0xc0ba6cad , -+ 0xedb88320 , 0x9abfb3b6 , 0x03b6e20c , 0x74b1d29a , 0xead54739 , 0x9dd277af , 0x04db2615 , 0x73dc1683 , -+ 0xe3630b12 , 0x94643b84 , 0x0d6d6a3e , 0x7a6a5aa8 , 0xe40ecf0b , 0x9309ff9d , 0x0a00ae27 , 0x7d079eb1 , -+ 0xf00f9344 , 0x8708a3d2 , 0x1e01f268 , 0x6906c2fe , 0xf762575d , 0x806567cb , 0x196c3671 , 0x6e6b06e7 , -+ 0xfed41b76 , 0x89d32be0 , 0x10da7a5a , 0x67dd4acc , 0xf9b9df6f , 0x8ebeeff9 , 0x17b7be43 , 0x60b08ed5 , -+ 0xd6d6a3e8 , 0xa1d1937e , 0x38d8c2c4 , 0x4fdff252 , 0xd1bb67f1 , 0xa6bc5767 , 0x3fb506dd , 0x48b2364b , -+ 0xd80d2bda , 0xaf0a1b4c , 0x36034af6 , 0x41047a60 , 0xdf60efc3 , 0xa867df55 , 0x316e8eef , 0x4669be79 , -+ 0xcb61b38c , 0xbc66831a , 0x256fd2a0 , 0x5268e236 , 0xcc0c7795 , 0xbb0b4703 , 0x220216b9 , 0x5505262f , -+ 0xc5ba3bbe , 0xb2bd0b28 , 0x2bb45a92 , 0x5cb36a04 , 0xc2d7ffa7 , 0xb5d0cf31 , 0x2cd99e8b , 0x5bdeae1d , -+ 0x9b64c2b0 , 0xec63f226 , 0x756aa39c , 0x026d930a , 0x9c0906a9 , 0xeb0e363f , 0x72076785 , 0x05005713 , -+ 0x95bf4a82 , 0xe2b87a14 , 0x7bb12bae , 0x0cb61b38 , 0x92d28e9b , 0xe5d5be0d , 0x7cdcefb7 , 0x0bdbdf21 , -+ 0x86d3d2d4 , 0xf1d4e242 , 0x68ddb3f8 , 0x1fda836e , 0x81be16cd , 0xf6b9265b , 0x6fb077e1 , 0x18b74777 , -+ 0x88085ae6 , 0xff0f6a70 , 0x66063bca , 0x11010b5c , 0x8f659eff , 0xf862ae69 , 0x616bffd3 , 0x166ccf45 , -+ 0xa00ae278 , 0xd70dd2ee , 0x4e048354 , 0x3903b3c2 , 0xa7672661 , 0xd06016f7 , 0x4969474d , 0x3e6e77db , -+ 0xaed16a4a , 0xd9d65adc , 0x40df0b66 , 0x37d83bf0 , 0xa9bcae53 , 0xdebb9ec5 , 0x47b2cf7f , 0x30b5ffe9 , -+ 0xbdbdf21c , 0xcabac28a , 0x53b39330 , 0x24b4a3a6 , 0xbad03605 , 0xcdd70693 , 0x54de5729 , 0x23d967bf , -+ 0xb3667a2e , 0xc4614ab8 , 0x5d681b02 , 0x2a6f2b94 , 0xb40bbe37 , 0xc30c8ea1 , 0x5a05df1b , 0x2d02ef8d , -+}; -+ -+/*** -+ * CRC Table creater. -+ * -+void make_crc_table(void) { -+ u_int32_t c; -+ u_int32_t n, k; -+ for (n = 0; n < 256; n++) -+ { -+ c = (u_int32_t) n; -+ for (k = 0; k < 8; k++) -+ { -+ if (c & 1) -+ c = 0xedb88320L ^ (c >> 1); -+ else -+ c = c >> 1; -+ } -+ CRC_Table[n] = c; -+ } -+} -+***/ -+#define NEXT_PTR (4) -+ -+static __inline__ -+u_int32_t _update_crc(u_int32_t crc, unsigned char *buf, size_t len) -+{ -+ u_int32_t c = crc; -+ size_t n; -+ for (n = 0; n < len; n++) -+ c = CRC_Table[(c ^ buf[n]) & 0xff] ^ (c >> 8); -+ return c; -+} -+/********************************************************************* -+ * update_crc4x4()() -+ * calc_crc32() をベースã«ã€4 ワード毎ã«å€‹åˆ¥ã« CRC32 を計算ã™ã‚‹æ–¹æ³• -+ * -+ * +0 +1 +2 +3 -+ * +0x00 AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDD -+ * +0x04 EEEEEEEE FFFFFFFF 00000000 11111111 -+ * : : : : -+ * CRC32 xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx -+ * -+ *********************************************************************/ -+ -+static __inline__ -+void update_crc4x4(u_int32_t crc[4], unsigned char *buf) -+{ -+ u_int32_t c1, c2, c3, c4; -+ u_int32_t *p = (void *)buf; -+ -+ c1 = crc[0] ^ p[0]; -+ c2 = crc[1] ^ p[1]; -+ c3 = crc[2] ^ p[2]; -+ c4 = crc[3] ^ p[3]; -+ -+ c1 = CRC_Table[c1 & 0xff] ^ (c1 >> 8); -+ c2 = CRC_Table[c2 & 0xff] ^ (c2 >> 8); -+ c3 = CRC_Table[c3 & 0xff] ^ (c3 >> 8); -+ c4 = CRC_Table[c4 & 0xff] ^ (c4 >> 8); -+ -+ c1 = CRC_Table[c1 & 0xff] ^ (c1 >> 8); -+ c2 = CRC_Table[c2 & 0xff] ^ (c2 >> 8); -+ c3 = CRC_Table[c3 & 0xff] ^ (c3 >> 8); -+ c4 = CRC_Table[c4 & 0xff] ^ (c4 >> 8); -+ -+ c1 = CRC_Table[c1 & 0xff] ^ (c1 >> 8); -+ c2 = CRC_Table[c2 & 0xff] ^ (c2 >> 8); -+ c3 = CRC_Table[c3 & 0xff] ^ (c3 >> 8); -+ c4 = CRC_Table[c4 & 0xff] ^ (c4 >> 8); -+ -+ c1 = CRC_Table[c1 & 0xff] ^ (c1 >> 8); -+ c2 = CRC_Table[c2 & 0xff] ^ (c2 >> 8); -+ c3 = CRC_Table[c3 & 0xff] ^ (c3 >> 8); -+ c4 = CRC_Table[c4 & 0xff] ^ (c4 >> 8); -+ -+ crc[0] = c1; -+ crc[1] = c2; -+ crc[2] = c3; -+ crc[3] = c4; -+} -+ -+ -+void calc_crc32x4(unsigned char *buf, size_t len, CRC32_WORD4_t *result) -+{ -+ unsigned int crc_tmp[4] = {CRC_INIT_VALUE, CRC_INIT_VALUE, CRC_INIT_VALUE, CRC_INIT_VALUE}; -+ u_int32_t i; -+ int res; -+ u_int32_t n4; -+ int xlen = len; -+#ifdef HWDPLS_ENABLE -+ unsigned long plstout = 60; -+ unsigned long plsstart = 0; -+ if ((unsigned long)CONFIG_SYS_HZ > 100000) -+ plstout *= (unsigned long)CONFIG_SYS_HZ / 1000; -+ else -+ plstout = DIV_ROUND_UP(plstout * (unsigned long)CONFIG_SYS_HZ, 1000); -+#endif -+ -+ /** -+ * 4ãƒã‚¤ãƒˆå¢ƒç•Œã«åˆã‚ãªã„開始アドレスã®å ´åˆ -+ * 境界ã¾ã§ã®CRCã‚’ crc_tmp[0] ã«æ±‚ã‚る。 -+ */ -+ if ((unsigned long)buf & 3) { -+ crc_tmp[0] = _update_crc(crc_tmp[0], buf, (unsigned long)buf & 3); -+ buf = (unsigned char *)((unsigned long)buf & ~3); -+ xlen -= (unsigned long)buf & 3; -+ } -+ -+ n4 = xlen/(NEXT_PTR*4); -+ /** -+ * 4ãƒã‚¤ãƒˆå¢ƒç•Œã«åˆã‚ãªã„開始アドレスã®å ´åˆ -+ * 境界ã¾ã§ã®CRCã‚’ crc_tmp[0] ã«æ±‚ã‚る。 -+ */ -+#ifdef HWDPLS_ENABLE -+ reset_timer(); -+ plsstart = get_timer(0); -+#endif -+ for (i = 0; i < n4 ; i++) { -+ update_crc4x4(crc_tmp, buf); -+ buf += NEXT_PTR * 4; -+#ifdef HWDPLS_ENABLE -+ /** -+ * WDを考慮 -+ */ -+ if (__builtin_expect((int)((i & 0x1f) == 0), 0)) { -+ if ((get_timer(plsstart)) > plstout) { -+ __HWDTPLS_OUT(); -+ MEASURE("crc plsout") -+ plsstart += plstout; -+ } -+ } -+#endif /*HWPLS_ENABLE*/ -+ } -+ -+ res = xlen % (NEXT_PTR * 4); -+ if (res > 0) -+ crc_tmp[3] = _update_crc(crc_tmp[3], buf, res); -+ -+ result->crc_w[0] = CRC_FIX(crc_tmp[0]); -+ result->crc_w[1] = CRC_FIX(crc_tmp[1]); -+ result->crc_w[2] = CRC_FIX(crc_tmp[2]); -+ result->crc_w[3] = CRC_FIX(crc_tmp[3]); -+ -+ MEASURE("calc_crc32x4 finish") -+} -+ -+#if defined(OWNTEST) -+#define BUFSIZE (2 * 1024 * 1024) -+#include -+#include -+ -+int main() -+{ -+ unsigned char *buf, *buf2; -+ struct timeval start, end; -+ unsigned long long diff; -+ int i; -+ -+ CRC32_WORD4_t result = { .crc_w = {0, 0, 0, 0 } }; -+ CRC32_WORD4_t result2 = { .crc_w = {0, 0, 0, 0 } }; -+ -+ buf = malloc(BUFSIZE); -+ if (!buf) { -+ perror("malloc"); -+ return 1; -+ } -+ printf("Generate %dMB random data..\n", BUFSIZE / 1024 / 1024); -+ srand(0); -+ for (i = 0; i < BUFSIZE / 4; i++) -+ ((int *)buf)[i] = rand(); -+ -+ /* Memory dup */ -+ buf2 = memalign(NEXT_PTR, BUFSIZE); -+ if (!buf2) { -+ perror("malloc"); -+ return 1; -+ } -+ memcpy(buf2, buf, BUFSIZE); -+ -+ -+ gettimeofday(&start, NULL); -+ calc_crc32x4(buf, BUFSIZE, &result); -+ gettimeofday(&end, NULL); -+ -+ diff = (end.tv_sec - start.tv_sec) * 1000000; -+ diff += end.tv_usec - start.tv_usec; -+ -+ printf("time=%lluus\n", diff); -+ printf(" result.word[0] = %x\n", result.crc_w[0]); -+ printf(" result.word[1] = %x\n", result.crc_w[1]); -+ printf(" result.word[2] = %x\n", result.crc_w[2]); -+ printf(" result.word[3] = %x\n", result.crc_w[3]); -+ -+ /* Broken test */ -+#if 0 /* Destory test */ -+ buf[rand() % BUFSIZE] ^= 1 << (rand()%7); -+#endif -+ for (i = 0; i < BUFSIZE ; i++) { -+ if (buf[i] != buf2[i]) -+ printf("buf[%d] %02x : %02x\n", i, buf[i], buf2[i]); -+ } -+ -+ gettimeofday(&start, NULL); -+ calc_crc32x4(buf, BUFSIZE, &result2); -+ gettimeofday(&end, NULL); -+ -+ diff = (end.tv_sec - start.tv_sec) * 1000000; -+ diff += end.tv_usec - start.tv_usec; -+ -+ printf("time=%lluus\n", diff); -+ printf(" result.word[0] = %x:%s\n", result2.crc_w[0] , -+ result.crc_w[0] == result2.crc_w[0] ? "OK" : "NG"); -+ printf(" result.word[1] = %x:%s\n", result2.crc_w[1] , -+ result.crc_w[1] == result2.crc_w[1] ? "OK" : "NG"); -+ printf(" result.word[2] = %x:%s\n", result2.crc_w[2] , -+ result.crc_w[2] == result2.crc_w[2] ? "OK" : "NG"); -+ printf(" result.word[3] = %x:%s\n", result2.crc_w[3] , -+ result.crc_w[3] == result2.crc_w[3] ? "OK" : "NG"); -+ return 0; -+} -+#endif /* TEST */ -diff --git a/arch/arm/cpu/armv7/rmobile/crc32_word4.h b/arch/arm/cpu/armv7/rmobile/crc32_word4.h -new file mode 100644 -index 0000000..2b64218 ---- /dev/null -+++ b/arch/arm/cpu/armv7/rmobile/crc32_word4.h -@@ -0,0 +1,23 @@ -+/************************************************************************* -+ * Coptright (C) FUJITSUTEN Limited, 2012 All Rights Reserved. -+ * -+ *************************************************************************/ -+#ifndef __CRC32_WORD4_H__ -+#define __CRC32_WORD4_H__ -+ -+typedef struct { -+ unsigned int crc_w[4]; -+} CRC32_WORD4_t; -+ -+void calc_crc32x4(unsigned char *buf, size_t len, CRC32_WORD4_t *result); -+ -+typedef struct { -+ unsigned int size; -+ CRC32_WORD4_t chksum; -+ unsigned int dummy[3]; -+} CRC32_WORD4_TICKET_t; -+ -+#define IS_CRC_WORD4_OK(_res1, _res2) (!memcmp((_res1), (_res2), sizeof(CRC32_WORD4_t))) -+#define IS_CRC_WORD4_ZERO(_w4) (((_w4)->crc_w[0] == 0) && ((_w4)->crc_w[1] == 0) && ((_w4)->crc_w[2] == 0) && ((_w4)->crc_w[3] == 0)) -+#define IS_CRC_WORD4_ALL_F(_w4) (((_w4)->crc_w[0] == 0xffffffff) && ((_w4)->crc_w[1] == 0xffffffff) && ((_w4)->crc_w[2] == 0xffffffff) && ((_w4)->crc_w[3] == 0xffffffff)) -+#endif -diff --git a/arch/arm/cpu/armv7/rmobile/sh_timer.c b/arch/arm/cpu/armv7/rmobile/sh_timer.c -new file mode 100644 -index 0000000..1c64950 ---- /dev/null -+++ b/arch/arm/cpu/armv7/rmobile/sh_timer.c -@@ -0,0 +1,209 @@ -+/* -+ * Copyright (C) 2013-2014 Renesas Electronics Corporation -+ * -+ * (C) Copyright 2009 -+ * Jean-Christophe PLAGNIOL-VILLARD -+ * -+ * (C) Copyright 2007-2012 -+ * Nobobuhiro Iwamatsu -+ * -+ * (C) Copyright 2003 -+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#if defined(CONFIG_R8A7790) || defined(CONFIG_R8A7791) || \ -+ defined(CONFIG_R8A7793) || defined(CONFIG_R8A7794) -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+#endif -+ -+static struct tmu_regs *tmu = (struct tmu_regs *)TMU_BASE; -+ -+static u16 bit; -+static unsigned long last_tcnt; -+static unsigned long long overflow_ticks; -+ -+#if defined(CONFIG_R8A7790) || defined(CONFIG_R8A7791) || \ -+ defined(CONFIG_R8A7793) || defined(CONFIG_R8A7794) -+ -+unsigned long get_tbclk(void) -+{ -+ if (gd->flags & GD_FLG_RELOC) -+ return get_tmu0_clk_rate() >> ((bit + 1) * 2); -+ else { -+ u16 bit; -+ -+ bit = (ffs(CONFIG_SYS_TMU_CLK_DIV) >> 1) - 1; -+ return get_tmu0_clk_rate() >> ((bit + 1) * 2); -+ } -+} -+ -+#else -+ -+unsigned long get_tbclk(void) -+{ -+ return get_tmu0_clk_rate() >> ((bit + 1) * 2); -+} -+ -+#endif -+ -+static inline unsigned long long tick_to_time(unsigned long long tick) -+{ -+ tick *= CONFIG_SYS_HZ; -+ do_div(tick, get_tbclk()); -+ -+ return tick; -+} -+ -+static inline unsigned long long usec_to_tick(unsigned long long usec) -+{ -+ usec *= get_tbclk(); -+ do_div(usec, 1000000); -+ -+ return usec; -+} -+ -+static void tmu_timer_start(unsigned int timer) -+{ -+ if (timer > 2) -+ return; -+ writeb(readb(&tmu->tstr) | (1 << timer), &tmu->tstr); -+} -+ -+static void tmu_timer_stop(unsigned int timer) -+{ -+ if (timer > 2) -+ return; -+ writeb(readb(&tmu->tstr) & ~(1 << timer), &tmu->tstr); -+} -+ -+#if defined(CONFIG_R8A7790) || defined(CONFIG_R8A7791) || \ -+ defined(CONFIG_R8A7793) || defined(CONFIG_R8A7794) -+ -+int sh_timer_init(void) -+{ -+ bit = (ffs(CONFIG_SYS_TMU_CLK_DIV) >> 1) - 1; -+ writew((readw(&tmu->tcr0) & ~0x7) | bit, &tmu->tcr0); -+ -+ tmu_timer_stop(0); -+ tmu_timer_start(0); -+ -+ last_tcnt = 0; -+ overflow_ticks = 0; -+ -+ return 0; -+} -+ -+int timer_init(void) -+{ -+ tmu_timer_stop(0); -+ tmu_timer_start(0); -+ -+ return 0; -+} -+ -+#else -+ -+int timer_init(void) -+{ -+ bit = (ffs(CONFIG_SYS_TMU_CLK_DIV) >> 1) - 1; -+ writew((readw(&tmu->tcr0) & ~0x7) | bit, &tmu->tcr0); -+ -+ tmu_timer_stop(0); -+ tmu_timer_start(0); -+ -+ last_tcnt = 0; -+ overflow_ticks = 0; -+ -+ return 0; -+} -+ -+#endif -+ -+#if defined(CONFIG_R8A7790) || defined(CONFIG_R8A7791) || \ -+ defined(CONFIG_R8A7793) || defined(CONFIG_R8A7794) -+ -+unsigned long long get_ticks(void) -+{ -+ unsigned long tcnt = 0 - readl(&tmu->tcnt0); -+ -+ if (gd->flags & GD_FLG_RELOC) { -+ if (last_tcnt > tcnt) /* overflow */ -+ overflow_ticks++; -+ last_tcnt = tcnt; -+ -+ return (overflow_ticks << 32) | tcnt; -+ } -+ else -+ return tcnt; -+} -+ -+#else -+ -+unsigned long long get_ticks(void) -+{ -+ unsigned long tcnt = 0 - readl(&tmu->tcnt0); -+ -+ if (last_tcnt > tcnt) /* overflow */ -+ overflow_ticks++; -+ last_tcnt = tcnt; -+ -+ return (overflow_ticks << 32) | tcnt; -+} -+ -+#endif -+ -+void __udelay(unsigned long usec) -+{ -+ unsigned long long tmp; -+ ulong tmo; -+ -+ tmo = usec_to_tick(usec); -+ tmp = get_ticks() + tmo; /* get current timestamp */ -+ -+ while (get_ticks() < tmp) /* loop till event */ -+ /*NOP*/; -+} -+ -+unsigned long get_timer(unsigned long base) -+{ -+ /* return msec */ -+ return tick_to_time(get_ticks()) - base; -+} -+ -+void set_timer(unsigned long t) -+{ -+ writel((0 - t), &tmu->tcnt0); -+} -+ -+void reset_timer(void) -+{ -+ tmu_timer_stop(0); -+ set_timer(0); -+ tmu_timer_start(0); -+} -diff --git a/arch/arm/include/asm/arch-rmobile/rmobile.h b/arch/arm/include/asm/arch-rmobile/rmobile.h -index 33a302e..12276e0 100644 ---- a/arch/arm/include/asm/arch-rmobile/rmobile.h -+++ b/arch/arm/include/asm/arch-rmobile/rmobile.h -@@ -26,6 +26,8 @@ u32 rmobile_get_cpu_type(void); - u32 rmobile_get_cpu_rev_integer(void); - u32 rmobile_get_cpu_rev_fraction(void); - -+void arm_arch_timer_init(void); -+ - #endif /* __ASSEMBLY__ */ - - #endif /* __KERNEL__ */ -diff --git a/arch/arm/include/asm/armv7.h b/arch/arm/include/asm/armv7.h -index ad9a875..aad5bf7 100644 ---- a/arch/arm/include/asm/armv7.h -+++ b/arch/arm/include/asm/armv7.h -@@ -62,9 +62,19 @@ - * However, we use the CP15 based instructtions because we use - * -march=armv5 in U-Boot - */ --#define CP15ISB asm volatile ("mcr p15, 0, %0, c7, c5, 4" : : "r" (0)) --#define CP15DSB asm volatile ("mcr p15, 0, %0, c7, c10, 4" : : "r" (0)) --#define CP15DMB asm volatile ("mcr p15, 0, %0, c7, c10, 5" : : "r" (0)) -+#define CP15ISB() asm volatile ("mcr p15, 0, %0, c7, c5, 4" : : "r" (0)) -+#define CP15DSB() asm volatile ("mcr p15, 0, %0, c7, c10, 4" : : "r" (0)) -+#define CP15DMB() asm volatile ("mcr p15, 0, %0, c7, c10, 5" : : "r" (0)) -+ -+#ifdef __ARM_ARCH_7A__ -+#define ISB() asm volatile ("isb" : : : "memory") -+#define DSB() asm volatile ("dsb" : : : "memory") -+#define DMB() asm volatile ("dmb" : : : "memory") -+#else -+#define ISB() CP15ISB -+#define DSB() CP15DSB -+#define DMB() CP15DMB -+#endif - - void v7_outer_cache_enable(void); - void v7_outer_cache_disable(void); -diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h -index cd0de6b..3906646 100644 ---- a/arch/arm/include/asm/system.h -+++ b/arch/arm/include/asm/system.h -@@ -45,6 +45,12 @@ - #define CR_AFE (1 << 29) /* Access flag enable */ - #define CR_TE (1 << 30) /* Thumb exception enable */ - -+#if defined(CONFIG_ARMV7_LPAE) && !defined(PGTABLE_SIZE) -+#define PGTABLE_SIZE (4096 * 5) -+#elif !defined(PGTABLE_SIZE) -+#define PGTABLE_SIZE (4096 * 4) -+#endif -+ - /* - * This is used to ensure the compiler did actually allocate the register we - * asked it for some inline assembly sequences. Apparently we can't trust -@@ -61,17 +67,50 @@ - - #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); - -+static inline unsigned long get_cpsr(void) -+{ -+ unsigned long cpsr; -+ -+ asm volatile("mrs %0, cpsr" : "=r"(cpsr): ); -+ return cpsr; -+} -+ -+static inline int is_hyp(void) -+{ -+#ifdef CONFIG_ARMV7_LPAE -+ /* HYP mode requires LPAE ... */ -+ return ((get_cpsr() & 0x1f) == 0x1a); -+#else -+ /* ... so without LPAE support we can optimize all hyp code away */ -+ return 0; -+#endif -+} -+ - static inline unsigned int get_cr(void) - { - unsigned int val; -- asm("mrc p15, 0, %0, c1, c0, 0 @ get CR" : "=r" (val) : : "cc"); -+ -+ if (is_hyp()) -+ asm volatile("mrc p15, 4, %0, c1, c0, 0 @ get CR" : "=r" (val) -+ : -+ : "cc"); -+ else -+ asm volatile("mrc p15, 0, %0, c1, c0, 0 @ get CR" : "=r" (val) -+ : -+ : "cc"); - return val; - } - - static inline void set_cr(unsigned int val) - { -- asm volatile("mcr p15, 0, %0, c1, c0, 0 @ set CR" -- : : "r" (val) : "cc"); -+ if (is_hyp()) -+ asm volatile("mcr p15, 4, %0, c1, c0, 0 @ set CR" : -+ : "r" (val) -+ : "cc"); -+ else -+ asm volatile("mcr p15, 0, %0, c1, c0, 0 @ set CR" : -+ : "r" (val) -+ : "cc"); - isb(); - } - -@@ -105,19 +144,108 @@ static inline void set_actlr(unsigned int val) - isb(); - } - -+#ifdef CONFIG_ARMV7_LPAE -+/* Long-Descriptor Translation Table Level 1/2 Bits */ -+#define TTB_SECT_XN_MASK (1ULL << 54) -+#define TTB_SECT_NG_MASK (1 << 11) -+#define TTB_SECT_AF (1 << 10) -+#define TTB_SECT_SH_MASK (3 << 8) -+#define TTB_SECT_NS_MASK (1 << 5) -+#define TTB_SECT_AP (1 << 6) -+/* Note: TTB AP bits are set elsewhere */ -+#define TTB_SECT_MAIR(x) ((x & 0x7) << 2) /* Index into MAIR */ -+#define TTB_SECT (1 << 0) -+#define TTB_PAGETABLE (3 << 0) -+ -+/* TTBCR flags */ -+#define TTBCR_EAE (1 << 31) -+#define TTBCR_T0SZ(x) ((x) << 0) -+#define TTBCR_T1SZ(x) ((x) << 16) -+#define TTBCR_USING_TTBR0 (TTBCR_T0SZ(0) | TTBCR_T1SZ(0)) -+#define TTBCR_IRGN0_NC (0 << 8) -+#define TTBCR_IRGN0_WBWA (1 << 8) -+#define TTBCR_IRGN0_WT (2 << 8) -+#define TTBCR_IRGN0_WBNWA (3 << 8) -+#define TTBCR_IRGN0_MASK (3 << 8) -+#define TTBCR_ORGN0_NC (0 << 10) -+#define TTBCR_ORGN0_WBWA (1 << 10) -+#define TTBCR_ORGN0_WT (2 << 10) -+#define TTBCR_ORGN0_WBNWA (3 << 10) -+#define TTBCR_ORGN0_MASK (3 << 10) -+#define TTBCR_SHARED_NON (0 << 12) -+#define TTBCR_SHARED_OUTER (2 << 12) -+#define TTBCR_SHARED_INNER (3 << 12) -+#define TTBCR_EPD0 (0 << 7) -+ -+/* -+ * Memory types -+ */ -+#define MEMORY_ATTRIBUTES ((0x00 << (0 * 8)) | (0x88 << (1 * 8)) | \ -+ (0xcc << (2 * 8)) | (0xff << (3 * 8))) -+ -+/* options available for data cache on each page */ -+enum dcache_option { -+ DCACHE_OFF = TTB_SECT | TTB_SECT_MAIR(0), -+ DCACHE_WRITETHROUGH = TTB_SECT | TTB_SECT_MAIR(1), -+ DCACHE_WRITEBACK = TTB_SECT | TTB_SECT_MAIR(2), -+ DCACHE_WRITEALLOC = TTB_SECT | TTB_SECT_MAIR(3), -+}; -+#elif defined(CONFIG_ARMV7) -+/* Short-Descriptor Translation Table Level 1 Bits */ -+#define TTB_SECT_NS_MASK (1 << 19) -+#define TTB_SECT_NG_MASK (1 << 17) -+#define TTB_SECT_S_MASK (1 << 16) -+/* Note: TTB AP bits are set elsewhere */ -+#define TTB_SECT_AP (3 << 10) -+#define TTB_SECT_TEX(x) ((x & 0x7) << 12) -+#define TTB_SECT_DOMAIN(x) ((x & 0xf) << 5) -+#define TTB_SECT_XN_MASK (1 << 4) -+#define TTB_SECT_C_MASK (1 << 3) -+#define TTB_SECT_B_MASK (1 << 2) -+#define TTB_SECT (2 << 0) -+ -+/* options available for data cache on each page */ -+enum dcache_option { -+ DCACHE_OFF = TTB_SECT_DOMAIN(0) | TTB_SECT_XN_MASK | TTB_SECT, -+ DCACHE_WRITETHROUGH = DCACHE_OFF | TTB_SECT_C_MASK, -+ DCACHE_WRITEBACK = DCACHE_WRITETHROUGH | TTB_SECT_B_MASK, -+ DCACHE_WRITEALLOC = DCACHE_WRITEBACK | TTB_SECT_TEX(1), -+}; -+#else -+#define TTB_SECT_AP (3 << 10) - /* options available for data cache on each page */ - enum dcache_option { - DCACHE_OFF = 0x12, - DCACHE_WRITETHROUGH = 0x1a, - DCACHE_WRITEBACK = 0x1e, -+ DCACHE_WRITEALLOC = 0x16, - }; -+#endif - - /* Size of an MMU section */ - enum { -- MMU_SECTION_SHIFT = 20, -+#ifdef CONFIG_ARMV7_LPAE -+ MMU_SECTION_SHIFT = 21, /* 2MB */ -+#else -+ MMU_SECTION_SHIFT = 20, /* 1MB */ -+#endif - MMU_SECTION_SIZE = 1 << MMU_SECTION_SHIFT, - }; - -+#ifdef CONFIG_ARMV7 -+/* TTBR0 bits */ -+#define TTBR0_BASE_ADDR_MASK 0xFFFFC000 -+#define TTBR0_RGN_NC (0 << 3) -+#define TTBR0_RGN_WBWA (1 << 3) -+#define TTBR0_RGN_WT (2 << 3) -+#define TTBR0_RGN_WB (3 << 3) -+/* TTBR0[6] is IRGN[0] and TTBR[0] is IRGN[1] */ -+#define TTBR0_IRGN_NC (0 << 0 | 0 << 6) -+#define TTBR0_IRGN_WBWA (0 << 0 | 1 << 6) -+#define TTBR0_IRGN_WT (1 << 0 | 0 << 6) -+#define TTBR0_IRGN_WB (1 << 0 | 1 << 6) -+#endif -+ - /** - * Change the cache settings for a region. - * -diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile -index 57111af..d8634be 100644 ---- a/arch/arm/lib/Makefile -+++ b/arch/arm/lib/Makefile -@@ -54,6 +54,8 @@ COBJS-y += reset.o - COBJS-y += cache.o - COBJS-y += cache-cp15.o - -+COBJS-y += call_with_stack.o -+ - SRCS := $(GLSOBJS:.o=.S) $(GLCOBJS:.o=.c) \ - $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) - OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) -diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c -index 9f861cc..3c2bf55 100644 ---- a/arch/arm/lib/board.c -+++ b/arch/arm/lib/board.c -@@ -355,7 +355,7 @@ void board_init_f(ulong bootflag) - - #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) - /* reserve TLB table */ -- gd->tlb_size = 4096 * 4; -+ gd->tlb_size = PGTABLE_SIZE; - addr -= gd->tlb_size; - - /* round down to next 64 kB limit */ -diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c -index 75cf7b1..aefa2ae 100644 ---- a/arch/arm/lib/cache-cp15.c -+++ b/arch/arm/lib/cache-cp15.c -@@ -44,13 +44,50 @@ static void cp_delay (void) - asm volatile("" : : : "memory"); - } - -+#ifdef CONFIG_ARMV7_LPAE -+struct special_addr { -+ u32 page; -+ u32 size; -+ u64 addr; -+}; -+ -+/* This hack is for 2GB board with second GB attached -+ * to LPAE-only address at 0x200000000ULL */ -+#define SDRAM2_ADDR 0x200000000ULL -+#define SDRAM2_SIZE 0x40000000 /* 1G */ -+static struct special_addr offsets[] = { -+ { 0x80000000 >> MMU_SECTION_SHIFT, SDRAM2_SIZE >> MMU_SECTION_SHIFT, SDRAM2_ADDR, }, -+}; -+#endif -+ - void set_section_dcache(int section, enum dcache_option option) - { -+#ifdef CONFIG_ARMV7_LPAE -+ int i; -+ u64 *page_table = (u64 *)gd->tlb_addr; -+ /* Need to set the access flag to not fault */ -+ u64 value = TTB_SECT_AP | TTB_SECT_AF; -+#else - u32 *page_table = (u32 *)gd->tlb_addr; -- u32 value; -+ u32 value = TTB_SECT_AP; -+#endif -+ -+ /* Add the page offset */ -+#ifdef CONFIG_ARMV7_LPAE -+ for (i = 0; i < ARRAY_SIZE(offsets); i++) -+ if (section >= offsets[i].page && -+ section < offsets[i].page + offsets[i].size) -+ value |= offsets[i].addr + ((section - offsets[i].page) << MMU_SECTION_SHIFT); -+ else -+ value |= ((u32)section << MMU_SECTION_SHIFT); -+#else -+ value |= ((u32)section << MMU_SECTION_SHIFT); -+#endif - -- value = (section << MMU_SECTION_SHIFT) | (3 << 10); -+ /* Add caching bits */ - value |= option; -+ -+ /* Set PTE */ - page_table[section] = value; - } - -@@ -66,11 +103,11 @@ void mmu_set_region_dcache_behaviour(u32 start, int size, - enum dcache_option option) - { - u32 *page_table = (u32 *)gd->tlb_addr; -- u32 upto, end; -+ unsigned long upto, end; - - end = ALIGN(start + size, MMU_SECTION_SIZE) >> MMU_SECTION_SHIFT; - start = start >> MMU_SECTION_SHIFT; -- debug("%s: start=%x, size=%x, option=%d\n", __func__, start, size, -+ debug("%s: start=%pa, size=%zu, option=%d\n", __func__, &start, size, - option); - for (upto = start; upto < end; upto++) - set_section_dcache(upto, option); -@@ -83,11 +120,14 @@ static inline void dram_bank_mmu_setup(int bank) - int i; - - debug("%s: bank: %d\n", __func__, bank); -- for (i = bd->bi_dram[bank].start >> 20; -- i < (bd->bi_dram[bank].start + bd->bi_dram[bank].size) >> 20; -+ for (i = bd->bi_dram[bank].start >> MMU_SECTION_SHIFT; -+ i < (bd->bi_dram[bank].start >> MMU_SECTION_SHIFT) + -+ (bd->bi_dram[bank].size >> MMU_SECTION_SHIFT); - i++) { - #if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH) - set_section_dcache(i, DCACHE_WRITETHROUGH); -+#elif defined(CONFIG_SYS_ARM_CACHE_WRITEALLOC) -+ set_section_dcache(i, DCACHE_WRITEALLOC); - #else - set_section_dcache(i, DCACHE_WRITEBACK); - #endif -@@ -102,19 +142,88 @@ static inline void mmu_setup(void) - - arm_init_before_mmu(); - /* Set up an identity-mapping for all 4GB, rw for everyone */ -- for (i = 0; i < 4096; i++) -+ for (i = 0; i < ((4096ULL * 1024 * 1024) >> MMU_SECTION_SHIFT); i++) - set_section_dcache(i, DCACHE_OFF); - - for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { - dram_bank_mmu_setup(i); - } -+ /* Enabling d-cache for remapped region of memory -+ * -+ */ -+ for (i = (0x80000000 >> MMU_SECTION_SHIFT); -+ i < 0xc0000000 >> MMU_SECTION_SHIFT; i++) -+#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH) -+ set_section_dcache(i, DCACHE_WRITETHROUGH); -+#elif defined(CONFIG_SYS_ARM_CACHE_WRITEALLOC) -+ set_section_dcache(i, DCACHE_WRITEALLOC); -+#else -+ set_section_dcache(i, DCACHE_WRITEBACK); -+#endif -+ -+#ifdef CONFIG_ARMV7_LPAE -+ /* Set up 4 PTE entries pointing to our 4 1GB page tables */ -+ for (i = 0; i < 4; i++) { -+ u64 *page_table = (u64 *)(gd->tlb_addr + (4096 * 4)); -+ u64 tpt = gd->tlb_addr + (4096 * i); -+ page_table[i] = tpt | TTB_PAGETABLE; -+ } - -+ reg = TTBCR_EAE; -+#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH) -+ reg |= TTBCR_ORGN0_WT | TTBCR_IRGN0_WT; -+#elif defined(CONFIG_SYS_ARM_CACHE_WRITEALLOC) -+ reg |= TTBCR_ORGN0_WBWA | TTBCR_IRGN0_WBWA; -+#else -+ reg |= TTBCR_ORGN0_WBNWA | TTBCR_IRGN0_WBNWA; -+#endif -+ -+ if (is_hyp()) { -+ /* Set HCTR to enable LPAE */ -+ asm volatile("mcr p15, 4, %0, c2, c0, 2" -+ : : "r" (reg) : "memory"); -+ /* Set HTTBR0 */ -+ asm volatile("mcrr p15, 4, %0, %1, c2" -+ : -+ : "r"(gd->tlb_addr + (4096 * 4)), "r"(0) -+ : "memory"); -+ /* Set HMAIR */ -+ asm volatile("mcr p15, 4, %0, c10, c2, 0" -+ : : "r" (MEMORY_ATTRIBUTES) : "memory"); -+ } else { -+ /* Set TTBCR to enable LPAE */ -+ asm volatile("mcr p15, 0, %0, c2, c0, 2" -+ : : "r" (reg) : "memory"); -+ /* Set 64-bit TTBR0 */ -+ asm volatile("mcrr p15, 0, %0, %1, c2" -+ : -+ : "r"(gd->tlb_addr + (4096 * 4)), "r"(0) -+ : "memory"); -+ /* Set MAIR */ -+ asm volatile("mcr p15, 0, %0, c10, c2, 0" -+ : : "r" (MEMORY_ATTRIBUTES) : "memory"); -+ } -+#elif defined(CONFIG_ARMV7) -+ /* Set TTBR0 */ -+ reg = gd->tlb_addr & TTBR0_BASE_ADDR_MASK; -+#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH) -+ reg |= TTBR0_RGN_WT | TTBR0_IRGN_WT; -+#elif defined(CONFIG_SYS_ARM_CACHE_WRITEALLOC) -+ reg |= TTBR0_RGN_WBWA | TTBR0_IRGN_WBWA; -+#else -+ reg |= TTBR0_RGN_WB | TTBR0_IRGN_WB; -+#endif -+ asm volatile("mcr p15, 0, %0, c2, c0, 0" -+ : : "r" (reg) : "memory"); -+#else - /* Copy the page table address to cp15 */ - asm volatile("mcr p15, 0, %0, c2, c0, 0" - : : "r" (gd->tlb_addr) : "memory"); -+#endif - /* Set the access control to all-supervisor */ - asm volatile("mcr p15, 0, %0, c3, c0, 0" - : : "r" (~0)); -+ - /* and enable the mmu */ - reg = get_cr(); /* get control reg. */ - cp_delay(); -diff --git a/arch/arm/lib/call_with_stack.S b/arch/arm/lib/call_with_stack.S -new file mode 100644 -index 0000000..651d869 ---- /dev/null -+++ b/arch/arm/lib/call_with_stack.S -@@ -0,0 +1,20 @@ -+.globl call_with_stack -+.syntax unified /* use unified assembler syntax */ -+#ifdef __thumb__ -+.thumb /* assemble in Thumb-2 (.thumb" can also be used) */ -+#endif -+call_with_stack: -+ str sp, [r2, #-4]! -+ str lr, [r2, #-4]! -+ -+ mov sp, r2 -+ mov r2, r0 -+ mov r0, r1 -+ -+ adr lr, 1f -+ mov pc, r2 -+ -+1: ldr lr, [sp] -+ ldr sp, [sp, #4] -+ mov pc, lr -+ -diff --git a/board/renesas/porter/porter.c b/board/renesas/porter/porter.c -index 71836e2..6c4fd1a 100644 ---- a/board/renesas/porter/porter.c -+++ b/board/renesas/porter/porter.c -@@ -42,6 +42,10 @@ void s_init(void) - struct r8a7791_swdt *swdt = (struct r8a7791_swdt *)SWDT_BASE; - u32 val; - -+#ifdef CONFIG_SYS_ARCH_TIMER -+ arm_arch_timer_init(); -+#endif -+ - /* Watchdog init */ - writel(0xA5A5A500, &rwdt->rwtcsra); - writel(0xA5A5A500, &swdt->swtcsra); -@@ -71,10 +75,12 @@ int board_early_init_f(void) - { - u32 val; - -+#ifdef CONFIG_TMU_TIMER - /* TMU0 */ - val = readl(MSTPSR1); - val &= ~TMU0_MSTP125; - writel(val, SMSTPCR1); -+#endif - - val = readl(MSTPSR7); - val &= ~SCIF0_MSTP721; -@@ -114,7 +120,9 @@ int board_init(void) - /* Init PFC controller */ - r8a7791_pinmux_init(); - -+#ifdef CONFIG_TMU_TIMER - sh_timer_init(); -+#endif - - /* ETHER Enable */ - gpio_request(GPIO_FN_ETH_CRS_DV, NULL); -@@ -288,10 +296,12 @@ void arch_preboot_os() - u32 val; - int i; - -+#ifdef CONFIG_TMU_TIMER - /* stop TMU0 */ - val = readb(TMU_BASE + TSTR0); - val &= ~TSTR0_STR0; - writeb(val, TMU_BASE + TSTR0); -+#endif - - /* stop all module clock*/ - for (i = MSTP00; i < MSTP_NR; i++) { -diff --git a/include/configs/porter.h b/include/configs/porter.h -index 7ab0643..5567c7c 100644 ---- a/include/configs/porter.h -+++ b/include/configs/porter.h -@@ -53,6 +53,9 @@ - #define CONFIG_CMD_EXT4_WRITE - #define CONFIG_CMD_SF - #define CONFIG_CMD_SPI -+#define CONFIG_CMD_SWSUSP -+#define CONFIG_CMD_SWSUSPMEM -+#define CONFIG_LZO - - #define CONFIG_CMDLINE_TAG - #define CONFIG_SETUP_MEMORY_TAGS -@@ -75,7 +78,6 @@ - #define CONFIG_BOARD_EARLY_INIT_F - #define CONFIG_USE_ARCH_MEMSET - #define CONFIG_USE_ARCH_MEMCPY --#define CONFIG_TMU_TIMER - - /* STACK */ - #if defined(CONFIG_EXTRAM_BOOT) -@@ -89,8 +91,8 @@ - - /* MEMORY */ - #define PORTER_SDRAM_BASE 0x40000000 --#define PORTER_SDRAM_SIZE 0x40000000 --#define PORTER_UBOOT_SDRAM_SIZE 0x20000000 -+#define PORTER_SDRAM_SIZE 0x48000000 -+#define PORTER_UBOOT_SDRAM_SIZE 0x40000000 - - #define CONFIG_SYS_LONGHELP - #define CONFIG_SYS_PROMPT "=> " -@@ -203,4 +205,15 @@ - #define CONFIG_USB_HOST_ETHER /* Enable USB Ethernet adapters */ - #define CONFIG_USB_ETHER_ASIX /* Asix, or whatever driver(s) you want */ - -+#define CONFIG_ARMV7_LPAE /* 64-bit MMU descriptors */ -+#define CONFIG_SYS_ARM_CACHE_WRITEALLOC /* Make memory operations faster */ -+ -+#define CONFIG_SYS_ARCH_TIMER /* Init arch timer */ -+#define CONFIG_VE_ENABLED /* Virtualization Extensions are enabled*/ -+#define CONFIG_SYS_HZ_CLOCK CONFIG_SYS_CLK_FREQ -+ -+#define CONFIG_SH_DMA -+#define CONFIG_SH_SYS_DMAL_BASE 0xE6700000 -+#define CONFIG_SH_SYS_DMAL_NCH 15 -+ - #endif /* __PORTER_H */ --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot_2013.01.01.bbappend b/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot_2013.01.01.bbappend deleted file mode 100644 index 9535e174d..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-bsp/u-boot/u-boot_2013.01.01.bbappend +++ /dev/null @@ -1,13 +0,0 @@ -FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" - -SRC_URI_append_porter_sota = "file://0001-Autoload-uEnv.txt-on-boot.patch" - -SRC_URI_append_agl-porter-hibernate = " file://hibernation/0001-Add-rcar-sdhi-DMA-support.patch \ - file://hibernation/0002-Add-Hibernation-swsusp-command-support.patch \ - file://hibernation/0003-Add-Hibernation-swsuspmem-command-support.patch \ - file://hibernation/0004-Add-porter-board-Hibernation-code.patch \ - file://hibernation/0001-Add-hibernation-image-area.patch \ - file://hibernation/0002-Enable-swsusp-DMA-support.patch \ - file://hibernation/0003-Add-hibernation-image-area.patch \ - " - diff --git a/meta-agl-bsp/meta-renesas/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl-bsp/meta-renesas/recipes-graphics/wayland/weston-ini-conf.bbappend deleted file mode 100644 index d92f7846e..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-graphics/wayland/weston-ini-conf.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -# Disable LVDS -SRC_URI += "file://lvds-off.cfg" diff --git a/meta-agl-bsp/meta-renesas/recipes-graphics/wayland/weston-ini-conf/lvds-off.cfg b/meta-agl-bsp/meta-renesas/recipes-graphics/wayland/weston-ini-conf/lvds-off.cfg deleted file mode 100644 index 8c141139d..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-graphics/wayland/weston-ini-conf/lvds-off.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[output] -name=LVDS-1 -mode=off diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/gles-module/gles-kernel-module.bbappend b/meta-agl-bsp/meta-renesas/recipes-kernel/gles-module/gles-kernel-module.bbappend deleted file mode 100755 index 589ed87dc..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/gles-module/gles-kernel-module.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -FILESEXTRAPATHS_prepend := '${THISDIR}/${PN}:' -SRC_URI_r8a7791_append_agl-porter-hibernate = ' file://hibernation/0001-Add-gles-hibernation-code-for-M2W-only.patch \ - ' -python __anonymous () { - d.delVarFlag('do_patch', 'noexec') -} - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/gles-module/gles-kernel-module/hibernation/0001-Add-gles-hibernation-code-for-M2W-only.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/gles-module/gles-kernel-module/hibernation/0001-Add-gles-hibernation-code-for-M2W-only.patch deleted file mode 100644 index a3dd6089c..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/gles-module/gles-kernel-module/hibernation/0001-Add-gles-hibernation-code-for-M2W-only.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 600612d670639fc74135a4f15a79d411931b39a8 Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Sun, 21 May 2017 12:14:03 +0900 -Subject: [PATCH] Add gles hibernation code for M2W only - -Signed-off-by: Yuichi Kusakabe ---- - services4/srvkm/env/linux/module.c | 13 +++++++++++-- - 1 file changed, 11 insertions(+), 2 deletions(-) - -diff --git a/services4/srvkm/env/linux/module.c b/services4/srvkm/env/linux/module.c -index f3f22b0..85ac24f 100644 ---- a/services4/srvkm/env/linux/module.c -+++ b/services4/srvkm/env/linux/module.c -@@ -284,9 +284,18 @@ static struct platform_device_id powervr_id_table[] __devinitdata = { - }; - #endif - -+int pvrsrv_restore_noirq(struct device *dev) -+{ -+#if defined(CONFIG_ARM_LPAE) && defined(SUPPORT_RCAR_IPMMU) -+ extern int r8a779x_ipmmu_initialize(void); -+ r8a779x_ipmmu_initialize(); -+#endif -+ return 0; -+} -+ - static struct dev_pm_ops powervr_dev_pm_ops = { -- .suspend = PVRSRVDriverSuspend, -- .resume = PVRSRVDriverResume, -+ SET_SYSTEM_SLEEP_PM_OPS(PVRSRVDriverSuspend, PVRSRVDriverResume) -+ .restore_noirq = pvrsrv_restore_noirq, - }; - - static LDM_DRV powervr_driver = { --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux-renesas_%.bbappend b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux-renesas_%.bbappend deleted file mode 100755 index 08831a365..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux-renesas_%.bbappend +++ /dev/null @@ -1,45 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/linux:" - -# Enable support for TP-Link TL-W722N USB Wifi adapter and RTL2832U DVB USB and USB Audio -# adapter. -SRC_URI += " file://disable_delay_printk.patch \ - file://cfg_mac_80211.cfg \ - file://ra2x00.cfg \ - file://0001-media-r820t-do-not-double-free-fe-tuner_priv-in-r820.patch \ - file://0002-media-r820t-remove-redundant-initializations-in-r820.patch \ - file://0003-media-r820t-avoid-potential-memcpy-buffer-overflow-i.patch \ - file://hciattach.cfg \ - file://pppd-rcar.cfg \ - " - -SRC_URI_append_agl-porter-hibernate = " file://hibernation/0001-Add-Hibernation-kernel-base-code.patch \ - file://hibernation/0002-Add-Hibernation-arch-code-Only-R-CAR-M2W.patch \ - file://hibernation/0003-Add-sata-hibernation-code.patch \ - file://hibernation/0004-Add-firmware-hibernation-code.patch \ - file://hibernation/0005-Add-rcar-dma-hibernation-code.patch \ - file://hibernation/0006-Add-rcar-du-hibernation-code.patch \ - file://hibernation/0007-Add-rcar-i2c-hibernation-code.patch \ - file://hibernation/0008-Add-rcar-mmc-hibernation-code.patch \ - file://hibernation/0009-Add-hibernation-store-area.patch \ - file://hibernation/0010-Add-rcar-eth-hibernation-code.patch \ - file://hibernation/0011-Add-rcar-pci-hibernation-code.patch \ - file://hibernation/0012-Add-rcar-gpio-hibernation-code.patch \ - file://hibernation/0013-Add-rcar-spi-hibernation-code.patch \ - file://hibernation/0014-Add-rcar-sci-hibernation-code.patch \ - file://hibernation/0015-Add-rcar-usbphy-hibernation-code.patch \ - file://hibernation/0001-Add-shdmac-hibernation-code.patch \ - file://hibernation/0002-Fix-Black-blink-correction-of-display.patch \ - file://hibernation/0003-Add-hibernation-image-area.patch \ - file://hibernation/hibernation.cfg \ - " - -KERNEL_CONFIG_FRAGMENTS_append_agl-porter-hibernate += " ${WORKDIR}/hibernation/hibernation.cfg" - -# file comes out of meta-agl-bsp/recipes-kernel/linux/linux_%.bbappend -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/can-bus.cfg" - -# Enable support for usb video class for usb camera devices -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/uvc.cfg" - -# Enable support for joystick devices -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/joystick.cfg" diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/0001-media-r820t-do-not-double-free-fe-tuner_priv-in-r820.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/0001-media-r820t-do-not-double-free-fe-tuner_priv-in-r820.patch deleted file mode 100644 index 61542556d..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/0001-media-r820t-do-not-double-free-fe-tuner_priv-in-r820.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 4aab0398e003ac2effae98ba66a012ed715967ba Mon Sep 17 00:00:00 2001 -From: Gianluca Gennari -Date: Sun, 2 Jun 2013 14:26:15 -0300 -Subject: [PATCH 1/3] [media] r820t: do not double-free fe->tuner_priv in - r820t_release() - -fe->tuner_priv is already freed by hybrid_tuner_release_state(). - -Signed-off-by: Gianluca Gennari -Signed-off-by: Michael Krufky -Signed-off-by: Mauro Carvalho Chehab ---- - drivers/media/tuners/r820t.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c -index 4835021..64f9738 100644 ---- a/drivers/media/tuners/r820t.c -+++ b/drivers/media/tuners/r820t.c -@@ -2256,7 +2256,6 @@ static int r820t_release(struct dvb_frontend *fe) - - mutex_unlock(&r820t_list_mutex); - -- kfree(fe->tuner_priv); - fe->tuner_priv = NULL; - - return 0; --- -2.9.2 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/0002-media-r820t-remove-redundant-initializations-in-r820.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/0002-media-r820t-remove-redundant-initializations-in-r820.patch deleted file mode 100644 index 596dd6bee..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/0002-media-r820t-remove-redundant-initializations-in-r820.patch +++ /dev/null @@ -1,52 +0,0 @@ -From e2e324d70defce7ffc4668085dc3c8ae580074e5 Mon Sep 17 00:00:00 2001 -From: Gianluca Gennari -Date: Sun, 2 Jun 2013 14:30:09 -0300 -Subject: [PATCH 2/3] [media] r820t: remove redundant initializations in - r820t_attach() - -fe->tuner_priv and fe->ops.tuner_ops are initialized twice in r820t_attach(). -Remove the redundant initializations and also move fe->ops.tuner_ops -initialization outside of the mutex lock (as in the xc4000 tuner code for example). - -Signed-off-by: Gianluca Gennari -Signed-off-by: Michael Krufky -Signed-off-by: Mauro Carvalho Chehab ---- - drivers/media/tuners/r820t.c | 9 +++------ - 1 file changed, 3 insertions(+), 6 deletions(-) - -diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c -index 64f9738..63062a9 100644 ---- a/drivers/media/tuners/r820t.c -+++ b/drivers/media/tuners/r820t.c -@@ -2310,8 +2310,6 @@ struct dvb_frontend *r820t_attach(struct dvb_frontend *fe, - break; - } - -- memcpy(&fe->ops.tuner_ops, &r820t_tuner_ops, sizeof(r820t_tuner_ops)); -- - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); - -@@ -2326,15 +2324,14 @@ struct dvb_frontend *r820t_attach(struct dvb_frontend *fe, - - tuner_info("Rafael Micro r820t successfully identified\n"); - -- fe->tuner_priv = priv; -- memcpy(&fe->ops.tuner_ops, &r820t_tuner_ops, -- sizeof(struct dvb_tuner_ops)); -- - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 0); - - mutex_unlock(&r820t_list_mutex); - -+ memcpy(&fe->ops.tuner_ops, &r820t_tuner_ops, -+ sizeof(struct dvb_tuner_ops)); -+ - return fe; - err: - if (fe->ops.i2c_gate_ctrl) --- -2.9.2 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/0003-media-r820t-avoid-potential-memcpy-buffer-overflow-i.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/0003-media-r820t-avoid-potential-memcpy-buffer-overflow-i.patch deleted file mode 100644 index fac5c2171..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/0003-media-r820t-avoid-potential-memcpy-buffer-overflow-i.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 757d7ace565c06e1302ba7c9244d839455e13881 Mon Sep 17 00:00:00 2001 -From: Gianluca Gennari -Date: Sun, 2 Jun 2013 14:31:19 -0300 -Subject: [PATCH 3/3] [media] r820t: avoid potential memcpy buffer overflow in - shadow_store() - -The memcpy in shadow_store() could exceed buffer limits when r > 0. - -Signed-off-by: Gianluca Gennari -Signed-off-by: Michael Krufky -Signed-off-by: Mauro Carvalho Chehab ---- - drivers/media/tuners/r820t.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c -index 63062a9..0a5f96b 100644 ---- a/drivers/media/tuners/r820t.c -+++ b/drivers/media/tuners/r820t.c -@@ -364,8 +364,8 @@ static void shadow_store(struct r820t_priv *priv, u8 reg, const u8 *val, - } - if (len <= 0) - return; -- if (len > NUM_REGS) -- len = NUM_REGS; -+ if (len > NUM_REGS - r) -+ len = NUM_REGS - r; - - tuner_dbg("%s: prev reg=%02x len=%d: %*ph\n", - __func__, r + REG_SHADOW_START, len, len, val); --- -2.9.2 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/cfg_mac_80211.cfg b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/cfg_mac_80211.cfg deleted file mode 100644 index 559f3e7af..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/cfg_mac_80211.cfg +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_CFG80211=m -CONFIG_MAC80211=m diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/disable_delay_printk.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/disable_delay_printk.patch deleted file mode 100755 index 28acf1e08..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/disable_delay_printk.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c -old mode 100644 -new mode 100755 -index 93b6e32..2e9dd36 ---- a/sound/usb/pcm.c -+++ b/sound/usb/pcm.c -@@ -1420,8 +1420,8 @@ static void retire_playback_urb(struct snd_usb_substream *subs, - * on two reads of a counter updated every ms. - */ - if (abs(est_delay - subs->last_delay) * 1000 > runtime->rate * 2) -- snd_printk(KERN_DEBUG "delay: estimated %d, actual %d\n", -- est_delay, subs->last_delay); -+// snd_printk(KERN_DEBUG "delay: estimated %d, actual %d\n", -+// est_delay, subs->last_delay); - - if (!subs->running) { - /* update last_frame_number for delay counting here since diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hciattach.cfg b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hciattach.cfg deleted file mode 100755 index 95ee2d7fc..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hciattach.cfg +++ /dev/null @@ -1,9 +0,0 @@ -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_ATH3K=y -CONFIG_BT_HCIUART_LL=y -CONFIG_BT_HCIUART_3WIRE=y -CONFIG_USB_SERIAL=y -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_CP210X=y diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0001-Add-Hibernation-kernel-base-code.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0001-Add-Hibernation-kernel-base-code.patch deleted file mode 100755 index 87cd2863a..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0001-Add-Hibernation-kernel-base-code.patch +++ /dev/null @@ -1,853 +0,0 @@ -From 60123966221b74199e4cf0c18d43396b4f00a94a Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Thu, 18 May 2017 16:44:34 +0900 -Subject: [PATCH 01/15] Add Hibernation kernel base code - -Signed-off-by: Yuichi Kusakabe ---- - include/linux/sched.h | 1 + - include/linux/suspend.h | 2 + - kernel/auditfilter.c | 2 +- - kernel/power/console.c | 2 + - kernel/power/hibernate.c | 146 +++++++++++++++++++++++++++++++---------------- - kernel/power/main.c | 4 -- - kernel/power/power.h | 8 ++- - kernel/power/process.c | 35 ++++++++---- - kernel/power/snapshot.c | 33 +++++++---- - kernel/power/suspend.c | 4 +- - kernel/power/swap.c | 50 ++++++++++++++-- - 11 files changed, 201 insertions(+), 86 deletions(-) - -diff --git a/include/linux/sched.h b/include/linux/sched.h -index f87e9a8..8e3270c 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -1644,6 +1644,7 @@ extern void thread_group_cputime_adjusted(struct task_struct *p, cputime_t *ut, - #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ - #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ - #define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezable */ -+#define PF_SUSPEND_TASK 0x80000000 /* this thread called freeze_processes and should not be frozen */ - - /* - * Only the _current_ task can read/write to tsk->flags, but other -diff --git a/include/linux/suspend.h b/include/linux/suspend.h -index d4e3f16..243ff56 100644 ---- a/include/linux/suspend.h -+++ b/include/linux/suspend.h -@@ -320,6 +320,8 @@ extern unsigned long get_safe_page(gfp_t gfp_mask); - extern void hibernation_set_ops(const struct platform_hibernation_ops *ops); - extern int hibernate(void); - extern bool system_entering_hibernation(void); -+asmlinkage int swsusp_save(void); -+extern struct pbe *restore_pblist; - #else /* CONFIG_HIBERNATION */ - static inline void register_nosave_region(unsigned long b, unsigned long e) {} - static inline void register_nosave_region_late(unsigned long b, unsigned long e) {} -diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c -index 6bd4a90..ac08a9a 100644 ---- a/kernel/auditfilter.c -+++ b/kernel/auditfilter.c -@@ -423,7 +423,7 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, - f->lsm_rule = NULL; - - /* Support legacy tests for a valid loginuid */ -- if ((f->type == AUDIT_LOGINUID) && (f->val == 4294967295)) { -+ if ((f->type == AUDIT_LOGINUID) && (f->val == 0xFFFFFFFF)) { - f->type = AUDIT_LOGINUID_SET; - f->val = 0; - } -diff --git a/kernel/power/console.c b/kernel/power/console.c -index 463aa67..aba9c54 100644 ---- a/kernel/power/console.c -+++ b/kernel/power/console.c -@@ -9,6 +9,7 @@ - #include - #include - #include -+#include - #include "power.h" - - #define SUSPEND_CONSOLE (MAX_NR_CONSOLES-1) -@@ -81,6 +82,7 @@ void pm_vt_switch_unregister(struct device *dev) - list_for_each_entry(tmp, &pm_vt_switch_list, head) { - if (tmp->dev == dev) { - list_del(&tmp->head); -+ kfree(tmp); - break; - } - } -diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c -index b26f5f1..524dcf5 100644 ---- a/kernel/power/hibernate.c -+++ b/kernel/power/hibernate.c -@@ -34,12 +34,13 @@ - - static int nocompress; - static int noresume; -+static int nohibernate; - static int resume_wait; --static int resume_delay; -+static unsigned int resume_delay; - static char resume_file[256] = CONFIG_PM_STD_PARTITION; - dev_t swsusp_resume_device; - sector_t swsusp_resume_block; --int in_suspend __nosavedata; -+__visible int in_suspend __nosavedata; - - enum { - HIBERNATION_INVALID, -@@ -61,6 +62,11 @@ bool freezer_test_done; - - static const struct platform_hibernation_ops *hibernation_ops; - -+bool hibernation_available(void) -+{ -+ return (nohibernate == 0); -+} -+ - /** - * hibernation_set_ops - Set the global hibernate operations. - * @ops: Hibernation operations to use in subsequent hibernation transitions. -@@ -82,6 +88,7 @@ void hibernation_set_ops(const struct platform_hibernation_ops *ops) - - unlock_system_sleep(); - } -+EXPORT_SYMBOL_GPL(hibernation_set_ops); - - static bool entering_platform_hibernation; - -@@ -227,19 +234,23 @@ static void platform_recover(int platform_mode) - void swsusp_show_speed(struct timeval *start, struct timeval *stop, - unsigned nr_pages, char *msg) - { -- s64 elapsed_centisecs64; -- int centisecs; -- int k; -- int kps; -+ u64 elapsed_centisecs64; -+ unsigned int centisecs; -+ unsigned int k; -+ unsigned int kps; - - elapsed_centisecs64 = timeval_to_ns(stop) - timeval_to_ns(start); -+ /* -+ * If "(s64)elapsed_centisecs64 < 0", it will print long elapsed time, -+ * it is obvious enough for what went wrong. -+ */ - do_div(elapsed_centisecs64, NSEC_PER_SEC / 100); - centisecs = elapsed_centisecs64; - if (centisecs == 0) - centisecs = 1; /* avoid div-by-zero */ - k = nr_pages * (PAGE_SIZE / 1024); - kps = (k * 100) / centisecs; -- printk(KERN_INFO "PM: %s %d kbytes in %d.%02d seconds (%d.%02d MB/s)\n", -+ pr_info("PM: %s %u kbytes in %u.%02u seconds (%u.%02u MB/s)\n", - msg, k, - centisecs / 100, centisecs % 100, - kps / 1000, (kps % 1000) / 10); -@@ -293,10 +304,10 @@ static int create_image(int platform_mode) - error); - /* Restore control flow magically appears here */ - restore_processor_state(); -- if (!in_suspend) { -+ if (!in_suspend) - events_check_enabled = false; -- platform_leave(platform_mode); -- } -+ -+ platform_leave(platform_mode); - - Power_up: - syscore_resume(); -@@ -594,7 +605,8 @@ static void power_down(void) - case HIBERNATION_PLATFORM: - hibernation_platform_enter(); - case HIBERNATION_SHUTDOWN: -- kernel_power_off(); -+ if (pm_power_off) -+ kernel_power_off(); - break; - #ifdef CONFIG_SUSPEND - case HIBERNATION_SUSPEND: -@@ -622,7 +634,8 @@ static void power_down(void) - * corruption after resume. - */ - printk(KERN_CRIT "PM: Please power down manually\n"); -- while(1); -+ while (1) -+ cpu_relax(); - } - - /** -@@ -632,6 +645,11 @@ int hibernate(void) - { - int error; - -+ if (!hibernation_available()) { -+ pr_debug("PM: Hibernation not available.\n"); -+ return -EPERM; -+ } -+ - lock_system_sleep(); - /* The snapshot device should not be opened while we're running */ - if (!atomic_add_unless(&snapshot_device_available, -1, 0)) { -@@ -644,22 +662,22 @@ int hibernate(void) - if (error) - goto Exit; - -- /* Allocate memory management structures */ -- error = create_basic_memory_bitmaps(); -- if (error) -- goto Exit; -- - printk(KERN_INFO "PM: Syncing filesystems ... "); - sys_sync(); - printk("done.\n"); - - error = freeze_processes(); - if (error) -- goto Free_bitmaps; -+ goto Exit; -+ -+ /* Allocate memory management structures */ -+ error = create_basic_memory_bitmaps(); -+ if (error) -+ goto Thaw; - - error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM); - if (error || freezer_test_done) -- goto Thaw; -+ goto Free_bitmaps; - - if (in_suspend) { - unsigned int flags = 0; -@@ -682,14 +700,13 @@ int hibernate(void) - pr_debug("PM: Image restored successfully.\n"); - } - -+ Free_bitmaps: -+ free_basic_memory_bitmaps(); - Thaw: - thaw_processes(); - - /* Don't bother checking whether freezer_test_done is true */ - freezer_test_done = false; -- -- Free_bitmaps: -- free_basic_memory_bitmaps(); - Exit: - pm_notifier_call_chain(PM_POST_HIBERNATION); - pm_restore_console(); -@@ -723,7 +740,7 @@ static int software_resume(void) - /* - * If the user said "noresume".. bail out early. - */ -- if (noresume) -+ if (noresume || !hibernation_available()) - return 0; - - /* -@@ -806,21 +823,19 @@ static int software_resume(void) - pm_prepare_console(); - error = pm_notifier_call_chain(PM_RESTORE_PREPARE); - if (error) -- goto close_finish; -- -- error = create_basic_memory_bitmaps(); -- if (error) -- goto close_finish; -+ goto Close_Finish; - - pr_debug("PM: Preparing processes for restore.\n"); - error = freeze_processes(); -- if (error) { -- swsusp_close(FMODE_READ); -- goto Done; -- } -+ if (error) -+ goto Close_Finish; - - pr_debug("PM: Loading hibernation image.\n"); - -+ error = create_basic_memory_bitmaps(); -+ if (error) -+ goto Thaw; -+ - error = swsusp_read(&flags); - swsusp_close(FMODE_READ); - if (!error) -@@ -828,9 +843,9 @@ static int software_resume(void) - - printk(KERN_ERR "PM: Failed to load hibernation image, recovering.\n"); - swsusp_free(); -- thaw_processes(); -- Done: - free_basic_memory_bitmaps(); -+ Thaw: -+ thaw_processes(); - Finish: - pm_notifier_call_chain(PM_POST_RESTORE); - pm_restore_console(); -@@ -840,12 +855,12 @@ static int software_resume(void) - mutex_unlock(&pm_mutex); - pr_debug("PM: Hibernation image not present or could not be loaded.\n"); - return error; --close_finish: -+ Close_Finish: - swsusp_close(FMODE_READ); - goto Finish; - } - --late_initcall(software_resume); -+late_initcall_sync(software_resume); - - - static const char * const hibernation_modes[] = { -@@ -889,6 +904,9 @@ static ssize_t disk_show(struct kobject *kobj, struct kobj_attribute *attr, - int i; - char *start = buf; - -+ if (!hibernation_available()) -+ return sprintf(buf, "[disabled]\n"); -+ - for (i = HIBERNATION_FIRST; i <= HIBERNATION_MAX; i++) { - if (!hibernation_modes[i]) - continue; -@@ -923,6 +941,9 @@ static ssize_t disk_store(struct kobject *kobj, struct kobj_attribute *attr, - char *p; - int mode = HIBERNATION_INVALID; - -+ if (!hibernation_available()) -+ return -EPERM; -+ - p = memchr(buf, '\n', n); - len = p ? p - buf : n; - -@@ -971,16 +992,20 @@ static ssize_t resume_show(struct kobject *kobj, struct kobj_attribute *attr, - static ssize_t resume_store(struct kobject *kobj, struct kobj_attribute *attr, - const char *buf, size_t n) - { -- unsigned int maj, min; - dev_t res; -- int ret = -EINVAL; -+ int len = n; -+ char *name; - -- if (sscanf(buf, "%u:%u", &maj, &min) != 2) -- goto out; -+ if (len && buf[len-1] == '\n') -+ len--; -+ name = kstrndup(buf, len, GFP_KERNEL); -+ if (!name) -+ return -ENOMEM; - -- res = MKDEV(maj,min); -- if (maj != MAJOR(res) || min != MINOR(res)) -- goto out; -+ res = name_to_dev_t(name); -+ kfree(name); -+ if (!res) -+ return -EINVAL; - - lock_system_sleep(); - swsusp_resume_device = res; -@@ -988,20 +1013,20 @@ static ssize_t resume_store(struct kobject *kobj, struct kobj_attribute *attr, - printk(KERN_INFO "PM: Starting manual resume from disk\n"); - noresume = 0; - software_resume(); -- ret = n; -- out: -- return ret; -+ return n; - } - - power_attr(resume); - --static ssize_t image_size_show(struct kobject *kobj, struct kobj_attribute *attr, -+static ssize_t image_size_show(struct kobject *kobj, -+ struct kobj_attribute *attr, - char *buf) - { - return sprintf(buf, "%lu\n", image_size); - } - --static ssize_t image_size_store(struct kobject *kobj, struct kobj_attribute *attr, -+static ssize_t image_size_store(struct kobject *kobj, -+ struct kobj_attribute *attr, - const char *buf, size_t n) - { - unsigned long size; -@@ -1065,7 +1090,7 @@ static int __init resume_setup(char *str) - if (noresume) - return 1; - -- strncpy( resume_file, str, 255 ); -+ strncpy(resume_file, str, 255); - return 1; - } - -@@ -1088,6 +1113,10 @@ static int __init hibernate_setup(char *str) - noresume = 1; - else if (!strncmp(str, "nocompress", 10)) - nocompress = 1; -+ else if (!strncmp(str, "no", 2)) { -+ noresume = 1; -+ nohibernate = 1; -+ } - return 1; - } - -@@ -1105,13 +1134,30 @@ static int __init resumewait_setup(char *str) - - static int __init resumedelay_setup(char *str) - { -- resume_delay = simple_strtoul(str, NULL, 0); -+ int rc = kstrtouint(str, 0, &resume_delay); -+ -+ if (rc) -+ return rc; -+ return 1; -+} -+ -+static int __init nohibernate_setup(char *str) -+{ -+ noresume = 1; -+ nohibernate = 1; - return 1; - } - -+static int __init kaslr_nohibernate_setup(char *str) -+{ -+ return nohibernate_setup(str); -+} -+ - __setup("noresume", noresume_setup); - __setup("resume_offset=", resume_offset_setup); - __setup("resume=", resume_setup); - __setup("hibernate=", hibernate_setup); - __setup("resumewait", resumewait_setup); - __setup("resumedelay=", resumedelay_setup); -+__setup("nohibernate", nohibernate_setup); -+__setup("kaslr", kaslr_nohibernate_setup); -diff --git a/kernel/power/main.c b/kernel/power/main.c -index d77663b..ac615e4 100644 ---- a/kernel/power/main.c -+++ b/kernel/power/main.c -@@ -610,7 +610,6 @@ static struct attribute_group attr_group = { - .attrs = g, - }; - --#ifdef CONFIG_PM_RUNTIME - struct workqueue_struct *pm_wq; - EXPORT_SYMBOL_GPL(pm_wq); - -@@ -620,9 +619,6 @@ static int __init pm_start_workqueue(void) - - return pm_wq ? 0 : -ENOMEM; - } --#else --static inline int pm_start_workqueue(void) { return 0; } --#endif - - static int __init pm_init(void) - { -diff --git a/kernel/power/power.h b/kernel/power/power.h -index 7d4b7ff..c5821ca 100644 ---- a/kernel/power/power.h -+++ b/kernel/power/power.h -@@ -2,6 +2,7 @@ - #include - #include - #include -+#include - - struct swsusp_info { - struct new_utsname uts; -@@ -11,7 +12,8 @@ struct swsusp_info { - unsigned long image_pages; - unsigned long pages; - unsigned long size; --} __attribute__((aligned(PAGE_SIZE))); -+ char archdata[1024]; -+} __aligned(PAGE_SIZE); - - #ifdef CONFIG_HIBERNATION - /* kernel/power/snapshot.c */ -@@ -37,6 +39,8 @@ static inline char *check_image_kernel(struct swsusp_info *info) - } - #endif /* CONFIG_ARCH_HIBERNATION_HEADER */ - -+extern void __weak swsusp_arch_add_info(char *archdata); -+ - /* - * Keep some memory free so that I/O operations can succeed without paging - * [Might this be more than 4 MB?] -@@ -49,6 +53,8 @@ static inline char *check_image_kernel(struct swsusp_info *info) - */ - #define SPARE_PAGES ((1024 * 1024) >> PAGE_SHIFT) - -+asmlinkage int swsusp_save(void); -+ - /* kernel/power/hibernate.c */ - extern bool freezer_test_done; - -diff --git a/kernel/power/process.c b/kernel/power/process.c -index 0695319..04559b4 100644 ---- a/kernel/power/process.c -+++ b/kernel/power/process.c -@@ -30,9 +30,10 @@ static int try_to_freeze_tasks(bool user_only) - unsigned int todo; - bool wq_busy = false; - struct timeval start, end; -- u64 elapsed_csecs64; -- unsigned int elapsed_csecs; -+ u64 elapsed_msecs64; -+ unsigned int elapsed_msecs; - bool wakeup = false; -+ int sleep_usecs = USEC_PER_MSEC; - - do_gettimeofday(&start); - -@@ -68,22 +69,25 @@ static int try_to_freeze_tasks(bool user_only) - - /* - * We need to retry, but first give the freezing tasks some -- * time to enter the refrigerator. -+ * time to enter the refrigerator. Start with an initial -+ * 1 ms sleep followed by exponential backoff until 8 ms. - */ -- msleep(10); -+ usleep_range(sleep_usecs / 2, sleep_usecs); -+ if (sleep_usecs < 8 * USEC_PER_MSEC) -+ sleep_usecs *= 2; - } - - do_gettimeofday(&end); -- elapsed_csecs64 = timeval_to_ns(&end) - timeval_to_ns(&start); -- do_div(elapsed_csecs64, NSEC_PER_SEC / 100); -- elapsed_csecs = elapsed_csecs64; -+ elapsed_msecs64 = timeval_to_ns(&end) - timeval_to_ns(&start); -+ do_div(elapsed_msecs64, NSEC_PER_MSEC); -+ elapsed_msecs = elapsed_msecs64; - - if (todo) { - printk("\n"); -- printk(KERN_ERR "Freezing of tasks %s after %d.%02d seconds " -+ printk(KERN_ERR "Freezing of tasks %s after %d.%03d seconds " - "(%d tasks refusing to freeze, wq_busy=%d):\n", - wakeup ? "aborted" : "failed", -- elapsed_csecs / 100, elapsed_csecs % 100, -+ elapsed_msecs / 1000, elapsed_msecs % 1000, - todo - wq_busy, wq_busy); - - if (!wakeup) { -@@ -96,8 +100,8 @@ static int try_to_freeze_tasks(bool user_only) - read_unlock(&tasklist_lock); - } - } else { -- printk("(elapsed %d.%02d seconds) ", elapsed_csecs / 100, -- elapsed_csecs % 100); -+ printk("(elapsed %d.%03d seconds) ", elapsed_msecs / 1000, -+ elapsed_msecs % 1000); - } - - return todo ? -EBUSY : 0; -@@ -139,6 +143,9 @@ int freeze_processes(void) - if (error) - return error; - -+ /* Make sure this task doesn't get frozen */ -+ current->flags |= PF_SUSPEND_TASK; -+ - if (!pm_freezing) - atomic_inc(&system_freezing_cnt); - -@@ -202,6 +209,7 @@ int freeze_kernel_threads(void) - void thaw_processes(void) - { - struct task_struct *g, *p; -+ struct task_struct *curr = current; - - if (pm_freezing) - atomic_dec(&system_freezing_cnt); -@@ -217,10 +225,15 @@ void thaw_processes(void) - - read_lock(&tasklist_lock); - do_each_thread(g, p) { -+ /* No other threads should have PF_SUSPEND_TASK set */ -+ WARN_ON((p != curr) && (p->flags & PF_SUSPEND_TASK)); - __thaw_task(p); - } while_each_thread(g, p); - read_unlock(&tasklist_lock); - -+ WARN_ON(!(curr->flags & PF_SUSPEND_TASK)); -+ curr->flags &= ~PF_SUSPEND_TASK; -+ - usermodehelper_enable(); - - schedule(); -diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c -index 91c04f1..a673f7b 100644 ---- a/kernel/power/snapshot.c -+++ b/kernel/power/snapshot.c -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -155,7 +156,7 @@ static inline void free_image_page(void *addr, int clear_nosave_free) - struct linked_page { - struct linked_page *next; - char data[LINKED_PAGE_DATA_SIZE]; --} __attribute__((packed)); -+} __packed; - - static inline void - free_list_of_pages(struct linked_page *list, int clear_page_nosave) -@@ -352,7 +353,7 @@ static int create_mem_extents(struct list_head *list, gfp_t gfp_mask) - struct mem_extent *ext, *cur, *aux; - - zone_start = zone->zone_start_pfn; -- zone_end = zone->zone_start_pfn + zone->spanned_pages; -+ zone_end = zone_end_pfn(zone); - - list_for_each_entry(ext, list, hook) - if (zone_start <= ext->end) -@@ -642,8 +643,9 @@ __register_nosave_region(unsigned long start_pfn, unsigned long end_pfn, - region->end_pfn = end_pfn; - list_add_tail(®ion->list, &nosave_regions); - Report: -- printk(KERN_INFO "PM: Registered nosave memory: %016lx - %016lx\n", -- start_pfn << PAGE_SHIFT, end_pfn << PAGE_SHIFT); -+ printk(KERN_INFO "PM: Registered nosave memory: [mem %#010llx-%#010llx]\n", -+ (unsigned long long) start_pfn << PAGE_SHIFT, -+ ((unsigned long long) end_pfn << PAGE_SHIFT) - 1); - } - - /* -@@ -742,7 +744,10 @@ int create_basic_memory_bitmaps(void) - struct memory_bitmap *bm1, *bm2; - int error = 0; - -- BUG_ON(forbidden_pages_map || free_pages_map); -+ if (forbidden_pages_map && free_pages_map) -+ return 0; -+ else -+ BUG_ON(forbidden_pages_map || free_pages_map); - - bm1 = kzalloc(sizeof(struct memory_bitmap), GFP_KERNEL); - if (!bm1) -@@ -788,7 +793,8 @@ void free_basic_memory_bitmaps(void) - { - struct memory_bitmap *bm1, *bm2; - -- BUG_ON(!(forbidden_pages_map && free_pages_map)); -+ if (WARN_ON(!(forbidden_pages_map && free_pages_map))) -+ return; - - bm1 = forbidden_pages_map; - bm2 = free_pages_map; -@@ -883,7 +889,7 @@ static unsigned int count_highmem_pages(void) - continue; - - mark_free_pages(zone); -- max_zone_pfn = zone->zone_start_pfn + zone->spanned_pages; -+ max_zone_pfn = zone_end_pfn(zone); - for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++) - if (saveable_highmem_page(zone, pfn)) - n++; -@@ -947,7 +953,7 @@ static unsigned int count_data_pages(void) - continue; - - mark_free_pages(zone); -- max_zone_pfn = zone->zone_start_pfn + zone->spanned_pages; -+ max_zone_pfn = zone_end_pfn(zone); - for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++) - if (saveable_page(zone, pfn)) - n++; -@@ -1040,7 +1046,7 @@ copy_data_pages(struct memory_bitmap *copy_bm, struct memory_bitmap *orig_bm) - unsigned long max_zone_pfn; - - mark_free_pages(zone); -- max_zone_pfn = zone->zone_start_pfn + zone->spanned_pages; -+ max_zone_pfn = zone_end_pfn(zone); - for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++) - if (page_is_saveable(zone, pfn)) - memory_bm_set_bit(orig_bm, pfn); -@@ -1092,7 +1098,7 @@ void swsusp_free(void) - unsigned long pfn, max_zone_pfn; - - for_each_populated_zone(zone) { -- max_zone_pfn = zone->zone_start_pfn + zone->spanned_pages; -+ max_zone_pfn = zone_end_pfn(zone); - for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++) - if (pfn_valid(pfn)) { - struct page *page = pfn_to_page(pfn); -@@ -1580,7 +1586,7 @@ swsusp_alloc(struct memory_bitmap *orig_bm, struct memory_bitmap *copy_bm, - return -ENOMEM; - } - --asmlinkage int swsusp_save(void) -+asmlinkage __visible int swsusp_save(void) - { - unsigned int nr_pages, nr_highmem; - -@@ -1628,6 +1634,7 @@ static int init_header_complete(struct swsusp_info *info) - { - memcpy(&info->uts, init_utsname(), sizeof(struct new_utsname)); - info->version_code = LINUX_VERSION_CODE; -+ swsusp_arch_add_info(info->archdata); - return 0; - } - -@@ -1647,6 +1654,8 @@ static char *check_image_kernel(struct swsusp_info *info) - } - #endif /* CONFIG_ARCH_HIBERNATION_HEADER */ - -+void __weak swsusp_arch_add_info(char *archdata) {} -+ - unsigned long snapshot_get_image_size(void) - { - return nr_copy_pages + nr_meta_pages + 1; -@@ -1758,7 +1767,7 @@ static int mark_unsafe_pages(struct memory_bitmap *bm) - - /* Clear page flags */ - for_each_populated_zone(zone) { -- max_zone_pfn = zone->zone_start_pfn + zone->spanned_pages; -+ max_zone_pfn = zone_end_pfn(zone); - for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++) - if (pfn_valid(pfn)) - swsusp_unset_page_free(pfn_to_page(pfn)); -diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c -index bef86d1..deec937 100644 ---- a/kernel/power/suspend.c -+++ b/kernel/power/suspend.c -@@ -156,13 +156,13 @@ static int suspend_prepare(suspend_state_t state) - } - - /* default implementation */ --void __attribute__ ((weak)) arch_suspend_disable_irqs(void) -+void __weak arch_suspend_disable_irqs(void) - { - local_irq_disable(); - } - - /* default implementation */ --void __attribute__ ((weak)) arch_suspend_enable_irqs(void) -+void __weak arch_suspend_enable_irqs(void) - { - local_irq_enable(); - } -diff --git a/kernel/power/swap.c b/kernel/power/swap.c -index 7c33ed2..a6a1c55 100644 ---- a/kernel/power/swap.c -+++ b/kernel/power/swap.c -@@ -91,17 +91,28 @@ struct swap_map_handle { - unsigned int k; - unsigned long reqd_free_pages; - u32 crc32; -+#ifdef CONFIG_ARCH_SHMOBILE -+ unsigned int img_size; /* add */ -+#endif - }; - - struct swsusp_header { -+#ifdef CONFIG_ARCH_SHMOBILE -+ char reserved[PAGE_SIZE - 20 - sizeof(sector_t) - sizeof(int) - -+ sizeof(u32) - (sizeof(unsigned int)*4) - sizeof(u32)]; -+ unsigned int comp_crc32[4]; -+ u32 img_size; -+#else - char reserved[PAGE_SIZE - 20 - sizeof(sector_t) - sizeof(int) - -- sizeof(u32)]; -+ sizeof(u32) - sizeof(u32)]; -+ u32 comp_crc32; -+#endif - u32 crc32; - sector_t image; - unsigned int flags; /* Flags to pass to the "boot" kernel */ - char orig_sig[10]; - char sig[10]; --} __attribute__((packed)); -+} __packed; - - static struct swsusp_header *swsusp_header; - -@@ -230,6 +241,11 @@ static int mark_swapfiles(struct swap_map_handle *handle, unsigned int flags) - swsusp_header->flags = flags; - if (flags & SF_CRC32_MODE) - swsusp_header->crc32 = handle->crc32; -+ -+#ifdef CONFIG_ARCH_SHMOBILE -+ swsusp_header->img_size = handle->img_size; -+#endif -+ - error = hib_bio_write_page(swsusp_resume_block, - swsusp_header, NULL); - } else { -@@ -587,7 +603,11 @@ static int save_image_lzo(struct swap_map_handle *handle, - unsigned char *page = NULL; - struct cmp_data *data = NULL; - struct crc_data *crc = NULL; -+ int compr = 0; - -+#ifdef CONFIG_ARCH_SHMOBILE -+ unsigned int comp_imgtotal = 0; -+#endif - /* - * We'll limit the number of threads for compression to limit memory - * footprint. -@@ -733,7 +753,12 @@ static int save_image_lzo(struct swap_map_handle *handle, - } - - *(size_t *)data[thr].cmp = data[thr].cmp_len; -- -+ compr += data[thr].cmp_len; -+#ifdef CONFIG_ARCH_SHMOBILE -+ comp_imgtotal += (data[thr].cmp_len -+ + LZO_HEADER + (PAGE_SIZE - 1)) -+ & ~(PAGE_SIZE - 1); -+#endif - /* - * Given we are writing one page at a time to disk, we - * copy that much from the buffer, although the last -@@ -746,7 +771,6 @@ static int save_image_lzo(struct swap_map_handle *handle, - off < LZO_HEADER + data[thr].cmp_len; - off += PAGE_SIZE) { - memcpy(page, data[thr].cmp + off, PAGE_SIZE); -- - ret = swap_write_page(handle, page, &bio); - if (ret) - goto out_finish; -@@ -762,8 +786,24 @@ out_finish: - do_gettimeofday(&stop); - if (!ret) - ret = err2; -- if (!ret) -+ if (!ret) { -+#ifdef CONFIG_ARCH_SHMOBILE -+ const unsigned int ds = comp_imgtotal + -+ ((comp_imgtotal -+ / ((2 * 1024 * 1024) -+ - PAGE_SIZE)) * PAGE_SIZE); -+ const unsigned int swaped = -+ (swp_offset(get_swap_page_of_type(root_swap)) -+ - 2) * PAGE_SIZE; -+ if (ds < swaped) -+ handle->img_size = swaped; -+ else -+ handle->img_size = ds; -+#endif - printk(KERN_INFO "PM: Image saving done.\n"); -+ printk(KERN_INFO "PM: Compressed output size: %d [%d] (imgsize=%d/swaped size=%d)\n", -+ compr, handle->img_size, ds, swaped); -+ } - swsusp_show_speed(&start, &stop, nr_to_write, "Wrote"); - out_clean: - if (crc) { --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0001-Add-shdmac-hibernation-code.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0001-Add-shdmac-hibernation-code.patch deleted file mode 100644 index ad4e4bc03..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0001-Add-shdmac-hibernation-code.patch +++ /dev/null @@ -1,110 +0,0 @@ -From dfc07c05c50155420e47f85442d099d433db869b Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Fri, 9 Jun 2017 20:11:49 +0900 -Subject: [PATCH 1/3] Add shdmac hibernation code - -Signed-off-by: Yuichi Kusakabe ---- - drivers/dma/sh/shdmac.c | 36 ++++++++++++++++++++++++------------ - 1 file changed, 24 insertions(+), 12 deletions(-) - -diff --git a/drivers/dma/sh/shdmac.c b/drivers/dma/sh/shdmac.c -index 1c97cc5..d084437 100644 ---- a/drivers/dma/sh/shdmac.c -+++ b/drivers/dma/sh/shdmac.c -@@ -743,11 +743,20 @@ static int sh_dmae_resume(struct device *dev) - #define sh_dmae_resume NULL - #endif - -+static int sh_dmae_restore(struct device *dev) -+{ -+#ifdef CONFIG_PM -+ return sh_dmae_resume(dev); -+#else -+ return 0; -+#endif -+} -+ - const struct dev_pm_ops sh_dmae_pm = { -- .suspend = sh_dmae_suspend, -- .resume = sh_dmae_resume, -- .runtime_suspend = sh_dmae_runtime_suspend, -- .runtime_resume = sh_dmae_runtime_resume, -+ SET_SYSTEM_SLEEP_PM_OPS(sh_dmae_suspend, sh_dmae_resume) -+ SET_RUNTIME_PM_OPS(sh_dmae_runtime_suspend, sh_dmae_runtime_resume, -+ NULL) -+ .restore_noirq = sh_dmae_restore, - }; - - static dma_addr_t sh_dmae_slave_addr(struct shdma_chan *schan) -@@ -798,7 +807,6 @@ static int sh_dmae_probe(struct platform_device *pdev) - struct sh_dmae_device *shdev; - struct dma_device *dma_dev; - struct resource *chan, *dmars, *errirq_res, *chanirq_res; -- unsigned long flags; - - if (pdev->dev.of_node) - pdata = of_match_device(sh_dmae_of_match, &pdev->dev)->data; -@@ -885,9 +893,9 @@ static int sh_dmae_probe(struct platform_device *pdev) - if (err < 0) - dev_err(&pdev->dev, "%s(): GET = %d\n", __func__, err); - -- spin_lock_irqsave(&sh_dmae_lock, flags); -+ spin_lock_irq(&sh_dmae_lock); - list_add_tail_rcu(&shdev->node, &sh_dmae_devices); -- spin_unlock_irqrestore(&sh_dmae_lock, flags); -+ spin_unlock_irq(&sh_dmae_lock); - - /* reset dma controller - only needed as a test */ - err = sh_dmae_rst(shdev); -@@ -981,6 +989,7 @@ static int sh_dmae_probe(struct platform_device *pdev) - return err; - - edmadevreg: -+ pm_runtime_get(&pdev->dev); - chan_probe_err: - sh_dmae_chan_remove(shdev); - -@@ -988,9 +997,9 @@ chan_probe_err: - eirq_err: - #endif - rst_err: -- spin_lock_irqsave(&sh_dmae_lock, flags); -+ spin_lock_irq(&sh_dmae_lock); - list_del_rcu(&shdev->node); -- spin_unlock_irqrestore(&sh_dmae_lock, flags); -+ spin_unlock_irq(&sh_dmae_lock); - - pm_runtime_put(&pdev->dev); - pm_runtime_disable(&pdev->dev); -@@ -1007,13 +1016,12 @@ static int sh_dmae_remove(struct platform_device *pdev) - { - struct sh_dmae_device *shdev = platform_get_drvdata(pdev); - struct dma_device *dma_dev = &shdev->shdma_dev.dma_dev; -- unsigned long flags; - - dma_async_device_unregister(dma_dev); - -- spin_lock_irqsave(&sh_dmae_lock, flags); -+ spin_lock_irq(&sh_dmae_lock); - list_del_rcu(&shdev->node); -- spin_unlock_irqrestore(&sh_dmae_lock, flags); -+ spin_unlock_irq(&sh_dmae_lock); - - pm_runtime_disable(&pdev->dev); - -@@ -1047,7 +1055,11 @@ static int __init sh_dmae_init(void) - - return platform_driver_probe(&sh_dmae_driver, sh_dmae_probe); - } -+#ifdef MODULE - module_init(sh_dmae_init); -+#else -+subsys_initcall(sh_dmae_init); -+#endif - - static void __exit sh_dmae_exit(void) - { --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0002-Add-Hibernation-arch-code-Only-R-CAR-M2W.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0002-Add-Hibernation-arch-code-Only-R-CAR-M2W.patch deleted file mode 100755 index 4db90e4e0..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0002-Add-Hibernation-arch-code-Only-R-CAR-M2W.patch +++ /dev/null @@ -1,1529 +0,0 @@ -From 34a419b3fd88a2275ca681c99a5787b937e0f39d Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Thu, 18 May 2017 16:47:29 +0900 -Subject: [PATCH 02/15] Add Hibernation arch code(Only R-CAR M2W) - -Signed-off-by: Yuichi Kusakabe ---- - arch/arm/Kconfig | 5 + - arch/arm/include/asm/memory.h | 1 + - arch/arm/include/asm/smp.h | 4 + - arch/arm/include/asm/suspend.h | 3 + - arch/arm/kernel/Makefile | 1 + - arch/arm/kernel/hibernate.c | 139 ++++++++++++++ - arch/arm/kernel/process.c | 7 +- - arch/arm/kernel/sleep.S | 8 + - arch/arm/kernel/smp.c | 6 + - arch/arm/kernel/suspend.c | 64 ++++--- - arch/arm/mach-shmobile/Kconfig | 65 +++++++ - arch/arm/mach-shmobile/Makefile | 1 + - arch/arm/mach-shmobile/common.h | 8 + - arch/arm/mach-shmobile/crc32_word4.c | 299 +++++++++++++++++++++++++++++++ - arch/arm/mach-shmobile/crc32_word4.h | 23 +++ - arch/arm/mach-shmobile/headsmp.S | 2 - - arch/arm/mach-shmobile/hibernation.c | 243 +++++++++++++++++++++++++ - arch/arm/mach-shmobile/platsmp-apmu.c | 13 +- - arch/arm/mach-shmobile/platsmp-rst.c | 3 +- - arch/arm/mach-shmobile/pm-r8a7791.c | 27 +-- - arch/arm/mach-shmobile/rcar-gen2.h | 39 ++++ - arch/arm/mach-shmobile/setup-r8a7791.c | 10 +- - arch/arm/mach-shmobile/setup-rcar-gen2.c | 14 +- - arch/arm/mach-shmobile/smp-r8a7791.c | 8 +- - arch/arm/mm/proc-v7.S | 31 ++-- - 25 files changed, 947 insertions(+), 77 deletions(-) - create mode 100644 arch/arm/kernel/hibernate.c - create mode 100644 arch/arm/mach-shmobile/crc32_word4.c - create mode 100644 arch/arm/mach-shmobile/crc32_word4.h - create mode 100644 arch/arm/mach-shmobile/hibernation.c - -diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 4dd95dd..eb76182 100644 ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -2232,6 +2232,11 @@ config ARCH_SUSPEND_POSSIBLE - config ARM_CPU_SUSPEND - def_bool PM_SLEEP - -+config ARCH_HIBERNATION_POSSIBLE -+ bool -+ depends on MMU -+ default y if ARCH_SUSPEND_POSSIBLE -+ - endmenu - - source "net/Kconfig" -diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h -index 48cb2b3..01158e7 100644 ---- a/arch/arm/include/asm/memory.h -+++ b/arch/arm/include/asm/memory.h -@@ -241,6 +241,7 @@ static inline void *phys_to_virt(phys_addr_t x) - #define __pa(x) __virt_to_phys((unsigned long)(x)) - #define __va(x) ((void *)__phys_to_virt((phys_addr_t)(x))) - #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) -+#define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) - - /* - * Virtual <-> DMA view memory address translations -diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h -index d3a22be..b718040 100644 ---- a/arch/arm/include/asm/smp.h -+++ b/arch/arm/include/asm/smp.h -@@ -42,6 +42,10 @@ void handle_IPI(int ipinr, struct pt_regs *regs); - */ - extern void smp_init_cpus(void); - -+/* -+ * Provide a function to call machine specific cpu initialization sequence -+ */ -+extern void arch_smp_prepare_cpus(unsigned int max_cpus); - - /* - * Provide a function to raise an IPI cross call on CPUs in callmap. -diff --git a/arch/arm/include/asm/suspend.h b/arch/arm/include/asm/suspend.h -index 1c0a551..709afa4 100644 ---- a/arch/arm/include/asm/suspend.h -+++ b/arch/arm/include/asm/suspend.h -@@ -3,5 +3,8 @@ - - extern void cpu_resume(void); - extern int cpu_suspend(unsigned long, int (*)(unsigned long)); -+extern const void __nosave_begin, __nosave_end; -+extern void cpu_resume_restore_nosave(u32, u32, u32); -+extern void call_with_stack(void (*fn)(void *), void *arg, void *sp); - - #endif -diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile -index 5f3338e..70f439f 100644 ---- a/arch/arm/kernel/Makefile -+++ b/arch/arm/kernel/Makefile -@@ -32,6 +32,7 @@ obj-$(CONFIG_ARTHUR) += arthur.o - obj-$(CONFIG_ISA_DMA) += dma-isa.o - obj-$(CONFIG_PCI) += bios32.o isa.o - obj-$(CONFIG_ARM_CPU_SUSPEND) += sleep.o suspend.o -+obj-$(CONFIG_HIBERNATION) += hibernate.o - obj-$(CONFIG_SMP) += smp.o smp_tlb.o - obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o - obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o -diff --git a/arch/arm/kernel/hibernate.c b/arch/arm/kernel/hibernate.c -new file mode 100644 -index 0000000..9380fe2 ---- /dev/null -+++ b/arch/arm/kernel/hibernate.c -@@ -0,0 +1,139 @@ -+/* -+ * Hibernation support specific for ARM -+ * -+ * Derived from work on ARM hibernation support by: -+ * -+ * Ubuntu project, hibernation support for mach-dove -+ * Copyright (C) 2010 Nokia Corporation (Hiroshi Doyu) -+ * Copyright (C) 2010 Texas Instruments, Inc. (Teerth Reddy et al.) -+ * https://lkml.org/lkml/2010/6/18/4 -+ * https://lists.linux-foundation.org/pipermail/linux-pm/2010-June/027422.html -+ * https://patchwork.kernel.org/patch/96442/ -+ * -+ * Copyright (C) 2006 Rafael J. Wysocki -+ * -+ * License terms: GNU General Public License (GPL) version 2 -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+struct swsusp_archdata { -+ u32 nosave_backup_phys; -+ u32 nosave_begin_phys; -+ u32 nosave_end_phys; -+ /* Function pointer */ -+ u32 cpu_resume_restore_nosave; -+}; -+ -+static struct swsusp_archdata __archdata; -+ -+void swsusp_arch_add_info(char *archdata) -+{ -+ memcpy((void *)archdata, (void *)&__archdata, -+ sizeof(struct swsusp_archdata)); -+} -+ -+int pfn_is_nosave(unsigned long pfn) -+{ -+ unsigned long nosave_begin_pfn = virt_to_pfn(&__nosave_begin); -+ unsigned long nosave_end_pfn = virt_to_pfn(&__nosave_end - 1); -+ -+ return (pfn >= nosave_begin_pfn) && (pfn <= nosave_end_pfn); -+} -+ -+void notrace save_processor_state(void) -+{ -+ WARN_ON(num_online_cpus() != 1); -+ local_fiq_disable(); -+} -+ -+void notrace restore_processor_state(void) -+{ -+ local_fiq_enable(); -+} -+ -+/* -+ * Snapshot kernel memory and reset the system. -+ * -+ * swsusp_save() is executed in the suspend finisher so that the CPU -+ * context pointer and memory are part of the saved image, which is -+ * required by the resume kernel image to restart execution from -+ * swsusp_arch_suspend(). -+ * -+ * soft_restart is not technically needed, but is used to get success -+ * returned from cpu_suspend. -+ * -+ * When soft reboot completes, the hibernation snapshot is written out. -+ */ -+static int notrace arch_save_image(unsigned long unused) -+{ -+ int ret; -+ ret = swsusp_save(); -+ if (ret == 0) -+ soft_restart(virt_to_phys(cpu_resume)); -+ return ret; -+} -+ -+/* -+ * Save the current CPU state before suspend / poweroff. -+ */ -+int notrace swsusp_arch_suspend(void) -+{ -+ return cpu_suspend(0, arch_save_image); -+} -+ -+/* -+ * Restore page contents for physical pages that were in use during loading -+ * hibernation image. Switch to idmap_pgd so the physical page tables -+ * are overwritten with the same contents. -+ */ -+static void notrace arch_restore_image(void *unused) -+{ -+ struct pbe *pbe; -+ -+ -+ cpu_switch_mm(idmap_pgd, &init_mm); -+ for (pbe = restore_pblist; pbe; pbe = pbe->next) -+ copy_page(pbe->orig_address, pbe->address); -+ -+ soft_restart(virt_to_phys(cpu_resume)); -+} -+static u64 resume_stack[PAGE_SIZE/2/sizeof(u64)] __nosavedata; -+ -+/* -+ * Resume from the hibernation image. -+ * Due to the kernel heap / data restore, stack contents change underneath -+ * and that would make function calls impossible; switch to a temporary -+ * stack within the nosave region to avoid that problem. -+ */ -+int swsusp_arch_resume(void) -+{ -+ call_with_stack(arch_restore_image, 0, -+ resume_stack + ARRAY_SIZE(resume_stack)); -+ return 0; -+} -+ -+static int __init swsusp_arch_init(void) -+{ -+ char *backup; -+ size_t len; -+ -+ len = &__nosave_end - &__nosave_begin; -+ backup = kmalloc(len, GFP_KERNEL); -+ if (backup) -+ memcpy(backup, &__nosave_begin, len); -+ -+ __archdata.nosave_backup_phys = virt_to_phys(backup); -+ __archdata.nosave_begin_phys = virt_to_phys(&__nosave_begin); -+ __archdata.nosave_end_phys = virt_to_phys(&__nosave_end); -+ __archdata.cpu_resume_restore_nosave = -+ virt_to_phys(cpu_resume_restore_nosave); -+ -+ return 0; -+} -+late_initcall(swsusp_arch_init); -diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c -index 7927629..ae56f0b 100644 ---- a/arch/arm/kernel/process.c -+++ b/arch/arm/kernel/process.c -@@ -98,7 +98,7 @@ void soft_restart(unsigned long addr) - u64 *stack = soft_restart_stack + ARRAY_SIZE(soft_restart_stack); - - /* Disable interrupts first */ -- local_irq_disable(); -+ raw_local_irq_disable(); - local_fiq_disable(); - - /* Disable the L2 if we're the last man standing. */ -@@ -284,12 +284,17 @@ void __show_regs(struct pt_regs *regs) - buf[3] = flags & PSR_V_BIT ? 'V' : 'v'; - buf[4] = '\0'; - -+#ifndef CONFIG_CPU_V7M - printk("Flags: %s IRQs o%s FIQs o%s Mode %s ISA %s Segment %s\n", - buf, interrupts_enabled(regs) ? "n" : "ff", - fast_interrupts_enabled(regs) ? "n" : "ff", - processor_modes[processor_mode(regs)], - isa_modes[isa_mode(regs)], - get_fs() == get_ds() ? "kernel" : "user"); -+#else -+ printk("xPSR: %08lx\n", regs->ARM_cpsr); -+#endif -+ - #ifdef CONFIG_CPU_CP15 - { - unsigned int ctrl; -diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S -index 987dcf3..e4d092f 100644 ---- a/arch/arm/kernel/sleep.S -+++ b/arch/arm/kernel/sleep.S -@@ -98,6 +98,14 @@ THUMB( mov sp, r2 ) - THUMB( bx r3 ) - ENDPROC(cpu_resume) - -+ .align -+ENTRY(cpu_resume_restore_nosave) -+1: ldmia r0!, {r3-r10} -+ stmia r1!, {r3-r10} -+ cmp r1, r2 -+ bne 1b -+ b cpu_resume -+ - sleep_save_sp: - .rept CONFIG_NR_CPUS - .long 0 @ preserve stack phys ptr here -diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c -index 5919eb4..c9a2991 100644 ---- a/arch/arm/kernel/smp.c -+++ b/arch/arm/kernel/smp.c -@@ -125,6 +125,12 @@ void __init smp_init_cpus(void) - smp_ops.smp_init_cpus(); - } - -+void arch_smp_prepare_cpus(unsigned int max_cpus) -+{ -+ if (smp_ops.smp_prepare_cpus) -+ smp_ops.smp_prepare_cpus(max_cpus); -+} -+ - int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) - { - if (smp_ops.smp_boot_secondary) -diff --git a/arch/arm/kernel/suspend.c b/arch/arm/kernel/suspend.c -index c59c97e..38a5067 100644 ---- a/arch/arm/kernel/suspend.c -+++ b/arch/arm/kernel/suspend.c -@@ -10,6 +10,42 @@ - extern int __cpu_suspend(unsigned long, int (*)(unsigned long)); - extern void cpu_resume_mmu(void); - -+#ifdef CONFIG_MMU -+/* -+ * Hide the first two arguments to __cpu_suspend - these are an implementation -+ * detail which platform code shouldn't have to know about. -+ */ -+int cpu_suspend(unsigned long arg, int (*fn)(unsigned long)) -+{ -+ struct mm_struct *mm = current->active_mm; -+ int ret; -+ -+ if (!idmap_pgd) -+ return -EINVAL; -+ -+ /* -+ * Provide a temporary page table with an identity mapping for -+ * the MMU-enable code, required for resuming. On successful -+ * resume (indicated by a zero return code), we need to switch -+ * back to the correct page tables. -+ */ -+ ret = __cpu_suspend(arg, fn); -+ if (ret == 0) { -+ cpu_switch_mm(mm->pgd, mm); -+ local_flush_bp_all(); -+ local_flush_tlb_all(); -+ } -+ -+ return ret; -+} -+#else -+int cpu_suspend(unsigned long arg, int (*fn)(unsigned long)) -+{ -+ return __cpu_suspend(arg, fn); -+} -+#define idmap_pgd NULL -+#endif -+ - /* - * This is called by __cpu_suspend() to save the state, and do whatever - * flushing is required to ensure that when the CPU goes to sleep we have -@@ -46,31 +82,3 @@ void __cpu_suspend_save(u32 *ptr, u32 ptrsz, u32 sp, u32 *save_ptr) - outer_clean_range(virt_to_phys(save_ptr), - virt_to_phys(save_ptr) + sizeof(*save_ptr)); - } -- --/* -- * Hide the first two arguments to __cpu_suspend - these are an implementation -- * detail which platform code shouldn't have to know about. -- */ --int cpu_suspend(unsigned long arg, int (*fn)(unsigned long)) --{ -- struct mm_struct *mm = current->active_mm; -- int ret; -- -- if (!idmap_pgd) -- return -EINVAL; -- -- /* -- * Provide a temporary page table with an identity mapping for -- * the MMU-enable code, required for resuming. On successful -- * resume (indicated by a zero return code), we need to switch -- * back to the correct page tables. -- */ -- ret = __cpu_suspend(arg, fn); -- if (ret == 0) { -- cpu_switch_mm(mm->pgd, mm); -- local_flush_bp_all(); -- local_flush_tlb_all(); -- } -- -- return ret; --} -diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig -index 7c15245..73371de 100644 ---- a/arch/arm/mach-shmobile/Kconfig -+++ b/arch/arm/mach-shmobile/Kconfig -@@ -64,6 +64,25 @@ config MACH_KOELSCH - select MICREL_PHY if SH_ETH - select SND_SOC_AK4642 if SND_SIMPLE_CARD - -+config MACH_KOELSCH_FTEN -+ bool "FTEN spf development environment" -+ depends on MACH_KOELSCH -+ -+config MACH_FTEN -+ bool -+ -+config MACH_FTEN_DT -+ bool -+ -+config MACH_FTEN_M2W -+ bool "FTEN R-Car M2W board" -+ depends on ARCH_R8A7791 -+ select MACH_FTEN -+ select MACH_FTEN_DT -+ select HAVE_IDE -+ select FIQ -+ select SND_SOC_DIRANA3 if SND_SIMPLE_CARD -+ - config MACH_LAGER - bool "Lager board" - depends on ARCH_R8A7790 -@@ -76,6 +95,15 @@ config MACH_GOSE - select MICREL_PHY if SH_ETH - select SND_SOC_AK4642 if SND_SIMPLE_CARD - -+config MACH_FTEN_M2N -+ bool "FTEN R-Car M2N board" -+ depends on ARCH_R8A7793 -+ select MACH_FTEN -+ select MACH_FTEN_DT -+ select HAVE_IDE -+ select FIQ -+ select SND_SOC_DIRANA3 if SND_SIMPLE_CARD -+ - config MACH_ALT - bool "Alt board" - depends on ARCH_R8A7794 -@@ -287,6 +315,19 @@ config MACH_KOELSCH - select USE_OF - select MICREL_PHY if SH_ETH - -+config MACH_FTEN -+ bool "FTEN strawberry board" -+ depends on ARCH_R8A7791 -+ select USE_OF -+ select HAVE_IDE -+ -+config MACH_FTEN_DT -+ bool "FTEN strawberry board - Device Tree Implementation" -+ depends on ARCH_R8A7791 -+ select USE_OF -+ select HAVE_IDE -+ select SND_SOC_DIRANA3 if SND_SIMPLE_CARD -+ - config MACH_KZM9G - bool "KZM-A9-GT board" - depends on ARCH_SH73A0 -@@ -360,4 +401,28 @@ config EM_TIMER_STI - - endmenu - -+if HIBERNATION -+ -+menu "Hibernation area parameters" -+ -+config SWSUSP_AREA -+ hex "RAM hibernation area address" -+ default "0x44000000" -+ depends on HIBERNATION -+ ---help--- -+ RAM hibernation area address, this is required for CRC -+ calculation of final compressed hibernation image -+ -+config SWSUSP_AREA_SIZE -+ hex "RAM hibernation area size" -+ default "0x4000000" -+ depends on HIBERNATION -+ ---help--- -+ RAM hibernation area size, this is required for CRC -+ calculation of final compressed hibernation image -+ -+endmenu -+ -+endif -+ - endif -diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile -index 43b4025..71cfcfa 100644 ---- a/arch/arm/mach-shmobile/Makefile -+++ b/arch/arm/mach-shmobile/Makefile -@@ -55,6 +55,7 @@ smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o platsmp-scu.o - - # PM objects - obj-$(CONFIG_SUSPEND) += suspend.o -+obj-$(CONFIG_HIBERNATION) += hibernation.o - obj-$(CONFIG_CPU_IDLE) += cpuidle.o - obj-$(CONFIG_CPU_FREQ) += cpufreq.o - obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o pm-rmobile.o -diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h -index 95a77a0..37c7f87 100644 ---- a/arch/arm/mach-shmobile/common.h -+++ b/arch/arm/mach-shmobile/common.h -@@ -25,6 +25,7 @@ struct clk; - extern int shmobile_clk_init(void); - extern void shmobile_handle_irq_intc(struct pt_regs *); - extern struct platform_suspend_ops shmobile_suspend_ops; -+extern const struct platform_hibernation_ops shmobile_hibernation_ops; - struct cpuidle_driver; - extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv); - extern void shmobile_smp_apmu_enter_cpuidle(void); -@@ -37,6 +38,12 @@ static inline int shmobile_suspend_init(void) { return 0; } - static inline void shmobile_smp_apmu_suspend_init(void) { } - #endif - -+#ifdef CONFIG_HIBERNATION -+int shmobile_hibernation_init(void); -+#else -+static inline int shmobile_hibernation_init(void) { return 0; } -+#endif -+ - #ifdef CONFIG_CPU_IDLE - int shmobile_cpuidle_init(void); - #else -@@ -59,6 +66,7 @@ extern unsigned int l2actlr_value; - static inline void __init shmobile_init_late(void) - { - shmobile_suspend_init(); -+ shmobile_hibernation_init(); - shmobile_cpuidle_init(); - shmobile_cpufreq_init(); - } -diff --git a/arch/arm/mach-shmobile/crc32_word4.c b/arch/arm/mach-shmobile/crc32_word4.c -new file mode 100644 -index 0000000..8aaefc6 ---- /dev/null -+++ b/arch/arm/mach-shmobile/crc32_word4.c -@@ -0,0 +1,299 @@ -+/************************************************************************* -+ * crc32_word4.c: rapid CRC32 -+ * Coptright (C) FUJITSUTEN Limited, 2015 All Rights Reserved. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 -+ * as published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software Foundation, -+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+ *************************************************************************/ -+#ifdef OWNTEST -+#include -+#include -+#include -+#include -+typedef unsigned int u_int32_t; -+#else -+#endif -+ -+#include "crc32_word4.h" -+ -+#define CRC_INIT_VALUE (-1) -+#define CRC_FIX(_crc32) (~(_crc32)) -+ -+/* #define HWDPLS_ENABLE */ -+#define __HWDTPLS_OUT() -+#define MEASURE(msg) -+ -+/**** calc_crc32.c *****/ -+ -+/* -+ * CRC32ã¯ã€ISO 3309 ã§è¦ç¨‹ã•ã‚Œ -+ * ãã®ã‚µãƒ³ãƒ—ル㯠-+ * RFC 2083 :PNG(Poratble Network Graphics -+ * ã§å…¬ã«ãªã£ã¦ã„ã¾ã™ã€‚本プログラムã¯ã€RFC2083 ã§æŽ²ç¤ºã•ã‚ŒãŸ -+ * CRC32を独自ã«æœ€é©åŒ–ã—ãŸãƒ—ログラムã§ã™ã€‚ -+ */ -+const static u_int32_t CRC_Table[256] = { -+ 0x00000000 , 0x77073096 , 0xee0e612c , 0x990951ba , 0x076dc419 , 0x706af48f , 0xe963a535 , 0x9e6495a3 , -+ 0x0edb8832 , 0x79dcb8a4 , 0xe0d5e91e , 0x97d2d988 , 0x09b64c2b , 0x7eb17cbd , 0xe7b82d07 , 0x90bf1d91 , -+ 0x1db71064 , 0x6ab020f2 , 0xf3b97148 , 0x84be41de , 0x1adad47d , 0x6ddde4eb , 0xf4d4b551 , 0x83d385c7 , -+ 0x136c9856 , 0x646ba8c0 , 0xfd62f97a , 0x8a65c9ec , 0x14015c4f , 0x63066cd9 , 0xfa0f3d63 , 0x8d080df5 , -+ 0x3b6e20c8 , 0x4c69105e , 0xd56041e4 , 0xa2677172 , 0x3c03e4d1 , 0x4b04d447 , 0xd20d85fd , 0xa50ab56b , -+ 0x35b5a8fa , 0x42b2986c , 0xdbbbc9d6 , 0xacbcf940 , 0x32d86ce3 , 0x45df5c75 , 0xdcd60dcf , 0xabd13d59 , -+ 0x26d930ac , 0x51de003a , 0xc8d75180 , 0xbfd06116 , 0x21b4f4b5 , 0x56b3c423 , 0xcfba9599 , 0xb8bda50f , -+ 0x2802b89e , 0x5f058808 , 0xc60cd9b2 , 0xb10be924 , 0x2f6f7c87 , 0x58684c11 , 0xc1611dab , 0xb6662d3d , -+ 0x76dc4190 , 0x01db7106 , 0x98d220bc , 0xefd5102a , 0x71b18589 , 0x06b6b51f , 0x9fbfe4a5 , 0xe8b8d433 , -+ 0x7807c9a2 , 0x0f00f934 , 0x9609a88e , 0xe10e9818 , 0x7f6a0dbb , 0x086d3d2d , 0x91646c97 , 0xe6635c01 , -+ 0x6b6b51f4 , 0x1c6c6162 , 0x856530d8 , 0xf262004e , 0x6c0695ed , 0x1b01a57b , 0x8208f4c1 , 0xf50fc457 , -+ 0x65b0d9c6 , 0x12b7e950 , 0x8bbeb8ea , 0xfcb9887c , 0x62dd1ddf , 0x15da2d49 , 0x8cd37cf3 , 0xfbd44c65 , -+ 0x4db26158 , 0x3ab551ce , 0xa3bc0074 , 0xd4bb30e2 , 0x4adfa541 , 0x3dd895d7 , 0xa4d1c46d , 0xd3d6f4fb , -+ 0x4369e96a , 0x346ed9fc , 0xad678846 , 0xda60b8d0 , 0x44042d73 , 0x33031de5 , 0xaa0a4c5f , 0xdd0d7cc9 , -+ 0x5005713c , 0x270241aa , 0xbe0b1010 , 0xc90c2086 , 0x5768b525 , 0x206f85b3 , 0xb966d409 , 0xce61e49f , -+ 0x5edef90e , 0x29d9c998 , 0xb0d09822 , 0xc7d7a8b4 , 0x59b33d17 , 0x2eb40d81 , 0xb7bd5c3b , 0xc0ba6cad , -+ 0xedb88320 , 0x9abfb3b6 , 0x03b6e20c , 0x74b1d29a , 0xead54739 , 0x9dd277af , 0x04db2615 , 0x73dc1683 , -+ 0xe3630b12 , 0x94643b84 , 0x0d6d6a3e , 0x7a6a5aa8 , 0xe40ecf0b , 0x9309ff9d , 0x0a00ae27 , 0x7d079eb1 , -+ 0xf00f9344 , 0x8708a3d2 , 0x1e01f268 , 0x6906c2fe , 0xf762575d , 0x806567cb , 0x196c3671 , 0x6e6b06e7 , -+ 0xfed41b76 , 0x89d32be0 , 0x10da7a5a , 0x67dd4acc , 0xf9b9df6f , 0x8ebeeff9 , 0x17b7be43 , 0x60b08ed5 , -+ 0xd6d6a3e8 , 0xa1d1937e , 0x38d8c2c4 , 0x4fdff252 , 0xd1bb67f1 , 0xa6bc5767 , 0x3fb506dd , 0x48b2364b , -+ 0xd80d2bda , 0xaf0a1b4c , 0x36034af6 , 0x41047a60 , 0xdf60efc3 , 0xa867df55 , 0x316e8eef , 0x4669be79 , -+ 0xcb61b38c , 0xbc66831a , 0x256fd2a0 , 0x5268e236 , 0xcc0c7795 , 0xbb0b4703 , 0x220216b9 , 0x5505262f , -+ 0xc5ba3bbe , 0xb2bd0b28 , 0x2bb45a92 , 0x5cb36a04 , 0xc2d7ffa7 , 0xb5d0cf31 , 0x2cd99e8b , 0x5bdeae1d , -+ 0x9b64c2b0 , 0xec63f226 , 0x756aa39c , 0x026d930a , 0x9c0906a9 , 0xeb0e363f , 0x72076785 , 0x05005713 , -+ 0x95bf4a82 , 0xe2b87a14 , 0x7bb12bae , 0x0cb61b38 , 0x92d28e9b , 0xe5d5be0d , 0x7cdcefb7 , 0x0bdbdf21 , -+ 0x86d3d2d4 , 0xf1d4e242 , 0x68ddb3f8 , 0x1fda836e , 0x81be16cd , 0xf6b9265b , 0x6fb077e1 , 0x18b74777 , -+ 0x88085ae6 , 0xff0f6a70 , 0x66063bca , 0x11010b5c , 0x8f659eff , 0xf862ae69 , 0x616bffd3 , 0x166ccf45 , -+ 0xa00ae278 , 0xd70dd2ee , 0x4e048354 , 0x3903b3c2 , 0xa7672661 , 0xd06016f7 , 0x4969474d , 0x3e6e77db , -+ 0xaed16a4a , 0xd9d65adc , 0x40df0b66 , 0x37d83bf0 , 0xa9bcae53 , 0xdebb9ec5 , 0x47b2cf7f , 0x30b5ffe9 , -+ 0xbdbdf21c , 0xcabac28a , 0x53b39330 , 0x24b4a3a6 , 0xbad03605 , 0xcdd70693 , 0x54de5729 , 0x23d967bf , -+ 0xb3667a2e , 0xc4614ab8 , 0x5d681b02 , 0x2a6f2b94 , 0xb40bbe37 , 0xc30c8ea1 , 0x5a05df1b , 0x2d02ef8d , -+}; -+ -+/*** -+ * CRC Table creater. -+ * -+void make_crc_table(void) { -+ u_int32_t c; -+ u_int32_t n, k; -+ for (n = 0; n < 256; n++) -+ { -+ c = (u_int32_t) n; -+ for (k = 0; k < 8; k++) -+ { -+ if (c & 1) -+ c = 0xedb88320L ^ (c >> 1); -+ else -+ c = c >> 1; -+ } -+ CRC_Table[n] = c; -+ } -+} -+***/ -+#define NEXT_PTR (4) -+ -+static __inline__ -+u_int32_t _update_crc(u_int32_t crc, unsigned char *buf, size_t len) -+{ -+ u_int32_t c = crc; -+ size_t n; -+ for (n = 0; n < len; n++) -+ c = CRC_Table[(c ^ buf[n]) & 0xff] ^ (c >> 8); -+ return c; -+} -+/********************************************************************* -+ * update_crc4x4()() -+ * calc_crc32() をベースã«ã€4 ワード毎ã«å€‹åˆ¥ã« CRC32 を計算ã™ã‚‹æ–¹æ³• -+ * -+ * +0 +1 +2 +3 -+ * +0x00 AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDD -+ * +0x04 EEEEEEEE FFFFFFFF 00000000 11111111 -+ * : : : : -+ * CRC32 xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx -+ * -+ *********************************************************************/ -+ -+static __inline__ -+void update_crc4x4(u_int32_t crc[4], unsigned char *buf) -+{ -+ u_int32_t c1, c2, c3, c4; -+ u_int32_t *p = (void *)buf; -+ -+ c1 = crc[0] ^ p[0]; -+ c2 = crc[1] ^ p[1]; -+ c3 = crc[2] ^ p[2]; -+ c4 = crc[3] ^ p[3]; -+ -+ c1 = CRC_Table[c1 & 0xff] ^ (c1 >> 8); -+ c2 = CRC_Table[c2 & 0xff] ^ (c2 >> 8); -+ c3 = CRC_Table[c3 & 0xff] ^ (c3 >> 8); -+ c4 = CRC_Table[c4 & 0xff] ^ (c4 >> 8); -+ -+ c1 = CRC_Table[c1 & 0xff] ^ (c1 >> 8); -+ c2 = CRC_Table[c2 & 0xff] ^ (c2 >> 8); -+ c3 = CRC_Table[c3 & 0xff] ^ (c3 >> 8); -+ c4 = CRC_Table[c4 & 0xff] ^ (c4 >> 8); -+ -+ c1 = CRC_Table[c1 & 0xff] ^ (c1 >> 8); -+ c2 = CRC_Table[c2 & 0xff] ^ (c2 >> 8); -+ c3 = CRC_Table[c3 & 0xff] ^ (c3 >> 8); -+ c4 = CRC_Table[c4 & 0xff] ^ (c4 >> 8); -+ -+ c1 = CRC_Table[c1 & 0xff] ^ (c1 >> 8); -+ c2 = CRC_Table[c2 & 0xff] ^ (c2 >> 8); -+ c3 = CRC_Table[c3 & 0xff] ^ (c3 >> 8); -+ c4 = CRC_Table[c4 & 0xff] ^ (c4 >> 8); -+ -+ crc[0] = c1; -+ crc[1] = c2; -+ crc[2] = c3; -+ crc[3] = c4; -+} -+ -+ -+void calc_crc32x4(unsigned char *buf, size_t len, CRC32_WORD4_t *result) -+{ -+ unsigned int crc_tmp[4] = {CRC_INIT_VALUE, CRC_INIT_VALUE, CRC_INIT_VALUE, CRC_INIT_VALUE}; -+ u_int32_t i; -+ int res; -+ u_int32_t n4; -+ int xlen = len; -+#ifdef HWDPLS_ENABLE -+ unsigned long plstout = 60; -+ unsigned long plsstart = 0; -+ if ((unsigned long)CONFIG_SYS_HZ > 100000) -+ plstout *= (unsigned long)CONFIG_SYS_HZ / 1000; -+ else -+ plstout = DIV_ROUND_UP(plstout * (unsigned long)CONFIG_SYS_HZ, 1000); -+#endif -+ -+ /** -+ * 4ãƒã‚¤ãƒˆå¢ƒç•Œã«åˆã‚ãªã„開始アドレスã®å ´åˆ -+ * 境界ã¾ã§ã®CRCã‚’ crc_tmp[0] ã«æ±‚ã‚る。 -+ */ -+ if ((unsigned long)buf & 3) { -+ crc_tmp[0] = _update_crc(crc_tmp[0], buf, (unsigned long)buf & 3); -+ buf = (unsigned char *)((unsigned long)buf & ~3); -+ xlen -= (unsigned long)buf & 3; -+ } -+ -+ n4 = xlen/(NEXT_PTR*4); -+ /** -+ * 4ãƒã‚¤ãƒˆå¢ƒç•Œã«åˆã‚ãªã„開始アドレスã®å ´åˆ -+ * 境界ã¾ã§ã®CRCã‚’ crc_tmp[0] ã«æ±‚ã‚る。 -+ */ -+#ifdef HWDPLS_ENABLE -+ reset_timer(); -+ plsstart = get_timer(0); -+#endif -+ for (i = 0; i < n4; i++) { -+ update_crc4x4(crc_tmp, buf); -+ buf += NEXT_PTR * 4; -+#ifdef HWDPLS_ENABLE -+ /** -+ * WDを考慮 -+ */ -+ if (__builtin_expect((int)((i & 0x1f) == 0), 0)) { -+ if ((get_timer(plsstart)) > plstout) { -+ __HWDTPLS_OUT(); -+ MEASURE("crc plsout") -+ plsstart += plstout; -+ } -+ } -+#endif /*HWPLS_ENABLE*/ -+ } -+ -+ res = xlen % (NEXT_PTR * 4); -+ if (res > 0) -+ crc_tmp[3] = _update_crc(crc_tmp[3], buf, res); -+ -+ result->crc_w[0] = CRC_FIX(crc_tmp[0]); -+ result->crc_w[1] = CRC_FIX(crc_tmp[1]); -+ result->crc_w[2] = CRC_FIX(crc_tmp[2]); -+ result->crc_w[3] = CRC_FIX(crc_tmp[3]); -+ -+ MEASURE("calc_crc32x4 finish") -+} -+ -+#if defined(OWNTEST) -+#define BUFSIZE (2 * 1024 * 1024) -+#include -+#include -+ -+int main() -+{ -+ unsigned char *buf, *buf2; -+ struct timeval start, end; -+ unsigned long long diff; -+ int i; -+ -+ CRC32_WORD4_t result = { .crc_w = {0, 0, 0, 0 } }; -+ CRC32_WORD4_t result2 = { .crc_w = {0, 0, 0, 0 } }; -+ -+ buf = malloc(BUFSIZE); -+ if (!buf) { -+ perror("malloc"); -+ return 1; -+ } -+ printf("Generate %dMB random data..\n", BUFSIZE / 1024 / 1024); -+ srand(0); -+ for (i = 0; i < BUFSIZE / 4; i++) -+ ((int *)buf)[i] = rand(); -+ -+ /* Memory dup */ -+ buf2 = memalign(NEXT_PTR, BUFSIZE); -+ if (!buf2) { -+ perror("malloc"); -+ return 1; -+ } -+ memcpy(buf2, buf, BUFSIZE); -+ -+ -+ gettimeofday(&start, NULL); -+ calc_crc32x4(buf, BUFSIZE, &result); -+ gettimeofday(&end, NULL); -+ -+ diff = (end.tv_sec - start.tv_sec) * 1000000; -+ diff += end.tv_usec - start.tv_usec; -+ -+ printf("time=%lluus\n", diff); -+ printf(" result.word[0] = %x\n", result.crc_w[0]); -+ printf(" result.word[1] = %x\n", result.crc_w[1]); -+ printf(" result.word[2] = %x\n", result.crc_w[2]); -+ printf(" result.word[3] = %x\n", result.crc_w[3]); -+ -+ /* Broken test */ -+#if 0 /* Destory test */ -+ buf[rand() % BUFSIZE] ^= 1 << (rand()%7); -+#endif -+ for (i = 0; i < BUFSIZE; i++) { -+ if (buf[i] != buf2[i]) -+ printf("buf[%d] %02x : %02x\n", i, buf[i], buf2[i]); -+ } -+ -+ gettimeofday(&start, NULL); -+ calc_crc32x4(buf, BUFSIZE, &result2); -+ gettimeofday(&end, NULL); -+ -+ diff = (end.tv_sec - start.tv_sec) * 1000000; -+ diff += end.tv_usec - start.tv_usec; -+ -+ printf("time=%lluus\n", diff); -+ printf(" result.word[0] = %x:%s\n", result2.crc_w[0] , -+ result.crc_w[0] == result2.crc_w[0] ? "OK" : "NG"); -+ printf(" result.word[1] = %x:%s\n", result2.crc_w[1] , -+ result.crc_w[1] == result2.crc_w[1] ? "OK" : "NG"); -+ printf(" result.word[2] = %x:%s\n", result2.crc_w[2] , -+ result.crc_w[2] == result2.crc_w[2] ? "OK" : "NG"); -+ printf(" result.word[3] = %x:%s\n", result2.crc_w[3] , -+ result.crc_w[3] == result2.crc_w[3] ? "OK" : "NG"); -+ return 0; -+} -+#endif /* TEST */ -diff --git a/arch/arm/mach-shmobile/crc32_word4.h b/arch/arm/mach-shmobile/crc32_word4.h -new file mode 100644 -index 0000000..6c04878 ---- /dev/null -+++ b/arch/arm/mach-shmobile/crc32_word4.h -@@ -0,0 +1,23 @@ -+/************************************************************************* -+ * Coptright (C) FUJITSUTEN Limited, 2012 All Rights Reserved. -+ * -+ *************************************************************************/ -+#ifndef __CRC32_WORD4_H__ -+#define __CRC32_WORD4_H__ -+ -+typedef struct { -+ unsigned int crc_w[4]; -+} CRC32_WORD4_t; -+ -+void calc_crc32x4(unsigned char *buf, size_t len, CRC32_WORD4_t *result); -+ -+typedef struct { -+ unsigned int size; -+ CRC32_WORD4_t chksum; -+ unsigned int dummy[3]; -+} CRC32_WORD4_TICKET_t; -+ -+#define IS_CRC_WORD4_OK(_res1, _res2) (!memcmp(_res1, _res2, sizeof(CRC32_WORD4_t))) -+#define IS_CRC_WORD4_ZERO(_w4) (((_w4)->crc_w[0] == 0) && ((_w4)->crc_w[1] == 0) && ((_w4)->crc_w[2] == 0) && ((_w4)->crc_w[3] == 0)) -+#define IS_CRC_WORD4_ALL_F(_w4) (((_w4)->crc_w[0] == 0xffffffff) && ((_w4)->crc_w[1] == 0xffffffff) && ((_w4)->crc_w[2] == 0xffffffff) && ((_w4)->crc_w[3] == 0xffffffff)) -+#endif -diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S -index debf271..f99f8b2 100644 ---- a/arch/arm/mach-shmobile/headsmp.S -+++ b/arch/arm/mach-shmobile/headsmp.S -@@ -16,8 +16,6 @@ - #include - #include - -- __CPUINIT -- - #ifdef CONFIG_SMP - ENTRY(shmobile_invalidate_start) - bl v7_invalidate_l1 -diff --git a/arch/arm/mach-shmobile/hibernation.c b/arch/arm/mach-shmobile/hibernation.c -new file mode 100644 -index 0000000..94fa78b ---- /dev/null -+++ b/arch/arm/mach-shmobile/hibernation.c -@@ -0,0 +1,243 @@ -+/* -+ * Suspend-to-RAM support code for SH-Mobile ARM -+ * -+ * Copyright (C) 2011 Magnus Damm -+ * -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ */ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include "common.h" -+#include "rcar-gen2.h" -+ -+#include -+ -+#include "crc32_word4.c" -+#include "pm-rcar.h" -+ -+ -+struct swsusp_header { -+ char reserved[PAGE_SIZE - 20 - sizeof(sector_t) - sizeof(int) - -+ sizeof(u32) - sizeof(CRC32_WORD4_t) - sizeof(u32)]; -+ CRC32_WORD4_t comp_crc32; -+ u32 img_size; /* add. see. kernel/power/swap.c */ -+ u32 crc32; -+ sector_t image; -+ unsigned int flags; /* Flags to pass to the "boot" kernel */ -+ char orig_sig[10]; -+ char sig[10]; -+} __packed; -+static unsigned long swsusp_area = CONFIG_SWSUSP_AREA; -+static unsigned long swsusp_area_size = CONFIG_SWSUSP_AREA_SIZE; -+ -+enum { -+ MSTP00, MSTP01, MSTP02, MSTP03, MSTP04, MSTP05, -+ MSTP07, MSTP08, MSTP09, MSTP10, MSTP11, -+ MSTP_NR, -+}; -+ -+static struct { -+ u32 s_offset; -+ u32 s_val; -+ u32 r_offset; -+ u32 r_val; -+} mstp_regs[] = { -+ [MSTP00] = { SMSTPCR0, 0, -+ RMSTPCR0, 0}, -+ [MSTP01] = { SMSTPCR1, 0, -+ RMSTPCR1, 0}, -+ [MSTP02] = { SMSTPCR2, 0, -+ RMSTPCR2, 0}, -+ [MSTP03] = { SMSTPCR3, 0, -+ RMSTPCR3, 0}, -+ [MSTP04] = { SMSTPCR4, 0, -+ RMSTPCR4, 0}, -+ [MSTP05] = { SMSTPCR5, 0, -+ RMSTPCR5, 0}, -+ [MSTP07] = { SMSTPCR7, 0, -+ RMSTPCR7, 0}, -+ [MSTP08] = { SMSTPCR8, 0, -+ RMSTPCR8, 0}, -+ [MSTP09] = { SMSTPCR9, 0, -+ RMSTPCR9, 0}, -+ [MSTP10] = { SMSTPCR10, 0, -+ RMSTPCR10, 0}, -+ [MSTP11] = { SMSTPCR11, 0, -+ RMSTPCR11, 0}, -+}; -+ -+static void save_mstp_regs(void) -+{ -+ int i; -+ void *m = ioremap(CPG_BASE, CPG_LEN); -+ for (i = MSTP00; i < MSTP_NR; i++) { -+ mstp_regs[i].s_val = ioread32(m +mstp_regs[i].s_offset); -+ mstp_regs[i].r_val = ioread32(m +mstp_regs[i].r_offset); -+ } -+ iounmap(m); -+} -+ -+static void restore_mstp_regs(void) -+{ -+ int i; -+ void *m = ioremap(CPG_BASE, CPG_LEN); -+ for (i = MSTP00; i < MSTP_NR; i++) { -+ iowrite32(mstp_regs[i].s_val, m +mstp_regs[i].s_offset); -+ iowrite32(mstp_regs[i].r_val, m +mstp_regs[i].r_offset); -+ } -+ iounmap(m); -+} -+ -+static int shmobile_hibernation_begin(void) -+{ -+ save_mstp_regs(); -+ return 0; -+} -+ -+static void shmobile_hibernation_end(void) -+{ -+} -+ -+static int shmobile_hibernation_pre_snapshot(void) -+{ -+ return 0; -+} -+ -+ -+static void shmobile_hibernation_finish(void) -+{ -+} -+ -+static int shmobile_hibernation_prepare(void) -+{ -+ return 0; -+} -+ -+static int shmobile_hibernation_enter(void) -+{ -+ void *m, *l; -+ struct swsusp_header *h; -+ unsigned int calc_sz; -+ if (swsusp_area_size > 0) { -+ h = m = ioremap(swsusp_area, swsusp_area_size); -+ if (h) { -+ if ((h->img_size > PAGE_SIZE) -+ && (h->img_size < (swsusp_area_size - PAGE_SIZE))) -+ calc_sz = h->img_size; -+ else -+ calc_sz = swsusp_area_size - PAGE_SIZE; -+ memset(&h->comp_crc32, 0, sizeof(h->comp_crc32)); -+ calc_crc32x4(m + PAGE_SIZE, calc_sz, &h->comp_crc32); -+ mb(); -+ iounmap(m); -+ } -+ } -+ /* Resetting FDP0 */ -+ l = ioremap(0xfe940000, 0x4000); -+ writel(1, l + 0x1c); -+ mb(); -+ iounmap(l); -+ /* Resetting FDP1 */ -+ l = ioremap(0xfe944000, 0x4000); -+ writel(1, l + 0x1c); -+ mb(); -+ iounmap(l); -+ /* Doing board reset */ -+ l = ioremap(0xe6300200, 4); -+ writel(0xa1b20001, l); -+ mb(); -+ iounmap(l); -+ -+ return 0; -+} -+ -+char *clks[] = { -+ "ehci", "hsusb", "dmal", "dmah", "sys-dmac1", -+ "sys-dmac0", "ssp", "ssp_dev", "ipmmu_gp", -+ "audmac0", "audmac1", -+}; -+ -+static int shmobile_hibernation_pre_restore(void) -+{ -+ return 0; -+} -+ -+ -+static void shmobile_hibernation_restore_cleanup(void) -+{ -+} -+ -+extern int in_suspend; -+ -+static void shmobile_hibernation_leave(void) -+{ -+ int restore_highmem(void); -+ struct clk *clk; -+ unsigned int i; -+ -+ if (!in_suspend) { -+#ifdef CONFIG_SMP -+ if (is_smp()) -+ arch_smp_prepare_cpus(setup_max_cpus); -+#endif -+ -+#ifdef CONFIG_HIGHMEM -+ restore_highmem(); -+#endif -+ restore_mstp_regs(); -+ } -+ -+ for (i = 0; i < ARRAY_SIZE(clks); ++i) { -+ clk = clk_get(NULL, clks[i]); -+ if (!IS_ERR(clk)) { -+ clk_prepare_enable(clk); -+ clk_put(clk); -+ } -+ } -+} -+ -+const struct platform_hibernation_ops shmobile_hibernation_ops = { -+ .leave = shmobile_hibernation_leave, -+ .begin = shmobile_hibernation_begin, -+ .end = shmobile_hibernation_end, -+ .pre_snapshot = shmobile_hibernation_pre_snapshot, -+ .finish = shmobile_hibernation_finish, -+ .prepare = shmobile_hibernation_prepare, -+ .enter = shmobile_hibernation_enter, -+ .pre_restore = shmobile_hibernation_pre_restore, -+ .restore_cleanup = shmobile_hibernation_restore_cleanup, -+}; -+ -+int __init shmobile_hibernation_init(void) -+{ -+ hibernation_set_ops(&shmobile_hibernation_ops); -+ return 0; -+} -+static int setup_swsusp_area(char *s) -+{ -+ long tmp = 0; -+ char *p; -+ if (!kstrtol(s, 0, &tmp) && tmp > 0) -+ swsusp_area = tmp; -+ p = strchr(s, ','); -+ if (!p) -+ goto out; -+ if (!kstrtol(p, 0, &tmp) && tmp > 0) -+ swsusp_area_size = tmp; -+out: -+ return 1; -+} -+__setup("swsusp_area=", setup_swsusp_area); -+ -diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c -index cff7a25..e382e26 100644 ---- a/arch/arm/mach-shmobile/platsmp-apmu.c -+++ b/arch/arm/mach-shmobile/platsmp-apmu.c -@@ -33,7 +33,10 @@ - - /* only enable the cluster that includes the boot CPU by default */ - static bool enable_multicluster = false; -+#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_SUSPEND) || \ -+defined(CONFIG_CPU_IDLE) - static bool is_last_cpu; -+#endif - - static __init int apmu_setup(char *opt) - { -@@ -71,12 +74,15 @@ static int __maybe_unused apmu_power_on(void __iomem *p, int bit) - return 0; - } - -+#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_SUSPEND) || \ -+defined(CONFIG_CPU_IDLE) - static int apmu_power_off(void __iomem *p, int bit) - { - /* request Core Standby for next WFI */ - writel_relaxed(3, p + CPUNCR_OFFS(bit)); - return 0; - } -+#endif - - static int __maybe_unused apmu_power_off_poll(void __iomem *p, int bit) - { -@@ -92,12 +98,15 @@ static int __maybe_unused apmu_power_off_poll(void __iomem *p, int bit) - return 0; - } - -+#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_SUSPEND) || \ -+defined(CONFIG_CPU_IDLE) || defined(CONFIG_SMP) - static int apmu_wrap(int cpu, int (*fn)(void __iomem *p, int cpu)) - { - void __iomem *p = apmu_cpus[cpu].iomem; - - return p ? fn(p, apmu_cpus[cpu].bit) : -EINVAL; - } -+#endif - - static void apmu_init_cpu(struct resource *res, int cpu, int bit) - { -@@ -141,7 +150,7 @@ static void apmu_parse_cfg(void (*fn)(struct resource *res, int cpu, int bit), - } - } - --void __init shmobile_smp_apmu_prepare_cpus(unsigned int max_cpus, -+void shmobile_smp_apmu_prepare_cpus(unsigned int max_cpus, - struct rcar_apmu_config *apmu_config, - int num) - { -@@ -328,7 +337,7 @@ static int __cpuinit shmobile_smp_apmu_enter_suspend(suspend_state_t state) - return 0; - } - --void __init shmobile_smp_apmu_suspend_init(void) -+void shmobile_smp_apmu_suspend_init(void) - { - cpucmcr_ca7 = ioremap_nocache(CPUCMCR_CA7, 0x4); - cpucmcr_ca15 = ioremap_nocache(CPUCMCR_CA15, 0x4); -diff --git a/arch/arm/mach-shmobile/platsmp-rst.c b/arch/arm/mach-shmobile/platsmp-rst.c -index 70a2b6c..7ba9eeb 100644 ---- a/arch/arm/mach-shmobile/platsmp-rst.c -+++ b/arch/arm/mach-shmobile/platsmp-rst.c -@@ -11,8 +11,7 @@ - #include - #include - #include -- --#define RST 0xe6160000 -+#include "rcar-gen2.h" - - #define r8a779x_clst_id(cpu) (cpu_logical_map((cpu)) >> 8) - #define r8a779x_cpu_id(cpu) (cpu_logical_map((cpu)) & 0xff) -diff --git a/arch/arm/mach-shmobile/pm-r8a7791.c b/arch/arm/mach-shmobile/pm-r8a7791.c -index f0ed98c..a13da84 100644 ---- a/arch/arm/mach-shmobile/pm-r8a7791.c -+++ b/arch/arm/mach-shmobile/pm-r8a7791.c -@@ -21,16 +21,9 @@ - #include - #include "common.h" - #include "pm-rcar.h" -+#include "rcar-gen2.h" - #include "r8a7791.h" - --#define RST 0xe6160000 --#define CA15BAR 0x0020 --#define RAM 0xe63c0000 -- --/* SYSC */ --#define SYSCIER 0x0c --#define SYSCIMR 0x10 -- - struct r8a7791_pm_domain { - struct generic_pm_domain genpd; - struct rcar_sysc_ch ch; -@@ -43,13 +36,14 @@ static inline struct rcar_sysc_ch *to_r8a7791_ch(struct generic_pm_domain *d) - - #if defined(CONFIG_PM) || defined(CONFIG_SMP) - --static void __init r8a7791_sysc_init(void) -+static void r8a7791_sysc_init(void) - { -- void __iomem *base = rcar_sysc_init(0xe6180000); -+ void __iomem *base = rcar_sysc_init(SYSC_BASE); - - /* enable all interrupt sources, but do not use interrupt handler */ - iowrite32(0x0131000e, base + SYSCIER); -- iowrite32(0, base + SYSCIMR); -+ /* keep reserved bits as they are in TRM */ -+ iowrite32(0x012001ec, base + SYSCIMR); - } - - #else /* CONFIG_PM || CONFIG_SMP */ -@@ -60,9 +54,6 @@ static inline void r8a7791_sysc_init(void) {} - - #ifdef CONFIG_PM - --#define CPG_BASE 0xe6150000 --#define CPG_LEN 0x1000 -- - /* Software Reset */ - #define SRCR0 0x00a0 - #define SRCR1 0x00a8 -@@ -243,14 +234,10 @@ static struct notifier_block platform_nb = { - - #endif /* CONFIG_PM */ - --void __init r8a7791_pm_init(void) -+void r8a7791_pm_init(void) - { - void __iomem *p; - u32 bar; -- static int once; -- -- if (once++) -- return; - - /* RAM for jump stub, because BAR requires 256KB aligned address */ - p = ioremap_nocache(RAM, shmobile_boot_size); -@@ -258,7 +245,7 @@ void __init r8a7791_pm_init(void) - iounmap(p); - - /* setup reset vectors */ -- p = ioremap_nocache(RST, 0x63); -+ p = ioremap_nocache(RST, RST_LEN); - bar = (RAM >> 8) & 0xfffffc00; - writel_relaxed(bar, p + CA15BAR); - writel_relaxed(bar | 0x10, p + CA15BAR); -diff --git a/arch/arm/mach-shmobile/rcar-gen2.h b/arch/arm/mach-shmobile/rcar-gen2.h -index ce53cb5..df7201a 100644 ---- a/arch/arm/mach-shmobile/rcar-gen2.h -+++ b/arch/arm/mach-shmobile/rcar-gen2.h -@@ -1,6 +1,45 @@ - #ifndef __ASM_RCAR_GEN2_H__ - #define __ASM_RCAR_GEN2_H__ - -+#define CPG_BASE 0xe6150000 -+#define CPG_LEN 0x1000 -+#define RMSTPCR0 0x110 -+#define RMSTPCR1 0x114 -+#define RMSTPCR2 0x118 -+#define RMSTPCR3 0x11c -+#define RMSTPCR4 0x120 -+#define RMSTPCR5 0x124 -+#define RMSTPCR7 0x12c -+#define RMSTPCR8 0x980 -+#define RMSTPCR9 0x984 -+#define RMSTPCR10 0x988 -+#define RMSTPCR11 0x98c -+#define SMSTPCR0 0x130 -+#define SMSTPCR1 0x134 -+#define SMSTPCR2 0x138 -+#define SMSTPCR3 0x13c -+#define SMSTPCR4 0x140 -+#define SMSTPCR5 0x144 -+#define SMSTPCR7 0x14c -+#define SMSTPCR8 0x990 -+#define SMSTPCR9 0x994 -+#define SMSTPCR10 0x998 -+#define SMSTPCR11 0x99c -+ -+#define SYSC_BASE 0xe6180000 -+#define SYSCIER 0x0c -+#define SYSCIMR 0x10 -+ -+#define RST 0xe6160000 -+#define RST_LEN 0x64 -+ -+#define CA15BAR 0x0020 -+#define CA7BAR 0x0030 -+#define RAM 0xe63c0000 -+ -+#define CNTCR 0 -+#define CNTFID0 0x20 -+ - void rcar_gen2_timer_init(void); - #define MD(nr) BIT(nr) - u32 rcar_gen2_read_mode_pins(void); -diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c -index 2aa431a..c48c6a9 100644 ---- a/arch/arm/mach-shmobile/setup-r8a7791.c -+++ b/arch/arm/mach-shmobile/setup-r8a7791.c -@@ -29,6 +29,7 @@ - #include - #include - #include -+#include - - #include "common.h" - #include "dma-register.h" -@@ -243,8 +244,6 @@ static const struct resource powervr_resources[] __initconst = { - powervr_resources, \ - ARRAY_SIZE(powervr_resources)) - --#define CPG_BASE 0xe6150000 --#define CPG_LEN 0x1000 - #define RGXCR 0x0B4 - - void __init r8a7791_register_pvrsrvkm(void) -@@ -271,7 +270,12 @@ void __init r8a7791_register_ssp(void) - - void __init r8a7791_add_dt_devices(void) - { -- r8a7791_pm_init(); -+#ifdef CONFIG_SMP -+ /* In case of SMP config pm_init already called from smp_prepare_cpus. -+ * It is still needed to call pm_init if 'nosmp' was given */ -+ if (!setup_max_cpus) -+#endif -+ r8a7791_pm_init(); - r8a7791_init_pm_domains(); - r8a7791_register_cmt(00); - r8a7791_register_pvrsrvkm(); -diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c -index da16ebd..641ee1d 100644 ---- a/arch/arm/mach-shmobile/setup-rcar-gen2.c -+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c -@@ -47,9 +47,6 @@ u32 rcar_gen2_read_mode_pins(void) - return mode; - } - --#define CNTCR 0 --#define CNTFID0 0x20 -- - void __init rcar_gen2_timer_init(void) - { - #if defined(CONFIG_ARM_ARCH_TIMER) || defined(CONFIG_COMMON_CLK) -@@ -58,7 +55,7 @@ void __init rcar_gen2_timer_init(void) - #ifdef CONFIG_ARM_ARCH_TIMER - void __iomem *base; - int extal_mhz = 0; -- u32 freq; -+ u32 rcar_gen2_archtimer_freq; - - /* At Linux boot time the r8a7790 arch timer comes up - * with the counter disabled. Moreover, it may also report -@@ -83,7 +80,7 @@ void __init rcar_gen2_timer_init(void) - } - - /* The arch timer frequency equals EXTAL / 2 */ -- freq = extal_mhz * (1000000 / 2); -+ rcar_gen2_archtimer_freq = extal_mhz * (1000000 / 2); - - /* Remap "armgcnt address map" space */ - base = ioremap(0xe6080000, PAGE_SIZE); -@@ -96,10 +93,11 @@ void __init rcar_gen2_timer_init(void) - */ - - if ((ioread32(base + CNTCR) & 1) == 0 || -- ioread32(base + CNTFID0) != freq) { -+ ioread32(base + CNTFID0) != rcar_gen2_archtimer_freq) { - /* Update registers with correct frequency */ -- iowrite32(freq, base + CNTFID0); -- asm volatile("mcr p15, 0, %0, c14, c0, 0" : : "r" (freq)); -+ iowrite32(rcar_gen2_archtimer_freq, base + CNTFID0); -+ asm volatile("mcr p15, 0, %0, c14, c0, 0" : : "r" -+ (rcar_gen2_archtimer_freq)); - - /* make sure arch timer is started by setting bit 0 of CNTCR */ - iowrite32(1, base + CNTCR); -diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c -index 24cad9f..4583cb6 100644 ---- a/arch/arm/mach-shmobile/smp-r8a7791.c -+++ b/arch/arm/mach-shmobile/smp-r8a7791.c -@@ -33,6 +33,11 @@ - - #define CA15RESCNT 0x0040 - -+static struct rcar_sysc_ch r8a7791_ca15_scu = { -+ .chan_offs = 0x180, /* PWRSR5 .. PWRER5 */ -+ .isr_bit = 12, /* CA15-SCU */ -+}; -+ - static struct rcar_apmu_config r8a7791_apmu_config[] = { - { - .iomem = DEFINE_RES_MEM(0xe6152000, 0x88), -@@ -47,7 +52,7 @@ static struct rcar_rst_config r8a7791_rst_config[] = { - } - }; - --static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus) -+static void r8a7791_smp_prepare_cpus(unsigned int max_cpus) - { - void __iomem *p; - u32 val; -@@ -67,6 +72,7 @@ static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus) - } - - r8a7791_pm_init(); -+ rcar_sysc_power_up(&r8a7791_ca15_scu); - - /* keep secondary CPU cores in reset */ - r8a779x_init_reset(r8a7791_rst_config); -diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S -index 19da841..35c9048 100644 ---- a/arch/arm/mm/proc-v7.S -+++ b/arch/arm/mm/proc-v7.S -@@ -92,48 +92,59 @@ ENDPROC(cpu_v7_dcache_clean_area) - - /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ - .globl cpu_v7_suspend_size --.equ cpu_v7_suspend_size, 4 * 8 -+.equ cpu_v7_suspend_size, 4 * 9 - #ifdef CONFIG_ARM_CPU_SUSPEND - ENTRY(cpu_v7_do_suspend) - stmfd sp!, {r4 - r10, lr} - mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID - mrc p15, 0, r5, c13, c0, 3 @ User r/o thread ID - stmia r0!, {r4 - r5} -+#ifdef CONFIG_MMU - mrc p15, 0, r6, c3, c0, 0 @ Domain ID -+#ifdef CONFIG_ARM_LPAE -+ mrrc p15, 1, r5, r7, c2 @ TTB 1 -+#else - mrc p15, 0, r7, c2, c0, 1 @ TTB 1 -+#endif - mrc p15, 0, r11, c2, c0, 2 @ TTB control register -+#endif - mrc p15, 0, r8, c1, c0, 0 @ Control register - mrc p15, 0, r9, c1, c0, 1 @ Auxiliary control register - mrc p15, 0, r10, c1, c0, 2 @ Co-processor access control -- stmia r0, {r6 - r11} -+ stmia r0, {r5 - r11} - ldmfd sp!, {r4 - r10, pc} - ENDPROC(cpu_v7_do_suspend) - - ENTRY(cpu_v7_do_resume) - mov ip, #0 -- mcr p15, 0, ip, c8, c7, 0 @ invalidate TLBs - mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache - mcr p15, 0, ip, c13, c0, 1 @ set reserved context ID - ldmia r0!, {r4 - r5} - mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID - mcr p15, 0, r5, c13, c0, 3 @ User r/o thread ID -- ldmia r0, {r6 - r11} -+ ldmia r0, {r5 - r11} -+#ifdef CONFIG_MMU -+ mcr p15, 0, ip, c8, c7, 0 @ invalidate TLBs - mcr p15, 0, r6, c3, c0, 0 @ Domain ID --#ifndef CONFIG_ARM_LPAE -+#ifdef CONFIG_ARM_LPAE -+ mcrr p15, 0, r1, ip, c2 @ TTB 0 -+ mcrr p15, 1, r5, r7, c2 @ TTB 1 -+#else - ALT_SMP(orr r1, r1, #TTB_FLAGS_SMP) - ALT_UP(orr r1, r1, #TTB_FLAGS_UP) --#endif - mcr p15, 0, r1, c2, c0, 0 @ TTB 0 - mcr p15, 0, r7, c2, c0, 1 @ TTB 1 -+#endif - mcr p15, 0, r11, c2, c0, 2 @ TTB control register -- mrc p15, 0, r4, c1, c0, 1 @ Read Auxiliary control register -- teq r4, r9 @ Is it already set? -- mcrne p15, 0, r9, c1, c0, 1 @ No, so write it -- mcr p15, 0, r10, c1, c0, 2 @ Co-processor access control - ldr r4, =PRRR @ PRRR - ldr r5, =NMRR @ NMRR - mcr p15, 0, r4, c10, c2, 0 @ write PRRR - mcr p15, 0, r5, c10, c2, 1 @ write NMRR -+#endif /* CONFIG_MMU */ -+ mrc p15, 0, r4, c1, c0, 1 @ Read Auxiliary control register -+ teq r4, r9 @ Is it already set? -+ mcrne p15, 0, r9, c1, c0, 1 @ No, so write it -+ mcr p15, 0, r10, c1, c0, 2 @ Co-processor access control - isb - dsb - mov r0, r8 @ control register --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0002-Fix-Black-blink-correction-of-display.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0002-Fix-Black-blink-correction-of-display.patch deleted file mode 100644 index 2ef1129ce..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0002-Fix-Black-blink-correction-of-display.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 175a91f2068c5cb4a9be5aa1ea5f1e24e2919bbb Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Fri, 9 Jun 2017 20:13:59 +0900 -Subject: [PATCH 2/3] Fix Black blink correction of display - -Signed-off-by: Yuichi Kusakabe ---- - drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 1 + - drivers/gpu/drm/rcar-du/rcar_du_crtc.h | 1 + - drivers/gpu/drm/rcar-du/rcar_du_drv.c | 13 ++++--------- - drivers/gpu/drm/rcar-du/rcar_du_group.c | 4 ++-- - 4 files changed, 8 insertions(+), 11 deletions(-) - -diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c -index 262d8a8d..ab3bb09 100644 ---- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c -+++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c -@@ -1027,4 +1027,5 @@ void rcar_du_crtc_enable_vblank(struct rcar_du_crtc *rcrtc, bool enable) - } else { - rcar_du_crtc_clr(rcrtc, DIER, DIER_VBE); - } -+ rcrtc->vblank_enable = enable; - } -diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.h b/drivers/gpu/drm/rcar-du/rcar_du_crtc.h -index 6cdd02e6..19c0d69 100644 ---- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.h -+++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.h -@@ -49,6 +49,7 @@ struct rcar_du_crtc { - int lif_enable; - void *vpsd_handle; - #endif -+ bool vblank_enable; - }; - - #define to_rcar_crtc(c) container_of(c, struct rcar_du_crtc, crtc) -diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c -index fbb212c..f83501d 100644 ---- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c -+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c -@@ -517,7 +517,7 @@ static int rcar_du_pm_resume(struct device *dev) - - return 0; - } --#ifdef CONFIG_MACH_FTEN -+ - static int rcar_du_pm_freeze(struct device *dev) - { - int ret; -@@ -546,18 +546,13 @@ static int rcar_du_pm_restore(struct device *dev) - return ret; - } - #endif --#endif -+ - static const struct dev_pm_ops rcar_du_pm_ops = { --#if defined(CONFIG_MACH_FTEN) && defined(CONFIG_HIBERNATION) && \ -- defined(CONFIG_PM_SLEEP) -- .suspend = rcar_du_pm_suspend, -- .resume = rcar_du_pm_resume, -+ SET_SYSTEM_SLEEP_PM_OPS(rcar_du_pm_suspend, rcar_du_pm_resume) -+#ifdef CONFIG_HIBERNATION - .freeze = rcar_du_pm_freeze, - .thaw = rcar_du_pm_thaw, -- .poweroff = rcar_du_pm_suspend, - .restore = rcar_du_pm_restore, --#else -- SET_SYSTEM_SLEEP_PM_OPS(rcar_du_pm_suspend, rcar_du_pm_resume) - #endif - }; - -diff --git a/drivers/gpu/drm/rcar-du/rcar_du_group.c b/drivers/gpu/drm/rcar-du/rcar_du_group.c -index 3620040..0e571d4 100644 ---- a/drivers/gpu/drm/rcar-du/rcar_du_group.c -+++ b/drivers/gpu/drm/rcar-du/rcar_du_group.c -@@ -151,8 +151,8 @@ void rcar_du_group_start_stop(struct rcar_du_group *rgrp, bool start) - * when the display controller will have to be restarted. - */ - if (start) { -- if (rgrp->used_crtcs++ != 0) -- __rcar_du_group_start_stop(rgrp, false); -+ rgrp->used_crtcs++; -+ __rcar_du_group_start_stop(rgrp, false); - __rcar_du_group_start_stop(rgrp, true); - } else { - if (--rgrp->used_crtcs == 0) --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0003-Add-hibernation-image-area.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0003-Add-hibernation-image-area.patch deleted file mode 100644 index 5901cc2b1..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0003-Add-hibernation-image-area.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 4d35f60f9bd47aebc104d34b9099e8e4f69fa53a Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Fri, 9 Jun 2017 20:15:32 +0900 -Subject: [PATCH 3/3] Add hibernation image area - -0x40000000 <-> 0x77FFFFFF : kernel -0x78000000 <-> 0x7FFFFFFF : hibernation image area - -Signed-off-by: Yuichi Kusakabe ---- - arch/arm/boot/dts/r8a7791-porter.dts | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/r8a7791-porter.dts b/arch/arm/boot/dts/r8a7791-porter.dts -index b1acf4a..a0e273e 100644 ---- a/arch/arm/boot/dts/r8a7791-porter.dts -+++ b/arch/arm/boot/dts/r8a7791-porter.dts -@@ -42,7 +42,10 @@ - - memory@40000000 { - device_type = "memory"; -- reg = <0 0x40000000 0 0x40000000>; -+/* reg = <0 0x40000000 0 0x40000000>; */ -+/* 0x40000000 <-> 0x77FFFFFF : kernel */ -+/* 0x78000000 <-> 0x7FFFFFFF : snap */ -+ reg = <0 0x40000000 0 0x38000000>; - }; - - memory@200000000 { --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0003-Add-sata-hibernation-code.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0003-Add-sata-hibernation-code.patch deleted file mode 100755 index fd0dfb66f..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0003-Add-sata-hibernation-code.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 5d87144a96085d74b6002bd6d8c093c37bf128b7 Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Thu, 18 May 2017 17:04:33 +0900 -Subject: [PATCH 03/15] Add sata hibernation code - -Signed-off-by: Yuichi Kusakabe ---- - drivers/ata/sata_rcar.c | 29 +++++++++++++++++++++++++++++ - 1 file changed, 29 insertions(+) - -diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c -index 92abfdd..4c82b5e 100644 ---- a/drivers/ata/sata_rcar.c -+++ b/drivers/ata/sata_rcar.c -@@ -1003,9 +1003,38 @@ static int sata_rcar_resume(struct device *dev) - return 0; - } - -+static int sata_rcar_restore(struct device *dev) -+{ -+ struct ata_host *host = dev_get_drvdata(dev); -+ struct sata_rcar_priv *priv = host->private_data; -+ int ret; -+ -+ clk_prepare_enable(priv->clk); -+ -+ ret = sata_rcar_setup_port(host); -+ if (ret) -+ goto cleanup; -+ -+ /* initialize host controller */ -+ sata_rcar_init_controller(host); -+ -+ ata_host_resume(host); -+ -+ return 0; -+ -+cleanup: -+ clk_disable_unprepare(priv->clk); -+ -+ return ret; -+} -+ - static const struct dev_pm_ops sata_rcar_pm_ops = { - .suspend = sata_rcar_suspend, - .resume = sata_rcar_resume, -+ .freeze = sata_rcar_suspend, -+ .restore = sata_rcar_restore, -+ .thaw = sata_rcar_resume, -+ .poweroff = sata_rcar_suspend - }; - #endif - --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0004-Add-firmware-hibernation-code.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0004-Add-firmware-hibernation-code.patch deleted file mode 100755 index d0250762e..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0004-Add-firmware-hibernation-code.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 33d4c0afe2a4e39c0afdc993f28a8d2d6228df01 Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Thu, 18 May 2017 17:31:24 +0900 -Subject: [PATCH 04/15] Add firmware hibernation code - -Signed-off-by: Yuichi Kusakabe ---- - drivers/base/firmware_class.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c -index 01e2103..6123148 100644 ---- a/drivers/base/firmware_class.c -+++ b/drivers/base/firmware_class.c -@@ -1464,6 +1464,7 @@ static int fw_pm_notify(struct notifier_block *notify_block, - switch (mode) { - case PM_HIBERNATION_PREPARE: - case PM_SUSPEND_PREPARE: -+ case PM_RESTORE_PREPARE: - device_cache_fw_images(); - break; - --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0005-Add-rcar-dma-hibernation-code.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0005-Add-rcar-dma-hibernation-code.patch deleted file mode 100755 index b446fa301..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0005-Add-rcar-dma-hibernation-code.patch +++ /dev/null @@ -1,113 +0,0 @@ -From c094e905cb0f542acdeb5d7009ab9edc812897f7 Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Thu, 18 May 2017 17:32:30 +0900 -Subject: [PATCH 05/15] Add rcar-dma hibernation code - -Signed-off-by: Yuichi Kusakabe ---- - drivers/dma/sh/rcar-dmac.c | 27 +++++++++++++++++++++++++++ - 1 file changed, 27 insertions(+) - -diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c -index e5e60ee..3b4a684 100644 ---- a/drivers/dma/sh/rcar-dmac.c -+++ b/drivers/dma/sh/rcar-dmac.c -@@ -121,6 +121,7 @@ struct rcar_dmac_desc_page { - * struct rcar_dmac_chan - R-Car Gen2 DMA Controller Channel - * @chan: base DMA channel object - * @iomem: channel I/O memory base -+ * @backup: channel I/O memory backup base - * @index: index of this channel in the controller - * @src_xfer_size: size (in bytes) of hardware transfers on the source side - * @dst_xfer_size: size (in bytes) of hardware transfers on the destination side -@@ -140,6 +141,7 @@ struct rcar_dmac_desc_page { - struct rcar_dmac_chan { - struct dma_chan chan; - void __iomem *iomem; -+ void *backup; - unsigned int index; - - unsigned int src_xfer_size; -@@ -171,6 +173,7 @@ struct rcar_dmac_chan { - * @engine: base DMA engine object - * @dev: the hardware device - * @iomem: remapped I/O memory base -+ * @backup: remapped I/O memory backup base - * @n_channels: number of available channels - * @channels: array of DMAC channels - * @modules: bitmask of client modules in use -@@ -179,6 +182,7 @@ struct rcar_dmac { - struct dma_device engine; - struct device *dev; - void __iomem *iomem; -+ void *backup; - - unsigned int n_channels; - struct rcar_dmac_chan *channels; -@@ -277,6 +281,7 @@ static void rcar_dmac_write(struct rcar_dmac *dmac, u32 reg, u32 data) - writew(data, dmac->iomem + reg); - else - writel(data, dmac->iomem + reg); -+ writel(data, dmac->backup + reg); - } - - static u32 rcar_dmac_read(struct rcar_dmac *dmac, u32 reg) -@@ -301,6 +306,7 @@ static void rcar_dmac_chan_write(struct rcar_dmac_chan *chan, u32 reg, u32 data) - writew(data, chan->iomem + reg); - else - writel(data, chan->iomem + reg); -+ writel(data, chan->backup + reg); - } - - /* ----------------------------------------------------------------------------- -@@ -1548,10 +1554,25 @@ static int rcar_dmac_runtime_resume(struct device *dev) - } - #endif - -+static int rcar_dmac_freeze(struct device *dev) -+{ -+ return 0; -+} -+ -+static int rcar_dmac_restore(struct device *dev) -+{ -+ int ret; -+ struct rcar_dmac *dmac = dev_get_drvdata(dev); -+ ret = rcar_dmac_init(dmac); -+ return ret; -+} -+ - static const struct dev_pm_ops rcar_dmac_pm = { - SET_SYSTEM_SLEEP_PM_OPS(rcar_dmac_sleep_suspend, rcar_dmac_sleep_resume) - SET_RUNTIME_PM_OPS(rcar_dmac_runtime_suspend, rcar_dmac_runtime_resume, - NULL) -+ .freeze = rcar_dmac_freeze, -+ .restore = rcar_dmac_restore, - }; - - /* ----------------------------------------------------------------------------- -@@ -1571,6 +1592,7 @@ static int rcar_dmac_chan_probe(struct rcar_dmac *dmac, - - rchan->index = index; - rchan->iomem = dmac->iomem + RCAR_DMAC_CHAN_OFFSET(index); -+ rchan->backup = dmac->backup + RCAR_DMAC_CHAN_OFFSET(index); - rchan->mid_rid = -EINVAL; - - spin_lock_init(&rchan->lock); -@@ -1657,8 +1679,13 @@ static int rcar_dmac_probe(struct platform_device *pdev) - /* Request resources. */ - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dmac->iomem = devm_ioremap_resource(&pdev->dev, mem); -+ dmac->backup = devm_kzalloc(&pdev->dev, resource_size(mem), GFP_KERNEL); - if (IS_ERR(dmac->iomem)) - return PTR_ERR(dmac->iomem); -+ dmac->backup = devm_kzalloc(&pdev->dev, resource_size(mem), GFP_KERNEL); -+ if (IS_ERR(dmac->backup)) { -+ return PTR_ERR(dmac->backup); -+ } - - irq = platform_get_irq_byname(pdev, "error"); - if (irq < 0) { --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0006-Add-rcar-du-hibernation-code.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0006-Add-rcar-du-hibernation-code.patch deleted file mode 100755 index 8942ed44e..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0006-Add-rcar-du-hibernation-code.patch +++ /dev/null @@ -1,127 +0,0 @@ -From 4a9a11deb2e83549d2e77cac129f879a0000ef7e Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Thu, 18 May 2017 17:33:54 +0900 -Subject: [PATCH 06/15] Add rcar-du hibernation code - -Signed-off-by: Yuichi Kusakabe ---- - drivers/gpu/drm/rcar-du/rcar_du_drv.c | 68 ++++++++++++++++++++++++++++++++++- - 1 file changed, 67 insertions(+), 1 deletion(-) - -diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c -index 53f1f6a..fbb212c 100644 ---- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c -+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c -@@ -442,6 +442,15 @@ static int rcar_du_pm_suspend(struct device *dev) - - drm_kms_helper_poll_disable(rcdu->ddev); - -+#ifdef CONFIG_MACH_FTEN -+ list_for_each_entry(encoder, -+ &rcdu->ddev->mode_config.encoder_list, head) { -+ if ((encoder->encoder_type == DRM_MODE_ENCODER_TVDAC) && -+ (get_rcar_slave_funcs(encoder)->dpms)) -+ get_rcar_slave_funcs(encoder)->dpms(encoder, -+ DRM_MODE_DPMS_SUSPEND); -+ } -+#else - #if defined(CONFIG_DRM_ADV7511) || defined(CONFIG_DRM_ADV7511_MODULE) - list_for_each_entry(encoder, - &rcdu->ddev->mode_config.encoder_list, head) { -@@ -451,6 +460,8 @@ static int rcar_du_pm_suspend(struct device *dev) - DRM_MODE_DPMS_OFF); - } - #endif -+#endif -+ - #ifdef CONFIG_DRM_RCAR_LVDS - for (i = 0; i < rcdu->info->num_lvds; ++i) { - if (rcdu->lvds[i]) -@@ -483,6 +494,15 @@ static int rcar_du_pm_resume(struct device *dev) - } - #endif - -+#ifdef CONFIG_MACH_FTEN -+ list_for_each_entry(encoder, -+ &rcdu->ddev->mode_config.encoder_list, head) { -+ if ((encoder->encoder_type == DRM_MODE_ENCODER_TVDAC) && -+ (get_rcar_slave_funcs(encoder)->dpms)) -+ get_rcar_slave_funcs(encoder)->dpms(encoder, -+ DRM_MODE_DPMS_ON); -+ } -+#else - #if defined(CONFIG_DRM_ADV7511) || defined(CONFIG_DRM_ADV7511_MODULE) - list_for_each_entry(encoder, - &rcdu->ddev->mode_config.encoder_list, head) { -@@ -492,14 +512,53 @@ static int rcar_du_pm_resume(struct device *dev) - DRM_MODE_DPMS_ON); - } - #endif -+#endif - drm_kms_helper_poll_enable(rcdu->ddev); - - return 0; - } --#endif -+#ifdef CONFIG_MACH_FTEN -+static int rcar_du_pm_freeze(struct device *dev) -+{ -+ int ret; -+ -+ ret = rcar_du_pm_suspend(dev); -+ return ret; -+} -+ -+static int rcar_du_pm_thaw(struct device *dev) -+{ -+ int ret; - -+ ret = rcar_du_pm_resume(dev); -+ return ret; -+} -+ -+static int rcar_du_pm_restore(struct device *dev) -+{ -+ int i, ret; -+ struct rcar_du_device *rcdu = dev_get_drvdata(dev); -+ -+ ret = rcar_du_pm_resume(dev); -+ for (i = 0; i < rcdu->pdata->num_crtcs; ++i) -+ rcar_du_crtc_enable_vblank(&rcdu->crtcs[i], -+ rcdu->crtcs[i].vblank_enable); -+ return ret; -+} -+#endif -+#endif - static const struct dev_pm_ops rcar_du_pm_ops = { -+#if defined(CONFIG_MACH_FTEN) && defined(CONFIG_HIBERNATION) && \ -+ defined(CONFIG_PM_SLEEP) -+ .suspend = rcar_du_pm_suspend, -+ .resume = rcar_du_pm_resume, -+ .freeze = rcar_du_pm_freeze, -+ .thaw = rcar_du_pm_thaw, -+ .poweroff = rcar_du_pm_suspend, -+ .restore = rcar_du_pm_restore, -+#else - SET_SYSTEM_SLEEP_PM_OPS(rcar_du_pm_suspend, rcar_du_pm_resume) -+#endif - }; - - /* ----------------------------------------------------------------------------- -@@ -620,6 +679,13 @@ static const struct rcar_du_device_info rcar_du_r8a7791_info = { - .possible_clones = 0, - .encoder_type = DRM_MODE_ENCODER_NONE, - }, -+#if defined(CONFIG_MACH_FTEN) -+ [RCAR_DU_OUTPUT_COMPOSITE] = { -+ .possible_crtcs = BIT(1), -+ .possible_clones = 0, -+ .encoder_type = DRM_MODE_ENCODER_TVDAC, -+ }, -+#endif - }, - .num_lvds = 1, - .drgbs_bit = 1, --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0007-Add-rcar-i2c-hibernation-code.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0007-Add-rcar-i2c-hibernation-code.patch deleted file mode 100755 index bba1eb401..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0007-Add-rcar-i2c-hibernation-code.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 6c133013b75d88d5b4514dfecb3089f830b82d65 Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Thu, 18 May 2017 17:35:37 +0900 -Subject: [PATCH 07/15] Add rcar-i2c hibernation code - -Signed-off-by: Yuichi Kusakabe ---- - drivers/i2c/busses/i2c-rcar.c | 38 ++++++++++++++++++++++++++++++++++++++ - 1 file changed, 38 insertions(+) - -diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c -index 8242002..c6a5a4b 100644 ---- a/drivers/i2c/busses/i2c-rcar.c -+++ b/drivers/i2c/busses/i2c-rcar.c -@@ -754,6 +754,43 @@ static int rcar_i2c_probe(struct platform_device *pdev) - - return 0; - } -+static int rcar_i2c_suspend(struct device *dev) -+{ -+ struct platform_device *pdev = to_platform_device(dev); -+ struct rcar_i2c_priv *priv = platform_get_drvdata(pdev); -+ pr_debug("suspend: i2c adapter name %s", priv->adap.name); -+ pr_debug("suspend: ICSCR: %08x\n", readl(priv->io + ICSCR)); -+ pr_debug("suspend: ICMCR: %08x\n", readl(priv->io + ICMCR)); -+ pr_debug("suspend: ICSSR: %08x\n", readl(priv->io + ICSSR)); -+ pr_debug("suspend: ICMSR: %08x\n", readl(priv->io + ICMSR)); -+ pr_debug("suspend: ICSIER: %08x\n", readl(priv->io + ICSIER)); -+ pr_debug("suspend: ICMIER: %08x\n", readl(priv->io + ICMIER)); -+ pr_debug("suspend: ICCCR: %08x\n", readl(priv->io + ICCCR)); -+ pr_debug("suspend: ICSAR: %08x\n", readl(priv->io + ICSAR)); -+ pr_debug("suspend: ICMAR: %08x\n", readl(priv->io + ICMAR)); -+ clk_disable(priv->clk); -+ return 0; -+} -+static int rcar_i2c_resume(struct device *dev) -+{ -+ struct platform_device *pdev = to_platform_device(dev); -+ struct rcar_i2c_priv *priv = platform_get_drvdata(pdev); -+ clk_enable(priv->clk); -+ pr_debug("resume: i2c adapter name %s", priv->adap.name); -+ pr_debug("resume: ICSCR: %08x\n", readl(priv->io + ICSCR)); -+ pr_debug("resume: ICMCR: %08x\n", readl(priv->io + ICMCR)); -+ pr_debug("resume: ICSSR: %08x\n", readl(priv->io + ICSSR)); -+ pr_debug("resume: ICMSR: %08x\n", readl(priv->io + ICMSR)); -+ pr_debug("resume: ICSIER: %08x\n", readl(priv->io + ICSIER)); -+ pr_debug("resume: ICMIER: %08x\n", readl(priv->io + ICMIER)); -+ pr_debug("resume: ICCCR: %08x\n", readl(priv->io + ICCCR)); -+ pr_debug("resume: ICSAR: %08x\n", readl(priv->io + ICSAR)); -+ pr_debug("resume: ICMAR: %08x\n", readl(priv->io + ICMAR)); -+ return 0; -+} -+static const struct dev_pm_ops rcar_i2c_pm_ops = { -+ SET_SYSTEM_SLEEP_PM_OPS(rcar_i2c_suspend, rcar_i2c_resume) -+}; - - static int rcar_i2c_remove(struct platform_device *pdev) - { -@@ -780,6 +817,7 @@ static struct platform_driver rcar_i2c_driver = { - .name = "i2c-rcar", - .owner = THIS_MODULE, - .of_match_table = rcar_i2c_dt_ids, -+ .pm = &rcar_i2c_pm_ops, - }, - .probe = rcar_i2c_probe, - .remove = rcar_i2c_remove, --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0008-Add-rcar-mmc-hibernation-code.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0008-Add-rcar-mmc-hibernation-code.patch deleted file mode 100755 index 34b40a147..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0008-Add-rcar-mmc-hibernation-code.patch +++ /dev/null @@ -1,414 +0,0 @@ -From 9d1d9be70ed3cf6670ae12a1caed337833f7bba8 Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Thu, 18 May 2017 17:38:11 +0900 -Subject: [PATCH 08/15] Add rcar mmc hibernation code - -Signed-off-by: Yuichi Kusakabe ---- - drivers/mmc/host/sh_mmcif.c | 65 +++++++++++++++++++++- - drivers/mmc/host/sh_mobile_sdhi.c | 112 +++++++++++++++++++++++++++++++++++++- - drivers/mmc/host/tmio_mmc.h | 1 + - drivers/mmc/host/tmio_mmc_pio.c | 49 ++++++++++++----- - 4 files changed, 210 insertions(+), 17 deletions(-) - -diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c -index 7290e6e..4ecf62c 100644 ---- a/drivers/mmc/host/sh_mmcif.c -+++ b/drivers/mmc/host/sh_mmcif.c -@@ -232,6 +232,7 @@ struct sh_mmcif_host { - struct platform_device *pd; - struct clk *hclk; - unsigned int clk; -+ int clkrate; - int bus_width; - unsigned char timing; - bool sd_error; -@@ -257,6 +258,8 @@ struct sh_mmcif_host { - struct dma_chan *chan_tx; - struct completion dma_complete; - bool dma_active; -+#define N_REGS 10 -+ u32 regs[N_REGS]; - }; - - static inline void sh_mmcif_bitset(struct sh_mmcif_host *host, -@@ -1457,6 +1460,8 @@ static int sh_mmcif_probe(struct platform_device *pdev) - } - } - -+ host->clkrate = clk_get_rate(host->hclk); -+ - ret = sh_mmcif_clk_update(host); - if (ret < 0) - goto eclkupdate; -@@ -1503,6 +1508,7 @@ static int sh_mmcif_probe(struct platform_device *pdev) - dev_info(&pdev->dev, "driver version %s\n", DRIVER_VERSION); - dev_dbg(&pdev->dev, "chip ver H'%04x\n", - sh_mmcif_readl(host->addr, MMCIF_CE_VERSION) & 0x0000ffff); -+ device_enable_async_suspend(&pdev->dev); - return ret; - - emmcaddh: -@@ -1574,15 +1580,68 @@ static int sh_mmcif_suspend(struct device *dev) - sh_mmcif_writel(host->addr, MMCIF_CE_INT_MASK, MASK_ALL); - pm_runtime_put(dev); - -- return 0; -+ return mmc_suspend_host(host->mmc); - } - - static int sh_mmcif_resume(struct device *dev) - { -- return 0; -+ struct sh_mmcif_host *host = dev_get_drvdata(dev); -+ return mmc_resume_host(host->mmc); -+} -+#endif -+ -+#ifdef CONFIG_PM -+static int sh_mmcif_restore(struct device *dev) -+{ -+ struct sh_mmcif_host *host = dev_get_drvdata(dev); -+ int ret; -+ ret = clk_set_rate(host->hclk, host->clkrate); -+ if (ret < 0) -+ goto eclkupdate; -+ ret = sh_mmcif_clk_update(host); -+ if (ret < 0) -+ goto eclkupdate; -+ ret = pm_runtime_resume(dev); -+ if (ret < 0) -+ goto eresume; -+ sh_mmcif_sync_reset(host); -+#ifdef CONFIG_MACH_FTEN -+ sh_mmcif_writel(host->addr, 0x00000080, 0x00000100); -+#endif -+ sh_mmcif_writel(host->addr, MMCIF_CE_INT_MASK, MASK_ALL); -+ clk_disable_unprepare(host->hclk); -+ dev_info(dev, "restore: chip ver H'%04x\n", -+ sh_mmcif_readl(host->addr, MMCIF_CE_VERSION) & 0x0000ffff); -+ sh_mmcif_writel(host->addr, MMCIF_CE_CMD_CTRL, host->regs[0]); -+ sh_mmcif_writel(host->addr, MMCIF_CE_BLOCK_SET, host->regs[1]); -+ sh_mmcif_writel(host->addr, MMCIF_CE_CLK_CTRL, host->regs[2]); -+ sh_mmcif_writel(host->addr, MMCIF_CE_BUF_ACC, host->regs[3]); -+ sh_mmcif_release_dma(host); -+ return mmc_resume_host(host->mmc); -+eclkupdate: -+ pr_info("Can't set clock\n"); -+ return -EINVAL; -+eresume: -+ pr_info("Can't resume PM\n"); -+ return -ENODEV; - } -+ -+static int sh_mmcif_freeze(struct device *dev) -+{ -+ struct sh_mmcif_host *host = dev_get_drvdata(dev); -+ int ret = mmc_suspend_host(host->mmc); -+ host->regs[0] = sh_mmcif_readl(host->addr, MMCIF_CE_CMD_CTRL); -+ host->regs[1] = sh_mmcif_readl(host->addr, MMCIF_CE_BLOCK_SET); -+ host->regs[2] = sh_mmcif_readl(host->addr, MMCIF_CE_CLK_CTRL); -+ host->regs[3] = sh_mmcif_readl(host->addr, MMCIF_CE_BUF_ACC); -+ return ret; -+} -+#else -+#define sh_mmcif_restore NULL -+#define sh_mmcif_freeze NULL - #endif - -+ - static const struct of_device_id mmcif_of_match[] = { - { .compatible = "renesas,sh-mmcif" }, - { } -@@ -1591,6 +1650,8 @@ MODULE_DEVICE_TABLE(of, mmcif_of_match); - - static const struct dev_pm_ops sh_mmcif_dev_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(sh_mmcif_suspend, sh_mmcif_resume) -+ .restore = sh_mmcif_restore, -+ .freeze = sh_mmcif_freeze, - }; - - static struct platform_driver sh_mmcif_driver = { -diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c -index 1b59cdf..c7f3abf 100644 ---- a/drivers/mmc/host/sh_mobile_sdhi.c -+++ b/drivers/mmc/host/sh_mobile_sdhi.c -@@ -156,6 +156,8 @@ struct sh_mobile_sdhi { - struct tmio_mmc_dma dma_priv; - unsigned int type; - struct sh_mobile_sdhi_vlt vlt; -+ int wifi_xrst; -+ int save_clk_rate; - }; - - static int sh_mobile_sdhi_clk_enable(struct platform_device *pdev, unsigned int *f) -@@ -647,6 +649,7 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) - if (ret < 0) - dev_err(&pdev->dev, - "cannot set clock rate: %d\n", ret); -+ priv->save_clk_rate = clk_rate; - - clk_disable_unprepare(priv->clk); - } -@@ -841,6 +844,7 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) - } - } - -+ device_enable_async_suspend(&pdev->dev); - dev_info(&pdev->dev, "%s base at 0x%08lx clock rate %u MHz\n", - mmc_hostname(host->mmc), (unsigned long) - (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start), -@@ -865,17 +869,123 @@ static int sh_mobile_sdhi_remove(struct platform_device *pdev) - struct mmc_host *mmc = platform_get_drvdata(pdev); - struct tmio_mmc_host *host = mmc_priv(mmc); - struct sh_mobile_sdhi_info *p = pdev->dev.platform_data; -+#ifdef CONFIG_MACH_FTEN_DT -+ int ret; -+ struct sh_mobile_sdhi *priv = container_of(host->pdata, -+ struct sh_mobile_sdhi, -+ mmc_data); -+#endif - - tmio_mmc_host_remove(host); - - if (p && p->cleanup) - p->cleanup(pdev); - -+#ifdef CONFIG_MACH_FTEN_DT -+ ret = gpio_request(priv->wifi_xrst, "sh_mobile_sdhi"); -+ if (ret != 0) { -+ dev_err(&pdev->dev, -+ "gpio_request(%d) failed(%d) remove\n", -+ priv->wifi_xrst, ret); -+ goto skip_wifi; -+ } -+ ret = gpio_direction_output(priv->wifi_xrst, 0); -+ if (ret != 0) { -+ dev_err(&pdev->dev, -+ "gpio_direction_output(%d) failed(%d) remove\n", -+ priv->wifi_xrst, ret); -+ } -+ gpio_free(priv->wifi_xrst); -+skip_wifi: -+#endif -+ -+ return 0; -+} -+ -+static int sh_mobile_sdhi_restore_noirq(struct device *dev) -+{ -+ struct mmc_host *mmc = dev_get_drvdata(dev); -+ struct tmio_mmc_host *host = mmc_priv(mmc); -+ -+ sd_ctrl_write32(host, CTL_IRQ_MASK, 0x8b7f031d); -+ sd_ctrl_write32(host, CTL_STATUS, 0); -+#if 0 -+ sh_mobile_sdhi_enable_sdbuf_acc32(host, false); -+ /* FIXME - should we set stop clock reg here */ -+ sd_ctrl_write16(host, CTL_RESET_SD, 0x0000); -+ /* implicit BUG_ON(!res) */ -+ if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG) -+ sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0000); -+ msleep(2); -+ sd_ctrl_write16(host, CTL_RESET_SD, 0x0001); -+ if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG) -+ sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0001); -+ msleep(2); -+ sd_ctrl_write32(host, CTL_IRQ_MASK, 0x8b7f031d); -+ sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, 0x0040); -+ sd_ctrl_write16(host, CTL_SD_MEM_CARD_OPT, 0x80E0); -+ sd_ctrl_write16(host, CTL_DMA_ENABLE, 0x1002); -+#endif -+ return 0; -+} -+ -+static int sh_mobile_sdhi_restore(struct device *dev) -+{ -+ struct mmc_host *mmc = dev_get_drvdata(dev); -+ struct tmio_mmc_host *host = mmc_priv(mmc); -+ struct sh_mobile_sdhi *priv = container_of(host->pdata, -+ struct sh_mobile_sdhi, -+ mmc_data); -+#if defined(CONFIG_MACH_FTEN_DT) || defined(CONFIG_PM_SLEEP) -+ int ret; -+#endif -+ int dma_size; -+ host->restore = true; -+ -+#ifdef CONFIG_MACH_FTEN_DT -+ /* priv->wifi_xrst is 0 or more. */ -+ if (priv->wifi_xrst >= 0) { -+ ret = gpio_request(priv->wifi_xrst, "sh_mobile_sdhi"); -+ if (ret != 0) { -+ dev_err(dev, "gpio_request(%d) failed(%d) restore\n", -+ priv->wifi_xrst, ret); -+ goto skip_wifi; -+ } -+ ret = gpio_direction_output(priv->wifi_xrst, 1); -+ if (ret != 0) { -+ dev_err(dev, "gpio_direction_output(%d) failed(%d) restore\n", -+ priv->wifi_xrst, ret); -+ } -+ gpio_free(priv->wifi_xrst); -+ } -+skip_wifi: -+#endif -+ -+ dma_size = sh_mobile_sdhi_get_xmit_size(priv->type, -+ priv->dma_priv.alignment_shift); -+ -+ sd_ctrl_write16(host, SD_DMACR(priv->type), dma_size); -+ -+#ifdef CONFIG_PM_SLEEP -+ ret = tmio_mmc_host_resume(dev); -+ host->restore = false; -+ return ret; -+#else -+ host->restore = false; - return 0; -+#endif - } - - static const struct dev_pm_ops tmio_mmc_dev_pm_ops = { -- SET_SYSTEM_SLEEP_PM_OPS(tmio_mmc_host_suspend, tmio_mmc_host_resume) -+#ifdef CONFIG_PM_SLEEP -+ .suspend = tmio_mmc_host_suspend, -+ .resume = tmio_mmc_host_resume, -+ .freeze = tmio_mmc_host_suspend, -+ .thaw = tmio_mmc_host_resume, -+ .poweroff = tmio_mmc_host_suspend, -+#endif -+ .restore = sh_mobile_sdhi_restore, -+ .restore_noirq = sh_mobile_sdhi_restore_noirq, - SET_RUNTIME_PM_OPS(tmio_mmc_host_runtime_suspend, - tmio_mmc_host_runtime_resume, - NULL) -diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h -index c5b12ad..3efe03d 100644 ---- a/drivers/mmc/host/tmio_mmc.h -+++ b/drivers/mmc/host/tmio_mmc.h -@@ -104,6 +104,7 @@ struct tmio_mmc_host { - bool resuming; - bool done_tuning; - struct completion completion; -+ bool restore; - }; - - int tmio_mmc_host_probe(struct tmio_mmc_host **host, -diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c -index 09c0c08..514af15 100644 ---- a/drivers/mmc/host/tmio_mmc_pio.c -+++ b/drivers/mmc/host/tmio_mmc_pio.c -@@ -167,8 +167,20 @@ static void tmio_mmc_set_clock(struct tmio_mmc_host *host, int new_clock) - if (host->set_clk_div) - host->set_clk_div(host->pdev, (clk>>22) & 1); - -+#ifdef CONFIG_MACH_FTEN -+ clk |= sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL) & 0x0100; -+ if (host->pdata->flags & TMIO_MMC_SDCLK_AUTO_CONTROL && -+ new_clock > host->mmc->f_init) -+ clk |= SDCLKOFFEN; -+ dev_dbg(&host->pdev->dev, -+ "clock=%d, clk=%08x, new_clock=%d, f_init=%d\n", -+ clock, clk, new_clock, host->mmc->f_init); -+ sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, clk & 0x3ff); -+#else - sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, clk & 0x1ff); -- msleep(10); -+#endif -+ if (!host->restore) -+ msleep(2); - } - - static void tmio_mmc_clk_stop(struct tmio_mmc_host *host) -@@ -176,13 +188,15 @@ static void tmio_mmc_clk_stop(struct tmio_mmc_host *host) - /* implicit BUG_ON(!res) */ - if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG) { - sd_ctrl_write16(host, CTL_CLK_AND_WAIT_CTL, 0x0000); -- if (!(host->pdata->flags & TMIO_MMC_CLK_NO_SLEEP)) -+ if (!(host->pdata->flags & TMIO_MMC_CLK_NO_SLEEP) -+ && !host->restore) - msleep(10); - } - - sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, ~0x0100 & - sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL)); -- if (!(host->pdata->flags & TMIO_MMC_CLK_NO_SLEEP)) -+ if (!(host->pdata->flags & TMIO_MMC_CLK_NO_SLEEP) -+ && !host->restore) - msleep(10); - } - -@@ -190,14 +204,16 @@ static void tmio_mmc_clk_start(struct tmio_mmc_host *host) - { - sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, 0x0100 | - sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL)); -- if (!(host->pdata->flags & TMIO_MMC_CLK_NO_SLEEP)) -- msleep(10); -+ if (!(host->pdata->flags & TMIO_MMC_CLK_NO_SLEEP) -+ && !host->restore) -+ msleep(2); - - /* implicit BUG_ON(!res) */ - if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG) { - sd_ctrl_write16(host, CTL_CLK_AND_WAIT_CTL, 0x0100); -- if (!(host->pdata->flags & TMIO_MMC_CLK_NO_SLEEP)) -- msleep(10); -+ if (!(host->pdata->flags & TMIO_MMC_CLK_NO_SLEEP) -+ && !host->restore) -+ msleep(2); - } - } - -@@ -208,11 +224,11 @@ static void tmio_mmc_reset(struct tmio_mmc_host *host) - /* implicit BUG_ON(!res) */ - if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG) - sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0000); -- msleep(10); -+ msleep(2); - sd_ctrl_write16(host, CTL_RESET_SD, 0x0001); - if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG) - sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0001); -- msleep(10); -+ msleep(2); - } - - static void tmio_mmc_reset_work(struct work_struct *work) -@@ -1134,16 +1150,21 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) - * is kept positive, so no suspending actually takes place. - */ - if (ios->power_mode == MMC_POWER_ON && ios->clock) { -+ int reset_needed = 0; - if (host->power != TMIO_MMC_ON_RUN) { - tmio_mmc_clk_update(mmc); - pm_runtime_get_sync(dev); -- if (host->resuming) { -- tmio_mmc_reset(host); -- host->resuming = false; -- } -+ if (host->resuming) -+ reset_needed = 1; - } -+ - if (host->power == TMIO_MMC_OFF_STOP) -+ reset_needed = 1; -+ if (reset_needed) { - tmio_mmc_reset(host); -+ if (host->resuming) -+ host->resuming = false; -+ } - tmio_mmc_set_clock(host, ios->clock); - if (host->power == TMIO_MMC_OFF_STOP) - /* power up SD card and the bus */ -@@ -1497,7 +1518,7 @@ int tmio_mmc_host_resume(struct device *dev) - - /* The MMC core will perform the complete set up */ - host->resuming = true; -- return mmc_resume_host(mmc); -+ return mmc_resume_host(mmc); - } - EXPORT_SYMBOL(tmio_mmc_host_resume); - #endif --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0009-Add-hibernation-store-area.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0009-Add-hibernation-store-area.patch deleted file mode 100755 index a3495e650..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0009-Add-hibernation-store-area.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 5509937666792520b755ed61a110c956478d089d Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Thu, 18 May 2017 17:41:19 +0900 -Subject: [PATCH 09/15] Add hibernation store area - -Signed-off-by: Yuichi Kusakabe ---- - drivers/mtd/Makefile | 3 ++- - drivers/mtd/devices/Makefile | 4 +++- - drivers/mtd/devices/phram.c | 5 ++++- - 3 files changed, 9 insertions(+), 3 deletions(-) - -diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile -index 99bb9a1..b48049c 100644 ---- a/drivers/mtd/Makefile -+++ b/drivers/mtd/Makefile -@@ -30,7 +30,8 @@ obj-$(CONFIG_MTD_SWAP) += mtdswap.o - nftl-objs := nftlcore.o nftlmount.o - inftl-objs := inftlcore.o inftlmount.o - -+obj-$(CONFIG_MTD_SPI_NOR) += spi-nor/ -+ - obj-y += chips/ lpddr/ maps/ devices/ nand/ onenand/ tests/ - --obj-$(CONFIG_MTD_SPI_NOR) += spi-nor/ - obj-$(CONFIG_MTD_UBI) += ubi/ -diff --git a/drivers/mtd/devices/Makefile b/drivers/mtd/devices/Makefile -index d83bd73..969f0e8 100644 ---- a/drivers/mtd/devices/Makefile -+++ b/drivers/mtd/devices/Makefile -@@ -3,8 +3,10 @@ - # - - obj-$(CONFIG_MTD_DOCG3) += docg3.o --obj-$(CONFIG_MTD_SLRAM) += slram.o -+# obj-$(CONFIG_MTD_SLRAM) += slram.o -+# obj-$(CONFIG_MTD_PHRAM) += phram.o - obj-$(CONFIG_MTD_PHRAM) += phram.o -+obj-$(CONFIG_MTD_SLRAM) += slram.o - obj-$(CONFIG_MTD_PMC551) += pmc551.o - obj-$(CONFIG_MTD_MS02NV) += ms02-nv.o - obj-$(CONFIG_MTD_MTDRAM) += mtdram.o -diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c -index 67823de..f05947f 100644 ---- a/drivers/mtd/devices/phram.c -+++ b/drivers/mtd/devices/phram.c -@@ -293,8 +293,11 @@ static void __exit cleanup_phram(void) - { - unregister_devices(); - } -- -+#ifdef __MODULE__ - module_init(init_phram); -+#else -+late_initcall(init_phram); -+#endif - module_exit(cleanup_phram); - - MODULE_LICENSE("GPL"); --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0010-Add-rcar-eth-hibernation-code.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0010-Add-rcar-eth-hibernation-code.patch deleted file mode 100755 index 55d1216fe..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0010-Add-rcar-eth-hibernation-code.patch +++ /dev/null @@ -1,238 +0,0 @@ -From 1d20d3bd16eac561e14513c9e6cac543fab5a3f0 Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Thu, 18 May 2017 17:42:33 +0900 -Subject: [PATCH 10/15] Add rcar-eth hibernation code - -Signed-off-by: Yuichi Kusakabe ---- - drivers/net/ethernet/renesas/sh_eth.c | 57 +++++++++++++++++++++++++++++++++-- - drivers/net/phy/phy_device.c | 41 +++++++++++++++++++++++++ - 2 files changed, 95 insertions(+), 3 deletions(-) - -diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c -index 991fa1e..7e91b26 100644 ---- a/drivers/net/ethernet/renesas/sh_eth.c -+++ b/drivers/net/ethernet/renesas/sh_eth.c -@@ -33,6 +33,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -999,6 +1000,7 @@ static unsigned long sh_eth_get_edtrr_trns(struct sh_eth_private *mdp) - struct bb_info { - void (*set_gate)(void *addr); - struct mdiobb_ctrl ctrl; -+ struct sh_eth_private *mdp; - void *addr; - u32 mmd_msk;/* MMD */ - u32 mdo_msk; -@@ -1029,6 +1031,8 @@ static void sh_mmd_ctrl(struct mdiobb_ctrl *ctrl, int bit) - { - struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); - -+ pm_runtime_get_sync(&bitbang->mdp->pdev->dev); -+ - if (bitbang->set_gate) - bitbang->set_gate(bitbang->addr); - -@@ -1036,6 +1040,8 @@ static void sh_mmd_ctrl(struct mdiobb_ctrl *ctrl, int bit) - bb_set(bitbang->addr, bitbang->mmd_msk); - else - bb_clr(bitbang->addr, bitbang->mmd_msk); -+ -+ pm_runtime_put_sync(&bitbang->mdp->pdev->dev); - } - - /* Set bit data*/ -@@ -1043,6 +1049,8 @@ static void sh_set_mdio(struct mdiobb_ctrl *ctrl, int bit) - { - struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); - -+ pm_runtime_get_sync(&bitbang->mdp->pdev->dev); -+ - if (bitbang->set_gate) - bitbang->set_gate(bitbang->addr); - -@@ -1050,17 +1058,26 @@ static void sh_set_mdio(struct mdiobb_ctrl *ctrl, int bit) - bb_set(bitbang->addr, bitbang->mdo_msk); - else - bb_clr(bitbang->addr, bitbang->mdo_msk); -+ -+ pm_runtime_put_sync(&bitbang->mdp->pdev->dev); - } - - /* Get bit data*/ - static int sh_get_mdio(struct mdiobb_ctrl *ctrl) - { - struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); -+ unsigned int ret; -+ -+ pm_runtime_get_sync(&bitbang->mdp->pdev->dev); - - if (bitbang->set_gate) - bitbang->set_gate(bitbang->addr); - -- return bb_read(bitbang->addr, bitbang->mdi_msk); -+ ret = bb_read(bitbang->addr, bitbang->mdi_msk); -+ -+ pm_runtime_put_sync(&bitbang->mdp->pdev->dev); -+ -+ return ret; - } - - /* MDC pin control */ -@@ -1068,6 +1085,8 @@ static void sh_mdc_ctrl(struct mdiobb_ctrl *ctrl, int bit) - { - struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); - -+ pm_runtime_get_sync(&bitbang->mdp->pdev->dev); -+ - if (bitbang->set_gate) - bitbang->set_gate(bitbang->addr); - -@@ -1075,6 +1094,8 @@ static void sh_mdc_ctrl(struct mdiobb_ctrl *ctrl, int bit) - bb_set(bitbang->addr, bitbang->mdc_msk); - else - bb_clr(bitbang->addr, bitbang->mdc_msk); -+ -+ pm_runtime_put_sync(&bitbang->mdp->pdev->dev); - } - - /* mdio bus control struct */ -@@ -2664,6 +2685,7 @@ static int sh_mdio_init(struct sh_eth_private *mdp, - bitbang->mdo_msk = PIR_MDO; - bitbang->mmd_msk = PIR_MMD; - bitbang->mdc_msk = PIR_MDC; -+ bitbang->mdp = mdp; - bitbang->ctrl.ops = &bb_ops; - - /* MII controller setting */ -@@ -3002,9 +3024,38 @@ static int sh_eth_runtime_nop(struct device *dev) - return 0; - } - -+static int sh_eth_suspend(struct device *dev) -+{ -+ int ret = 0; -+ struct net_device *ndev = dev_get_drvdata(dev); -+ -+ if (netif_running(ndev)) { -+ netif_device_detach(ndev); -+ ret = sh_eth_close(ndev); -+ } -+ -+ return ret; -+} -+ -+static int sh_eth_resume(struct device *dev) -+{ -+ int ret = 0; -+ struct net_device *ndev = dev_get_drvdata(dev); -+ -+ if (netif_running(ndev)) { -+ ret = sh_eth_open(ndev); -+ if (ret < 0) -+ goto err; -+ netif_device_attach(ndev); -+ } -+ -+err: -+ return ret; -+} -+ - static const struct dev_pm_ops sh_eth_dev_pm_ops = { -- .runtime_suspend = sh_eth_runtime_nop, -- .runtime_resume = sh_eth_runtime_nop, -+ SET_RUNTIME_PM_OPS(sh_eth_runtime_nop, sh_eth_runtime_nop, NULL) -+ SET_SYSTEM_SLEEP_PM_OPS(sh_eth_suspend, sh_eth_resume) - }; - #define SH_ETH_PM_OPS (&sh_eth_dev_pm_ops) - #else -diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c -index 3657b4a..3ceb4f9 100644 ---- a/drivers/net/phy/phy_device.c -+++ b/drivers/net/phy/phy_device.c -@@ -510,6 +510,32 @@ int phy_init_hw(struct phy_device *phydev) - return phydev->drv->config_init(phydev); - } - -+int phy_suspend(struct phy_device *phydev) -+{ -+ struct phy_driver *phydrv = to_phy_driver(phydev->dev.driver); -+ struct ethtool_wolinfo wol = { .cmd = ETHTOOL_GWOL }; -+ -+ /* If the device has WOL enabled, we cannot suspend the PHY */ -+ phy_ethtool_get_wol(phydev, &wol); -+ if (wol.wolopts) -+ return -EBUSY; -+ -+ if (phydrv->suspend) -+ return phydrv->suspend(phydev); -+ return 0; -+} -+EXPORT_SYMBOL(phy_suspend); -+ -+int phy_resume(struct phy_device *phydev) -+{ -+ struct phy_driver *phydrv = to_phy_driver(phydev->dev.driver); -+ -+ if (phydrv->resume) -+ return phydrv->resume(phydev); -+ return 0; -+} -+EXPORT_SYMBOL(phy_resume); -+ - /** - * phy_attach_direct - attach a network device to a given PHY device pointer - * @dev: network device to attach -@@ -528,6 +554,7 @@ static int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, - u32 flags, phy_interface_t interface) - { - struct device *d = &phydev->dev; -+ struct module *bus_module; - int err; - - /* Assume that if there is no driver, that it doesn't -@@ -553,6 +580,14 @@ static int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, - return -EBUSY; - } - -+ /* Increment the bus module reference count */ -+ bus_module = phydev->bus->dev.driver ? -+ phydev->bus->dev.driver->owner : NULL; -+ if (!try_module_get(bus_module)) { -+ dev_err(&dev->dev, "failed to get the bus module\n"); -+ return -EIO; -+ } -+ - phydev->attached_dev = dev; - dev->phydev = phydev; - -@@ -568,6 +603,8 @@ static int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, - err = phy_init_hw(phydev); - if (err) - phy_detach(phydev); -+ else -+ phy_resume(phydev); - - return err; - } -@@ -612,8 +649,12 @@ EXPORT_SYMBOL(phy_attach); - */ - void phy_detach(struct phy_device *phydev) - { -+ if (phydev->bus->dev.driver) -+ module_put(phydev->bus->dev.driver->owner); -+ - phydev->attached_dev->phydev = NULL; - phydev->attached_dev = NULL; -+ phy_suspend(phydev); - - /* If the device had no specific driver before (i.e. - it - * was using the generic driver), we unbind the device --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0011-Add-rcar-pci-hibernation-code.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0011-Add-rcar-pci-hibernation-code.patch deleted file mode 100755 index bdc9555c8..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0011-Add-rcar-pci-hibernation-code.patch +++ /dev/null @@ -1,375 +0,0 @@ -From f8691a62199319d9e37cd451a9b8364aa640c4cb Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Thu, 18 May 2017 17:45:19 +0900 -Subject: [PATCH 11/15] Add rcar-pci hibernation code - -Signed-off-by: Yuichi Kusakabe ---- - drivers/pci/host/pci-rcar-gen2.c | 281 ++++++++++++++++++++++++++++++++++++--- - 1 file changed, 266 insertions(+), 15 deletions(-) - -diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c -index 57b6572..4cb9693 100644 ---- a/drivers/pci/host/pci-rcar-gen2.c -+++ b/drivers/pci/host/pci-rcar-gen2.c -@@ -23,9 +23,12 @@ - #include - #include - #include -+#include - - /* AHB-PCI Bridge PCI communication registers */ - #define RCAR_AHBPCI_PCICOM_OFFSET 0x800 -+#define RCAR_PCICONF_OHCI 0x0 -+#define RCAR_PCICONF_EHCI 0x100 - - #define RCAR_PCIAHB_WIN1_CTR_REG (RCAR_AHBPCI_PCICOM_OFFSET + 0x00) - #define RCAR_PCIAHB_WIN2_CTR_REG (RCAR_AHBPCI_PCICOM_OFFSET + 0x04) -@@ -104,6 +107,14 @@ struct rcar_pci_priv { - int domain; - int irq; - unsigned long window_size; -+ void __iomem *ohci_memdata; -+ void __iomem *ehci_memdata; -+#ifndef MCCILDK_CHANGE_DISABLE -+ u32 store_cfg[12]; -+#else -+ u32 store_cfg[9]; -+#endif -+ struct usb_phy *phy; - }; - - /* PCI configuration space operations */ -@@ -276,12 +287,6 @@ static int rcar_pci_setup(int nr, struct pci_sys_data *sys) - /* Configure AHB master and slave modes */ - iowrite32(RCAR_AHB_BUS_MODE, reg + RCAR_AHB_BUS_CTR_REG); - -- /* Configure PCI arbiter */ -- val = ioread32(reg + RCAR_PCI_ARBITER_CTR_REG); -- val |= RCAR_PCI_ARBITER_PCIREQ0 | RCAR_PCI_ARBITER_PCIREQ1 | -- RCAR_PCI_ARBITER_PCIBP_MODE; -- iowrite32(val, reg + RCAR_PCI_ARBITER_CTR_REG); -- - /* PCI-AHB mapping: 0x40000000 base */ - iowrite32(0x40000000 | RCAR_PCIAHB_PREFETCH16, - reg + RCAR_PCIAHB_WIN1_CTR_REG); -@@ -290,9 +295,25 @@ static int rcar_pci_setup(int nr, struct pci_sys_data *sys) - val = priv->mem_res.start | RCAR_AHBPCI_WIN_CTR_MEM; - iowrite32(val, reg + RCAR_AHBPCI_WIN2_CTR_REG); - -+ /* Enable PCI interrupts */ -+ iowrite32(RCAR_PCI_INT_A | RCAR_PCI_INT_B | RCAR_PCI_INT_PME, -+ reg + RCAR_PCI_INT_ENABLE_REG); -+ -+ /* Configure PCI arbiter */ -+ val = ioread32(reg + RCAR_PCI_ARBITER_CTR_REG); -+ val |= RCAR_PCI_ARBITER_PCIREQ0 | RCAR_PCI_ARBITER_PCIREQ1 | -+ RCAR_PCI_ARBITER_PCIBP_MODE; -+ iowrite32(val, reg + RCAR_PCI_ARBITER_CTR_REG); -+ - /* Enable AHB-PCI bridge PCI configuration access */ - iowrite32(RCAR_AHBPCI_WIN1_HOST | RCAR_AHBPCI_WIN_CTR_CFG, - reg + RCAR_AHBPCI_WIN1_CTR_REG); -+ val = ioread32(reg + PCI_COMMAND); -+ -+ val |= PCI_COMMAND_SERR | PCI_COMMAND_PARITY | -+ PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER; -+ iowrite32(val, reg + PCI_COMMAND); -+ - /* Set PCI-AHB Window1 address */ - iowrite32(0x40000000 | PCI_BASE_ADDRESS_MEM_PREFETCH, - reg + PCI_BASE_ADDRESS_1); -@@ -300,15 +321,6 @@ static int rcar_pci_setup(int nr, struct pci_sys_data *sys) - val = priv->cfg_res->start + RCAR_AHBPCI_PCICOM_OFFSET; - iowrite32(val, reg + PCI_BASE_ADDRESS_0); - -- val = ioread32(reg + PCI_COMMAND); -- val |= PCI_COMMAND_SERR | PCI_COMMAND_PARITY | -- PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER; -- iowrite32(val, reg + PCI_COMMAND); -- -- /* Enable PCI interrupts */ -- iowrite32(RCAR_PCI_INT_A | RCAR_PCI_INT_B | RCAR_PCI_INT_PME, -- reg + RCAR_PCI_INT_ENABLE_REG); -- - if (priv->irq > 0) - rcar_pci_setup_errirq(priv); - -@@ -326,6 +338,8 @@ static struct pci_ops rcar_pci_ops = { - .write = rcar_pci_write_config, - }; - -+#define RCAR_MAX_PCI_HOSTS 2 -+static struct rcar_pci_priv *keep_priv[RCAR_MAX_PCI_HOSTS]; - static int rcar_pci_probe(struct platform_device *pdev) - { - struct resource *cfg_res, *mem_res; -@@ -350,6 +364,7 @@ static int rcar_pci_probe(struct platform_device *pdev) - return -ENOMEM; - - priv->mem_res = *mem_res; -+ keep_priv[pdev->id] = priv; - /* - * The controller does not support/use port I/O, - * so setup a dummy port I/O region here. -@@ -378,6 +393,7 @@ static int rcar_pci_probe(struct platform_device *pdev) - return PTR_ERR(phy); - - usb_phy_init(phy); -+ priv->phy = phy; - - hw_private[0] = priv; - memset(&hw, 0, sizeof(hw)); -@@ -390,14 +406,249 @@ static int rcar_pci_probe(struct platform_device *pdev) - hw.domain = priv->domain; - #endif - pci_common_init_dev(&pdev->dev, &hw); -+ priv->ohci_memdata = ioremap(cfg_res->start - 0x10000, 0x1000); -+ priv->ehci_memdata = ioremap(cfg_res->start - 0x10000 + 0x1000, 0x1000); -+ return 0; -+} -+ -+static int rcar_pci_suspend(struct device *dev) -+{ -+ struct clk *clk; -+ clk = clk_get(NULL, "ehci"); -+ clk_disable_unprepare(clk); -+ clk_put(clk); -+ return 0; -+} -+static int rcar_pci_resume(struct device *dev) -+{ -+ struct clk *clk; -+ clk = clk_get(NULL, "ehci"); -+ clk_prepare_enable(clk); -+ clk_put(clk); -+ return 0; -+} -+static u32 rcar_pci_get_conf(struct rcar_pci_priv *priv, int id, int offset) -+{ -+ u32 val, kpt; -+ void __iomem *data; -+ kpt = ioread32(priv->reg + RCAR_AHBPCI_WIN1_CTR_REG); -+ val = id ? RCAR_AHBPCI_WIN1_DEVICE | RCAR_AHBPCI_WIN_CTR_CFG : -+ RCAR_AHBPCI_WIN1_HOST | RCAR_AHBPCI_WIN_CTR_CFG; -+ -+ iowrite32(val, priv->reg + RCAR_AHBPCI_WIN1_CTR_REG); -+ data = priv->reg + (id >> 1) * 0x100; -+ val = ioread32(data + offset); -+ iowrite32(kpt, priv->reg + RCAR_AHBPCI_WIN1_CTR_REG); -+ return val; -+} -+ -+static void rcar_pci_set_conf(struct rcar_pci_priv *priv, -+ int id, int offset, u32 d) -+{ -+ u32 val, kpt; -+ void __iomem *data; -+ kpt = ioread32(priv->reg + RCAR_AHBPCI_WIN1_CTR_REG); -+ val = id ? RCAR_AHBPCI_WIN1_DEVICE | RCAR_AHBPCI_WIN_CTR_CFG : -+ RCAR_AHBPCI_WIN1_HOST | RCAR_AHBPCI_WIN_CTR_CFG; -+ -+ iowrite32(val, priv->reg + RCAR_AHBPCI_WIN1_CTR_REG); -+ data = priv->reg + (id >> 1) * 0x100; -+ iowrite32(d, data + offset); -+ iowrite32(kpt, priv->reg + RCAR_AHBPCI_WIN1_CTR_REG); -+} -+ -+ -+static int rcar_pci_freeze(struct device *dev) -+{ -+ struct rcar_pci_priv *priv = keep_priv[to_platform_device(dev)->id]; -+ struct clk *clk; -+ clk = clk_get(NULL, "ehci"); -+ clk_disable_unprepare(clk); -+ clk_put(clk); -+ -+#ifndef MCCILDK_CHANGE_DISABLE -+ priv->store_cfg[0] = rcar_pci_get_conf(priv, 0, PCI_COMMAND); -+ priv->store_cfg[1] = rcar_pci_get_conf(priv, 1, PCI_COMMAND); -+ priv->store_cfg[2] = rcar_pci_get_conf(priv, 2, PCI_COMMAND); -+ priv->store_cfg[3] = rcar_pci_get_conf(priv, 0, PCI_CACHE_LINE_SIZE); -+ priv->store_cfg[4] = rcar_pci_get_conf(priv, 1, PCI_CACHE_LINE_SIZE); -+ priv->store_cfg[5] = rcar_pci_get_conf(priv, 2, PCI_CACHE_LINE_SIZE); -+ priv->store_cfg[6] = rcar_pci_get_conf(priv, 0, PCI_INTERRUPT_LINE); -+ priv->store_cfg[7] = rcar_pci_get_conf(priv, 1, PCI_INTERRUPT_LINE); -+ priv->store_cfg[8] = rcar_pci_get_conf(priv, 2, PCI_INTERRUPT_LINE); -+ priv->store_cfg[9] = rcar_pci_get_conf(priv, 0, PCI_BASE_ADDRESS_0); -+ priv->store_cfg[10] = rcar_pci_get_conf(priv, 1, PCI_BASE_ADDRESS_0); -+ priv->store_cfg[11] = rcar_pci_get_conf(priv, 2, PCI_BASE_ADDRESS_0); -+#else -+ priv->store_cfg[0] = rcar_pci_get_conf(priv, 0, 0x04); -+ priv->store_cfg[1] = rcar_pci_get_conf(priv, 1, 0x04); -+ priv->store_cfg[2] = rcar_pci_get_conf(priv, 2, 0x04); -+ priv->store_cfg[3] = rcar_pci_get_conf(priv, 0, 0x0c); -+ priv->store_cfg[4] = rcar_pci_get_conf(priv, 1, 0x0c); -+ priv->store_cfg[5] = rcar_pci_get_conf(priv, 2, 0x0c); -+ priv->store_cfg[6] = rcar_pci_get_conf(priv, 0, 0x3c); -+ priv->store_cfg[7] = rcar_pci_get_conf(priv, 1, 0x3c); -+ priv->store_cfg[8] = rcar_pci_get_conf(priv, 2, 0x3c); -+#endif -+ pm_runtime_disable(priv->dev); -+ return 0; -+} -+ -+static int rcar_pci_restore(struct device *dev) -+{ -+ struct clk *clk; -+ void *m; -+ u32 val; -+ struct rcar_pci_priv *priv = keep_priv[to_platform_device(dev)->id]; -+ void __iomem *reg = priv->reg; -+ int id = to_platform_device(dev)->id; -+ -+ pm_runtime_enable(priv->dev); -+ pm_runtime_get_sync(priv->dev); -+ -+ clk = clk_get(NULL, "ehci"); -+ clk_prepare_enable(clk); -+ clk_put(clk); -+ clk = clk_get(NULL, "hsusb"); -+ clk_prepare_enable(clk); -+ clk_put(clk); -+ usb_phy_set_suspend(priv->phy, 0); -+ m = ioremap(0xe61501c4, 4); -+ val = readl(m); -+ iounmap(m); -+ m = ioremap(0xe615014c, 4); -+ writel(val & ~(3 << 3), m); -+ iounmap(m); -+ val = ioread32(reg + RCAR_PCI_UNIT_REV_REG); -+ dev_info(priv->dev, "PCI: bus%u revision %x\n", id, val); -+ -+ /* Disable Direct Power Down State and assert reset */ -+ val = ioread32(reg + RCAR_USBCTR_REG) & ~RCAR_USBCTR_DIRPD; -+#ifndef MCCILDK_CHANGE_DISABLE -+ val |= RCAR_USBCTR_USBH_RST | RCAR_USBCTR_PLL_RST; -+#else -+ val |= RCAR_USBCTR_USBH_RST; -+#endif -+ iowrite32(val, reg + RCAR_USBCTR_REG); -+ udelay(4); -+ /* De-assert reset */ -+#ifndef MCCILDK_CHANGE_DISABLE -+ val &= ~(RCAR_USBCTR_USBH_RST | RCAR_USBCTR_PLL_RST -+ | RCAR_USBCTR_PCICLK_MASK); -+ iowrite32(val, reg + RCAR_USBCTR_REG); -+ /* reset PCIAHB window size */ -+ val &= ~RCAR_USBCTR_PCIAHB_WIN1_MASK; -+ val |= RCAR_USBCTR_PCIAHB_WIN1_1G; -+ iowrite32(val, reg + RCAR_USBCTR_REG); -+#else -+ val &= RCAR_USBCTR_USBH_RST | RCAR_USBCTR_PLL_RST -+ | RCAR_USBCTR_PCICLK_MASK; -+ iowrite32(val, reg + RCAR_USBCTR_REG); -+ val &= RCAR_USBCTR_USBH_RST | RCAR_USBCTR_PLL_RST -+ | RCAR_USBCTR_PCICLK_MASK; -+ iowrite32(val, reg + RCAR_USBCTR_REG); -+ /* reset PCIAHB window size */ -+ val &= RCAR_USBCTR_PCIAHB_WIN1_MASK; -+ val |= RCAR_USBCTR_PCIAHB_WIN1_1G; -+ iowrite32(val, reg + RCAR_USBCTR_REG); -+#endif -+ -+ /* Configure AHB master and slave modes */ -+ iowrite32(RCAR_AHB_BUS_MODE, reg + RCAR_AHB_BUS_CTR_REG); -+ -+ /* PCI-AHB mapping: 0x40000000 base */ -+ iowrite32(0x40000000 | RCAR_PCIAHB_PREFETCH16, -+ reg + RCAR_PCIAHB_WIN1_CTR_REG); -+ -+ /* AHB-PCI mapping: OHCI/EHCI registers */ -+ val = priv->mem_res.start | RCAR_AHBPCI_WIN_CTR_MEM; -+ iowrite32(val, reg + RCAR_AHBPCI_WIN2_CTR_REG); -+ -+ /* Enable PCI interrupts */ -+ iowrite32(RCAR_PCI_INT_A | RCAR_PCI_INT_B | RCAR_PCI_INT_PME, -+ reg + RCAR_PCI_INT_ENABLE_REG); -+ -+ /* Configure PCI arbiter */ -+ val = ioread32(reg + RCAR_PCI_ARBITER_CTR_REG); -+ val |= RCAR_PCI_ARBITER_PCIREQ0 | RCAR_PCI_ARBITER_PCIREQ1 | -+ RCAR_PCI_ARBITER_PCIBP_MODE; -+ iowrite32(val, reg + RCAR_PCI_ARBITER_CTR_REG); -+ -+ /* Enable AHB-PCI bridge PCI configuration access */ -+ iowrite32(RCAR_AHBPCI_WIN1_HOST | RCAR_AHBPCI_WIN_CTR_CFG, -+ reg + RCAR_AHBPCI_WIN1_CTR_REG); -+ -+ val = ioread32(reg + PCI_COMMAND); -+ val |= PCI_COMMAND_SERR | PCI_COMMAND_PARITY | -+ PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER; -+ iowrite32(val, reg + PCI_COMMAND); -+ -+ /* Set PCI-AHB Window1 address */ -+ iowrite32(0x40000000 | PCI_BASE_ADDRESS_MEM_PREFETCH, -+ reg + PCI_BASE_ADDRESS_1); -+ /* Set AHB-PCI bridge PCI communication area address */ -+ val = priv->cfg_res->start + RCAR_AHBPCI_PCICOM_OFFSET; -+ iowrite32(val, reg + PCI_BASE_ADDRESS_0); -+ -+ if (priv->irq > 0) -+ rcar_pci_setup_errirq(priv); -+#ifndef MCCILDK_CHANGE_DISABLE -+ rcar_pci_set_conf(priv, 0, PCI_COMMAND, priv->store_cfg[0]); -+ rcar_pci_set_conf(priv, 1, PCI_COMMAND, priv->store_cfg[1]); -+ rcar_pci_set_conf(priv, 2, PCI_COMMAND, priv->store_cfg[2]); -+ rcar_pci_set_conf(priv, 0, PCI_CACHE_LINE_SIZE, priv->store_cfg[3]); -+ rcar_pci_set_conf(priv, 1, PCI_CACHE_LINE_SIZE, priv->store_cfg[4]); -+ rcar_pci_set_conf(priv, 2, PCI_CACHE_LINE_SIZE, priv->store_cfg[5]); -+ rcar_pci_set_conf(priv, 0, PCI_INTERRUPT_LINE, priv->store_cfg[6]); -+ rcar_pci_set_conf(priv, 1, PCI_INTERRUPT_LINE, priv->store_cfg[7]); -+ rcar_pci_set_conf(priv, 2, PCI_INTERRUPT_LINE, priv->store_cfg[8]); -+ rcar_pci_set_conf(priv, 1, PCI_BASE_ADDRESS_0, priv->store_cfg[10]); -+ rcar_pci_set_conf(priv, 2, PCI_BASE_ADDRESS_0, priv->store_cfg[11]); -+#else -+ rcar_pci_set_conf(priv, 1, PCI_COMMAND, PCI_COMMAND_SERR -+ | PCI_COMMAND_PARITY | PCI_COMMAND_MEMORY -+ | PCI_COMMAND_MASTER); -+ rcar_pci_set_conf(priv, 1, PCI_BASE_ADDRESS_0 -+ priv->cfg_res->start - 0x10000); -+ rcar_pci_set_conf(priv, 2, PCI_COMMAND, PCI_COMMAND_SERR -+ | PCI_COMMAND_PARITY | PCI_COMMAND_MEMORY -+ | PCI_COMMAND_MASTER); -+ rcar_pci_set_conf(priv, 2, PCI_BASE_ADDRESS_0, -+ priv->cfg_res->start - 0x10000 + 0x1000); -+ rcar_pci_set_conf(priv, 0, PCI_CACHE_LINE_SIZE, priv->store_cfg[3]); -+ rcar_pci_set_conf(priv, 1, PCI_CACHE_LINE_SIZE, priv->store_cfg[4]); -+ rcar_pci_set_conf(priv, 2, PCI_CACHE_LINE_SIZE, priv->store_cfg[5]); -+ rcar_pci_set_conf(priv, 0, PCI_INTERRUPT_LINE, 0x00020100); -+ rcar_pci_set_conf(priv, 1, PCI_INTERRUPT_LINE, 0x2a010100); -+ rcar_pci_set_conf(priv, 2, PCI_INTERRUPT_LINE, 0x22100200); -+ val = RCAR_AHBPCI_WIN1_DEVICE | RCAR_AHBPCI_WIN_CTR_CFG; -+ iowrite32(val, priv->reg + RCAR_AHBPCI_WIN1_CTR_REG); -+ val = ioread32(priv->reg + 0x04); -+ iowrite32(val | (1 << 1), priv->reg + 0x04); -+ val = ioread32(priv->reg + 0x104); -+ iowrite32(val | (1 << 1), priv->reg + 0x104); -+ -+ val = RCAR_AHBPCI_WIN1_HOST | RCAR_AHBPCI_WIN_CTR_CFG; -+ iowrite32(val, priv->reg + RCAR_AHBPCI_WIN1_CTR_REG); -+#endif - return 0; - } - -+static const struct dev_pm_ops rcar_pci_pm_ops = { -+ .suspend = rcar_pci_suspend, -+ .resume = rcar_pci_resume, -+ .freeze_noirq = rcar_pci_freeze, -+ .restore_noirq = rcar_pci_restore, -+ .thaw = rcar_pci_resume, -+ .poweroff = rcar_pci_suspend -+}; -+ - static struct platform_driver rcar_pci_driver = { - .driver = { - .name = "pci-rcar-gen2", - .owner = THIS_MODULE, - .suppress_bind_attrs = true, -+ .pm = &rcar_pci_pm_ops, - }, - .probe = rcar_pci_probe, - }; --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0012-Add-rcar-gpio-hibernation-code.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0012-Add-rcar-gpio-hibernation-code.patch deleted file mode 100755 index 9b2aff4f9..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0012-Add-rcar-gpio-hibernation-code.patch +++ /dev/null @@ -1,230 +0,0 @@ -From bf20be14fc1b3f7e096bdac9c5ff67362b391479 Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Thu, 18 May 2017 17:46:24 +0900 -Subject: [PATCH 12/15] Add rcar-gpio hibernation code - -Signed-off-by: Yuichi Kusakabe ---- - drivers/pinctrl/sh-pfc/core.c | 141 +++++++++++++++++++++++++++++++++++++++--- - drivers/pinctrl/sh-pfc/core.h | 4 ++ - 2 files changed, 138 insertions(+), 7 deletions(-) - -diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c -index b9e025d..c37418e 100644 ---- a/drivers/pinctrl/sh-pfc/core.c -+++ b/drivers/pinctrl/sh-pfc/core.c -@@ -24,6 +24,7 @@ - #include - #include - #include -+#include - - #include "core.h" - -@@ -201,19 +202,117 @@ static void sh_pfc_config_reg_helper(struct sh_pfc *pfc, - } - } - -+#ifdef CONFIG_CPU_PM -+struct reg_record { -+ void __iomem *reg; -+ unsigned long width; -+ unsigned long data; -+}; -+ -+struct reg_config { -+ bool unlock; -+ struct reg_record unlock_reg; -+ struct reg_record actual_reg; -+ struct list_head list; -+}; -+ -+static struct reg_config *regs_list; -+ -+struct reg_range { -+ int start; -+ int end; -+}; -+ -+static int sh_pfc_cpu_pm_notify(struct notifier_block *self, -+ unsigned long action, void *hcpu) -+{ -+ struct reg_config *tmp = NULL; -+ struct sh_pfc *pfc = container_of(self, struct sh_pfc, pm_notify); -+ /* We don't setup pinmux in kernel - store all registers */ -+ struct reg_range ranges[] = { -+ {0x0, 0x5c}, {0x160, 0x160}, {0x90, 0x98}, -+ {0x100, 0x118}, {0x70, 0x70}, {0x60, 0x64}, -+ {0x84, 0x8c}, {0x240, 0x248}, -+ }; -+ -+ if (action == CPU_PM_ENTER) { -+ if (!regs_list) { -+ /* No pinmux configuration, storing all registers */ -+ int store_cnt = 0; -+ int i; -+ for (i = 0; i < ARRAY_SIZE(ranges); i++) { -+ int j; -+ for (j = ranges[i].start; j <= ranges[i].end; j += sizeof(u32)) { -+ pfc->stored_regs[store_cnt] = -+ sh_pfc_read_raw_reg(sh_pfc_phys_to_virt(pfc, 0xe6060000 + j), 32); -+ pr_debug("PFC: %08x => %08x\n", 0xe6060000 + j, pfc->stored_regs[store_cnt]); -+ store_cnt++; -+ if (store_cnt >= ARRAY_SIZE(pfc->stored_regs)) { -+ pr_err("read: Register store overflow\n"); -+ goto out; -+ } -+ } -+ } -+ } -+ } else if (action == CPU_PM_ENTER_FAILED || action == CPU_PM_EXIT) { -+ if (!regs_list) { -+ /* No list, restoring all registers */ -+ int store_cnt = 0; -+ int i; -+ for (i = 0; i < ARRAY_SIZE(ranges); i++) { -+ int j; -+ for (j = ranges[i].start; j <= ranges[i].end; j += sizeof(u32)) { -+ sh_pfc_write_raw_reg(sh_pfc_phys_to_virt(pfc, 0xe6060000 + j), 32, -+ pfc->stored_regs[store_cnt]); -+ pr_debug("PFC: %08x => %08x\n", 0xe6060000 + j, pfc->stored_regs[store_cnt]); -+ store_cnt++; -+ if (store_cnt >= ARRAY_SIZE(pfc->stored_regs)) { -+ pr_err("write: Register store overflow\n"); -+ goto out; -+ } -+ } -+ } -+ goto out; -+ } -+ list_for_each_entry(tmp , &(regs_list->list), list) { -+ if (tmp->unlock) -+ sh_pfc_write_raw_reg(tmp->unlock_reg.reg, -+ tmp->unlock_reg.width, -+ tmp->unlock_reg.data); -+ sh_pfc_write_raw_reg(tmp->actual_reg.reg, -+ tmp->actual_reg.width, -+ tmp->actual_reg.data); -+ } -+ } -+out: -+ return NOTIFY_OK; -+} -+ -+static int __init sh_pfc_cpu_pm_init(struct sh_pfc *pfc) -+{ -+ memset(&pfc->pm_notify, 0, sizeof(pfc->pm_notify)); -+ pfc->pm_notify.notifier_call = sh_pfc_cpu_pm_notify; -+ return cpu_pm_register_notifier(&pfc->pm_notify); -+} -+#else -+static int __init sh_pfc_cpu_pm_init(struct sh_pfc *pfc) -+{ -+ return 0; -+} -+#endif -+ -+ - static void sh_pfc_write_config_reg(struct sh_pfc *pfc, - const struct pinmux_cfg_reg *crp, - unsigned long field, unsigned long value) - { - void __iomem *mapped_reg; - unsigned long mask, pos, data; -- -+#ifdef CONFIG_CPU_PM -+ struct reg_config *tmp; -+#endif - sh_pfc_config_reg_helper(pfc, crp, field, &mapped_reg, &mask, &pos); - -- dev_dbg(pfc->dev, "write_reg addr = %lx, value = %ld, field = %ld, " -- "r_width = %ld, f_width = %ld\n", -- crp->reg, value, field, crp->reg_width, crp->field_width); -- - mask = ~(mask << pos); - value = value << pos; - -@@ -221,14 +320,39 @@ static void sh_pfc_write_config_reg(struct sh_pfc *pfc, - data &= mask; - data |= value; - -- if (pfc->info->unlock_reg) -+#ifdef CONFIG_CPU_PM -+ tmp = kzalloc(sizeof(struct reg_config), GFP_KERNEL); -+ BUG_ON(!tmp); -+ -+ if (!regs_list) { -+ regs_list = tmp; -+ INIT_LIST_HEAD(®s_list->list); -+ } -+#endif -+ -+ if (pfc->info->unlock_reg) { -+#ifdef CONFIG_CPU_PM -+ tmp->unlock = true; -+ tmp->unlock_reg.reg = sh_pfc_phys_to_virt(pfc, -+ pfc->info->unlock_reg); -+ tmp->unlock_reg.width = 32; -+ tmp->unlock_reg.data = ~data; -+#endif - sh_pfc_write_raw_reg( - sh_pfc_phys_to_virt(pfc, pfc->info->unlock_reg), 32, - ~data); -+ } -+ -+#ifdef CONFIG_CPU_PM -+ tmp->actual_reg.reg = mapped_reg; -+ tmp->actual_reg.width = crp->reg_width; -+ tmp->actual_reg.data = data; -+ -+ list_add(&tmp->list, ®s_list->list); -+#endif - - sh_pfc_write_raw_reg(mapped_reg, crp->reg_width, data); - } -- - static int sh_pfc_get_config_reg(struct sh_pfc *pfc, u16 enum_id, - const struct pinmux_cfg_reg **crp, int *fieldp, - int *valuep) -@@ -574,6 +698,8 @@ static int sh_pfc_probe(struct platform_device *pdev) - - platform_set_drvdata(pdev, pfc); - -+ sh_pfc_cpu_pm_init(pfc); -+ - dev_info(pfc->dev, "%s support registered\n", info->name); - - return 0; -@@ -596,6 +722,7 @@ static int sh_pfc_remove(struct platform_device *pdev) - if (pfc->info->ops && pfc->info->ops->exit) - pfc->info->ops->exit(pfc); - -+ - return 0; - } - -diff --git a/drivers/pinctrl/sh-pfc/core.h b/drivers/pinctrl/sh-pfc/core.h -index 75ecb67..5471a6c 100644 ---- a/drivers/pinctrl/sh-pfc/core.h -+++ b/drivers/pinctrl/sh-pfc/core.h -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include - - #include "sh_pfc.h" - -@@ -51,6 +52,9 @@ struct sh_pfc { - struct sh_pfc_chip *func; - - struct sh_pfc_pinctrl *pinctrl; -+ struct notifier_block pm_notify; -+#define STORE_REGS_COUNT 50 -+ u32 stored_regs[STORE_REGS_COUNT]; - }; - - int sh_pfc_register_gpiochip(struct sh_pfc *pfc); --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0013-Add-rcar-spi-hibernation-code.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0013-Add-rcar-spi-hibernation-code.patch deleted file mode 100755 index 515b08b12..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0013-Add-rcar-spi-hibernation-code.patch +++ /dev/null @@ -1,168 +0,0 @@ -From c1b129172a91046a7555a3c198b49eb1b45aafd7 Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Thu, 18 May 2017 17:58:28 +0900 -Subject: [PATCH 13/15] Add rcar-spi hibernation code - -Signed-off-by: Yuichi Kusakabe ---- - drivers/spi/spi-rspi.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 108 insertions(+), 1 deletion(-) - -diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c -index 215be3b..a2432de 100644 ---- a/drivers/spi/spi-rspi.c -+++ b/drivers/spi/spi-rspi.c -@@ -38,6 +38,7 @@ - #include - #include - #include -+#include - - #define RSPI_SPCR 0x00 /* Control Register */ - #define RSPI_SSLP 0x01 /* Slave Select Polarity Register */ -@@ -208,6 +209,12 @@ struct rspi_data { - u8 sppcr; - int rx_irq, tx_irq; - const struct spi_ops *ops; -+ u32 save_spbmul0; -+ u32 save_spbmul1; -+ u32 save_spbmul2; -+ u32 save_spbmul3; -+ u8 save_spbfcr; -+ u8 save_spscr; - - unsigned dma_callbacked:1; - unsigned byte_access:1; -@@ -238,6 +245,11 @@ static u16 rspi_read16(const struct rspi_data *rspi, u16 offset) - return ioread16(rspi->addr + offset); - } - -+static u16 rspi_read32(const struct rspi_data *rspi, u16 offset) -+{ -+ return ioread32(rspi->addr + offset); -+} -+ - #define rspi_update8(spi, mask, val, reg) \ - rspi_write8(spi, (rspi_read8(spi, reg) & ~mask) | val, reg); - -@@ -504,7 +516,6 @@ static int rspi_pio_transfer_in(struct rspi_data *rspi, u8 *rx, unsigned int n) - if (!rx) - return 0; - -- - while (n > 0) { - count = min(n, SPI_BUFFER_SIZE); - if (count >= SPI_BUFFER_SIZE) { -@@ -1278,6 +1289,101 @@ error1: - return ret; - } - -+int rspi_suspend(struct device *dev) -+{ -+ struct rspi_data *rspi = platform_get_drvdata(to_platform_device(dev)); -+ clk_disable_unprepare(rspi->clk); -+ return 0; -+} -+ -+int rspi_resume(struct device *dev) -+{ -+ struct rspi_data *rspi = platform_get_drvdata(to_platform_device(dev)); -+ clk_prepare_enable(rspi->clk); -+ return 0; -+} -+ -+#define PR_REG8(dev, rspi, reg) \ -+ dev_dbg(dev, "QSPI REG: " #reg " = %08x\n", \ -+ rspi_read8(rspi, reg)) -+#define PR_REG16(dev, rspi, reg) \ -+ dev_dbg(dev, "QSPI REG: " #reg " = %08x\n", \ -+ rspi_read16(rspi, reg)) -+#define PR_REG32(dev, rspi, reg) \ -+ dev_dbg(dev, "QSPI REG: " #reg " = %08x\n", \ -+ rspi_read32(rspi, reg)) -+ -+#ifdef DEBUG -+static void pr_regs(struct device *dev) -+{ -+ struct rspi_data *rspi = platform_get_drvdata(to_platform_device(dev)); -+ PR_REG8(dev, rspi, RSPI_SPCR); -+ PR_REG8(dev, rspi, RSPI_SSLP); -+ PR_REG8(dev, rspi, RSPI_SPPCR); -+ PR_REG8(dev, rspi, RSPI_SPDR); -+ PR_REG8(dev, rspi, RSPI_SPSCR); -+ PR_REG8(dev, rspi, RSPI_SPBR); -+ PR_REG8(dev, rspi, RSPI_SPDCR); -+ PR_REG8(dev, rspi, RSPI_SPCKD); -+ PR_REG8(dev, rspi, RSPI_SSLND); -+ PR_REG8(dev, rspi, RSPI_SPND); -+ PR_REG16(dev, rspi, RSPI_SPCMD0); -+ PR_REG16(dev, rspi, RSPI_SPCMD1); -+ PR_REG16(dev, rspi, RSPI_SPCMD2); -+ PR_REG16(dev, rspi, RSPI_SPCMD3); -+ PR_REG8(dev, rspi, QSPI_SPBFCR); -+ PR_REG16(dev, rspi, QSPI_SPBDCR); -+ PR_REG32(dev, rspi, QSPI_SPBMUL0); -+ PR_REG32(dev, rspi, QSPI_SPBMUL1); -+ PR_REG32(dev, rspi, QSPI_SPBMUL2); -+ PR_REG32(dev, rspi, QSPI_SPBMUL3); -+} -+#endif -+ -+int rspi_freeze(struct device *dev) -+{ -+ struct rspi_data *rspi = platform_get_drvdata(to_platform_device(dev)); -+ rspi_write8(rspi, rspi_read8(rspi, RSPI_SPCR) & ~SPCR_SPE, RSPI_SPCR); -+ rspi->save_spbmul0 = rspi_read32(rspi, QSPI_SPBMUL0); -+ rspi->save_spbmul1 = rspi_read32(rspi, QSPI_SPBMUL1); -+ rspi->save_spbmul2 = rspi_read32(rspi, QSPI_SPBMUL2); -+ rspi->save_spbmul3 = rspi_read32(rspi, QSPI_SPBMUL3); -+ rspi->save_spbfcr = rspi_read8(rspi, QSPI_SPBFCR); -+ rspi->save_spscr = rspi_read8(rspi, RSPI_SPSCR); -+ dev_info(dev, "freeze\n"); -+#ifdef DEBUG -+ pr_regs(dev); -+#endif -+ return 0; -+} -+ -+ -+int rspi_restore(struct device *dev) -+{ -+ struct rspi_data *rspi = platform_get_drvdata(to_platform_device(dev)); -+ clk_prepare_enable(rspi->clk); -+ udelay(16); -+ set_config_register(rspi, 8); -+ rspi_write8(rspi, rspi_read8(rspi, RSPI_SPCR) & ~SPCR_SPE, RSPI_SPCR); -+ rspi_write8(rspi, rspi->save_spscr, RSPI_SPSCR); -+ rspi_write8(rspi, rspi->save_spbfcr, QSPI_SPBFCR); -+ rspi_write32(rspi, rspi->save_spbmul3, QSPI_SPBMUL3); -+ rspi_write32(rspi, rspi->save_spbmul2, QSPI_SPBMUL2); -+ rspi_write32(rspi, rspi->save_spbmul1, QSPI_SPBMUL1); -+ rspi_write32(rspi, rspi->save_spbmul0, QSPI_SPBMUL0); -+ dev_info(dev, "restore\n"); -+#ifdef DEBUG -+ pr_regs(dev); -+#endif -+ return 0; -+} -+ -+const struct dev_pm_ops rspi_pm_ops = { -+ SET_SYSTEM_SLEEP_PM_OPS(rspi_suspend, rspi_resume) -+ .restore = rspi_restore, -+ .freeze = rspi_freeze, -+}; -+ - static struct platform_device_id spi_driver_ids[] = { - { "rspi", (kernel_ulong_t)&rspi_ops }, - { "rspi-rz", (kernel_ulong_t)&rspi_rz_ops }, -@@ -1295,6 +1401,7 @@ static struct platform_driver rspi_driver = { - .name = "renesas_spi", - .owner = THIS_MODULE, - .of_match_table = of_match_ptr(rspi_of_match), -+ .pm = &rspi_pm_ops, - }, - }; - module_platform_driver(rspi_driver); --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0014-Add-rcar-sci-hibernation-code.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0014-Add-rcar-sci-hibernation-code.patch deleted file mode 100755 index c70f515a2..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0014-Add-rcar-sci-hibernation-code.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 947b9e15ff36a9dcd517bb932303cc32f8356550 Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Thu, 18 May 2017 17:59:40 +0900 -Subject: [PATCH 14/15] Add rcar-sci hibernation code - -Signed-off-by: Yuichi Kusakabe ---- - drivers/tty/serial/sh-sci.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c -index e3abfb7..2f0dc7a 100644 ---- a/drivers/tty/serial/sh-sci.c -+++ b/drivers/tty/serial/sh-sci.c -@@ -2852,6 +2852,7 @@ static int sci_probe(struct platform_device *dev) - return 0; - } - -+#ifdef CONFIG_PM_SLEEP - static int sci_suspend(struct device *dev) - { - struct sci_port *sport = dev_get_drvdata(dev); -@@ -2871,10 +2872,13 @@ static int sci_resume(struct device *dev) - - return 0; - } -+#else -+#define sci_suspend NULL -+#define sci_resume NULL -+#endif - - static const struct dev_pm_ops sci_dev_pm_ops = { -- .suspend = sci_suspend, -- .resume = sci_resume, -+ SET_SYSTEM_SLEEP_PM_OPS(sci_suspend, sci_resume) - }; - - static struct platform_driver sci_driver = { --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0015-Add-rcar-usbphy-hibernation-code.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0015-Add-rcar-usbphy-hibernation-code.patch deleted file mode 100755 index c0c2b1675..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/0015-Add-rcar-usbphy-hibernation-code.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 28393daa686ef43966e3fa1652bcd8d860698ef4 Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Thu, 18 May 2017 18:00:39 +0900 -Subject: [PATCH 15/15] Add rcar-usbphy hibernation code - -Signed-off-by: Yuichi Kusakabe ---- - drivers/usb/phy/phy-rcar-gen2-usb.c | 35 +++++++++++++++++++++++++++++++++++ - 1 file changed, 35 insertions(+) - -diff --git a/drivers/usb/phy/phy-rcar-gen2-usb.c b/drivers/usb/phy/phy-rcar-gen2-usb.c -index 9e7205d..05849e7 100644 ---- a/drivers/usb/phy/phy-rcar-gen2-usb.c -+++ b/drivers/usb/phy/phy-rcar-gen2-usb.c -@@ -148,6 +148,7 @@ static int rcar_gen2_usb_phy_set_suspend(struct usb_phy *phy, int suspend) - - devm_release_mem_region(&pdev->dev, res->start, resource_size(res)); - devm_iounmap(&pdev->dev, priv->base); -+ priv->base = NULL; - - spin_unlock_irqrestore(&priv->lock, flags); - -@@ -178,6 +179,7 @@ static int rcar_gen2_usb_phy_init(struct usb_phy *phy) - devm_release_mem_region(&pdev->dev, res->start, - resource_size(res)); - devm_iounmap(&pdev->dev, priv->base); -+ priv->base = NULL; - spin_unlock_irqrestore(&priv->lock, flags); - } - return 0; -@@ -209,6 +211,7 @@ static void rcar_gen2_usb_phy_shutdown(struct usb_phy *phy) - devm_release_mem_region(&pdev->dev, res->start, - resource_size(res)); - devm_iounmap(&pdev->dev, priv->base); -+ priv->base = NULL; - } - out: - spin_unlock_irqrestore(&priv->lock, flags); -@@ -431,9 +434,41 @@ static int phy_rcar_gen2_pm_resume(struct device *dev) - return 0; - } - -+static int phy_rcar_gen2_pm_freeze(struct device *dev) -+{ -+ struct rcar_gen2_usb_phy_priv *priv = dev_get_drvdata(dev); -+ pr_info("freeze: %p\n", priv->base); -+ -+ return phy_rcar_gen2_pm_suspend(dev); -+} -+ -+static int phy_rcar_gen2_pm_restore(struct device *dev) -+{ -+ struct rcar_gen2_usb_phy_priv *priv = dev_get_drvdata(dev); -+ struct resource *res; -+ -+ res = platform_get_resource(to_platform_device(dev), IORESOURCE_MEM, 0); -+ priv->base = devm_ioremap_resource(dev, res); -+ if (IS_ERR(priv->base)) { -+ pr_info("restore: pointer error %ld\n", PTR_ERR(priv->base)); -+ return PTR_ERR(priv->base); -+ } -+ pr_info("restore: %p\n", priv->base); -+ __rcar_gen2_usb_phy_init(priv); -+ devm_release_mem_region(dev, res->start, -+ resource_size(res)); -+ devm_iounmap(dev, priv->base); -+ priv->base = NULL; -+ return phy_rcar_gen2_pm_resume(dev); -+} -+ - static const struct dev_pm_ops phy_rcar_gen2_dev_pm_ops = { - .suspend = phy_rcar_gen2_pm_suspend, - .resume = phy_rcar_gen2_pm_resume, -+ .freeze_noirq = phy_rcar_gen2_pm_freeze, -+ .restore = phy_rcar_gen2_pm_restore, -+ .thaw = phy_rcar_gen2_pm_resume, -+ .poweroff = phy_rcar_gen2_pm_suspend, - }; - #endif - --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/hibernation.cfg b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/hibernation.cfg deleted file mode 100755 index eddb52ce7..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/hibernation/hibernation.cfg +++ /dev/null @@ -1,10 +0,0 @@ -CONFIG_SWSUSP_AREA=0x78000000 -CONFIG_SWSUSP_AREA_SIZE=0x8000000 -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_MTD_SWAP=y -CONFIG_MTD_PHRAM=y -CONFIG_MMC_UNSAFE_RESUME=y - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/pppd-rcar.cfg b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/pppd-rcar.cfg deleted file mode 100755 index e50b2e1fc..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/pppd-rcar.cfg +++ /dev/null @@ -1,6 +0,0 @@ -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/ra2x00.cfg b/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/ra2x00.cfg deleted file mode 100644 index e20934352..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/linux/linux/ra2x00.cfg +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_RT2X00=m -CONFIG_RT2800USB=m diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/mmngr-module/files/0001-Fix-for-memory-corruption-during-hibernate.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/mmngr-module/files/0001-Fix-for-memory-corruption-during-hibernate.patch deleted file mode 100644 index de0365da5..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/mmngr-module/files/0001-Fix-for-memory-corruption-during-hibernate.patch +++ /dev/null @@ -1,155 +0,0 @@ -From 99f60a25458ac553ff609f5bdbf4db7dade46d9a Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Sat, 10 Jun 2017 20:26:26 +0900 -Subject: [PATCH] Fix for memory corruption during hibernate - -Signed-off-by: Yuichi Kusakabe ---- - drv/mmngr_drv.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 106 insertions(+), 3 deletions(-) - -diff --git a/drv/mmngr_drv.c b/drv/mmngr_drv.c -index 797800f..91f6c6e 100755 ---- a/drv/mmngr_drv.c -+++ b/drv/mmngr_drv.c -@@ -844,7 +844,7 @@ static struct miscdevice misc = { - extern struct cma *rcar_gen2_dma_contiguous; - #endif - --static int mm_init(void) -+static int mmngr_probe(struct platform_device *pdev) - { - int ret = 0; - struct MM_DRVDATA *p = NULL; -@@ -946,16 +946,16 @@ static int mm_init(void) - printk(KERN_ERR "MMD reserve area from 0x%08x to 0x%08x at physical\n", - (unsigned int)phy_addr, - (unsigned int)phy_addr + MM_KERNEL_RESERVE_SIZE - 1); --#endif - #ifdef MMNGR_IPMMU_ENABLE - r8a779x_ipmmu_startup(); - r8a779x_ipmmu_initialize(IPMMUMX_DOMAIN); - #endif -+#endif - - return 0; - } - --static void mm_exit(void) -+static int mmngr_remove(struct platform_device *pdev) - { - #ifdef MMNGR_IPMMU_ENABLE - r8a779x_ipmmu_cleanup(); -@@ -983,6 +983,109 @@ static void mm_exit(void) - #endif - - kfree(mm_drvdata); -+ return 0; -+} -+static int mmngr_suspend(struct device *dev) -+{ -+ return 0; -+} -+static int mmngr_resume(struct device *dev) -+{ -+ return 0; -+} -+static int mmngr_freeze(struct device *dev) -+{ -+#if defined(MMNGR_KOELSCH) || defined(MMNGR_LAGER) || \ -+ defined(MMNGR_ALT) || defined(MMNGR_GOSE) -+ iowrite32((~MM_IMPCTR_VAL) & ioread32(top_impctr), top_impctr); -+#endif -+ mm_set_mxi_path(0, 0); -+ dma_free_coherent(mm_drvdata->mm_dev_reserve, -+ mm_drvdata->reserve_size, -+ (void *)mm_drvdata->reserve_kernel_virt_addr, -+ (dma_addr_t)mm_drvdata->reserve_phy_addr); -+ return 0; -+} -+static int mmngr_thaw(struct device *dev) -+{ -+ void *pkernel_virt_addr; -+ mm_set_mxi_path(MM_OMXBUF_MXI_ADDR, -+ MM_OMXBUF_MXI_ADDR + MM_OMXBUF_SIZE); -+ pkernel_virt_addr = dma_alloc_coherent(mm_drvdata->mm_dev_reserve, -+ MM_KERNEL_RESERVE_SIZE, -+ (dma_addr_t *)&mm_drvdata->reserve_phy_addr, -+ GFP_KERNEL); -+ mm_drvdata->reserve_kernel_virt_addr = (unsigned long)pkernel_virt_addr; -+ return 0; -+} -+static int mmngr_restore(struct device *dev) -+{ -+ void *pkernel_virt_addr; -+ mm_set_mxi_path(MM_OMXBUF_MXI_ADDR, -+ MM_OMXBUF_MXI_ADDR + MM_OMXBUF_SIZE); -+ -+#ifdef MMNGR_KOELSCH -+ if ((MM_PRR_ESMASK & ioread32(top_prr)) >= MM_PRR_ES2) { -+ mm_enable_pmb(); -+ mm_set_pmb_area(MM_OMXBUF_ADDR, top_impmba0, top_impmbd0); -+ mm_enable_vpc_utlb(); -+ } -+#endif -+#ifdef MMNGR_LAGER -+ if ((MM_PRR_ESMASK & ioread32(top_prr)) >= MM_PRR_ES2) { -+ mm_enable_pmb(); -+ mm_set_pmb_area(MM_OMXBUF_ADDR, top_impmba0, top_impmbd0); -+ mm_set_pmb_area(MM_OMXBUF_ADDR + MM_PMB_SIZE_128M, -+ top_impmba1, top_impmbd1); -+ mm_enable_vpc_utlb(); -+ } -+#endif -+#ifdef MMNGR_ALT -+ mm_enable_pmb(); -+ mm_set_pmb_area(MM_OMXBUF_ADDR, top_impmba0, top_impmbd0); -+ mm_enable_vpc_utlb(); -+#endif -+#ifdef MMNGR_GOSE -+ mm_enable_pmb(); -+ mm_set_pmb_area(MM_OMXBUF_ADDR, top_impmba0, top_impmbd0); -+ mm_enable_vpc_utlb(); -+#endif -+ pkernel_virt_addr = dma_alloc_coherent(mm_drvdata->mm_dev_reserve, -+ MM_KERNEL_RESERVE_SIZE, -+ (dma_addr_t *)&mm_drvdata->reserve_phy_addr, -+ GFP_KERNEL); -+ mm_drvdata->reserve_kernel_virt_addr = (unsigned long)pkernel_virt_addr; -+ -+ return 0; -+} -+static const struct dev_pm_ops mmngr_pm_ops = { -+ SET_SYSTEM_SLEEP_PM_OPS(mmngr_suspend, mmngr_resume) -+ .freeze = mmngr_freeze, -+ .thaw = mmngr_thaw, -+ .restore = mmngr_restore, -+}; -+struct platform_driver mmngr_driver = { -+ .probe = mmngr_probe, -+ .remove = mmngr_remove, -+ .driver = { -+ .name = "mmngr", -+ .pm = &mmngr_pm_ops, -+ }, -+}; -+struct platform_device mmngr_device = { -+ .name = "mmngr", -+ .id = -1, -+}; -+static int mm_init(void) -+{ -+ platform_driver_register(&mmngr_driver); -+ platform_device_register(&mmngr_device); -+ return 0; -+} -+static void mm_exit(void) -+{ -+ platform_device_unregister(&mmngr_device); -+ platform_driver_unregister(&mmngr_driver); - } - - module_init(mm_init); --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/mmngr-module/mmngr-kernel-module.bbappend b/meta-agl-bsp/meta-renesas/recipes-kernel/mmngr-module/mmngr-kernel-module.bbappend deleted file mode 100644 index 7863beaf7..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/mmngr-module/mmngr-kernel-module.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -FILESEXTRAPATHS_prepend := '${THISDIR}/files:' -SRC_URI_append_agl-porter-hibernate = " file://0001-Fix-for-memory-corruption-during-hibernate.patch \ - " - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/s3ctl-module/files/0001-Add-s3ctl-hibernation-code.patch b/meta-agl-bsp/meta-renesas/recipes-kernel/s3ctl-module/files/0001-Add-s3ctl-hibernation-code.patch deleted file mode 100644 index b5d9050b2..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/s3ctl-module/files/0001-Add-s3ctl-hibernation-code.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 03253eae0da9a84e343a8f21c65ac07196369420 Mon Sep 17 00:00:00 2001 -From: Yuichi Kusakabe -Date: Sun, 21 May 2017 23:08:52 +0900 -Subject: [PATCH] Add s3ctl hibernation code - -Signed-off-by: Yuichi Kusakabe ---- - drv/s3ctl_drv.c | 50 ++++++++++++++++++++++++++++++++++++++------------ - 1 file changed, 38 insertions(+), 12 deletions(-) - -diff --git a/drv/s3ctl_drv.c b/drv/s3ctl_drv.c -index a7b4bee..6640a49 100755 ---- a/drv/s3ctl_drv.c -+++ b/drv/s3ctl_drv.c -@@ -66,6 +66,7 @@ - #include - #include - #include -+#include - - #include "s3ctl_private.h" - -@@ -332,19 +333,10 @@ static struct miscdevice misc = { - .fops = &fops, - }; - -- --static int s3ctrl_init(void) -+static int s3ctl_initialize(void) - { -- int ret; -- unsigned int product; -- unsigned int es; -- -- ret = map_register(); -- if (ret != 0) { -- printk(KERN_ERR "S3D map_register() NG\n"); -- return -1; -- } -- -+ int product; -+ int es; - product = S3_PRR_PRODUCTMASK & ioread32((void *)top_prr); - es = S3_PRR_ESMASK & ioread32((void *)top_prr); - if (product == S3_PRR_H2) { -@@ -366,11 +358,44 @@ static int s3ctrl_init(void) - set_xymodeconf(S3_XYMODE_VAL_NEW); - } else - set_xymodeconf(S3_XYMODE_VAL_NEW); -+ return 0; -+} -+ -+static int s3ctl_cpu_pm_notify(struct notifier_block *self, -+ unsigned long action, void *hcpu) -+{ -+ if (action == PM_HIBERNATION_PREPARE) -+ ; -+ else if (action == PM_POST_HIBERNATION) { -+ pr_info("%s: hibernation finished: %ld\n", __func__, action); -+ s3ctl_initialize(); -+ } -+ return NOTIFY_DONE; -+} -+ -+static struct notifier_block s3ctl_pm_notifier_block = { -+ .notifier_call = s3ctl_cpu_pm_notify, -+}; -+ -+static int s3ctrl_init(void) -+{ -+ int ret; -+ unsigned int product; -+ unsigned int es; -+ -+ ret = map_register(); -+ if (ret != 0) { -+ printk(KERN_ERR "S3D map_register() NG\n"); -+ return -1; -+ } -+ s3ctl_initialize(); - - misc_register(&misc); - - spin_lock_init(&lock); - -+ register_pm_notifier(&s3ctl_pm_notifier_block); -+ - return 0; - } - -@@ -379,6 +404,7 @@ static void s3ctrl_exit(void) - misc_deregister(&misc); - - unmap_register(); -+ unregister_pm_notifier(&s3ctl_pm_notifier_block); - } - - module_init(s3ctrl_init); --- -1.8.3.1 - diff --git a/meta-agl-bsp/meta-renesas/recipes-kernel/s3ctl-module/s3ctl-kernel-module.bbappend b/meta-agl-bsp/meta-renesas/recipes-kernel/s3ctl-module/s3ctl-kernel-module.bbappend deleted file mode 100644 index 172418402..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-kernel/s3ctl-module/s3ctl-kernel-module.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -FILESEXTRAPATHS_prepend := '${THISDIR}/files:' -SRC_URI_append_agl-porter-hibernate = " file://0001-Add-s3ctl-hibernation-code.patch \ - " - diff --git a/meta-agl-bsp/meta-renesas/recipes-multimedia/libuiomux/files/0001-Fix-Wformat-security-issue-in-named-open.patch b/meta-agl-bsp/meta-renesas/recipes-multimedia/libuiomux/files/0001-Fix-Wformat-security-issue-in-named-open.patch deleted file mode 100644 index e2f332cee..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-multimedia/libuiomux/files/0001-Fix-Wformat-security-issue-in-named-open.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0b424ab0cd7811f158186d04b868aa2d88559df2 Mon Sep 17 00:00:00 2001 -From: Matt Ranostay -Date: Tue, 28 Mar 2017 22:15:21 -0700 -Subject: [PATCH] Fix -Wformat-security issue in named-open - -Signed-off-by: Matt Ranostay ---- - src/tests/named-open.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/tests/named-open.c b/src/tests/named-open.c -index 025aa506dad6..dea885babaae 100644 ---- a/src/tests/named-open.c -+++ b/src/tests/named-open.c -@@ -49,7 +49,7 @@ main (int argc, char *argv[]) - uiomux_list_device(&name, &count); - - for (i = 0; i < count; i++) -- printf(name[i]); -+ printf("%s", name[i]); - - uiomux_list_device(&name2, &count); - --- -2.11.0 - diff --git a/meta-agl-bsp/meta-renesas/recipes-multimedia/libuiomux/libuiomux_git.bbappend b/meta-agl-bsp/meta-renesas/recipes-multimedia/libuiomux/libuiomux_git.bbappend deleted file mode 100644 index 3e64886c0..000000000 --- a/meta-agl-bsp/meta-renesas/recipes-multimedia/libuiomux/libuiomux_git.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -SRC_URI_append = " file://0001-Fix-Wformat-security-issue-in-named-open.patch" diff --git a/templates/machine/porter-nogfx/50_bblayers.conf.inc b/templates/machine/porter-nogfx/50_bblayers.conf.inc deleted file mode 100644 index ba0e17ef3..000000000 --- a/templates/machine/porter-nogfx/50_bblayers.conf.inc +++ /dev/null @@ -1,5 +0,0 @@ -BBLAYERS =+ "\ - ${METADIR}/meta-renesas \ - ${METADIR}/meta-renesas/meta-rcar-gen2 \ - " - diff --git a/templates/machine/porter-nogfx/50_local.conf.inc b/templates/machine/porter-nogfx/50_local.conf.inc deleted file mode 100644 index 87ec427e3..000000000 --- a/templates/machine/porter-nogfx/50_local.conf.inc +++ /dev/null @@ -1,3 +0,0 @@ -MACHINE = "porter" -#see meta-agl/meta-agl-bsp/conf/include/agl_porter-nogfx.inc -require conf/include/agl_porter-nogfx.inc diff --git a/templates/machine/porter/50_bblayers.conf.inc b/templates/machine/porter/50_bblayers.conf.inc deleted file mode 100644 index ba0e17ef3..000000000 --- a/templates/machine/porter/50_bblayers.conf.inc +++ /dev/null @@ -1,5 +0,0 @@ -BBLAYERS =+ "\ - ${METADIR}/meta-renesas \ - ${METADIR}/meta-renesas/meta-rcar-gen2 \ - " - diff --git a/templates/machine/porter/50_local.conf.inc b/templates/machine/porter/50_local.conf.inc deleted file mode 100644 index f2794b0d0..000000000 --- a/templates/machine/porter/50_local.conf.inc +++ /dev/null @@ -1,3 +0,0 @@ -MACHINE = "porter" -#see meta-agl/meta-agl-bsp/conf/include/agl_porter.inc -require conf/include/agl_porter.inc diff --git a/templates/machine/porter/50_setup.sh b/templates/machine/porter/50_setup.sh deleted file mode 100644 index f51d4f4f5..000000000 --- a/templates/machine/porter/50_setup.sh +++ /dev/null @@ -1,14 +0,0 @@ -# setup proprietary gfx drivers and multimedia packages -pushd $METADIR 2>/dev/null - -SETUP_MM_SCRIPT=$METADIR/meta-renesas/meta-rcar-gen2/scripts/setup_mm_packages.sh -if [ -f $SETUP_MM_SCRIPT ]; then - . $SETUP_MM_SCRIPT $MACHINE - copy_mm_packages $MACHINE - if [ $? -ne 0 ]; then - echo "Copying gfx drivers and multimedia packages for '$MACHINE' failed." - exit 1 - fi -fi - -popd 2>/dev/null -- cgit 1.2.3-korg From 3e680b33c5eb4ec1fb8cd38909cd3578ce987c74 Mon Sep 17 00:00:00 2001 From: ronan Date: Thu, 8 Feb 2018 18:11:19 +0100 Subject: Update rcar gen3 driver Change-Id: I71ba7ac53db51f73209424a45e7c94cd1cc7c46e Signed-off-by: ronan --- meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh b/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh index 587569f9e..f58baed8c 100644 --- a/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh +++ b/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh @@ -1,7 +1,7 @@ #!/bin/bash -ZIP_1="R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-weston2-20170904.zip" -ZIP_2="R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-weston2-20170904.zip" +ZIP_1="R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20180130.zip" +ZIP_2="R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20180130.zip" COPY_SCRIPT="$METADIR/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh" -- cgit 1.2.3-korg From 6a0b04208d21ae960c071189442ce260a29fa2d8 Mon Sep 17 00:00:00 2001 From: ronan Date: Thu, 8 Feb 2018 18:12:49 +0100 Subject: Update rcar gen3 kernel bbappend version Change-Id: I0ad8b780183feead322bd4dd5cceb25d4b2bad2d Signed-off-by: ronan --- .../recipes-kernel/linux/linux-renesas_4.14.bbappend | 10 ++++++++++ .../recipes-kernel/linux/linux-renesas_4.9.bbappend | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.9.bbappend (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend new file mode 100644 index 000000000..ec39aa075 --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend @@ -0,0 +1,10 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +#------------------------------------------------------------------------- +# Fix for CVE-2017-1000364 by backporting the upstream patches. +SRC_URI_append = "\ + file://0001-mm-larger-stack-guard-gap-between-vmas.patch \ + file://0002-Allow-stack-to-grow-up-to-address-space-limit.patch \ + file://0003-mm-fix-new-crash-in-unmapped_area_topdown.patch \ + file://0001-give-up-on-gcc-ilog2-constant-optimizations.patch \ + " diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.9.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.9.bbappend deleted file mode 100644 index ec39aa075..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.9.bbappend +++ /dev/null @@ -1,10 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -#------------------------------------------------------------------------- -# Fix for CVE-2017-1000364 by backporting the upstream patches. -SRC_URI_append = "\ - file://0001-mm-larger-stack-guard-gap-between-vmas.patch \ - file://0002-Allow-stack-to-grow-up-to-address-space-limit.patch \ - file://0003-mm-fix-new-crash-in-unmapped_area_topdown.patch \ - file://0001-give-up-on-gcc-ilog2-constant-optimizations.patch \ - " -- cgit 1.2.3-korg From 735ea348ad55018959daae61cdc0ae75db6253e7 Mon Sep 17 00:00:00 2001 From: ronan Date: Fri, 9 Feb 2018 09:31:47 +0100 Subject: Remove gcc 6 fix Change-Id: I7418c88311b89ad96e29709429d9558519e3c7cc Signed-off-by: ronan --- .../arm-trusted-firmware_git.bbappend | 4 ---- ...1-fix-arm-trusted-firmware-build-for-gcc6.patch | 26 ---------------------- 2 files changed, 30 deletions(-) delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bbappend delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/files/0001-fix-arm-trusted-firmware-build-for-gcc6.patch (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bbappend deleted file mode 100644 index 47c0fec7b..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRC_URI_append = " file://0001-fix-arm-trusted-firmware-build-for-gcc6.patch" - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/files/0001-fix-arm-trusted-firmware-build-for-gcc6.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/files/0001-fix-arm-trusted-firmware-build-for-gcc6.patch deleted file mode 100644 index 744f9f5f5..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/files/0001-fix-arm-trusted-firmware-build-for-gcc6.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 26927f2aff43607b422ce5cb463ee4eccbdaef5a Mon Sep 17 00:00:00 2001 -From: Ronan Le Martret -Date: Thu, 23 Feb 2017 14:18:06 +0100 -Subject: [PATCH] Fix arm-trusted-firmware build for gcc6 - -Signed-off-by: Ronan Le Martret ---- - include/lib/smcc.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/lib/smcc.h b/include/lib/smcc.h -index c415ba1..e648692 100644 ---- a/include/lib/smcc.h -+++ b/include/lib/smcc.h -@@ -57,7 +57,7 @@ - #define SMC_64 1 - #define SMC_32 0 - #define SMC_UNK 0xffffffff --#define SMC_TYPE_FAST 1 -+#define SMC_TYPE_FAST 1U - #define SMC_TYPE_STD 0 - #define SMC_PREEMPTED 0xfffffffe - /******************************************************************************* --- -2.6.6 - -- cgit 1.2.3-korg From ef4be54e09d81f603478fb16356bc755664cc2d9 Mon Sep 17 00:00:00 2001 From: ronan Date: Fri, 9 Feb 2018 09:40:45 +0100 Subject: Remove fix for optee-os Change-Id: I5107a29d97909bbca5a135ef8faa52332dff84ae Signed-off-by: ronan --- ...file-generation-and-directly-copy-the-fil.patch | 41 - .../recipes-bsp/optee/optee-os/default_bold.c | 1033 -------------------- .../recipes-bsp/optee/optee-os/default_bold.h | 10 - .../recipes-bsp/optee/optee-os/default_regular.c | 1024 ------------------- .../recipes-bsp/optee/optee-os/default_regular.h | 10 - .../recipes-bsp/optee/optee-os_git.bbappend | 23 - 6 files changed, 2141 deletions(-) delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/0001-Remove-the-file-generation-and-directly-copy-the-fil.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/default_bold.c delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/default_bold.h delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/default_regular.c delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/default_regular.h delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bbappend (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/0001-Remove-the-file-generation-and-directly-copy-the-fil.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/0001-Remove-the-file-generation-and-directly-copy-the-fil.patch deleted file mode 100644 index 14b91699a..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/0001-Remove-the-file-generation-and-directly-copy-the-fil.patch +++ /dev/null @@ -1,41 +0,0 @@ -From f9e26ca66938281a635cdac2fbeda7418488aac8 Mon Sep 17 00:00:00 2001 -From: Ronan Le Martret -Date: Thu, 23 Mar 2017 15:20:45 +0100 -Subject: [PATCH] Remove the file generation and directly copy the files. - -Signed-off-by: Ronan Le Martret ---- - lib/libutee/tui/sub.mk | 12 ++++-------- - 1 file changed, 4 insertions(+), 8 deletions(-) - -diff --git a/lib/libutee/tui/sub.mk b/lib/libutee/tui/sub.mk -index 517cde4..d55340c 100644 ---- a/lib/libutee/tui/sub.mk -+++ b/lib/libutee/tui/sub.mk -@@ -11,19 +11,15 @@ produce-additional-default_bold = default_bold.h - produce-default_bold = default_bold.c - depends-default_bold := scripts/render_font.py \ - $(sub-dir)/fonts/amble/Amble-Bold.ttf --recipe-default_bold := scripts/render_font.py \ -- --font_file $(sub-dir)/fonts/amble/Amble-Bold.ttf \ -- --font_size 20 --font_name default_bold \ -- --out_dir $(sub-dir-out) -+recipe-default_bold := cp $(sub-dir)/fonts/amble/default_bold.{c,h} \ -+ $(sub-dir-out) - - gensrcs-y += default_regular - produce-additional-default_regular = default_regular.h - produce-default_regular = default_regular.c - depends-default_regular := scripts/render_font.py \ - $(sub-dir)/fonts/amble/Amble-Regular.ttf --recipe-default_regular := scripts/render_font.py \ -- --font_file $(sub-dir)/fonts/amble/Amble-Regular.ttf \ -- --font_size 20 --font_name default_regular \ -- --out_dir $(sub-dir-out) -+recipe-default_regular := cp $(sub-dir)/fonts/amble/default_regular.{c,h} \ -+ $(sub-dir-out) - - --- -2.6.6 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/default_bold.c b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/default_bold.c deleted file mode 100644 index 4fbbadddd..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/default_bold.c +++ /dev/null @@ -1,1033 +0,0 @@ -/* - * This file is auto generated with - * scripts/render_font.py --font_file lib/libutee/tui/fonts/amble/Amble-Bold.ttf --font_size 20 --font_name default_bold --out_dir out/arm-plat-rcar/ta_arm64-lib/libutee/tui - * do not edit. - */ -#include "font.h" - -static const unsigned char letter_20[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_21[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, - 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_22[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x6e, 0x00, 0x6e, 0x00, 0x6c, 0x00, - 0x6c, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_23[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0e, 0x60, 0x0e, 0x60, 0x0e, 0xe0, - 0x3f, 0xf8, 0x3f, 0xf8, 0x0c, 0xe0, 0x0c, 0xe0, - 0x1c, 0xc0, 0x7f, 0xf8, 0x7f, 0xf8, 0x1c, 0xc0, - 0x19, 0xc0, 0x19, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_24[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, - 0x06, 0x00, 0x0f, 0x80, 0x3f, 0xc0, 0x3d, 0xc0, - 0x78, 0x00, 0x78, 0x00, 0x3c, 0x00, 0x1f, 0x00, - 0x0f, 0xc0, 0x01, 0xc0, 0x00, 0xe0, 0x00, 0xe0, - 0x3f, 0xc0, 0x3f, 0x80, 0x0f, 0x00, 0x06, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_25[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, - 0x18, 0x00, 0x7e, 0x30, 0x00, 0x66, 0x20, 0x00, - 0x66, 0x60, 0x00, 0x3c, 0xc0, 0x00, 0x01, 0x80, - 0x00, 0x01, 0x80, 0x00, 0x03, 0x3c, 0x00, 0x06, - 0x6c, 0x00, 0x06, 0x66, 0x00, 0x0c, 0x66, 0x00, - 0x18, 0x7c, 0x00, 0x18, 0x38, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_26[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0f, 0x00, 0x1f, 0xc0, 0x39, 0xc0, - 0x39, 0xc0, 0x1f, 0x80, 0x1f, 0x00, 0x1f, 0x00, - 0x3f, 0x80, 0x73, 0xf0, 0x71, 0xf0, 0x79, 0xf0, - 0x3f, 0xf8, 0x1f, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_27[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_28[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, - 0x0c, 0x00, 0x1c, 0x00, 0x18, 0x00, 0x38, 0x00, - 0x38, 0x00, 0x30, 0x00, 0x70, 0x00, 0x70, 0x00, - 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x30, 0x00, - 0x38, 0x00, 0x38, 0x00, 0x18, 0x00, 0x1c, 0x00, - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_29[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, - 0x70, 0x00, 0x30, 0x00, 0x38, 0x00, 0x18, 0x00, - 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, - 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, - 0x18, 0x00, 0x38, 0x00, 0x38, 0x00, 0x30, 0x00, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_2a[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x6d, 0x80, - 0x7f, 0x80, 0x0e, 0x00, 0x1f, 0x00, 0x3b, 0x00, - 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_2b[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x7f, 0xc0, - 0x7f, 0xc0, 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_2c[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x38, 0x30, 0x30, 0x70, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_2d[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7e, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_2e[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_2f[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x03, 0x00, 0x07, 0x00, 0x06, 0x00, - 0x06, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, - 0x18, 0x00, 0x18, 0x00, 0x38, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x60, 0x00, 0x60, 0x00, 0x40, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_30[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0f, 0x00, 0x3f, 0x80, 0x39, 0xc0, - 0x71, 0xc0, 0x70, 0xe0, 0x70, 0xe0, 0x70, 0xe0, - 0x70, 0xe0, 0x70, 0xe0, 0x71, 0xc0, 0x39, 0xc0, - 0x3f, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_31[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0f, 0x00, 0x3f, 0x00, 0x37, 0x00, - 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, - 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, - 0x3f, 0xc0, 0x3f, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_32[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x1f, 0x00, 0x7f, 0xc0, 0x33, 0xc0, - 0x01, 0xe0, 0x01, 0xc0, 0x01, 0xc0, 0x07, 0x80, - 0x0f, 0x00, 0x1c, 0x00, 0x38, 0x00, 0x70, 0x00, - 0x7f, 0xe0, 0x7f, 0xe0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_33[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3f, 0x00, 0x7f, 0x80, 0x01, 0xc0, - 0x01, 0xc0, 0x01, 0xc0, 0x1f, 0x80, 0x1f, 0x80, - 0x01, 0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x21, 0xc0, - 0x7f, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_34[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x03, 0x80, 0x07, 0x80, 0x07, 0x80, - 0x0f, 0x80, 0x1d, 0x80, 0x19, 0x80, 0x39, 0x80, - 0x31, 0x80, 0x73, 0xc0, 0x7f, 0xe0, 0x7f, 0xe0, - 0x01, 0x80, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_35[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3f, 0xc0, 0x3f, 0xc0, 0x30, 0x00, - 0x30, 0x00, 0x7f, 0x00, 0x7f, 0xc0, 0x01, 0xc0, - 0x00, 0xe0, 0x00, 0xe0, 0x01, 0xe0, 0x03, 0xc0, - 0x7f, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_36[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0f, 0x80, 0x1f, 0x80, 0x3c, 0x00, - 0x38, 0x00, 0x77, 0x80, 0x7f, 0xc0, 0x79, 0xe0, - 0x70, 0xe0, 0x70, 0xe0, 0x78, 0xe0, 0x39, 0xc0, - 0x1f, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_37[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7f, 0xe0, 0x7f, 0xe0, 0x01, 0xc0, - 0x01, 0xc0, 0x01, 0x80, 0x03, 0x80, 0x03, 0x80, - 0x07, 0x00, 0x07, 0x00, 0x0e, 0x00, 0x0e, 0x00, - 0x0c, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_38[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x1f, 0x00, 0x3f, 0xc0, 0x79, 0xc0, - 0x71, 0xc0, 0x39, 0xc0, 0x3f, 0x80, 0x3f, 0x80, - 0x71, 0xc0, 0x70, 0xe0, 0x70, 0xe0, 0x79, 0xe0, - 0x3f, 0xc0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_39[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x1f, 0x00, 0x3f, 0x80, 0x71, 0xc0, - 0x71, 0xc0, 0x70, 0xe0, 0x71, 0xe0, 0x3f, 0xe0, - 0x1f, 0xe0, 0x01, 0xc0, 0x01, 0xc0, 0x03, 0xc0, - 0x1f, 0x80, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_3a[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_3b[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, - 0x30, 0x70, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_3c[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0xc0, 0x0f, 0xc0, 0x3f, 0x00, - 0x78, 0x00, 0x78, 0x00, 0x3f, 0x00, 0x0f, 0xc0, - 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_3d[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7f, 0xc0, 0x7f, 0xc0, 0x00, 0x00, - 0x00, 0x00, 0x7f, 0xc0, 0x7f, 0xc0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_3e[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x70, 0x00, 0x7c, 0x00, 0x1f, 0x80, - 0x07, 0xc0, 0x07, 0xc0, 0x1f, 0x80, 0x7c, 0x00, - 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_3f[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3e, 0x00, 0x7f, 0x80, 0x43, 0x80, - 0x03, 0x80, 0x03, 0x80, 0x07, 0x00, 0x0e, 0x00, - 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_40[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - 0xf8, 0x00, 0x0f, 0xbc, 0x00, 0x1c, 0x06, 0x00, - 0x18, 0x03, 0x00, 0x31, 0xf1, 0x80, 0x33, 0xf9, - 0x80, 0x63, 0x19, 0x80, 0x66, 0x19, 0x80, 0x66, - 0x31, 0x80, 0x66, 0x31, 0x80, 0x66, 0x31, 0x80, - 0x67, 0xff, 0x00, 0x63, 0x9e, 0x00, 0x30, 0x00, - 0x00, 0x38, 0x00, 0x00, 0x1c, 0x10, 0x00, 0x07, - 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_41[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x07, 0x00, 0x07, 0x80, 0x0f, 0x80, - 0x0f, 0x80, 0x1d, 0xc0, 0x1c, 0xc0, 0x18, 0xe0, - 0x38, 0xe0, 0x3f, 0xe0, 0x3f, 0xf0, 0x70, 0x70, - 0x70, 0x70, 0x70, 0x38, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_42[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7f, 0x80, 0x7f, 0xc0, 0x79, 0xe0, - 0x70, 0xe0, 0x70, 0xe0, 0x7f, 0xc0, 0x7f, 0xc0, - 0x70, 0xe0, 0x70, 0x70, 0x70, 0x70, 0x78, 0xe0, - 0x7f, 0xe0, 0x7f, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_43[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x07, 0xc0, 0x1f, 0xc0, 0x3c, 0x00, - 0x38, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, - 0x70, 0x00, 0x70, 0x00, 0x38, 0x00, 0x3c, 0x00, - 0x1f, 0xc0, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_44[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7f, 0x80, 0x7f, 0xc0, 0x71, 0xe0, - 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, 0x38, - 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, 0x71, 0xe0, - 0x7f, 0xc0, 0x7f, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_45[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7f, 0xc0, 0x7f, 0xc0, 0x70, 0x00, - 0x70, 0x00, 0x70, 0x00, 0x7f, 0x80, 0x7f, 0x80, - 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, - 0x7f, 0xc0, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_46[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7f, 0xc0, 0x7f, 0xc0, 0x70, 0x00, - 0x70, 0x00, 0x70, 0x00, 0x7f, 0x80, 0x7f, 0x80, - 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, - 0x70, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_47[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x07, 0xe0, 0x1f, 0xe0, 0x3c, 0x00, - 0x38, 0x00, 0x70, 0x00, 0x70, 0x00, 0x71, 0xf0, - 0x71, 0xf0, 0x70, 0x30, 0x38, 0x30, 0x3c, 0x70, - 0x1f, 0xf0, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_48[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x70, 0x38, 0x70, 0x38, 0x70, 0x38, - 0x70, 0x38, 0x70, 0x38, 0x7f, 0xf8, 0x7f, 0xf8, - 0x70, 0x38, 0x70, 0x38, 0x70, 0x38, 0x70, 0x38, - 0x70, 0x38, 0x70, 0x38, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_49[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x1c, 0x00, - 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, - 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, - 0x7e, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_4a[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, - 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, - 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x0f, 0x00, - 0x7e, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_4b[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x70, 0xe0, 0x70, 0xe0, 0x71, 0xc0, - 0x71, 0xc0, 0x73, 0x80, 0x7f, 0x80, 0x7f, 0x80, - 0x73, 0x80, 0x71, 0xc0, 0x71, 0xc0, 0x70, 0xe0, - 0x70, 0xf0, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_4c[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, - 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, - 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, - 0x7f, 0xc0, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_4d[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, - 0x0e, 0x00, 0x7c, 0x1e, 0x00, 0x7c, 0x3e, 0x00, - 0x7e, 0x3e, 0x00, 0x7e, 0x7e, 0x00, 0x77, 0x6e, - 0x00, 0x73, 0xee, 0x00, 0x73, 0xce, 0x00, 0x71, - 0xce, 0x00, 0x70, 0x0e, 0x00, 0x70, 0x0e, 0x00, - 0x70, 0x0e, 0x00, 0x70, 0x0e, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_4e[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x78, 0x38, 0x78, 0x38, 0x7c, 0x38, - 0x7e, 0x38, 0x7e, 0x38, 0x77, 0x38, 0x73, 0xb8, - 0x71, 0xb8, 0x71, 0xf8, 0x70, 0xf8, 0x70, 0xf8, - 0x70, 0x78, 0x70, 0x38, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_4f[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0f, 0xc0, 0x1f, 0xe0, 0x3c, 0xf0, - 0x70, 0x78, 0x70, 0x38, 0x70, 0x38, 0x70, 0x38, - 0x70, 0x38, 0x70, 0x38, 0x78, 0x78, 0x3c, 0xf0, - 0x1f, 0xe0, 0x0f, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_50[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7f, 0x80, 0x7f, 0xe0, 0x70, 0xe0, - 0x70, 0x70, 0x70, 0x70, 0x70, 0xe0, 0x7f, 0xe0, - 0x7f, 0x80, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, - 0x70, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_51[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0f, 0xc0, 0x1f, 0xe0, 0x3c, 0xf0, - 0x70, 0x78, 0x70, 0x38, 0x70, 0x38, 0x70, 0x38, - 0x70, 0x38, 0x70, 0x38, 0x78, 0x78, 0x3c, 0xf0, - 0x1f, 0xe0, 0x0f, 0xf0, 0x00, 0x78, 0x00, 0x18, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_52[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7f, 0x80, 0x7f, 0xc0, 0x70, 0xe0, - 0x70, 0xe0, 0x70, 0xe0, 0x70, 0xe0, 0x7f, 0xc0, - 0x7f, 0xc0, 0x71, 0xc0, 0x71, 0xc0, 0x70, 0xe0, - 0x70, 0xe0, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_53[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x1f, 0x00, 0x3f, 0xc0, 0x79, 0x80, - 0x70, 0x00, 0x70, 0x00, 0x7c, 0x00, 0x1f, 0x00, - 0x07, 0x80, 0x01, 0xc0, 0x01, 0xc0, 0x73, 0xc0, - 0x7f, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_54[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xe0, 0xff, 0xe0, 0x0e, 0x00, - 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00, - 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00, - 0x0e, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_55[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x70, 0x38, 0x70, 0x38, 0x70, 0x38, - 0x70, 0x38, 0x70, 0x38, 0x70, 0x38, 0x70, 0x38, - 0x70, 0x38, 0x70, 0x38, 0x38, 0x70, 0x3c, 0xf0, - 0x1f, 0xe0, 0x0f, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_56[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, - 0x38, 0xe0, 0x38, 0xe0, 0x38, 0xe0, 0x19, 0xc0, - 0x1d, 0xc0, 0x1d, 0xc0, 0x0f, 0x80, 0x0f, 0x80, - 0x0f, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_57[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, - 0xc1, 0xc0, 0x71, 0xe3, 0x80, 0x71, 0xe3, 0x80, - 0x71, 0xe3, 0x80, 0x71, 0xf3, 0x80, 0x33, 0xf3, - 0x00, 0x3b, 0x37, 0x00, 0x3b, 0x37, 0x00, 0x3f, - 0x3f, 0x00, 0x1f, 0x1f, 0x00, 0x1e, 0x1e, 0x00, - 0x1e, 0x1e, 0x00, 0x1e, 0x1e, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_58[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x70, 0xe0, 0x70, 0xe0, 0x39, 0xc0, - 0x1d, 0xc0, 0x1f, 0x80, 0x0f, 0x00, 0x0f, 0x00, - 0x0f, 0x00, 0x1f, 0x80, 0x3d, 0xc0, 0x39, 0xc0, - 0x70, 0xe0, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_59[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x70, 0x70, 0x70, 0xe0, 0x38, 0xe0, - 0x39, 0xc0, 0x19, 0xc0, 0x1f, 0x80, 0x0f, 0x80, - 0x0f, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, - 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_5a[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7f, 0xc0, 0x7f, 0xc0, 0x01, 0xc0, - 0x03, 0x80, 0x07, 0x80, 0x07, 0x00, 0x0e, 0x00, - 0x0e, 0x00, 0x1c, 0x00, 0x38, 0x00, 0x38, 0x00, - 0x7f, 0xe0, 0x7f, 0xe0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_5b[] = { - 0x00, 0x00, 0x00, 0x3e, 0x3e, 0x38, 0x38, 0x38, - 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, - 0x38, 0x38, 0x38, 0x3e, 0x3e, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_5c[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x60, 0x00, 0x70, 0x00, 0x70, 0x00, - 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x1c, 0x00, - 0x1c, 0x00, 0x0c, 0x00, 0x0e, 0x00, 0x0e, 0x00, - 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_5d[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, - 0x7c, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, - 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, - 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, - 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x7c, 0x00, - 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_5e[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x1c, 0x00, 0x1e, 0x00, 0x3e, 0x00, - 0x37, 0x00, 0x33, 0x00, 0x63, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_5f[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xe0, - 0x7f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_60[] = { - 0x00, 0x00, 0x00, 0x00, 0x30, 0x38, 0x18, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_61[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1f, 0x00, 0x3f, 0x80, 0x23, 0xc0, 0x01, 0xc0, - 0x1f, 0xc0, 0x7f, 0xc0, 0x71, 0xc0, 0x71, 0xc0, - 0x7f, 0xc0, 0x3d, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_62[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, - 0x7f, 0x80, 0x7f, 0xc0, 0x79, 0xe0, 0x70, 0xe0, - 0x70, 0xe0, 0x70, 0xe0, 0x70, 0xe0, 0x79, 0xe0, - 0x7f, 0xc0, 0x77, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_63[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0f, 0x00, 0x3f, 0x00, 0x78, 0x00, 0x70, 0x00, - 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x78, 0x00, - 0x3f, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_64[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x00, 0xe0, 0x00, 0xe0, 0x00, 0xe0, - 0x1f, 0xe0, 0x3f, 0xe0, 0x79, 0xe0, 0x70, 0xe0, - 0x70, 0xe0, 0x70, 0xe0, 0x70, 0xe0, 0x79, 0xe0, - 0x3f, 0xe0, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_65[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1f, 0x00, 0x3f, 0x80, 0x79, 0xc0, 0x71, 0xc0, - 0x7f, 0xc0, 0x7f, 0xc0, 0x70, 0x00, 0x78, 0x00, - 0x3f, 0x80, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_66[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0f, 0x00, 0x3f, 0x00, 0x38, 0x00, 0x38, 0x00, - 0xfe, 0x00, 0x7e, 0x00, 0x38, 0x00, 0x38, 0x00, - 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, - 0x38, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_67[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1f, 0xe0, 0x3f, 0xe0, 0x71, 0xc0, 0x71, 0xc0, - 0x71, 0xc0, 0x3f, 0xc0, 0x3f, 0x00, 0x30, 0x00, - 0x3f, 0x80, 0x3f, 0xc0, 0x70, 0xe0, 0xf0, 0xe0, - 0x7f, 0xe0, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_68[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, - 0x77, 0x80, 0x7f, 0xc0, 0x79, 0xe0, 0x70, 0xe0, - 0x70, 0xe0, 0x70, 0xe0, 0x70, 0xe0, 0x70, 0xe0, - 0x70, 0xe0, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_69[] = { - 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, - 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, - 0x38, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_6a[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, - 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, - 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, - 0xf8, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_6b[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, - 0x71, 0xc0, 0x73, 0xc0, 0x73, 0x80, 0x77, 0x00, - 0x7f, 0x00, 0x7f, 0x00, 0x73, 0x80, 0x73, 0x80, - 0x71, 0xc0, 0x71, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_6c[] = { - 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x38, - 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, - 0x38, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_6d[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x77, 0xdf, 0x00, 0x7f, 0xff, 0x00, 0x78, 0xe3, - 0x80, 0x70, 0xe3, 0x80, 0x70, 0xe3, 0x80, 0x70, - 0xe3, 0x80, 0x70, 0xe3, 0x80, 0x70, 0xe3, 0x80, - 0x70, 0xe3, 0x80, 0x70, 0xe3, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_6e[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x77, 0x80, 0x7f, 0xc0, 0x78, 0xe0, 0x70, 0xe0, - 0x70, 0xe0, 0x70, 0xe0, 0x70, 0xe0, 0x70, 0xe0, - 0x70, 0xe0, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_6f[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0f, 0x00, 0x3f, 0xc0, 0x79, 0xc0, 0x70, 0xe0, - 0x70, 0xe0, 0x70, 0xe0, 0x70, 0xe0, 0x79, 0xc0, - 0x3f, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_70[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x77, 0x80, 0x7f, 0xc0, 0x79, 0xe0, 0x70, 0xe0, - 0x70, 0xe0, 0x70, 0xe0, 0x70, 0xe0, 0x79, 0xe0, - 0x7f, 0xc0, 0x7f, 0x80, 0x70, 0x00, 0x70, 0x00, - 0x70, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_71[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1e, 0xe0, 0x3f, 0xe0, 0x79, 0xe0, 0x70, 0xe0, - 0x70, 0xe0, 0x70, 0xe0, 0x70, 0xe0, 0x79, 0xe0, - 0x3f, 0xe0, 0x1f, 0xe0, 0x00, 0xe0, 0x00, 0xe0, - 0x00, 0xe0, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_72[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x77, 0x00, 0x7e, 0x00, 0x78, 0x00, 0x70, 0x00, - 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, - 0x70, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_73[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1f, 0x00, 0x7f, 0x00, 0x70, 0x00, 0x70, 0x00, - 0x3e, 0x00, 0x1f, 0x00, 0x07, 0x80, 0x47, 0x80, - 0x7f, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_74[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x30, 0x00, 0x38, 0x00, 0x38, 0x00, - 0xff, 0x00, 0xfe, 0x00, 0x38, 0x00, 0x38, 0x00, - 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, - 0x3f, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_75[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x70, 0xe0, 0x70, 0xe0, 0x70, 0xe0, 0x70, 0xe0, - 0x70, 0xe0, 0x70, 0xe0, 0x70, 0xe0, 0x39, 0xe0, - 0x3f, 0xe0, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_76[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe1, 0xc0, 0x71, 0xc0, 0x73, 0x80, 0x73, 0x80, - 0x33, 0x00, 0x3b, 0x00, 0x3f, 0x00, 0x1e, 0x00, - 0x1e, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_77[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x63, 0x8c, 0x00, 0x73, 0x9c, 0x00, 0x73, 0x9c, - 0x00, 0x77, 0xdc, 0x00, 0x36, 0xd8, 0x00, 0x36, - 0xd8, 0x00, 0x3e, 0xf8, 0x00, 0x3c, 0x78, 0x00, - 0x1c, 0x70, 0x00, 0x1c, 0x70, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_78[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x71, 0xc0, 0x3b, 0x80, 0x3b, 0x80, 0x1f, 0x00, - 0x0e, 0x00, 0x1e, 0x00, 0x1f, 0x00, 0x3b, 0x80, - 0x73, 0x80, 0x71, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_79[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe1, 0xc0, 0x71, 0xc0, 0x71, 0x80, 0x33, 0x80, - 0x3b, 0x80, 0x3b, 0x00, 0x1f, 0x00, 0x1f, 0x00, - 0x1e, 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x1c, 0x00, - 0x3c, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_7a[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x7f, 0x00, 0x7f, 0x00, 0x0f, 0x00, 0x0e, 0x00, - 0x1c, 0x00, 0x1c, 0x00, 0x38, 0x00, 0x78, 0x00, - 0x7f, 0x80, 0x7f, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_7b[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, - 0x1c, 0x00, 0x1c, 0x00, 0x18, 0x00, 0x18, 0x00, - 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x38, 0x00, - 0x70, 0x00, 0x70, 0x00, 0x38, 0x00, 0x18, 0x00, - 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x1c, 0x00, - 0x1e, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_7c[] = { - 0x00, 0x00, 0x00, 0x70, 0x70, 0x70, 0x70, 0x70, - 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, - 0x70, 0x70, 0x70, 0x70, 0x70, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_7d[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, - 0x78, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, - 0x38, 0x00, 0x38, 0x00, 0x18, 0x00, 0x1c, 0x00, - 0x0e, 0x00, 0x1e, 0x00, 0x1c, 0x00, 0x18, 0x00, - 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, - 0x78, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const struct font_letter letters[] = { - { letter_20, sizeof(letter_20), 7}, - { letter_21, sizeof(letter_21), 6}, - { letter_22, sizeof(letter_22), 9}, - { letter_23, sizeof(letter_23), 15}, - { letter_24, sizeof(letter_24), 13}, - { letter_25, sizeof(letter_25), 17}, - { letter_26, sizeof(letter_26), 16}, - { letter_27, sizeof(letter_27), 6}, - { letter_28, sizeof(letter_28), 9}, - { letter_29, sizeof(letter_29), 9}, - { letter_2a, sizeof(letter_2a), 12}, - { letter_2b, sizeof(letter_2b), 13}, - { letter_2c, sizeof(letter_2c), 7}, - { letter_2d, sizeof(letter_2d), 9}, - { letter_2e, sizeof(letter_2e), 7}, - { letter_2f, sizeof(letter_2f), 11}, - { letter_30, sizeof(letter_30), 13}, - { letter_31, sizeof(letter_31), 12}, - { letter_32, sizeof(letter_32), 13}, - { letter_33, sizeof(letter_33), 13}, - { letter_34, sizeof(letter_34), 14}, - { letter_35, sizeof(letter_35), 13}, - { letter_36, sizeof(letter_36), 13}, - { letter_37, sizeof(letter_37), 13}, - { letter_38, sizeof(letter_38), 13}, - { letter_39, sizeof(letter_39), 13}, - { letter_3a, sizeof(letter_3a), 6}, - { letter_3b, sizeof(letter_3b), 7}, - { letter_3c, sizeof(letter_3c), 12}, - { letter_3d, sizeof(letter_3d), 13}, - { letter_3e, sizeof(letter_3e), 12}, - { letter_3f, sizeof(letter_3f), 12}, - { letter_40, sizeof(letter_40), 20}, - { letter_41, sizeof(letter_41), 16}, - { letter_42, sizeof(letter_42), 14}, - { letter_43, sizeof(letter_43), 13}, - { letter_44, sizeof(letter_44), 15}, - { letter_45, sizeof(letter_45), 13}, - { letter_46, sizeof(letter_46), 12}, - { letter_47, sizeof(letter_47), 15}, - { letter_48, sizeof(letter_48), 15}, - { letter_49, sizeof(letter_49), 10}, - { letter_4a, sizeof(letter_4a), 10}, - { letter_4b, sizeof(letter_4b), 15}, - { letter_4c, sizeof(letter_4c), 12}, - { letter_4d, sizeof(letter_4d), 18}, - { letter_4e, sizeof(letter_4e), 15}, - { letter_4f, sizeof(letter_4f), 16}, - { letter_50, sizeof(letter_50), 14}, - { letter_51, sizeof(letter_51), 16}, - { letter_52, sizeof(letter_52), 15}, - { letter_53, sizeof(letter_53), 13}, - { letter_54, sizeof(letter_54), 14}, - { letter_55, sizeof(letter_55), 15}, - { letter_56, sizeof(letter_56), 16}, - { letter_57, sizeof(letter_57), 21}, - { letter_58, sizeof(letter_58), 15}, - { letter_59, sizeof(letter_59), 15}, - { letter_5a, sizeof(letter_5a), 13}, - { letter_5b, sizeof(letter_5b), 8}, - { letter_5c, sizeof(letter_5c), 12}, - { letter_5d, sizeof(letter_5d), 9}, - { letter_5e, sizeof(letter_5e), 11}, - { letter_5f, sizeof(letter_5f), 13}, - { letter_60, sizeof(letter_60), 8}, - { letter_61, sizeof(letter_61), 12}, - { letter_62, sizeof(letter_62), 14}, - { letter_63, sizeof(letter_63), 11}, - { letter_64, sizeof(letter_64), 13}, - { letter_65, sizeof(letter_65), 13}, - { letter_66, sizeof(letter_66), 11}, - { letter_67, sizeof(letter_67), 15}, - { letter_68, sizeof(letter_68), 13}, - { letter_69, sizeof(letter_69), 6}, - { letter_6a, sizeof(letter_6a), 9}, - { letter_6b, sizeof(letter_6b), 13}, - { letter_6c, sizeof(letter_6c), 6}, - { letter_6d, sizeof(letter_6d), 19}, - { letter_6e, sizeof(letter_6e), 13}, - { letter_6f, sizeof(letter_6f), 14}, - { letter_70, sizeof(letter_70), 14}, - { letter_71, sizeof(letter_71), 13}, - { letter_72, sizeof(letter_72), 10}, - { letter_73, sizeof(letter_73), 11}, - { letter_74, sizeof(letter_74), 11}, - { letter_75, sizeof(letter_75), 13}, - { letter_76, sizeof(letter_76), 14}, - { letter_77, sizeof(letter_77), 18}, - { letter_78, sizeof(letter_78), 14}, - { letter_79, sizeof(letter_79), 14}, - { letter_7a, sizeof(letter_7a), 11}, - { letter_7b, sizeof(letter_7b), 9}, - { letter_7c, sizeof(letter_7c), 6}, - { letter_7d, sizeof(letter_7d), 10}, -}; - -const struct font font_default_bold = { - .first = 0x20, - .last = 0x7d, - .letters = letters, - .height = 26, - .max_width = 22.0, -}; diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/default_bold.h b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/default_bold.h deleted file mode 100644 index dbc58301f..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/default_bold.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - * This file is auto generated with - * scripts/render_font.py --font_file lib/libutee/tui/fonts/amble/Amble-Bold.ttf --font_size 20 --font_name default_bold --out_dir out/arm-plat-rcar/ta_arm64-lib/libutee/tui - * do not edit. - */ -#ifndef __DEFAULT_BOLD_H -#define __DEFAULT_BOLD_H -#include "font.h" -extern const struct font font_default_bold; -#endif /*__DEFAULT_BOLD_H*/ diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/default_regular.c b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/default_regular.c deleted file mode 100644 index 96e65cf61..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/default_regular.c +++ /dev/null @@ -1,1024 +0,0 @@ -/* - * This file is auto generated with - * scripts/render_font.py --font_file lib/libutee/tui/fonts/amble/Amble-Regular.ttf --font_size 20 --font_name default_regular --out_dir out/arm-plat-rcar/ta_arm64-lib/libutee/tui - * do not edit. - */ -#include "font.h" - -static const unsigned char letter_20[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_21[] = { - 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, - 0x20, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_22[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x68, 0x48, - 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_23[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x04, 0xc0, 0x0c, 0xc0, 0x0c, 0xc0, - 0x3f, 0xf0, 0x1d, 0xc0, 0x0c, 0xc0, 0x0c, 0xc0, - 0x1d, 0xc0, 0x7f, 0xf0, 0x19, 0x80, 0x19, 0x80, - 0x19, 0x80, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_24[] = { - 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, - 0x0f, 0x80, 0x3f, 0xc0, 0x30, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x38, 0x00, 0x1e, 0x00, 0x07, 0x80, - 0x01, 0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xc0, - 0x3f, 0x80, 0x1f, 0x00, 0x06, 0x00, 0x06, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_25[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, - 0x08, 0x00, 0x36, 0x10, 0x00, 0x63, 0x30, 0x00, - 0x22, 0x20, 0x00, 0x3e, 0x40, 0x00, 0x00, 0xc0, - 0x00, 0x01, 0x80, 0x00, 0x01, 0x3c, 0x00, 0x03, - 0x66, 0x00, 0x06, 0x66, 0x00, 0x04, 0x66, 0x00, - 0x0c, 0x76, 0x00, 0x18, 0x3c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_26[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0f, 0x00, 0x3b, 0x80, 0x31, 0x80, - 0x31, 0x80, 0x1b, 0x00, 0x1e, 0x00, 0x1e, 0x00, - 0x37, 0x00, 0x63, 0xb0, 0x61, 0xe0, 0x60, 0xe0, - 0x3f, 0xe0, 0x1f, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_27[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x40, 0x40, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_28[] = { - 0x00, 0x00, 0x00, 0x08, 0x08, 0x18, 0x30, 0x30, - 0x30, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, - 0x30, 0x30, 0x10, 0x18, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_29[] = { - 0x00, 0x00, 0x00, 0x00, 0x20, 0x30, 0x10, 0x18, - 0x18, 0x08, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, - 0x18, 0x18, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_2a[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x6b, 0x00, - 0x3e, 0x00, 0x1c, 0x00, 0x16, 0x00, 0x32, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_2b[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x7f, 0x80, - 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_2c[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x30, 0x20, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_2d[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x7e, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_2e[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_2f[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x03, 0x00, 0x06, 0x00, 0x06, 0x00, - 0x06, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x18, 0x00, - 0x18, 0x00, 0x18, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x20, 0x00, 0x60, 0x00, 0x60, 0x00, 0x40, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_30[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0f, 0x00, 0x1b, 0x80, 0x30, 0xc0, - 0x60, 0xc0, 0x60, 0xc0, 0x60, 0x60, 0x60, 0x60, - 0x60, 0x60, 0x60, 0xc0, 0x60, 0xc0, 0x30, 0xc0, - 0x3b, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_31[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0e, 0x00, 0x3e, 0x00, 0x06, 0x00, - 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, - 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, - 0x07, 0x00, 0x3f, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_32[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x1f, 0x00, 0x3b, 0x80, 0x00, 0xc0, - 0x00, 0xc0, 0x00, 0xc0, 0x01, 0x80, 0x03, 0x00, - 0x0e, 0x00, 0x18, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x3f, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_33[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3f, 0x00, 0x33, 0x80, 0x00, 0xc0, - 0x00, 0xc0, 0x01, 0x80, 0x1f, 0x00, 0x03, 0x80, - 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xc0, - 0x77, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_34[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x07, 0x80, - 0x0d, 0x80, 0x0d, 0x80, 0x19, 0x80, 0x31, 0x80, - 0x31, 0x80, 0x61, 0x80, 0x7f, 0xe0, 0x01, 0x80, - 0x01, 0x80, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_35[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3f, 0xc0, 0x30, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x20, 0x00, 0x3f, 0x00, 0x31, 0xc0, - 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xc0, - 0x33, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_36[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x07, 0x80, 0x1e, 0x80, 0x30, 0x00, - 0x30, 0x00, 0x6f, 0x80, 0x79, 0xc0, 0x60, 0xc0, - 0x60, 0x60, 0x60, 0x60, 0x30, 0x60, 0x30, 0xc0, - 0x1d, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_37[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7f, 0xc0, 0x00, 0xc0, 0x00, 0xc0, - 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x03, 0x00, - 0x03, 0x00, 0x06, 0x00, 0x06, 0x00, 0x0c, 0x00, - 0x0c, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_38[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x1f, 0x00, 0x3b, 0xc0, 0x70, 0xc0, - 0x60, 0xc0, 0x31, 0xc0, 0x1f, 0x80, 0x39, 0xc0, - 0x60, 0xc0, 0x60, 0x60, 0x60, 0x60, 0x60, 0xc0, - 0x3b, 0xc0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_39[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x1f, 0x00, 0x3b, 0x80, 0x60, 0xc0, - 0x60, 0xc0, 0x60, 0xc0, 0x60, 0xc0, 0x31, 0xc0, - 0x1f, 0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x01, 0x80, - 0x37, 0x80, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_3a[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_3b[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x30, 0x20, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_3c[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x07, 0x80, 0x1e, 0x00, - 0x78, 0x00, 0x70, 0x00, 0x1e, 0x00, 0x07, 0x80, - 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_3d[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_3e[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x60, 0x00, 0x78, 0x00, 0x1e, 0x00, - 0x03, 0x80, 0x03, 0x80, 0x0f, 0x00, 0x78, 0x00, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_3f[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3e, 0x00, 0x77, 0x00, 0x01, 0x80, - 0x01, 0x80, 0x01, 0x80, 0x03, 0x00, 0x0e, 0x00, - 0x0c, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_40[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - 0xf0, 0x00, 0x06, 0x0c, 0x00, 0x18, 0x06, 0x00, - 0x10, 0x03, 0x00, 0x31, 0xf1, 0x00, 0x23, 0x91, - 0x00, 0x63, 0x11, 0x80, 0x66, 0x11, 0x80, 0x66, - 0x11, 0x80, 0x66, 0x31, 0x80, 0x66, 0x31, 0x00, - 0x67, 0xf3, 0x00, 0x23, 0x9c, 0x00, 0x30, 0x00, - 0x00, 0x18, 0x00, 0x00, 0x0c, 0x10, 0x00, 0x03, - 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_41[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, - 0x0d, 0x80, 0x0c, 0x80, 0x18, 0xc0, 0x18, 0xc0, - 0x18, 0x40, 0x3f, 0xe0, 0x30, 0x60, 0x20, 0x20, - 0x60, 0x30, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_42[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3f, 0x00, 0x33, 0xc0, 0x30, 0xc0, - 0x30, 0xc0, 0x30, 0xc0, 0x3f, 0x80, 0x30, 0xc0, - 0x30, 0x60, 0x30, 0x60, 0x30, 0x60, 0x30, 0x60, - 0x31, 0xc0, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_43[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x07, 0xc0, 0x1e, 0xc0, 0x30, 0x00, - 0x30, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, - 0x60, 0x00, 0x60, 0x00, 0x30, 0x00, 0x38, 0x00, - 0x1e, 0xc0, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_44[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3f, 0x80, 0x33, 0xc0, 0x30, 0x60, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x60, - 0x33, 0xc0, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_45[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3f, 0xc0, 0x30, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x3f, 0x80, - 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x3f, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_46[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3f, 0x80, 0x30, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x3f, 0x80, - 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_47[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x07, 0xe0, 0x1e, 0x60, 0x38, 0x00, - 0x30, 0x00, 0x20, 0x00, 0x60, 0x00, 0x61, 0xf0, - 0x60, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x30, - 0x1e, 0x70, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_48[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3f, 0xf0, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_49[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7e, 0x00, 0x18, 0x00, 0x18, 0x00, - 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, - 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, - 0x18, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_4a[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, - 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, - 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x06, 0x00, - 0x6e, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_4b[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x30, 0x60, 0x30, 0xc0, 0x30, 0xc0, - 0x31, 0x80, 0x33, 0x80, 0x33, 0x00, 0x3e, 0x00, - 0x33, 0x00, 0x31, 0x80, 0x31, 0x80, 0x30, 0xc0, - 0x30, 0x60, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_4c[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x3f, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_4d[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, - 0x0e, 0x00, 0x38, 0x1e, 0x00, 0x3c, 0x1e, 0x00, - 0x3c, 0x36, 0x00, 0x36, 0x36, 0x00, 0x33, 0x66, - 0x00, 0x33, 0xc6, 0x00, 0x31, 0xc6, 0x00, 0x30, - 0x86, 0x00, 0x30, 0x06, 0x00, 0x30, 0x06, 0x00, - 0x30, 0x06, 0x00, 0x30, 0x06, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_4e[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x30, 0x10, 0x38, 0x10, 0x38, 0x10, - 0x3c, 0x10, 0x36, 0x10, 0x36, 0x10, 0x33, 0x10, - 0x31, 0x90, 0x31, 0x90, 0x30, 0xf0, 0x30, 0x70, - 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_4f[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0f, 0x80, 0x1c, 0xe0, 0x30, 0x70, - 0x30, 0x30, 0x60, 0x10, 0x60, 0x18, 0x60, 0x18, - 0x60, 0x18, 0x60, 0x10, 0x30, 0x30, 0x30, 0x70, - 0x1d, 0xe0, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_50[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3f, 0x80, 0x33, 0xc0, 0x30, 0x60, - 0x30, 0x60, 0x30, 0x60, 0x30, 0x60, 0x30, 0xc0, - 0x3f, 0x80, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_51[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0f, 0x80, 0x1d, 0xe0, 0x30, 0x60, - 0x60, 0x30, 0x60, 0x30, 0x60, 0x30, 0x60, 0x10, - 0x60, 0x30, 0x60, 0x30, 0x60, 0x30, 0x30, 0x60, - 0x1d, 0xe0, 0x0f, 0xe0, 0x00, 0x30, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_52[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3f, 0x80, 0x33, 0xc0, 0x30, 0x60, - 0x30, 0x60, 0x30, 0x60, 0x30, 0xc0, 0x3f, 0x80, - 0x31, 0x80, 0x31, 0x80, 0x30, 0xc0, 0x30, 0xc0, - 0x30, 0x60, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_53[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x1f, 0x80, 0x3b, 0x80, 0x60, 0x00, - 0x60, 0x00, 0x60, 0x00, 0x38, 0x00, 0x1f, 0x00, - 0x03, 0x80, 0x01, 0xc0, 0x00, 0xc0, 0x00, 0xc0, - 0x73, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_54[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7f, 0xe0, 0x0e, 0x00, 0x06, 0x00, - 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, - 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, - 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_55[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x1d, 0xe0, 0x0f, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_56[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x60, 0x30, 0x60, 0x30, 0x30, 0x60, - 0x30, 0x60, 0x30, 0x60, 0x18, 0xc0, 0x18, 0xc0, - 0x18, 0x80, 0x0d, 0x80, 0x0d, 0x80, 0x07, 0x00, - 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_57[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, - 0xc1, 0x80, 0x60, 0xc1, 0x80, 0x61, 0xe1, 0x80, - 0x31, 0xe3, 0x00, 0x31, 0xe3, 0x00, 0x31, 0x33, - 0x00, 0x33, 0x33, 0x00, 0x13, 0x32, 0x00, 0x1a, - 0x16, 0x00, 0x1e, 0x1e, 0x00, 0x1e, 0x1e, 0x00, - 0x0c, 0x0c, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_58[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x60, 0x60, 0x30, 0xc0, 0x31, 0x80, - 0x19, 0x80, 0x1b, 0x00, 0x0f, 0x00, 0x0e, 0x00, - 0x0f, 0x00, 0x1b, 0x00, 0x19, 0x80, 0x31, 0x80, - 0x30, 0xc0, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_59[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x60, 0x60, 0x60, 0xc0, 0x30, 0xc0, - 0x31, 0x80, 0x19, 0x80, 0x1b, 0x00, 0x0f, 0x00, - 0x0e, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, - 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_5a[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7f, 0xe0, 0x00, 0xc0, 0x01, 0xc0, - 0x01, 0x80, 0x03, 0x00, 0x03, 0x00, 0x06, 0x00, - 0x0c, 0x00, 0x0c, 0x00, 0x18, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x7f, 0xe0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_5b[] = { - 0x00, 0x00, 0x00, 0x00, 0x1c, 0x18, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x18, 0x1c, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_5c[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, - 0x30, 0x00, 0x30, 0x00, 0x10, 0x00, 0x18, 0x00, - 0x18, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, - 0x06, 0x00, 0x06, 0x00, 0x02, 0x00, 0x02, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_5d[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x78, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, - 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, - 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, - 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, - 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_5e[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x36, 0x00, - 0x36, 0x00, 0x63, 0x00, 0x63, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_5f[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xc0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_60[] = { - 0x00, 0x00, 0x00, 0x00, 0x20, 0x30, 0x18, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_61[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1f, 0x00, 0x3f, 0x80, 0x01, 0x80, 0x01, 0x80, - 0x1f, 0x80, 0x31, 0x80, 0x61, 0x80, 0x61, 0x80, - 0x73, 0x80, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_62[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x3f, 0x00, 0x3b, 0xc0, 0x30, 0xc0, 0x30, 0xc0, - 0x30, 0x60, 0x30, 0x60, 0x30, 0xc0, 0x30, 0xc0, - 0x3f, 0x80, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_63[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0f, 0x00, 0x3d, 0x00, 0x30, 0x00, 0x60, 0x00, - 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x30, 0x00, - 0x3d, 0x80, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_64[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xc0, - 0x1e, 0xc0, 0x3b, 0xc0, 0x30, 0xc0, 0x60, 0xc0, - 0x60, 0xc0, 0x60, 0xc0, 0x60, 0xc0, 0x30, 0xc0, - 0x3f, 0xc0, 0x1f, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_65[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0f, 0x00, 0x3b, 0x80, 0x30, 0xc0, 0x60, 0xc0, - 0x7f, 0xc0, 0x60, 0x00, 0x60, 0x00, 0x30, 0x00, - 0x3d, 0x80, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_66[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0e, 0x00, 0x18, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x7e, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_67[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1f, 0xe0, 0x3b, 0xc0, 0x70, 0xc0, 0x60, 0xc0, - 0x31, 0xc0, 0x1f, 0x80, 0x30, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x3f, 0xc0, 0x60, 0xc0, 0x60, 0x60, - 0x7b, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_68[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x37, 0x80, 0x3d, 0xc0, 0x30, 0xc0, 0x30, 0xc0, - 0x30, 0xc0, 0x30, 0xc0, 0x30, 0xc0, 0x30, 0xc0, - 0x30, 0xc0, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_69[] = { - 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_6a[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, - 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, - 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, - 0x38, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_6b[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x31, 0x80, 0x31, 0x80, 0x33, 0x00, 0x36, 0x00, - 0x3e, 0x00, 0x36, 0x00, 0x33, 0x00, 0x33, 0x00, - 0x31, 0x80, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_6c[] = { - 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_6d[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x3f, 0x9e, 0x00, 0x38, 0xe3, 0x00, 0x30, 0xc3, - 0x00, 0x30, 0xc3, 0x00, 0x30, 0xc3, 0x00, 0x30, - 0xc3, 0x00, 0x30, 0xc3, 0x00, 0x30, 0xc3, 0x00, - 0x30, 0xc3, 0x00, 0x30, 0xc3, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_6e[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x37, 0x80, 0x39, 0xc0, 0x30, 0xc0, 0x30, 0xc0, - 0x30, 0xc0, 0x30, 0xc0, 0x30, 0xc0, 0x30, 0xc0, - 0x30, 0xc0, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_6f[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0f, 0x00, 0x3b, 0x80, 0x30, 0xc0, 0x60, 0xc0, - 0x60, 0x60, 0x60, 0x60, 0x60, 0xc0, 0x30, 0xc0, - 0x3b, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_70[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x3f, 0x00, 0x39, 0xc0, 0x30, 0xc0, 0x30, 0x40, - 0x30, 0x60, 0x30, 0x60, 0x30, 0xc0, 0x30, 0xc0, - 0x3f, 0x80, 0x3f, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_71[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1e, 0xc0, 0x3b, 0xc0, 0x30, 0xc0, 0x60, 0xc0, - 0x60, 0xc0, 0x60, 0xc0, 0x60, 0xc0, 0x30, 0xc0, - 0x3f, 0xc0, 0x1e, 0xc0, 0x00, 0xc0, 0x00, 0xc0, - 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_72[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x26, 0x00, 0x3c, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_73[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1f, 0x00, 0x33, 0x00, 0x60, 0x00, 0x60, 0x00, - 0x3c, 0x00, 0x0f, 0x00, 0x03, 0x00, 0x03, 0x00, - 0x77, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_74[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x7e, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x3a, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_75[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x30, 0xc0, 0x30, 0xc0, 0x30, 0xc0, 0x30, 0xc0, - 0x30, 0xc0, 0x30, 0xc0, 0x30, 0xc0, 0x30, 0xc0, - 0x31, 0xc0, 0x1e, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_76[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x61, 0x80, 0x61, 0x80, 0x61, 0x80, 0x33, 0x00, - 0x33, 0x00, 0x33, 0x00, 0x16, 0x00, 0x1e, 0x00, - 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_77[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x61, 0x0c, 0x00, 0x63, 0x8c, 0x00, 0x63, 0x8c, - 0x00, 0x23, 0x88, 0x00, 0x26, 0xd8, 0x00, 0x36, - 0xd8, 0x00, 0x34, 0x58, 0x00, 0x1c, 0x70, 0x00, - 0x18, 0x70, 0x00, 0x18, 0x30, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_78[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x61, 0x80, 0x31, 0x80, 0x13, 0x00, 0x1e, 0x00, - 0x0c, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x33, 0x00, - 0x31, 0x80, 0x61, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_79[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x60, 0x80, 0x61, 0x80, 0x61, 0x80, 0x31, 0x00, - 0x33, 0x00, 0x13, 0x00, 0x1a, 0x00, 0x1e, 0x00, - 0x0e, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, - 0x18, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_7a[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x7f, 0x80, 0x03, 0x80, 0x03, 0x00, 0x06, 0x00, - 0x0c, 0x00, 0x1c, 0x00, 0x18, 0x00, 0x30, 0x00, - 0x70, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_7b[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, - 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, - 0x18, 0x00, 0x10, 0x00, 0x30, 0x00, 0x30, 0x00, - 0x60, 0x00, 0x30, 0x00, 0x30, 0x00, 0x10, 0x00, - 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, - 0x18, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char letter_7c[] = { - 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, - 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, - 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x00, -}; - -static const unsigned char letter_7d[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, - 0x30, 0x00, 0x30, 0x00, 0x10, 0x00, 0x18, 0x00, - 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, - 0x0c, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, - 0x18, 0x00, 0x18, 0x00, 0x10, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -static const struct font_letter letters[] = { - { letter_20, sizeof(letter_20), 7}, - { letter_21, sizeof(letter_21), 6}, - { letter_22, sizeof(letter_22), 8}, - { letter_23, sizeof(letter_23), 15}, - { letter_24, sizeof(letter_24), 12}, - { letter_25, sizeof(letter_25), 18}, - { letter_26, sizeof(letter_26), 15}, - { letter_27, sizeof(letter_27), 5}, - { letter_28, sizeof(letter_28), 8}, - { letter_29, sizeof(letter_29), 8}, - { letter_2a, sizeof(letter_2a), 11}, - { letter_2b, sizeof(letter_2b), 12}, - { letter_2c, sizeof(letter_2c), 7}, - { letter_2d, sizeof(letter_2d), 9}, - { letter_2e, sizeof(letter_2e), 6}, - { letter_2f, sizeof(letter_2f), 11}, - { letter_30, sizeof(letter_30), 13}, - { letter_31, sizeof(letter_31), 12}, - { letter_32, sizeof(letter_32), 13}, - { letter_33, sizeof(letter_33), 13}, - { letter_34, sizeof(letter_34), 13}, - { letter_35, sizeof(letter_35), 13}, - { letter_36, sizeof(letter_36), 13}, - { letter_37, sizeof(letter_37), 13}, - { letter_38, sizeof(letter_38), 13}, - { letter_39, sizeof(letter_39), 13}, - { letter_3a, sizeof(letter_3a), 6}, - { letter_3b, sizeof(letter_3b), 7}, - { letter_3c, sizeof(letter_3c), 12}, - { letter_3d, sizeof(letter_3d), 13}, - { letter_3e, sizeof(letter_3e), 12}, - { letter_3f, sizeof(letter_3f), 11}, - { letter_40, sizeof(letter_40), 19}, - { letter_41, sizeof(letter_41), 15}, - { letter_42, sizeof(letter_42), 13}, - { letter_43, sizeof(letter_43), 13}, - { letter_44, sizeof(letter_44), 14}, - { letter_45, sizeof(letter_45), 11}, - { letter_46, sizeof(letter_46), 11}, - { letter_47, sizeof(letter_47), 14}, - { letter_48, sizeof(letter_48), 14}, - { letter_49, sizeof(letter_49), 9}, - { letter_4a, sizeof(letter_4a), 10}, - { letter_4b, sizeof(letter_4b), 14}, - { letter_4c, sizeof(letter_4c), 11}, - { letter_4d, sizeof(letter_4d), 17}, - { letter_4e, sizeof(letter_4e), 14}, - { letter_4f, sizeof(letter_4f), 15}, - { letter_50, sizeof(letter_50), 12}, - { letter_51, sizeof(letter_51), 16}, - { letter_52, sizeof(letter_52), 13}, - { letter_53, sizeof(letter_53), 12}, - { letter_54, sizeof(letter_54), 13}, - { letter_55, sizeof(letter_55), 14}, - { letter_56, sizeof(letter_56), 15}, - { letter_57, sizeof(letter_57), 20}, - { letter_58, sizeof(letter_58), 13}, - { letter_59, sizeof(letter_59), 13}, - { letter_5a, sizeof(letter_5a), 14}, - { letter_5b, sizeof(letter_5b), 7}, - { letter_5c, sizeof(letter_5c), 11}, - { letter_5d, sizeof(letter_5d), 9}, - { letter_5e, sizeof(letter_5e), 11}, - { letter_5f, sizeof(letter_5f), 12}, - { letter_60, sizeof(letter_60), 8}, - { letter_61, sizeof(letter_61), 12}, - { letter_62, sizeof(letter_62), 12}, - { letter_63, sizeof(letter_63), 11}, - { letter_64, sizeof(letter_64), 13}, - { letter_65, sizeof(letter_65), 12}, - { letter_66, sizeof(letter_66), 10}, - { letter_67, sizeof(letter_67), 13}, - { letter_68, sizeof(letter_68), 12}, - { letter_69, sizeof(letter_69), 6}, - { letter_6a, sizeof(letter_6a), 9}, - { letter_6b, sizeof(letter_6b), 12}, - { letter_6c, sizeof(letter_6c), 6}, - { letter_6d, sizeof(letter_6d), 18}, - { letter_6e, sizeof(letter_6e), 12}, - { letter_6f, sizeof(letter_6f), 13}, - { letter_70, sizeof(letter_70), 12}, - { letter_71, sizeof(letter_71), 13}, - { letter_72, sizeof(letter_72), 9}, - { letter_73, sizeof(letter_73), 11}, - { letter_74, sizeof(letter_74), 10}, - { letter_75, sizeof(letter_75), 12}, - { letter_76, sizeof(letter_76), 13}, - { letter_77, sizeof(letter_77), 17}, - { letter_78, sizeof(letter_78), 12}, - { letter_79, sizeof(letter_79), 12}, - { letter_7a, sizeof(letter_7a), 12}, - { letter_7b, sizeof(letter_7b), 9}, - { letter_7c, sizeof(letter_7c), 5}, - { letter_7d, sizeof(letter_7d), 9}, -}; - -const struct font font_default_regular = { - .first = 0x20, - .last = 0x7d, - .letters = letters, - .height = 26, - .max_width = 21.0, -}; diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/default_regular.h b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/default_regular.h deleted file mode 100644 index 28ae28420..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os/default_regular.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - * This file is auto generated with - * scripts/render_font.py --font_file lib/libutee/tui/fonts/amble/Amble-Regular.ttf --font_size 20 --font_name default_regular --out_dir out/arm-plat-rcar/ta_arm64-lib/libutee/tui - * do not edit. - */ -#ifndef __DEFAULT_REGULAR_H -#define __DEFAULT_REGULAR_H -#include "font.h" -extern const struct font font_default_regular; -#endif /*__DEFAULT_REGULAR_H*/ diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bbappend deleted file mode 100644 index 9dbdfc527..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bbappend +++ /dev/null @@ -1,23 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -inherit pythonnative -DEPENDS += " python-pycrypto-native" - -#Need for gcc 6.2 -CFLAGS += " -fno-strict-aliasing -Wno-unused-variable -Wno-shift-negative-value -Wno-implicit-fallthrough" - -SRC_URI_append = " \ - file://default_bold.c \ - file://default_bold.h \ - file://default_regular.c \ - file://default_regular.h \ - file://0001-Remove-the-file-generation-and-directly-copy-the-fil.patch \ - " - - -do_compile_prepend() { - GENDIRECTORY=${S}/lib/libutee/tui/fonts/amble/ - cp ${WORKDIR}/default_bold.c ${GENDIRECTORY} - cp ${WORKDIR}/default_bold.h ${GENDIRECTORY} - cp ${WORKDIR}/default_regular.c ${GENDIRECTORY} - cp ${WORKDIR}/default_regular.h ${GENDIRECTORY} -} -- cgit 1.2.3-korg From 4666d062480f45858c222f23b7fb73cd3223f24d Mon Sep 17 00:00:00 2001 From: ronan Date: Fri, 9 Feb 2018 10:42:33 +0100 Subject: Revert "Fix CVE-2017-1000364 by backporting the patches for gen3" This reverts commit 9b9894c5497f9604282f5abc25de7dd48b99e7b8. Change-Id: Iab95fb8feb2f50397d6a285bddffaafd37a62984 --- ...01-mm-larger-stack-guard-gap-between-vmas.patch | 935 --------------------- ...w-stack-to-grow-up-to-address-space-limit.patch | 51 -- ...mm-fix-new-crash-in-unmapped_area_topdown.patch | 52 -- .../linux/linux-renesas_4.14.bbappend | 5 - 4 files changed, 1043 deletions(-) delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0001-mm-larger-stack-guard-gap-between-vmas.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0002-Allow-stack-to-grow-up-to-address-space-limit.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0003-mm-fix-new-crash-in-unmapped_area_topdown.patch (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0001-mm-larger-stack-guard-gap-between-vmas.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0001-mm-larger-stack-guard-gap-between-vmas.patch deleted file mode 100644 index 08a4ec717..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0001-mm-larger-stack-guard-gap-between-vmas.patch +++ /dev/null @@ -1,935 +0,0 @@ -From 0f637a08fa3b048f1e0b0d3dc8f5cb9df3368b5d Mon Sep 17 00:00:00 2001 -From: Hugh Dickins -Date: Mon, 19 Jun 2017 04:03:24 -0700 -Subject: [PATCH 1/3] mm: larger stack guard gap, between vmas - -commit 1be7107fbe18eed3e319a6c3e83c78254b693acb upstream. - -Stack guard page is a useful feature to reduce a risk of stack smashing -into a different mapping. We have been using a single page gap which -is sufficient to prevent having stack adjacent to a different mapping. -But this seems to be insufficient in the light of the stack usage in -userspace. E.g. glibc uses as large as 64kB alloca() in many commonly -used functions. Others use constructs liks gid_t buffer[NGROUPS_MAX] -which is 256kB or stack strings with MAX_ARG_STRLEN. - -This will become especially dangerous for suid binaries and the default -no limit for the stack size limit because those applications can be -tricked to consume a large portion of the stack and a single glibc call -could jump over the guard page. These attacks are not theoretical, -unfortunatelly. - -Make those attacks less probable by increasing the stack guard gap -to 1MB (on systems with 4k pages; but make it depend on the page size -because systems with larger base pages might cap stack allocations in -the PAGE_SIZE units) which should cover larger alloca() and VLA stack -allocations. It is obviously not a full fix because the problem is -somehow inherent, but it should reduce attack space a lot. - -One could argue that the gap size should be configurable from userspace, -but that can be done later when somebody finds that the new 1MB is wrong -for some special case applications. For now, add a kernel command line -option (stack_guard_gap) to specify the stack gap size (in page units). - -Implementation wise, first delete all the old code for stack guard page: -because although we could get away with accounting one extra page in a -stack vma, accounting a larger gap can break userspace - case in point, -a program run with "ulimit -S -v 20000" failed when the 1MB gap was -counted for RLIMIT_AS; similar problems could come with RLIMIT_MLOCK -and strict non-overcommit mode. - -Instead of keeping gap inside the stack vma, maintain the stack guard -gap as a gap between vmas: using vm_start_gap() in place of vm_start -(or vm_end_gap() in place of vm_end if VM_GROWSUP) in just those few -places which need to respect the gap - mainly arch_get_unmapped_area(), -and and the vma tree's subtree_gap support for that. - -Original-patch-by: Oleg Nesterov -Original-patch-by: Michal Hocko -Signed-off-by: Hugh Dickins -Acked-by: Michal Hocko -Tested-by: Helge Deller # parisc -Signed-off-by: Linus Torvalds -[wt: backport to 4.11: adjust context] -[wt: backport to 4.9: adjust context ; kernel doc was not in admin-guide] -Signed-off-by: Willy Tarreau -Signed-off-by: Greg Kroah-Hartman ---- - Documentation/kernel-parameters.txt | 7 ++ - arch/arc/mm/mmap.c | 2 +- - arch/arm/mm/mmap.c | 4 +- - arch/frv/mm/elf-fdpic.c | 2 +- - arch/mips/mm/mmap.c | 2 +- - arch/parisc/kernel/sys_parisc.c | 15 ++-- - arch/powerpc/mm/hugetlbpage-radix.c | 2 +- - arch/powerpc/mm/mmap.c | 4 +- - arch/powerpc/mm/slice.c | 2 +- - arch/s390/mm/mmap.c | 4 +- - arch/sh/mm/mmap.c | 4 +- - arch/sparc/kernel/sys_sparc_64.c | 4 +- - arch/sparc/mm/hugetlbpage.c | 2 +- - arch/tile/mm/hugetlbpage.c | 2 +- - arch/x86/kernel/sys_x86_64.c | 4 +- - arch/x86/mm/hugetlbpage.c | 2 +- - arch/xtensa/kernel/syscall.c | 2 +- - fs/hugetlbfs/inode.c | 2 +- - fs/proc/task_mmu.c | 4 - - include/linux/mm.h | 53 ++++++------- - mm/gup.c | 5 -- - mm/memory.c | 38 --------- - mm/mmap.c | 149 +++++++++++++++++++++--------------- - 23 files changed, 152 insertions(+), 163 deletions(-) - -diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt -index 38556cd..bf3ecf8 100644 ---- a/Documentation/kernel-parameters.txt -+++ b/Documentation/kernel-parameters.txt -@@ -3918,6 +3918,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted. - spia_pedr= - spia_peddr= - -+ stack_guard_gap= [MM] -+ override the default stack gap protection. The value -+ is in page units and it defines how many pages prior -+ to (for stacks growing down) resp. after (for stacks -+ growing up) the main stack are reserved for no other -+ mapping. Default value is 256 pages. -+ - stacktrace [FTRACE] - Enabled the stack tracer on boot up. - -diff --git a/arch/arc/mm/mmap.c b/arch/arc/mm/mmap.c -index 2e06d56..cf4ae69 100644 ---- a/arch/arc/mm/mmap.c -+++ b/arch/arc/mm/mmap.c -@@ -64,7 +64,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, - - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c -index 66353ca..641334e 100644 ---- a/arch/arm/mm/mmap.c -+++ b/arch/arm/mm/mmap.c -@@ -89,7 +89,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, - - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -@@ -140,7 +140,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, - addr = PAGE_ALIGN(addr); - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -diff --git a/arch/frv/mm/elf-fdpic.c b/arch/frv/mm/elf-fdpic.c -index 836f147..efa59f1 100644 ---- a/arch/frv/mm/elf-fdpic.c -+++ b/arch/frv/mm/elf-fdpic.c -@@ -74,7 +74,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi - addr = PAGE_ALIGN(addr); - vma = find_vma(current->mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - goto success; - } - -diff --git a/arch/mips/mm/mmap.c b/arch/mips/mm/mmap.c -index d08ea3f..a44052c 100644 ---- a/arch/mips/mm/mmap.c -+++ b/arch/mips/mm/mmap.c -@@ -92,7 +92,7 @@ static unsigned long arch_get_unmapped_area_common(struct file *filp, - - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c -index 0a393a0..1d7691f 100644 ---- a/arch/parisc/kernel/sys_parisc.c -+++ b/arch/parisc/kernel/sys_parisc.c -@@ -88,7 +88,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, - unsigned long len, unsigned long pgoff, unsigned long flags) - { - struct mm_struct *mm = current->mm; -- struct vm_area_struct *vma; -+ struct vm_area_struct *vma, *prev; - unsigned long task_size = TASK_SIZE; - int do_color_align, last_mmap; - struct vm_unmapped_area_info info; -@@ -115,9 +115,10 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, - else - addr = PAGE_ALIGN(addr); - -- vma = find_vma(mm, addr); -+ vma = find_vma_prev(mm, addr, &prev); - if (task_size - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma)) && -+ (!prev || addr >= vm_end_gap(prev))) - goto found_addr; - } - -@@ -141,7 +142,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, - const unsigned long len, const unsigned long pgoff, - const unsigned long flags) - { -- struct vm_area_struct *vma; -+ struct vm_area_struct *vma, *prev; - struct mm_struct *mm = current->mm; - unsigned long addr = addr0; - int do_color_align, last_mmap; -@@ -175,9 +176,11 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, - addr = COLOR_ALIGN(addr, last_mmap, pgoff); - else - addr = PAGE_ALIGN(addr); -- vma = find_vma(mm, addr); -+ -+ vma = find_vma_prev(mm, addr, &prev); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma)) && -+ (!prev || addr >= vm_end_gap(prev))) - goto found_addr; - } - -diff --git a/arch/powerpc/mm/hugetlbpage-radix.c b/arch/powerpc/mm/hugetlbpage-radix.c -index 35254a6..a2b2d97 100644 ---- a/arch/powerpc/mm/hugetlbpage-radix.c -+++ b/arch/powerpc/mm/hugetlbpage-radix.c -@@ -65,7 +65,7 @@ radix__hugetlb_get_unmapped_area(struct file *file, unsigned long addr, - addr = ALIGN(addr, huge_page_size(h)); - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - /* -diff --git a/arch/powerpc/mm/mmap.c b/arch/powerpc/mm/mmap.c -index 2f1e443..5bc2845 100644 ---- a/arch/powerpc/mm/mmap.c -+++ b/arch/powerpc/mm/mmap.c -@@ -106,7 +106,7 @@ radix__arch_get_unmapped_area(struct file *filp, unsigned long addr, - addr = PAGE_ALIGN(addr); - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && addr >= mmap_min_addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -@@ -142,7 +142,7 @@ radix__arch_get_unmapped_area_topdown(struct file *filp, - addr = PAGE_ALIGN(addr); - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && addr >= mmap_min_addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c -index 2b27458..c4d5c9c 100644 ---- a/arch/powerpc/mm/slice.c -+++ b/arch/powerpc/mm/slice.c -@@ -105,7 +105,7 @@ static int slice_area_is_free(struct mm_struct *mm, unsigned long addr, - if ((mm->task_size - len) < addr) - return 0; - vma = find_vma(mm, addr); -- return (!vma || (addr + len) <= vma->vm_start); -+ return (!vma || (addr + len) <= vm_start_gap(vma)); - } - - static int slice_low_has_vma(struct mm_struct *mm, unsigned long slice) -diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c -index eb9df28..812368f 100644 ---- a/arch/s390/mm/mmap.c -+++ b/arch/s390/mm/mmap.c -@@ -98,7 +98,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, - addr = PAGE_ALIGN(addr); - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && addr >= mmap_min_addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -@@ -136,7 +136,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, - addr = PAGE_ALIGN(addr); - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && addr >= mmap_min_addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -diff --git a/arch/sh/mm/mmap.c b/arch/sh/mm/mmap.c -index 6777177..7df7d59 100644 ---- a/arch/sh/mm/mmap.c -+++ b/arch/sh/mm/mmap.c -@@ -63,7 +63,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, - - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -@@ -113,7 +113,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, - - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c -index fe8b8ee..02e05e2 100644 ---- a/arch/sparc/kernel/sys_sparc_64.c -+++ b/arch/sparc/kernel/sys_sparc_64.c -@@ -118,7 +118,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi - - vma = find_vma(mm, addr); - if (task_size - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -@@ -181,7 +181,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, - - vma = find_vma(mm, addr); - if (task_size - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -diff --git a/arch/sparc/mm/hugetlbpage.c b/arch/sparc/mm/hugetlbpage.c -index 988acc8..58cde8d 100644 ---- a/arch/sparc/mm/hugetlbpage.c -+++ b/arch/sparc/mm/hugetlbpage.c -@@ -116,7 +116,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, - addr = ALIGN(addr, HPAGE_SIZE); - vma = find_vma(mm, addr); - if (task_size - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - if (mm->get_unmapped_area == arch_get_unmapped_area) -diff --git a/arch/tile/mm/hugetlbpage.c b/arch/tile/mm/hugetlbpage.c -index 77ceaa3..67508b2 100644 ---- a/arch/tile/mm/hugetlbpage.c -+++ b/arch/tile/mm/hugetlbpage.c -@@ -232,7 +232,7 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, - addr = ALIGN(addr, huge_page_size(h)); - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - if (current->mm->get_unmapped_area == arch_get_unmapped_area) -diff --git a/arch/x86/kernel/sys_x86_64.c b/arch/x86/kernel/sys_x86_64.c -index a55ed63..1119414 100644 ---- a/arch/x86/kernel/sys_x86_64.c -+++ b/arch/x86/kernel/sys_x86_64.c -@@ -140,7 +140,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, - addr = PAGE_ALIGN(addr); - vma = find_vma(mm, addr); - if (end - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -@@ -183,7 +183,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, - addr = PAGE_ALIGN(addr); - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c -index 2ae8584..fe342e8 100644 ---- a/arch/x86/mm/hugetlbpage.c -+++ b/arch/x86/mm/hugetlbpage.c -@@ -144,7 +144,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, - addr = ALIGN(addr, huge_page_size(h)); - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - if (mm->get_unmapped_area == arch_get_unmapped_area) -diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c -index 83cf496..3aaaae1 100644 ---- a/arch/xtensa/kernel/syscall.c -+++ b/arch/xtensa/kernel/syscall.c -@@ -87,7 +87,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, - /* At this point: (!vmm || addr < vmm->vm_end). */ - if (TASK_SIZE - len < addr) - return -ENOMEM; -- if (!vmm || addr + len <= vmm->vm_start) -+ if (!vmm || addr + len <= vm_start_gap(vmm)) - return addr; - addr = vmm->vm_end; - if (flags & MAP_SHARED) -diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c -index 4fb7b10..704fa0b 100644 ---- a/fs/hugetlbfs/inode.c -+++ b/fs/hugetlbfs/inode.c -@@ -191,7 +191,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, - addr = ALIGN(addr, huge_page_size(h)); - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } - -diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c -index 35b92d8..c5f2136 100644 ---- a/fs/proc/task_mmu.c -+++ b/fs/proc/task_mmu.c -@@ -299,11 +299,7 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid) - - /* We don't show the stack guard page in /proc/maps */ - start = vma->vm_start; -- if (stack_guard_page_start(vma, start)) -- start += PAGE_SIZE; - end = vma->vm_end; -- if (stack_guard_page_end(vma, end)) -- end -= PAGE_SIZE; - - seq_setwidth(m, 25 + sizeof(void *) * 6 - 1); - seq_printf(m, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu ", -diff --git a/include/linux/mm.h b/include/linux/mm.h -index a92c8d7..451251b 100644 ---- a/include/linux/mm.h -+++ b/include/linux/mm.h -@@ -1354,39 +1354,11 @@ int clear_page_dirty_for_io(struct page *page); - - int get_cmdline(struct task_struct *task, char *buffer, int buflen); - --/* Is the vma a continuation of the stack vma above it? */ --static inline int vma_growsdown(struct vm_area_struct *vma, unsigned long addr) --{ -- return vma && (vma->vm_end == addr) && (vma->vm_flags & VM_GROWSDOWN); --} -- - static inline bool vma_is_anonymous(struct vm_area_struct *vma) - { - return !vma->vm_ops; - } - --static inline int stack_guard_page_start(struct vm_area_struct *vma, -- unsigned long addr) --{ -- return (vma->vm_flags & VM_GROWSDOWN) && -- (vma->vm_start == addr) && -- !vma_growsdown(vma->vm_prev, addr); --} -- --/* Is the vma a continuation of the stack vma below it? */ --static inline int vma_growsup(struct vm_area_struct *vma, unsigned long addr) --{ -- return vma && (vma->vm_start == addr) && (vma->vm_flags & VM_GROWSUP); --} -- --static inline int stack_guard_page_end(struct vm_area_struct *vma, -- unsigned long addr) --{ -- return (vma->vm_flags & VM_GROWSUP) && -- (vma->vm_end == addr) && -- !vma_growsup(vma->vm_next, addr); --} -- - int vma_is_stack_for_current(struct vm_area_struct *vma); - - extern unsigned long move_page_tables(struct vm_area_struct *vma, -@@ -2125,6 +2097,7 @@ void page_cache_async_readahead(struct address_space *mapping, - pgoff_t offset, - unsigned long size); - -+extern unsigned long stack_guard_gap; - /* Generic expand stack which grows the stack according to GROWS{UP,DOWN} */ - extern int expand_stack(struct vm_area_struct *vma, unsigned long address); - -@@ -2153,6 +2126,30 @@ static inline struct vm_area_struct * find_vma_intersection(struct mm_struct * m - return vma; - } - -+static inline unsigned long vm_start_gap(struct vm_area_struct *vma) -+{ -+ unsigned long vm_start = vma->vm_start; -+ -+ if (vma->vm_flags & VM_GROWSDOWN) { -+ vm_start -= stack_guard_gap; -+ if (vm_start > vma->vm_start) -+ vm_start = 0; -+ } -+ return vm_start; -+} -+ -+static inline unsigned long vm_end_gap(struct vm_area_struct *vma) -+{ -+ unsigned long vm_end = vma->vm_end; -+ -+ if (vma->vm_flags & VM_GROWSUP) { -+ vm_end += stack_guard_gap; -+ if (vm_end < vma->vm_end) -+ vm_end = -PAGE_SIZE; -+ } -+ return vm_end; -+} -+ - static inline unsigned long vma_pages(struct vm_area_struct *vma) - { - return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; -diff --git a/mm/gup.c b/mm/gup.c -index ec4f827..c63a034 100644 ---- a/mm/gup.c -+++ b/mm/gup.c -@@ -370,11 +370,6 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma, - /* mlock all present pages, but do not fault in new pages */ - if ((*flags & (FOLL_POPULATE | FOLL_MLOCK)) == FOLL_MLOCK) - return -ENOENT; -- /* For mm_populate(), just skip the stack guard page. */ -- if ((*flags & FOLL_POPULATE) && -- (stack_guard_page_start(vma, address) || -- stack_guard_page_end(vma, address + PAGE_SIZE))) -- return -ENOENT; - if (*flags & FOLL_WRITE) - fault_flags |= FAULT_FLAG_WRITE; - if (*flags & FOLL_REMOTE) -diff --git a/mm/memory.c b/mm/memory.c -index e18c57b..2868911 100644 ---- a/mm/memory.c -+++ b/mm/memory.c -@@ -2699,40 +2699,6 @@ int do_swap_page(struct fault_env *fe, pte_t orig_pte) - } - - /* -- * This is like a special single-page "expand_{down|up}wards()", -- * except we must first make sure that 'address{-|+}PAGE_SIZE' -- * doesn't hit another vma. -- */ --static inline int check_stack_guard_page(struct vm_area_struct *vma, unsigned long address) --{ -- address &= PAGE_MASK; -- if ((vma->vm_flags & VM_GROWSDOWN) && address == vma->vm_start) { -- struct vm_area_struct *prev = vma->vm_prev; -- -- /* -- * Is there a mapping abutting this one below? -- * -- * That's only ok if it's the same stack mapping -- * that has gotten split.. -- */ -- if (prev && prev->vm_end == address) -- return prev->vm_flags & VM_GROWSDOWN ? 0 : -ENOMEM; -- -- return expand_downwards(vma, address - PAGE_SIZE); -- } -- if ((vma->vm_flags & VM_GROWSUP) && address + PAGE_SIZE == vma->vm_end) { -- struct vm_area_struct *next = vma->vm_next; -- -- /* As VM_GROWSDOWN but s/below/above/ */ -- if (next && next->vm_start == address + PAGE_SIZE) -- return next->vm_flags & VM_GROWSUP ? 0 : -ENOMEM; -- -- return expand_upwards(vma, address + PAGE_SIZE); -- } -- return 0; --} -- --/* - * We enter with non-exclusive mmap_sem (to exclude vma changes, - * but allow concurrent faults), and pte mapped but not yet locked. - * We return with mmap_sem still held, but pte unmapped and unlocked. -@@ -2748,10 +2714,6 @@ static int do_anonymous_page(struct fault_env *fe) - if (vma->vm_flags & VM_SHARED) - return VM_FAULT_SIGBUS; - -- /* Check if we need to add a guard page to the stack */ -- if (check_stack_guard_page(vma, fe->address) < 0) -- return VM_FAULT_SIGSEGV; -- - /* - * Use pte_alloc() instead of pte_alloc_map(). We can't run - * pte_offset_map() on pmds where a huge pmd might be created -diff --git a/mm/mmap.c b/mm/mmap.c -index 1af87c1..26542b3 100644 ---- a/mm/mmap.c -+++ b/mm/mmap.c -@@ -183,6 +183,7 @@ SYSCALL_DEFINE1(brk, unsigned long, brk) - unsigned long retval; - unsigned long newbrk, oldbrk; - struct mm_struct *mm = current->mm; -+ struct vm_area_struct *next; - unsigned long min_brk; - bool populate; - -@@ -228,7 +229,8 @@ SYSCALL_DEFINE1(brk, unsigned long, brk) - } - - /* Check against existing mmap mappings. */ -- if (find_vma_intersection(mm, oldbrk, newbrk+PAGE_SIZE)) -+ next = find_vma(mm, oldbrk); -+ if (next && newbrk + PAGE_SIZE > vm_start_gap(next)) - goto out; - - /* Ok, looks good - let it rip. */ -@@ -251,10 +253,22 @@ SYSCALL_DEFINE1(brk, unsigned long, brk) - - static long vma_compute_subtree_gap(struct vm_area_struct *vma) - { -- unsigned long max, subtree_gap; -- max = vma->vm_start; -- if (vma->vm_prev) -- max -= vma->vm_prev->vm_end; -+ unsigned long max, prev_end, subtree_gap; -+ -+ /* -+ * Note: in the rare case of a VM_GROWSDOWN above a VM_GROWSUP, we -+ * allow two stack_guard_gaps between them here, and when choosing -+ * an unmapped area; whereas when expanding we only require one. -+ * That's a little inconsistent, but keeps the code here simpler. -+ */ -+ max = vm_start_gap(vma); -+ if (vma->vm_prev) { -+ prev_end = vm_end_gap(vma->vm_prev); -+ if (max > prev_end) -+ max -= prev_end; -+ else -+ max = 0; -+ } - if (vma->vm_rb.rb_left) { - subtree_gap = rb_entry(vma->vm_rb.rb_left, - struct vm_area_struct, vm_rb)->rb_subtree_gap; -@@ -350,7 +364,7 @@ static void validate_mm(struct mm_struct *mm) - anon_vma_unlock_read(anon_vma); - } - -- highest_address = vma->vm_end; -+ highest_address = vm_end_gap(vma); - vma = vma->vm_next; - i++; - } -@@ -539,7 +553,7 @@ void __vma_link_rb(struct mm_struct *mm, struct vm_area_struct *vma, - if (vma->vm_next) - vma_gap_update(vma->vm_next); - else -- mm->highest_vm_end = vma->vm_end; -+ mm->highest_vm_end = vm_end_gap(vma); - - /* - * vma->vm_prev wasn't known when we followed the rbtree to find the -@@ -854,7 +868,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start, - vma_gap_update(vma); - if (end_changed) { - if (!next) -- mm->highest_vm_end = end; -+ mm->highest_vm_end = vm_end_gap(vma); - else if (!adjust_next) - vma_gap_update(next); - } -@@ -939,7 +953,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start, - * mm->highest_vm_end doesn't need any update - * in remove_next == 1 case. - */ -- VM_WARN_ON(mm->highest_vm_end != end); -+ VM_WARN_ON(mm->highest_vm_end != vm_end_gap(vma)); - } - } - if (insert && file) -@@ -1783,7 +1797,7 @@ unsigned long unmapped_area(struct vm_unmapped_area_info *info) - - while (true) { - /* Visit left subtree if it looks promising */ -- gap_end = vma->vm_start; -+ gap_end = vm_start_gap(vma); - if (gap_end >= low_limit && vma->vm_rb.rb_left) { - struct vm_area_struct *left = - rb_entry(vma->vm_rb.rb_left, -@@ -1794,7 +1808,7 @@ unsigned long unmapped_area(struct vm_unmapped_area_info *info) - } - } - -- gap_start = vma->vm_prev ? vma->vm_prev->vm_end : 0; -+ gap_start = vma->vm_prev ? vm_end_gap(vma->vm_prev) : 0; - check_current: - /* Check if current node has a suitable gap */ - if (gap_start > high_limit) -@@ -1821,8 +1835,8 @@ unsigned long unmapped_area(struct vm_unmapped_area_info *info) - vma = rb_entry(rb_parent(prev), - struct vm_area_struct, vm_rb); - if (prev == vma->vm_rb.rb_left) { -- gap_start = vma->vm_prev->vm_end; -- gap_end = vma->vm_start; -+ gap_start = vm_end_gap(vma->vm_prev); -+ gap_end = vm_start_gap(vma); - goto check_current; - } - } -@@ -1886,7 +1900,7 @@ unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info) - - while (true) { - /* Visit right subtree if it looks promising */ -- gap_start = vma->vm_prev ? vma->vm_prev->vm_end : 0; -+ gap_start = vma->vm_prev ? vm_end_gap(vma->vm_prev) : 0; - if (gap_start <= high_limit && vma->vm_rb.rb_right) { - struct vm_area_struct *right = - rb_entry(vma->vm_rb.rb_right, -@@ -1899,7 +1913,7 @@ unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info) - - check_current: - /* Check if current node has a suitable gap */ -- gap_end = vma->vm_start; -+ gap_end = vm_start_gap(vma); - if (gap_end < low_limit) - return -ENOMEM; - if (gap_start <= high_limit && gap_end - gap_start >= length) -@@ -1925,7 +1939,7 @@ unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info) - struct vm_area_struct, vm_rb); - if (prev == vma->vm_rb.rb_right) { - gap_start = vma->vm_prev ? -- vma->vm_prev->vm_end : 0; -+ vm_end_gap(vma->vm_prev) : 0; - goto check_current; - } - } -@@ -1963,7 +1977,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, - unsigned long len, unsigned long pgoff, unsigned long flags) - { - struct mm_struct *mm = current->mm; -- struct vm_area_struct *vma; -+ struct vm_area_struct *vma, *prev; - struct vm_unmapped_area_info info; - - if (len > TASK_SIZE - mmap_min_addr) -@@ -1974,9 +1988,10 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, - - if (addr) { - addr = PAGE_ALIGN(addr); -- vma = find_vma(mm, addr); -+ vma = find_vma_prev(mm, addr, &prev); - if (TASK_SIZE - len >= addr && addr >= mmap_min_addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma)) && -+ (!prev || addr >= vm_end_gap(prev))) - return addr; - } - -@@ -1999,7 +2014,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, - const unsigned long len, const unsigned long pgoff, - const unsigned long flags) - { -- struct vm_area_struct *vma; -+ struct vm_area_struct *vma, *prev; - struct mm_struct *mm = current->mm; - unsigned long addr = addr0; - struct vm_unmapped_area_info info; -@@ -2014,9 +2029,10 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, - /* requesting a specific address */ - if (addr) { - addr = PAGE_ALIGN(addr); -- vma = find_vma(mm, addr); -+ vma = find_vma_prev(mm, addr, &prev); - if (TASK_SIZE - len >= addr && addr >= mmap_min_addr && -- (!vma || addr + len <= vma->vm_start)) -+ (!vma || addr + len <= vm_start_gap(vma)) && -+ (!prev || addr >= vm_end_gap(prev))) - return addr; - } - -@@ -2151,21 +2167,19 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr, - * update accounting. This is shared with both the - * grow-up and grow-down cases. - */ --static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, unsigned long grow) -+static int acct_stack_growth(struct vm_area_struct *vma, -+ unsigned long size, unsigned long grow) - { - struct mm_struct *mm = vma->vm_mm; - struct rlimit *rlim = current->signal->rlim; -- unsigned long new_start, actual_size; -+ unsigned long new_start; - - /* address space limit tests */ - if (!may_expand_vm(mm, vma->vm_flags, grow)) - return -ENOMEM; - - /* Stack limit test */ -- actual_size = size; -- if (size && (vma->vm_flags & (VM_GROWSUP | VM_GROWSDOWN))) -- actual_size -= PAGE_SIZE; -- if (actual_size > READ_ONCE(rlim[RLIMIT_STACK].rlim_cur)) -+ if (size > READ_ONCE(rlim[RLIMIT_STACK].rlim_cur)) - return -ENOMEM; - - /* mlock limit tests */ -@@ -2203,17 +2217,30 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns - int expand_upwards(struct vm_area_struct *vma, unsigned long address) - { - struct mm_struct *mm = vma->vm_mm; -+ struct vm_area_struct *next; -+ unsigned long gap_addr; - int error = 0; - - if (!(vma->vm_flags & VM_GROWSUP)) - return -EFAULT; - - /* Guard against wrapping around to address 0. */ -- if (address < PAGE_ALIGN(address+4)) -- address = PAGE_ALIGN(address+4); -- else -+ address &= PAGE_MASK; -+ address += PAGE_SIZE; -+ if (!address) - return -ENOMEM; - -+ /* Enforce stack_guard_gap */ -+ gap_addr = address + stack_guard_gap; -+ if (gap_addr < address) -+ return -ENOMEM; -+ next = vma->vm_next; -+ if (next && next->vm_start < gap_addr) { -+ if (!(next->vm_flags & VM_GROWSUP)) -+ return -ENOMEM; -+ /* Check that both stack segments have the same anon_vma? */ -+ } -+ - /* We must make sure the anon_vma is allocated. */ - if (unlikely(anon_vma_prepare(vma))) - return -ENOMEM; -@@ -2257,7 +2284,7 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address) - if (vma->vm_next) - vma_gap_update(vma->vm_next); - else -- mm->highest_vm_end = address; -+ mm->highest_vm_end = vm_end_gap(vma); - spin_unlock(&mm->page_table_lock); - - perf_event_mmap(vma); -@@ -2278,6 +2305,8 @@ int expand_downwards(struct vm_area_struct *vma, - unsigned long address) - { - struct mm_struct *mm = vma->vm_mm; -+ struct vm_area_struct *prev; -+ unsigned long gap_addr; - int error; - - address &= PAGE_MASK; -@@ -2285,6 +2314,17 @@ int expand_downwards(struct vm_area_struct *vma, - if (error) - return error; - -+ /* Enforce stack_guard_gap */ -+ gap_addr = address - stack_guard_gap; -+ if (gap_addr > address) -+ return -ENOMEM; -+ prev = vma->vm_prev; -+ if (prev && prev->vm_end > gap_addr) { -+ if (!(prev->vm_flags & VM_GROWSDOWN)) -+ return -ENOMEM; -+ /* Check that both stack segments have the same anon_vma? */ -+ } -+ - /* We must make sure the anon_vma is allocated. */ - if (unlikely(anon_vma_prepare(vma))) - return -ENOMEM; -@@ -2339,28 +2379,25 @@ int expand_downwards(struct vm_area_struct *vma, - return error; - } - --/* -- * Note how expand_stack() refuses to expand the stack all the way to -- * abut the next virtual mapping, *unless* that mapping itself is also -- * a stack mapping. We want to leave room for a guard page, after all -- * (the guard page itself is not added here, that is done by the -- * actual page faulting logic) -- * -- * This matches the behavior of the guard page logic (see mm/memory.c: -- * check_stack_guard_page()), which only allows the guard page to be -- * removed under these circumstances. -- */ -+/* enforced gap between the expanding stack and other mappings. */ -+unsigned long stack_guard_gap = 256UL< -Debugged-by: Linus Torvalds -Signed-off-by: Hugh Dickins -Acked-by: Michal Hocko -Signed-off-by: Linus Torvalds -Signed-off-by: Greg Kroah-Hartman ---- - mm/mmap.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/mm/mmap.c b/mm/mmap.c -index d71a61e..145d3d5 100644 ---- a/mm/mmap.c -+++ b/mm/mmap.c -@@ -1813,7 +1813,8 @@ unsigned long unmapped_area(struct vm_unmapped_area_info *info) - /* Check if current node has a suitable gap */ - if (gap_start > high_limit) - return -ENOMEM; -- if (gap_end >= low_limit && gap_end - gap_start >= length) -+ if (gap_end >= low_limit && -+ gap_end > gap_start && gap_end - gap_start >= length) - goto found; - - /* Visit right subtree if it looks promising */ -@@ -1916,7 +1917,8 @@ unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info) - gap_end = vm_start_gap(vma); - if (gap_end < low_limit) - return -ENOMEM; -- if (gap_start <= high_limit && gap_end - gap_start >= length) -+ if (gap_start <= high_limit && -+ gap_end > gap_start && gap_end - gap_start >= length) - goto found; - - /* Visit left subtree if it looks promising */ --- -2.1.4 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend index ec39aa075..014f727c0 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend @@ -1,10 +1,5 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -#------------------------------------------------------------------------- -# Fix for CVE-2017-1000364 by backporting the upstream patches. SRC_URI_append = "\ - file://0001-mm-larger-stack-guard-gap-between-vmas.patch \ - file://0002-Allow-stack-to-grow-up-to-address-space-limit.patch \ - file://0003-mm-fix-new-crash-in-unmapped_area_topdown.patch \ file://0001-give-up-on-gcc-ilog2-constant-optimizations.patch \ " -- cgit 1.2.3-korg From d5057be098877efff235f36f0d08f53e8c352017 Mon Sep 17 00:00:00 2001 From: ronan Date: Fri, 9 Feb 2018 10:51:36 +0100 Subject: remove backport commit Change-Id: I63e974a075752a9d2f7cba3a1880321c7c4c6b17 Signed-off-by: ronan --- .../meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend | 3 +++ 1 file changed, 3 insertions(+) (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend index 014f727c0..4e8ac359b 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend @@ -3,3 +3,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" SRC_URI_append = "\ file://0001-give-up-on-gcc-ilog2-constant-optimizations.patch \ " + +#Already present in 4.14 +SRC_URI_remove = "file://0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch" -- cgit 1.2.3-korg From 523e481a1a2e68ac85c29b1a79fef603211952f4 Mon Sep 17 00:00:00 2001 From: ronan Date: Fri, 9 Feb 2018 10:52:40 +0100 Subject: Revert "Fix kernel gcc7 issue" This reverts commit 9b7584fd0ca807998643028a264b25c8dbbbed18. Change-Id: I41337a1ee9425cfcfe19cf1406b3b4391f4af3be --- ...ve-up-on-gcc-ilog2-constant-optimizations.patch | 127 --------------------- .../linux/linux-renesas_4.14.bbappend | 6 - 2 files changed, 133 deletions(-) delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0001-give-up-on-gcc-ilog2-constant-optimizations.patch (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0001-give-up-on-gcc-ilog2-constant-optimizations.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0001-give-up-on-gcc-ilog2-constant-optimizations.patch deleted file mode 100644 index 67b455da6..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0001-give-up-on-gcc-ilog2-constant-optimizations.patch +++ /dev/null @@ -1,127 +0,0 @@ -From 474c90156c8dcc2fa815e6716cc9394d7930cb9c Mon Sep 17 00:00:00 2001 -From: Linus Torvalds -Date: Thu, 2 Mar 2017 12:17:22 -0800 -Subject: [PATCH] give up on gcc ilog2() constant optimizations - -gcc-7 has an "optimization" pass that completely screws up, and -generates the code expansion for the (impossible) case of calling -ilog2() with a zero constant, even when the code gcc compiles does not -actually have a zero constant. - -And we try to generate a compile-time error for anybody doing ilog2() on -a constant where that doesn't make sense (be it zero or negative). So -now gcc7 will fail the build due to our sanity checking, because it -created that constant-zero case that didn't actually exist in the source -code. - -There's a whole long discussion on the kernel mailing about how to work -around this gcc bug. The gcc people themselevs have discussed their -"feature" in - - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785 - -but it's all water under the bridge, because while it looked at one -point like it would be solved by the time gcc7 was released, that was -not to be. - -So now we have to deal with this compiler braindamage. - -And the only simple approach seems to be to just delete the code that -tries to warn about bad uses of ilog2(). - -So now "ilog2()" will just return 0 not just for the value 1, but for -any non-positive value too. - -It's not like I can recall anybody having ever actually tried to use -this function on any invalid value, but maybe the sanity check just -meant that such code never made it out in public. - -Reported-by: Laura Abbott -Cc: John Stultz , -Cc: Thomas Gleixner -Cc: Ard Biesheuvel -Signed-off-by: Linus Torvalds ---- - include/linux/log2.h | 13 ++----------- - tools/include/linux/log2.h | 13 ++----------- - 2 files changed, 4 insertions(+), 22 deletions(-) - -diff --git a/include/linux/log2.h b/include/linux/log2.h -index ef3d4f67118c..c373295f359f 100644 ---- a/include/linux/log2.h -+++ b/include/linux/log2.h -@@ -16,12 +16,6 @@ - #include - - /* -- * deal with unrepresentable constant logarithms -- */ --extern __attribute__((const, noreturn)) --int ____ilog2_NaN(void); -- --/* - * non-constant log of base 2 calculators - * - the arch may override these in asm/bitops.h if they can be implemented - * more efficiently than using fls() and fls64() -@@ -85,7 +79,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) - #define ilog2(n) \ - ( \ - __builtin_constant_p(n) ? ( \ -- (n) < 1 ? ____ilog2_NaN() : \ -+ (n) < 2 ? 0 : \ - (n) & (1ULL << 63) ? 63 : \ - (n) & (1ULL << 62) ? 62 : \ - (n) & (1ULL << 61) ? 61 : \ -@@ -148,10 +142,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) - (n) & (1ULL << 4) ? 4 : \ - (n) & (1ULL << 3) ? 3 : \ - (n) & (1ULL << 2) ? 2 : \ -- (n) & (1ULL << 1) ? 1 : \ -- (n) & (1ULL << 0) ? 0 : \ -- ____ilog2_NaN() \ -- ) : \ -+ 1 ) : \ - (sizeof(n) <= 4) ? \ - __ilog2_u32(n) : \ - __ilog2_u64(n) \ -diff --git a/tools/include/linux/log2.h b/tools/include/linux/log2.h -index 41446668ccce..d5677d39c1e4 100644 ---- a/tools/include/linux/log2.h -+++ b/tools/include/linux/log2.h -@@ -13,12 +13,6 @@ - #define _TOOLS_LINUX_LOG2_H - - /* -- * deal with unrepresentable constant logarithms -- */ --extern __attribute__((const, noreturn)) --int ____ilog2_NaN(void); -- --/* - * non-constant log of base 2 calculators - * - the arch may override these in asm/bitops.h if they can be implemented - * more efficiently than using fls() and fls64() -@@ -78,7 +72,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) - #define ilog2(n) \ - ( \ - __builtin_constant_p(n) ? ( \ -- (n) < 1 ? ____ilog2_NaN() : \ -+ (n) < 2 ? 0 : \ - (n) & (1ULL << 63) ? 63 : \ - (n) & (1ULL << 62) ? 62 : \ - (n) & (1ULL << 61) ? 61 : \ -@@ -141,10 +135,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) - (n) & (1ULL << 4) ? 4 : \ - (n) & (1ULL << 3) ? 3 : \ - (n) & (1ULL << 2) ? 2 : \ -- (n) & (1ULL << 1) ? 1 : \ -- (n) & (1ULL << 0) ? 0 : \ -- ____ilog2_NaN() \ -- ) : \ -+ 1 ) : \ - (sizeof(n) <= 4) ? \ - __ilog2_u32(n) : \ - __ilog2_u64(n) \ --- -2.13.6 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend index 4e8ac359b..c1fedc92b 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend @@ -1,8 +1,2 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRC_URI_append = "\ - file://0001-give-up-on-gcc-ilog2-constant-optimizations.patch \ - " - #Already present in 4.14 SRC_URI_remove = "file://0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch" -- cgit 1.2.3-korg From d9dc7d14ce997dda7cb02d0f1bd6ccf1cf6d5e65 Mon Sep 17 00:00:00 2001 From: ronan Date: Tue, 13 Feb 2018 14:22:53 +0100 Subject: [GEN3] add preferred version on omx package Change-Id: I61c6971adddd756ebec262b084b8e4d847d1cb8f Signed-off-by: ronan --- meta-agl-bsp/conf/include/agl_m3ulcb.inc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/conf/include/agl_m3ulcb.inc b/meta-agl-bsp/conf/include/agl_m3ulcb.inc index de47c1f3c..7644e0b69 100644 --- a/meta-agl-bsp/conf/include/agl_m3ulcb.inc +++ b/meta-agl-bsp/conf/include/agl_m3ulcb.inc @@ -19,6 +19,8 @@ PREFERRED_PROVIDER_virtual/mesa = "mesa" PREFERRED_PROVIDER_libgbm = "libgbm" PREFERRED_RPROVIDER_libgbm-dev = "libgbm" +PREFERRED_RPROVIDER_libomxil = "omx-user-module" + # Mask the gstreamer recipe for MMP BBMASK = "meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" -- cgit 1.2.3-korg From 3f0d2e62f0dd36d58150011a0398638c25256ffc Mon Sep 17 00:00:00 2001 From: ronan Date: Tue, 13 Feb 2018 14:34:42 +0100 Subject: Remove unsed gstreamer backport Change-Id: I42cf2872946ad46852136dfc9170718434b4b5ba Signed-off-by: ronan --- ...on.m4-prefix-pkgconfig-paths-with-PKG_CON.patch | 42 --- ...error-signal-emission-for-missing-plugins.patch | 252 ----------------- .../gst-player/Fix-pause-play.patch | 107 -------- .../gst-player/filechooser.patch | 54 ---- .../gst-player/gst-player.desktop | 10 - .../gstreamer_bp_krogoth/gst-player/gtk2.patch | 71 ----- .../gstreamer_bp_krogoth/gst-player_git.bb | 39 --- .../gstreamer_bp_krogoth/gst-plugins-package.inc | 56 ---- .../gstreamer_bp_krogoth/gstreamer1.0-libav.inc | 46 ---- ...-Disable-yasm-for-libav-when-disable-yasm.patch | 33 --- ...ound-to-build-gst-libav-for-i586-with-gcc.patch | 26 -- .../gstreamer1.0-libav_1.6.3.bb | 20 -- .../gstreamer_bp_krogoth/gstreamer1.0-libav_git.bb | 38 --- .../gstreamer_bp_krogoth/gstreamer1.0-meta-base.bb | 68 ----- .../gstreamer_bp_krogoth/gstreamer1.0-omx.inc | 43 --- .../0001-omx-fixed-type-error-in-printf-call.patch | 30 --- .../gstreamer_bp_krogoth/gstreamer1.0-omx_1.2.0.bb | 11 - .../gstreamer_bp_krogoth/gstreamer1.0-omx_git.bb | 25 -- .../gstreamer1.0-plugins-bad.inc | 148 ---------- ...-don-t-hardcode-libtool-name-when-running.patch | 57 ---- .../0001-glimagesink-Downrank-to-marginal.patch | 32 --- ...gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch | 27 -- ...window-fix-memory-leak-of-navigation-thre.patch | 35 --- .../avoid-including-sys-poll.h-directly.patch | 30 --- .../configure-allow-to-disable-libssh2.patch | 64 ----- ...valid-sentinels-for-gst_structure_get-etc.patch | 86 ------ ...itialized-warnings-when-compiling-with-Os.patch | 28 -- .../gstreamer1.0-plugins-bad_1.6.3.bb | 28 -- .../gstreamer1.0-plugins-bad_git.bb | 65 ----- .../gstreamer1.0-plugins-base.inc | 50 ---- ...-don-t-hardcode-libtool-name-when-running.patch | 168 ------------ ...-prefix-calls-to-pkg-config-with-PKG_CONF.patch | 298 --------------------- ...ssing-include-directories-when-calling-in.patch | 28 -- ...3-ssaparse-enhance-SSA-text-lines-parsing.patch | 225 ---------------- ...ncorrect-reference-to-gstreamer-sdp-in-Ma.patch | 27 -- ...t-need_segment-after-sink-pad-received-GS.patch | 69 ----- ...ame-Support-video-crop-when-convert-frame.patch | 143 ---------- ...eed-more-buffers-in-output-queue-for-bett.patch | 32 --- .../get-caps-from-src-pad-when-query-caps.patch | 44 --- ...make-gio_unix_2_0-dependency-configurable.patch | 47 ---- .../gstreamer1.0-plugins-base_1.6.3.bb | 25 -- .../gstreamer1.0-plugins-base_git.bb | 27 -- .../gstreamer1.0-plugins-good.inc | 53 ---- ...ay-set-dafault-value-for-MPEG4-without-co.patch | 62 ----- .../avoid-including-sys-poll.h-directly.patch | 44 --- ...sure-valid-sentinel-for-gst_structure_get.patch | 40 --- .../gstreamer1.0-plugins-good_1.6.3.bb | 15 -- .../gstreamer1.0-plugins-good_git.bb | 28 -- .../gstreamer1.0-plugins-ugly.inc | 31 --- .../gstreamer1.0-plugins-ugly_1.6.3.bb | 13 - .../gstreamer1.0-plugins-ugly_git.bb | 41 --- .../gstreamer_bp_krogoth/gstreamer1.0-plugins.inc | 40 --- .../gstreamer1.0-rtsp-server.inc | 24 -- ...ode-libtool-name-when-using-introspection.patch | 27 -- .../gstreamer1.0-rtsp-server_1.6.2.bb | 6 - .../gstreamer_bp_krogoth/gstreamer1.0.inc | 58 ---- .../0001-Fix-crash-with-gst-inspect.patch | 28 -- .../gstreamer_bp_krogoth/gstreamer1.0_1.6.3.bb | 14 - .../gstreamer_bp_krogoth/gstreamer1.0_git.bb | 30 --- 59 files changed, 3308 deletions(-) delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/Add-error-signal-emission-for-missing-plugins.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/Fix-pause-play.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/filechooser.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/gst-player.desktop delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/gtk2.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player_git.bb delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-plugins-package.inc delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav.inc delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav_1.6.3.bb delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav_git.bb delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-meta-base.bb delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-omx.inc delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-omx_1.2.0.bb delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-omx_git.bb delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad.inc delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/0001-glimagesink-Downrank-to-marginal.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch delete mode 100755 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad_1.6.3.bb delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad_git.bb delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base.inc delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch delete mode 100755 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base_1.6.3.bb delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base_git.bb delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good.inc delete mode 100755 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good/avoid-including-sys-poll.h-directly.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good_1.6.3.bb delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good_git.bb delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-ugly.inc delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-ugly_1.6.3.bb delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-ugly_git.bb delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins.inc delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-rtsp-server.inc delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-rtsp-server/0001-Don-t-hardcode-libtool-name-when-using-introspection.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-rtsp-server_1.6.2.bb delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0.inc delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0/0001-Fix-crash-with-gst-inspect.patch delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0_1.6.3.bb delete mode 100644 meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0_git.bb (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch deleted file mode 100644 index 2cab87f9e..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 90916f96262fa7b27a0a99788c69f9fd6df11000 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Tue, 24 Nov 2015 16:46:27 +0200 -Subject: [PATCH] introspection.m4: prefix pkgconfig paths with - PKG_CONFIG_SYSROOT_DIR - -We can't use our tweaked introspection.m4 from gobject-introspection tarball -because gstreamer also defines INTROSPECTION_INIT in its introspection.m4, which -is later supplied to g-ir-scanner. - -Upstream-Status: Pending [review on oe-core list] -Signed-off-by: Alexander Kanavin ---- - common/m4/introspection.m4 | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/common/m4/introspection.m4 b/common/m4/introspection.m4 -index 162be57..217a6ae 100644 ---- a/common/m4/introspection.m4 -+++ b/common/m4/introspection.m4 -@@ -54,14 +54,14 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], - INTROSPECTION_GIRDIR= - INTROSPECTION_TYPELIBDIR= - if test "x$found_introspection" = "xyes"; then -- INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` -- INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` -- INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` -+ INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` -+ INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` -+ INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` - INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` - INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" - INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` - INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` -- INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection -+ INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection - INTROSPECTION_INIT="extern void gst_init(gint*,gchar**); gst_init(NULL,NULL);" - fi - AC_SUBST(INTROSPECTION_SCANNER) --- -2.6.2 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/Add-error-signal-emission-for-missing-plugins.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/Add-error-signal-emission-for-missing-plugins.patch deleted file mode 100644 index 712d46daa..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/Add-error-signal-emission-for-missing-plugins.patch +++ /dev/null @@ -1,252 +0,0 @@ -From d64c7edb66f4a64ff49c4306cf77fd269b7079ab Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen -Date: Mon, 16 Mar 2015 13:45:30 +0200 -Subject: [PATCH] Add error signal emission for missing plugins - -Add a missing plugins error signal to gst-player. Note that this error -does not necessarily mean the playback has completely failed, but in -practice the user experience will be bad (think, e.g. of a mp4 file -where H.264 codec is missing: AAC playback still works...). - -Use the signal in gtk-play to show a infobar if plugins are missing. - -Submitted upstream at https://github.com/sdroege/gst-player/pull/11 - -Upstream-Status: Submitted -Signed-off-by: Jussi Kukkonen ---- - configure.ac | 2 +- - gtk/gtk-play.c | 54 +++++++++++++++++++++++++++++++++++++++++++++- - lib/gst/player/gstplayer.c | 22 +++++++++++++++++++ - lib/gst/player/gstplayer.h | 3 ++- - 4 files changed, 78 insertions(+), 3 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 90ab74c..6cdb4eb 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -53,7 +53,7 @@ AC_SUBST(LT_AGE) - PKG_PROG_PKG_CONFIG - - PKG_CHECK_MODULES(GLIB, [glib-2.0 gobject-2.0]) --PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0 >= 1.4 gstreamer-video-1.0 >= 1.4]) -+PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0 >= 1.4 gstreamer-video-1.0 >= 1.4 gstreamer-pbutils-1.0]) - - GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`" - AC_SUBST(GLIB_PREFIX) -diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c -index b92773b..e2b605a 100644 ---- a/gtk/gtk-play.c -+++ b/gtk/gtk-play.c -@@ -30,6 +30,8 @@ typedef struct - GtkWidget *prev_button, *next_button; - GtkWidget *seekbar; - GtkWidget *video_area; -+ GtkWidget *info_label; -+ GtkWidget *info_bar; - GtkWidget *volume_button; - gulong seekbar_value_changed_signal_id; - gboolean playing; -@@ -141,6 +143,13 @@ play_pause_clicked_cb (GtkButton * button, GtkPlay * play) - } - - static void -+clear_missing_plugins (GtkPlay * play) -+{ -+ gtk_label_set_text (GTK_LABEL (play->info_label), ""); -+ gtk_widget_hide (play->info_bar); -+} -+ -+static void - skip_prev_clicked_cb (GtkButton * button, GtkPlay * play) - { - GList *prev; -@@ -155,6 +164,7 @@ skip_prev_clicked_cb (GtkButton * button, GtkPlay * play) - - gtk_widget_set_sensitive (play->next_button, TRUE); - gst_player_set_uri (play->player, prev->data); -+ clear_missing_plugins (play); - gst_player_play (play->player); - set_title (play, prev->data); - gtk_widget_set_sensitive (play->prev_button, g_list_previous (prev) != NULL); -@@ -175,6 +185,7 @@ skip_next_clicked_cb (GtkButton * button, GtkPlay * play) - - gtk_widget_set_sensitive (play->prev_button, TRUE); - gst_player_set_uri (play->player, next->data); -+ clear_missing_plugins (play); - gst_player_play (play->player); - set_title (play, next->data); - gtk_widget_set_sensitive (play->next_button, g_list_next (next) != NULL); -@@ -193,10 +204,16 @@ volume_changed_cb (GtkScaleButton * button, gdouble value, GtkPlay * play) - gst_player_set_volume (play->player, value); - } - -+void -+info_bar_response_cb (GtkInfoBar * bar, gint response, GtkPlay * play) -+{ -+ gtk_widget_hide (GTK_WIDGET (bar)); -+} -+ - static void - create_ui (GtkPlay * play) - { -- GtkWidget *controls, *main_hbox, *main_vbox; -+ GtkWidget *controls, *main_hbox, *main_vbox, *info_bar, *content_area; - - play->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - g_signal_connect (G_OBJECT (play->window), "delete-event", -@@ -208,6 +225,20 @@ create_ui (GtkPlay * play) - g_signal_connect (play->video_area, "realize", - G_CALLBACK (video_area_realize_cb), play); - -+ play->info_bar = gtk_info_bar_new (); -+ gtk_info_bar_set_message_type (GTK_INFO_BAR (play->info_bar), -+ GTK_MESSAGE_WARNING); -+ //gtk_info_bar_set_show_close_button (GTK_INFO_BAR (play->info_bar), -+ // TRUE); -+ gtk_widget_set_no_show_all (play->info_bar, TRUE); -+ g_signal_connect (play->info_bar, "response", -+ G_CALLBACK (info_bar_response_cb), play); -+ -+ content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (play->info_bar)); -+ play->info_label = gtk_label_new (""); -+ gtk_container_add (GTK_CONTAINER (content_area), play->info_label); -+ gtk_widget_show (play->info_label); -+ - /* Unified play/pause button */ - play->play_pause_button = - gtk_button_new_from_icon_name ("media-playback-pause", -@@ -258,6 +289,7 @@ create_ui (GtkPlay * play) - - main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); - gtk_box_pack_start (GTK_BOX (main_vbox), main_hbox, TRUE, TRUE, 0); -+ gtk_box_pack_start (GTK_BOX (main_vbox), play->info_bar, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (main_vbox), controls, FALSE, FALSE, 0); - gtk_container_add (GTK_CONTAINER (play->window), main_vbox); - -@@ -322,6 +354,7 @@ eos_cb (GstPlayer * unused, GtkPlay * play) - gtk_widget_set_sensitive (play->next_button, g_list_next (next) != NULL); - - gst_player_set_uri (play->player, next->data); -+ clear_missing_plugins (play); - gst_player_play (play->player); - set_title (play, next->data); - } else { -@@ -330,6 +363,24 @@ eos_cb (GstPlayer * unused, GtkPlay * play) - } - } - -+static void -+error_cb (GstPlayer * player, GError * err, GtkPlay * play) -+{ -+ char *message; -+ -+ if (g_error_matches (err, gst_player_error_quark (), -+ GST_PLAYER_ERROR_MISSING_PLUGIN)) { -+ // add message to end of any existing message: there may be -+ // multiple missing plugins. -+ message = g_strdup_printf ("%s%s. ", -+ gtk_label_get_text (GTK_LABEL (play->info_label)), err->message); -+ gtk_label_set_text (GTK_LABEL (play->info_label), message); -+ g_free (message); -+ -+ gtk_widget_show (play->info_bar); -+ } -+} -+ - int - main (gint argc, gchar ** argv) - { -@@ -422,6 +473,7 @@ main (gint argc, gchar ** argv) - g_signal_connect (play.player, "video-dimensions-changed", - G_CALLBACK (video_dimensions_changed_cb), &play); - g_signal_connect (play.player, "end-of-stream", G_CALLBACK (eos_cb), &play); -+ g_signal_connect (play.player, "error", G_CALLBACK (error_cb), &play); - - /* We have file(s) that need playing. */ - set_title (&play, g_list_first (play.uris)->data); -diff --git a/lib/gst/player/gstplayer.c b/lib/gst/player/gstplayer.c -index bd682d9..78e7ba1 100644 ---- a/lib/gst/player/gstplayer.c -+++ b/lib/gst/player/gstplayer.c -@@ -47,6 +47,7 @@ - - #include - #include -+#include - - GST_DEBUG_CATEGORY_STATIC (gst_player_debug); - #define GST_CAT_DEFAULT gst_player_debug -@@ -238,6 +239,7 @@ gst_player_class_init (GstPlayerClass * klass) - g_signal_new ("video-dimensions-changed", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS, 0, NULL, - NULL, NULL, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); -+ - } - - static void -@@ -619,6 +621,21 @@ error_cb (GstBus * bus, GstMessage * msg, gpointer user_data) - g_mutex_unlock (&self->priv->lock); - } - -+static void -+element_cb (GstBus * bus, GstMessage * msg, gpointer user_data) -+{ -+ GstPlayer *self = GST_PLAYER (user_data); -+ -+ if (gst_is_missing_plugin_message (msg)) { -+ gchar *desc; -+ -+ desc = gst_missing_plugin_message_get_description (msg); -+ emit_error (self, g_error_new (GST_PLAYER_ERROR, -+ GST_PLAYER_ERROR_MISSING_PLUGIN, "Missing plugin '%s'", desc)); -+ g_free (desc); -+ } -+} -+ - static gboolean - eos_dispatch (gpointer user_data) - { -@@ -1059,6 +1076,8 @@ gst_player_main (gpointer data) - NULL, NULL); - g_source_attach (bus_source, self->priv->context); - -+ g_signal_connect (G_OBJECT (bus), "message::element", -+ G_CALLBACK (element_cb), self); - g_signal_connect (G_OBJECT (bus), "message::error", G_CALLBACK (error_cb), - self); - g_signal_connect (G_OBJECT (bus), "message::eos", G_CALLBACK (eos_cb), self); -@@ -1560,6 +1579,7 @@ gst_player_error_get_type (void) - static gsize id = 0; - static const GEnumValue values[] = { - {C_ENUM (GST_PLAYER_ERROR_FAILED), "GST_PLAYER_ERROR_FAILED", "failed"}, -+ {C_ENUM (GST_PLAYER_ERROR_MISSING_PLUGIN), "GST_PLAYER_ERROR_MISSING_PLUGIN", "missing-plugin"}, - {0, NULL, NULL} - }; - -@@ -1577,6 +1597,8 @@ gst_player_error_get_name (GstPlayerError error) - switch (error) { - case GST_PLAYER_ERROR_FAILED: - return "failed"; -+ case GST_PLAYER_ERROR_MISSING_PLUGIN: -+ return "missing-plugin"; - } - - g_assert_not_reached (); -diff --git a/lib/gst/player/gstplayer.h b/lib/gst/player/gstplayer.h -index c438513..35fb5bb 100644 ---- a/lib/gst/player/gstplayer.h -+++ b/lib/gst/player/gstplayer.h -@@ -44,7 +44,8 @@ GType gst_player_error_get_type (void); - #define GST_TYPE_PLAYER_ERROR (gst_player_error_get_type ()) - - typedef enum { -- GST_PLAYER_ERROR_FAILED = 0 -+ GST_PLAYER_ERROR_FAILED = 0, -+ GST_PLAYER_ERROR_MISSING_PLUGIN - } GstPlayerError; - - const gchar *gst_player_error_get_name (GstPlayerError error); --- -2.1.4 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/Fix-pause-play.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/Fix-pause-play.patch deleted file mode 100644 index 783c42ad7..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/Fix-pause-play.patch +++ /dev/null @@ -1,107 +0,0 @@ -Fix pause/play - -The current player state is now notified via the state-changed signal, -and in the GTK UI it was only used to keep track of the desired state. - -This is a backport of upstream commit 738479c7a0. - -Upstream-Status: Backport -Signed-off-by: Jussi Kukkonen - ---- - gtk/gtk-play.c | 8 ++++++-- - lib/gst/player/gstplayer.c | 12 ------------ - lib/gst/player/gstplayer.h | 2 -- - 3 files changed, 6 insertions(+), 16 deletions(-) - -diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c -index 6e7a098..e2b605a 100644 ---- a/gtk/gtk-play.c -+++ b/gtk/gtk-play.c -@@ -34,6 +34,7 @@ typedef struct - GtkWidget *info_bar; - GtkWidget *volume_button; - gulong seekbar_value_changed_signal_id; -+ gboolean playing; - } GtkPlay; - - /* Compat stubs */ -@@ -118,12 +119,13 @@ play_pause_clicked_cb (GtkButton * button, GtkPlay * play) - { - GtkWidget *image; - -- if (gst_player_is_playing (play->player)) { -+ if (play->playing) { - gst_player_pause (play->player); - image = - gtk_image_new_from_icon_name ("media-playback-start", - GTK_ICON_SIZE_BUTTON); - gtk_button_set_image (GTK_BUTTON (play->play_pause_button), image); -+ play->playing = FALSE; - } else { - gchar *title; - -@@ -136,6 +138,7 @@ play_pause_clicked_cb (GtkButton * button, GtkPlay * play) - title = gst_player_get_uri (play->player); - set_title (play, title); - g_free (title); -+ play->playing = TRUE; - } - } - -@@ -335,7 +338,7 @@ video_dimensions_changed_cb (GstPlayer * unused, gint width, gint height, - static void - eos_cb (GstPlayer * unused, GtkPlay * play) - { -- if (gst_player_is_playing (play->player)) { -+ if (play->playing) { - GList *next = NULL; - gchar *uri; - -@@ -452,6 +455,7 @@ main (gint argc, gchar ** argv) - } - - play.player = gst_player_new (); -+ play.playing = TRUE; - - g_object_set (play.player, "dispatch-to-main-context", TRUE, NULL); - -diff --git a/lib/gst/player/gstplayer.c b/lib/gst/player/gstplayer.c -index 069b284..78e7ba1 100644 ---- a/lib/gst/player/gstplayer.c -+++ b/lib/gst/player/gstplayer.c -@@ -1422,18 +1422,6 @@ gst_player_set_uri (GstPlayer * self, const gchar * val) - g_object_set (self, "uri", val, NULL); - } - --gboolean --gst_player_is_playing (GstPlayer * self) --{ -- gboolean val; -- -- g_return_val_if_fail (GST_IS_PLAYER (self), FALSE); -- -- g_object_get (self, "is-playing", &val, NULL); -- -- return val; --} -- - GstClockTime - gst_player_get_position (GstPlayer * self) - { -diff --git a/lib/gst/player/gstplayer.h b/lib/gst/player/gstplayer.h -index 6933dd7..35fb5bb 100644 ---- a/lib/gst/player/gstplayer.h -+++ b/lib/gst/player/gstplayer.h -@@ -93,8 +93,6 @@ gchar * gst_player_get_uri (GstPlayer * player); - void gst_player_set_uri (GstPlayer * player, - const gchar * uri); - --gboolean gst_player_is_playing (GstPlayer * player); -- - GstClockTime gst_player_get_position (GstPlayer * player); - GstClockTime gst_player_get_duration (GstPlayer * player); - --- -2.1.4 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/filechooser.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/filechooser.patch deleted file mode 100644 index 7bf1b034b..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/filechooser.patch +++ /dev/null @@ -1,54 +0,0 @@ -Upstream-Status: Submitted -Signed-off-by: Ross Burton - -From 43d4b19ab611d844156e26c4840cc54ddb73ae03 Mon Sep 17 00:00:00 2001 -From: Ross Burton -Date: Thu, 26 Feb 2015 17:17:05 +0000 -Subject: [PATCH] gtk-play: show a file chooser if no URIs were passed - ---- - gtk/gtk-play.c | 28 ++++++++++++++++++++++++++-- - 1 file changed, 26 insertions(+), 2 deletions(-) - -diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c -index f015077..9766a72 100644 ---- a/gtk/gtk-play.c -+++ b/gtk/gtk-play.c -@@ -319,8 +319,32 @@ main (gint argc, gchar ** argv) - // FIXME: Add support for playlists and stuff - /* Parse the list of the file names we have to play. */ - if (!file_names) { -- g_print ("Usage: %s FILE(s)|URI(s)\n", APP_NAME); -- return 1; -+ GtkWidget *chooser; -+ int res; -+ -+ chooser = gtk_file_chooser_dialog_new ("Select files to play", NULL, -+ GTK_FILE_CHOOSER_ACTION_OPEN, -+ "_Cancel", GTK_RESPONSE_CANCEL, -+ "_Open", GTK_RESPONSE_ACCEPT, -+ NULL); -+ g_object_set (chooser, -+ "local-only", FALSE, -+ "select-multiple", TRUE, -+ NULL); -+ -+ res = gtk_dialog_run (GTK_DIALOG (chooser)); -+ if (res == GTK_RESPONSE_ACCEPT) { -+ GSList *l; -+ -+ l = gtk_file_chooser_get_uris (GTK_FILE_CHOOSER (chooser)); -+ while (l) { -+ play.uris = g_list_append (play.uris, l->data); -+ l = g_slist_delete_link (l, l); -+ } -+ } else { -+ return 0; -+ } -+ gtk_widget_destroy (chooser); - } else { - guint i; - --- -1.7.10.4 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/gst-player.desktop b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/gst-player.desktop deleted file mode 100644 index 9fd207b38..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/gst-player.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Name=Media Player -Comment=Basic media player -Icon=audio-player -TryExec=gtk-play -Exec=gtk-play -StartupNotify=true -Terminal=false -Type=Application -Categories=GTK;AudioVideo; diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/gtk2.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/gtk2.patch deleted file mode 100644 index 2cd18bbc9..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player/gtk2.patch +++ /dev/null @@ -1,71 +0,0 @@ -As the rest of Sato is GTK+ 2, patch gtk-play to use GTK+ 2. When the rest of -Sato has been ported to GTK+ 3 this patch can be dropped. - -Upstream-Status: Inappropriate -Signed-off-by: Ross Burton - - -diff --git a/configure.ac b/configure.ac -index b8af13b..90ab74c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -60,7 +60,7 @@ AC_SUBST(GLIB_PREFIX) - GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-1.0`" - AC_SUBST(GST_PREFIX) - --PKG_CHECK_MODULES(GTK, [gtk+-3.0], [have_gtk="yes"], [have_gtk="no"]) -+PKG_CHECK_MODULES(GTK, [gtk+-2.0], [have_gtk="yes"], [have_gtk="no"]) - AM_CONDITIONAL(HAVE_GTK, test "x$have_gtk" != "xno") - - GOBJECT_INTROSPECTION_CHECK([1.31.1]) -diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c -index f015077..954d6fb 100644 ---- a/gtk/gtk-play.c -+++ b/gtk/gtk-play.c -@@ -34,6 +34,46 @@ typedef struct - gulong seekbar_value_changed_signal_id; - } GtkPlay; - -+/* Compat stubs */ -+GtkWidget * -+gtk_box_new (GtkOrientation orientation, -+ gint spacing) -+{ -+ switch (orientation) { -+ case GTK_ORIENTATION_HORIZONTAL: -+ return gtk_hbox_new (FALSE, spacing); -+ case GTK_ORIENTATION_VERTICAL: -+ return gtk_vbox_new (FALSE, spacing); -+ } -+} -+ -+GtkWidget* -+gtk_button_new_from_icon_name (const gchar *icon_name, -+ GtkIconSize size) -+{ -+ GtkWidget *button; -+ GtkWidget *image; -+ -+ image = gtk_image_new_from_icon_name (icon_name, size); -+ button = g_object_new (GTK_TYPE_BUTTON, -+ "image", image, -+ NULL); -+ return button; -+} -+ -+GtkWidget * -+gtk_scale_new_with_range (GtkOrientation orientation, -+ gdouble min, -+ gdouble max, -+ gdouble step) -+{ -+ switch (orientation) { -+ case GTK_ORIENTATION_HORIZONTAL: -+ return gtk_hscale_new_with_range (min, max, step); -+ case GTK_ORIENTATION_VERTICAL: -+ return gtk_vscale_new_with_range (min, max, step); -+ } -+} - - static void - set_title (GtkPlay * play, const gchar * title) diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player_git.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player_git.bb deleted file mode 100644 index 8129169c5..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-player_git.bb +++ /dev/null @@ -1,39 +0,0 @@ -SUMMARY = "GStreamer playback helper library and examples" -LICENSE = "LGPL-2.0+" -LIC_FILES_CHKSUM = "file://lib/gst/player/gstplayer.c;beginline=1;endline=19;md5=03aeca9d8295f811817909075a15ff65" - -DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gtk+" - -SRC_URI = "git://github.com/sdroege/gst-player.git \ - file://filechooser.patch \ - file://gtk2.patch \ - file://Fix-pause-play.patch \ - file://Add-error-signal-emission-for-missing-plugins.patch \ - file://gst-player.desktop" - -SRCREV = "5386c5b984d40ef5434673ed62204e69aaf52645" - -S = "${WORKDIR}/git" - -inherit autotools gtk-doc lib_package pkgconfig distro_features_check gobject-introspection - -ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}" - -do_configure_prepend() { - touch ${S}/ChangeLog -} - -EXTRA_OECONF += "ac_cv_path_VALGRIND=no ac_cv_path_GDB=no" - -do_install_append() { - install -m 0644 -D ${WORKDIR}/gst-player.desktop ${D}${datadir}/applications/gst-player.desktop -} - -FILES_${PN}-bin += "${datadir}/applications/*.desktop" - -RDEPENDS_${PN}-bin = "gstreamer1.0-plugins-base-playback" -RRECOMMENDS_${PN}-bin = "gstreamer1.0-plugins-base-meta \ - gstreamer1.0-plugins-good-meta \ - gstreamer1.0-plugins-bad-meta \ - ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-libav", "", d)} \ - ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-plugins-package.inc b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-plugins-package.inc deleted file mode 100644 index c24493e1e..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gst-plugins-package.inc +++ /dev/null @@ -1,56 +0,0 @@ -PACKAGESPLITFUNCS_prepend = " split_gstreamer10_packages " -PACKAGESPLITFUNCS_append = " set_metapkg_rdepends " - -python split_gstreamer10_packages () { - gst_libdir = d.expand('${libdir}/gstreamer-${LIBV}') - postinst = d.getVar('plugin_postinst', True) - glibdir = d.getVar('libdir', True) - - do_split_packages(d, glibdir, '^lib(.*)\.so\.*', 'lib%s', 'gstreamer %s library', extra_depends='', allow_links=True) - do_split_packages(d, gst_libdir, 'libgst(.*)\.so$', d.expand('${PN}-%s'), 'GStreamer plugin for %s', postinst=postinst, extra_depends='') - do_split_packages(d, glibdir+'/girepository-1.0', 'Gst(.*)-1.0\.typelib$', d.expand('${PN}-%s-typelib'), 'GStreamer typelib file for %s', postinst=postinst, extra_depends='') - do_split_packages(d, gst_libdir, 'libgst(.*)\.la$', d.expand('${PN}-%s-dev'), 'GStreamer plugin for %s (development files)', extra_depends='${PN}-dev') - do_split_packages(d, gst_libdir, 'libgst(.*)\.a$', d.expand('${PN}-%s-staticdev'), 'GStreamer plugin for %s (static development files)', extra_depends='${PN}-staticdev') -} - -python set_metapkg_rdepends () { - import os - - pn = d.getVar('PN', True) - metapkg = pn + '-meta' - d.setVar('ALLOW_EMPTY_' + metapkg, "1") - d.setVar('FILES_' + metapkg, "") - blacklist = [ pn, pn + '-locale', pn + '-dev', pn + '-dbg', pn + '-doc', pn + '-meta' ] - metapkg_rdepends = [] - packages = d.getVar('PACKAGES', True).split() - pkgdest = d.getVar('PKGDEST', True) - for pkg in packages[1:]: - if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.count('locale') and not pkg.count('-staticdev'): - # See if the package is empty by looking at the contents of its PKGDEST subdirectory. - # If this subdirectory is empty, then the package is. - # Empty packages do not get added to the meta package's RDEPENDS - pkgdir = os.path.join(pkgdest, pkg) - if os.path.exists(pkgdir): - dir_contents = os.listdir(pkgdir) or [] - else: - dir_contents = [] - is_empty = len(dir_contents) == 0 - if not is_empty: - metapkg_rdepends.append(pkg) - d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends)) - d.setVar('DESCRIPTION_' + metapkg, pn + ' meta package') -} - -# each plugin-dev depends on PN-dev, plugin-staticdev on PN-staticdev -# so we need them even when empty (like in gst-plugins-good case) -ALLOW_EMPTY_${PN} = "1" -ALLOW_EMPTY_${PN}-dev = "1" -ALLOW_EMPTY_${PN}-staticdev = "1" - -PACKAGES += "${PN}-apps ${PN}-meta ${PN}-glib" - -FILES_${PN} = "" -FILES_${PN}-apps = "${bindir}" -FILES_${PN}-glib = "${datadir}/glib-2.0" - -RRECOMMENDS_${PN} += "${PN}-meta" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav.inc b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav.inc deleted file mode 100644 index 363101e1a..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav.inc +++ /dev/null @@ -1,46 +0,0 @@ -SUMMARY = "Libav-based GStreamer 1.x plugin" -HOMEPAGE = "http://gstreamer.freedesktop.org/" -SECTION = "multimedia" - -LICENSE = "GPLv2+ & LGPLv2+ & ( (GPLv2+ & LGPLv2.1+) | (GPLv3+ & LGPLv3+) )" -LICENSE_FLAGS = "commercial" - -DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base zlib bzip2 xz" - -inherit autotools pkgconfig upstream-version-is-even - -# CAUTION: Using the system libav is not recommended. Since the libav API is changing all the time, -# compilation errors (and other, more subtle bugs) can happen. It is usually better to rely on the -# libav copy included in the gst-libav package. -PACKAGECONFIG ??= "orc yasm" - -PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl," -PACKAGECONFIG[libav] = "--with-system-libav,,libav" -PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc" -PACKAGECONFIG[yasm] = "--enable-yasm,--disable-yasm,yasm-native" - -GSTREAMER_1_0_DEBUG ?= "--disable-debug" - -LIBAV_EXTRA_CONFIGURE = "--with-libav-extra-configure" - -LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \ - --cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \ - --ranlib='${RANLIB}' \ - ${GSTREAMER_1_0_DEBUG} \ - --cross-prefix='${HOST_PREFIX}'" - -LIBAV_EXTRA_CONFIGURE_COMMON = \ -'${LIBAV_EXTRA_CONFIGURE}="${LIBAV_EXTRA_CONFIGURE_COMMON_ARG}"' - -EXTRA_OECONF = "${LIBAV_EXTRA_CONFIGURE_COMMON}" - -FILES_${PN} += "${libdir}/gstreamer-1.0/*.so" -FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la" -FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a" - -# http://errors.yoctoproject.org/Errors/Details/20493/ -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" - -# ffmpeg/libav disables PIC on some platforms (e.g. x86-32) -INSANE_SKIP_${PN} = "textrel" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch deleted file mode 100644 index 1d99ad125..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 54bba228ea52d01fd84941d97be23c03f9862b64 Mon Sep 17 00:00:00 2001 -From: Carlos Rafael Giani -Date: Sat, 6 Apr 2013 01:22:22 +0200 -Subject: [PATCH] Disable yasm for libav when --disable-yasm - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Shane Wang -Signed-off-by: Carlos Rafael Giani ---- - configure.ac | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 22ede88..ef3c050 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -305,6 +305,12 @@ else - emblibav_configure_args="$emblibav_configure_args --enable-gpl" - fi - -+ AC_ARG_ENABLE(yasm, -+ [AC_HELP_STRING([--disable-yasm], [disable use of yasm assembler])]) -+ if test "x$enable_yasm" = "xno"; then -+ emblibav_configure_args="$emblibav_configure_args --disable-yasm" -+ fi -+ - # if we are cross-compiling, tell libav so - case $host in - *android*) --- -1.8.2 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch deleted file mode 100644 index 36abf8607..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch +++ /dev/null @@ -1,26 +0,0 @@ -Description: Workaround to build libav for i586 with gcc 4.9.2 by avoiding memset -Author: Bernhard Übelacker - ---- -Bug-Debian: https://bugs.debian.org/783082 -Last-Update: 2015-04-28 - -Upstream-Status: Backport [debian] - -Signed-off-by: Robert Yang - ---- gst-libav-1.4.5.orig/gst-libs/ext/libav/libavcodec/h264_cabac.c -+++ gst-libav-1.4.5/gst-libs/ext/libav/libavcodec/h264_cabac.c -@@ -2020,7 +2020,11 @@ decode_intra_mb: - // In deblocking, the quantizer is 0 - h->cur_pic.qscale_table[mb_xy] = 0; - // All coeffs are present -- memset(h->non_zero_count[mb_xy], 16, 48); -+ /*memset(h->non_zero_count[mb_xy], 16, 48);*/ -+ /* avoiding this memset because it leads at least with gcc4.9.2 to error: 'asm' operand has impossible constraints */ -+ for (size_t i = 0; i < 48; i++) { -+ ( (unsigned char*)(h->non_zero_count[mb_xy]) ) [i] = 16; -+ } - h->cur_pic.mb_type[mb_xy] = mb_type; - sl->last_qscale_diff = 0; - return 0; diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav_1.6.3.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav_1.6.3.bb deleted file mode 100644 index 687230a8f..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav_1.6.3.bb +++ /dev/null @@ -1,20 +0,0 @@ -include gstreamer1.0-libav.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \ - file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \ - file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ - file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ - file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" - -SRC_URI = " \ - http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \ - file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \ - file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \ -" - -SRC_URI[md5sum] = "cfe9a06913d4fd4067e9e47f6e05fac2" -SRC_URI[sha256sum] = "857b9c060a0337de38c6d26238c47352433c02eabf26c2f860c854dbc35bd4ab" - -S = "${WORKDIR}/gst-libav-${PV}" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav_git.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav_git.bb deleted file mode 100644 index ebc8a5ef2..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-libav_git.bb +++ /dev/null @@ -1,38 +0,0 @@ -DEFAULT_PREFERENCE = "-1" - -include gstreamer1.0-libav.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \ - file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \ - file://gst-libs/ext/libav/LICENSE.md;md5=acda96fe91ccaabc9cd9d541806a0d37 \ - file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ - file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ - file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" - -# To build using the system libav/ffmpeg, append "libav" to PACKAGECONFIG -# and remove the ffmpeg sources from SRC_URI below. However, first note the -# warnings in gstreamer1.0-libav.inc -SRC_URI = " \ - git://anongit.freedesktop.org/gstreamer/gst-libav;name=base \ - git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \ - git://source.ffmpeg.org/ffmpeg;destsuffix=git/gst-libs/ext/libav;name=ffmpeg;branch=release/3.0 \ - file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \ - file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \ -" - -PV = "1.7.2+git${SRCPV}" - -UPSTREAM_CHECK_GITTAGREGEX = "(?P(\d+(\.\d+)+))" - -SRCREV_base = "6c4878b6abc916b7f6f25b8926c4859119acf1ec" -SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0" -SRCREV_ffmpeg = "c40983a6f631d22fede713d535bb9c31d5c9740c" -SRCREV_FORMAT = "base" - -S = "${WORKDIR}/git" - -do_configure_prepend() { - ${S}/autogen.sh --noconfigure -} diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-meta-base.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-meta-base.bb deleted file mode 100644 index c542b13f0..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-meta-base.bb +++ /dev/null @@ -1,68 +0,0 @@ -SUMMARY = "Gstreamer1.0 package groups" -LICENSE = "MIT" - -# Due to use of COMBINED_FEATURES -PACKAGE_ARCH = "${MACHINE_ARCH}" - -inherit packagegroup - -COMMERCIAL_PLUGINS = "${COMMERCIAL_AUDIO_PLUGINS} ${COMMERCIAL_VIDEO_PLUGINS}" -DEPENDS_UGLY="${@'gstreamer1.0-plugins-ugly' if 'ugly' in COMMERCIAL_PLUGINS.split('-') else ''}" -DEPENDS_BAD="${@'gstreamer1.0-plugins-bad' if 'bad' in COMMERCIAL_PLUGINS.split('-') else ''}" -DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good ${DEPENDS_UGLY} ${DEPENDS_BAD}" - -PACKAGES = "\ - gstreamer1.0-meta-base \ - gstreamer1.0-meta-x11-base \ - gstreamer1.0-meta-audio \ - gstreamer1.0-meta-debug \ - gstreamer1.0-meta-video" - -ALLOW_EMPTY_gstreamer1.0-meta-base = "1" -ALLOW_EMPTY_gstreamer1.0-meta-x11-base = "1" -ALLOW_EMPTY_gstreamer1.0-meta-audio = "1" -ALLOW_EMPTY_gstreamer1.0-meta-debug = "1" -ALLOW_EMPTY_gstreamer1.0-meta-video = "1" - -RDEPENDS_gstreamer1.0-meta-base = "\ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gstreamer1.0-meta-x11-base', '', d)} \ - gstreamer1.0 \ - gstreamer1.0-plugins-base-playback \ - gstreamer1.0-plugins-base-gio \ - ${@bb.utils.contains('COMBINED_FEATURES', 'alsa', 'gstreamer1.0-plugins-base-alsa', '',d)} \ - gstreamer1.0-plugins-base-volume \ - gstreamer1.0-plugins-base-audioconvert \ - gstreamer1.0-plugins-base-audioresample \ - gstreamer1.0-plugins-base-typefindfunctions \ - gstreamer1.0-plugins-base-videoscale \ - gstreamer1.0-plugins-base-videoconvert \ - gstreamer1.0-plugins-good-autodetect \ - gstreamer1.0-plugins-good-souphttpsrc" - -RRECOMMENDS_gstreamer1.0-meta-x11-base = "\ - gstreamer1.0-plugins-base-ximagesink \ - gstreamer1.0-plugins-base-xvimagesink" - -RDEPENDS_gstreamer1.0-meta-audio = "\ - gstreamer1.0-meta-base \ - gstreamer1.0-plugins-base-vorbis \ - gstreamer1.0-plugins-base-ogg \ - gstreamer1.0-plugins-good-wavparse \ - gstreamer1.0-plugins-good-flac \ - ${COMMERCIAL_AUDIO_PLUGINS}" - -RDEPENDS_gstreamer1.0-meta-debug = "\ - gstreamer1.0-meta-base \ - gstreamer1.0-plugins-good-debug \ - gstreamer1.0-plugins-base-audiotestsrc \ - gstreamer1.0-plugins-base-videotestsrc" - -RDEPENDS_gstreamer1.0-meta-video = "\ - gstreamer1.0-meta-base \ - gstreamer1.0-plugins-good-avi \ - gstreamer1.0-plugins-good-matroska \ - gstreamer1.0-plugins-base-theora \ - ${COMMERCIAL_VIDEO_PLUGINS}" - -RRECOMMENDS_gstreamer1.0-meta-video = "\ - gstreamer1.0-meta-audio" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-omx.inc b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-omx.inc deleted file mode 100644 index 0fff612ee..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-omx.inc +++ /dev/null @@ -1,43 +0,0 @@ -SUMMARY = "OpenMAX IL plugins for GStreamer" -HOMEPAGE = "http://gstreamer.freedesktop.org/" -SECTION = "multimedia" - -LICENSE = "LGPLv2.1" -LICENSE_FLAGS = "commercial" - -DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" - -inherit autotools pkgconfig gettext - -acpaths = "-I ${S}/common/m4 -I ${S}/m4" - -PR = "r1" - -GSTREAMER_1_0_OMX_TARGET ?= "bellagio" -GSTREAMER_1_0_OMX_CORE_NAME ?= "${libdir}/libomxil-bellagio.so.0" - -EXTRA_OECONF += "--disable-valgrind --with-omx-target=${GSTREAMER_1_0_OMX_TARGET}" - -python __anonymous () { - omx_target = d.getVar("GSTREAMER_1_0_OMX_TARGET", True) - if omx_target in ['generic', 'bellagio']: - # Bellagio headers are incomplete (they are missing the OMX_VERSION_MAJOR,# - # OMX_VERSION_MINOR, OMX_VERSION_REVISION, and OMX_VERSION_STEP macros); - # appending a directory path to gst-omx' internal OpenMAX IL headers fixes this - d.appendVar("CFLAGS", " -I${S}/omx/openmax") - elif omx_target == "rpi": - # Dedicated Raspberry Pi OpenMAX IL support makes this package machine specific - d.setVar("PACKAGE_ARCH", d.getVar("MACHINE_ARCH", True)) -} - -set_omx_core_name() { - sed -i -e "s;^core-name=.*;core-name=${GSTREAMER_1_0_OMX_CORE_NAME};" "${D}${sysconfdir}/xdg/gstomx.conf" -} - -do_install[postfuncs] += " set_omx_core_name " - -FILES_${PN} += "${libdir}/gstreamer-1.0/*.so" -FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la" -FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a" - -RDEPENDS_${PN} = "libomxil" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch deleted file mode 100644 index a428ac9c9..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch +++ /dev/null @@ -1,30 +0,0 @@ -From f629e041e9f678fcd86ad764a15117dff63c271c Mon Sep 17 00:00:00 2001 -From: Carlos Rafael Giani -Date: Sat, 27 Apr 2013 02:50:25 +0200 -Subject: [PATCH] omx: fixed type error in printf call - -%zu expects size_t - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=699008] - -Signed-off-by: Carlos Rafael Giani ---- - omx/gstomx.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/omx/gstomx.c b/omx/gstomx.c -index a2945ed..1eca7cc 100644 ---- a/omx/gstomx.c -+++ b/omx/gstomx.c -@@ -1630,7 +1630,7 @@ gst_omx_port_allocate_buffers_unlocked (GstOMXPort * port, - - GST_INFO_OBJECT (comp->parent, - "Allocating %d buffers of size %zu for %s port %u", n, -- port->port_def.nBufferSize, comp->name, (guint) port->index); -+ (size_t) (port->port_def.nBufferSize), comp->name, (guint) port->index); - - if (!port->buffers) - port->buffers = g_ptr_array_sized_new (n); --- -1.7.9.5 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-omx_1.2.0.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-omx_1.2.0.bb deleted file mode 100644 index 74358a724..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-omx_1.2.0.bb +++ /dev/null @@ -1,11 +0,0 @@ -include gstreamer1.0-omx.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ - file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f" - -SRC_URI = "http://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz" - -SRC_URI[md5sum] = "d24e8c0153c35dfefee3e26b1c2c35f8" -SRC_URI[sha256sum] = "0b4874961e6488ad9e5808114bd486ea981c540907262caab1419355fd82d745" - -S = "${WORKDIR}/gst-omx-${PV}" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-omx_git.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-omx_git.bb deleted file mode 100644 index 970554352..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-omx_git.bb +++ /dev/null @@ -1,25 +0,0 @@ -DEFAULT_PREFERENCE = "-1" - -include gstreamer1.0-omx.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ - file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f" - -SRC_URI = " \ - git://anongit.freedesktop.org/gstreamer/gst-omx;branch=master;name=gst-omx \ - git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;branch=master;name=common \ - file://0001-omx-fixed-type-error-in-printf-call.patch \ -" - -SRCREV_gst-omx = "a2db76b048db278ef0aa798e106b7594264e06c0" -SRCREV_common = "5edcd857b2107cd8b78c16232dd10877513ec157" - -SRCREV_FORMAT = "gst-omx" - -S = "${WORKDIR}/git" - -do_configure_prepend() { - cd ${S} - ./autogen.sh --noconfigure - cd ${B} -} diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad.inc b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad.inc deleted file mode 100644 index 9e2b94ede..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad.inc +++ /dev/null @@ -1,148 +0,0 @@ -require gstreamer1.0-plugins.inc - -LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+" - -DEPENDS += "gstreamer1.0-plugins-base libpng jpeg" - -inherit gettext bluetooth - -SRC_URI_append = " \ - file://0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch \ -" - -# opengl packageconfig factored out to make it easy for distros -# and BSP layers to pick either (desktop) opengl, gles2, or no GL -PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2', '', d)}" - -# gtk is not in the PACKAGECONFIG variable by default until -# the transition to gtk+3 is finished -PACKAGECONFIG ??= " \ - ${GSTREAMER_ORC} \ - ${PACKAGECONFIG_GL} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \ - bz2 curl dash dtls hls neon rsvg sbc smoothstreaming sndfile uvch264 webp \ -" - -PACKAGECONFIG[assrender] = "--enable-assrender,--disable-assrender,libass" -PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,${BLUEZ}" -PACKAGECONFIG[bz2] = "--enable-bz2,--disable-bz2,bzip2" -PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl" -PACKAGECONFIG[dash] = "--enable-dash,--disable-dash,libxml2" -PACKAGECONFIG[directfb] = "--enable-directfb,--disable-directfb,directfb" -PACKAGECONFIG[dtls] = "--enable-dtls,--disable-dtls,openssl" -PACKAGECONFIG[faac] = "--enable-faac,--disable-faac,faac" -PACKAGECONFIG[faad] = "--enable-faad,--disable-faad,faad2" -PACKAGECONFIG[flite] = "--enable-flite,--disable-flite,flite-alsa" -PACKAGECONFIG[fluidsynth] = "--enable-fluidsynth,--disable-fluidsynth,fluidsynth" -PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2" -PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3" -PACKAGECONFIG[hls] = "--enable-hls,--disable-hls,nettle" -PACKAGECONFIG[libmms] = "--enable-libmms,--disable-libmms,libmms" -PACKAGECONFIG[libssh2] = "--enable-libssh2,--disable-libssh2,libssh2" -PACKAGECONFIG[modplug] = "--enable-modplug,--disable-modplug,libmodplug" -PACKAGECONFIG[neon] = "--enable-neon,--disable-neon,neon" -PACKAGECONFIG[openal] = "--enable-openal,--disable-openal,openal-soft" -PACKAGECONFIG[opencv] = "--enable-opencv,--disable-opencv,opencv" -PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,virtual/libgl libglu" -PACKAGECONFIG[opus] = "--enable-opus,--disable-opus,libopus" -PACKAGECONFIG[resindvd] = "--enable-resindvd,--disable-resindvd,libdvdread libdvdnav" -PACKAGECONFIG[rsvg] = "--enable-rsvg,--disable-rsvg,librsvg" -PACKAGECONFIG[rtmp] = "--enable-rtmp,--disable-rtmp,rtmpdump" -PACKAGECONFIG[sbc] = "--enable-sbc,--disable-sbc,sbc" -PACKAGECONFIG[schroedinger] = "--enable-schro,--disable-schro,schroedinger" -PACKAGECONFIG[smoothstreaming] = "--enable-smoothstreaming,--disable-smoothstreaming,libxml2" -PACKAGECONFIG[sndfile] = "--enable-sndfile,--disable-sndfile,libsndfile1" -PACKAGECONFIG[srtp] = "--enable-srtp,--disable-srtp,libsrtp" -PACKAGECONFIG[uvch264] = "--enable-uvch264,--disable-uvch264,libusb1 libgudev" -PACKAGECONFIG[voaacenc] = "--enable-voaacenc,--disable-voaacenc,vo-aacenc" -PACKAGECONFIG[voamrwbenc] = "--enable-voamrwbenc,--disable-voamrwbenc,vo-amrwbenc" -PACKAGECONFIG[wayland] = "--enable-wayland --enable-egl,--disable-wayland --disable-egl,wayland virtual/egl" -PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp" - -# these plugins have not been ported to 1.0 (yet): -# apexsink dc1394 lv2 linsys musepack nas timidity teletextdec sdl xvid wininet -# acm gsettings sndio cdxaparse dccp faceoverlay hdvparse tta mve nuvdemux -# patchdetect real sdi videomeasure gsettings - -# these plugins have no corresponding library in OE-core or meta-openembedded: -# openni2 winks direct3d directsound winscreencap -# apple_media android_media avc bs2b chromaprint daala dts gme gsm kate ladspa -# libde265 mimic mpeg2enc mplex ofa openh264 opensles pvr soundtouch spandsp -# spc vdpau wasapi x265 zbar - -# qt5 support is disabled, because it is not present in OE core, and requires more work than -# just adding a packageconfig (it requires access to moc, uic, rcc, and qmake paths). -# This is better done in a separate qt5 layer (which then should add a "qt5" packageconfig -# in a gstreamer1.0-plugins-bad bbappend). - -EXTRA_OECONF += " \ - --enable-decklink \ - --enable-dvb \ - --enable-fbdev \ - --enable-shm \ - --enable-vcd \ - --disable-acm \ - --disable-android_media \ - --disable-apexsink \ - --disable-apple_media \ - --disable-avc \ - --disable-bs2b \ - --disable-chromaprint \ - --disable-cocoa \ - --disable-daala \ - --disable-dc1394 \ - --disable-direct3d \ - --disable-directsound \ - --disable-dts \ - --disable-gme \ - --disable-gsm \ - --disable-kate \ - --disable-ladspa \ - --disable-libde265 \ - --disable-libvisual \ - --disable-linsys \ - --disable-lv2 \ - --disable-mimic \ - --disable-mpeg2enc \ - --disable-mplex \ - --disable-musepack \ - --disable-nas \ - --disable-ofa \ - --disable-openexr \ - --disable-openh264 \ - --disable-openjpeg \ - --disable-openni2 \ - --disable-opensles \ - --disable-pvr \ - --disable-qt \ - --disable-sdl \ - --disable-sdltest \ - --disable-sndio \ - --disable-soundtouch \ - --disable-spandsp \ - --disable-spc \ - --disable-teletextdec \ - --disable-timidity \ - --disable-vdpau \ - --disable-wasapi \ - --disable-wildmidi \ - --disable-wininet \ - --disable-winks \ - --disable-winscreencap \ - --disable-x265 \ - --disable-xvid \ - --disable-zbar \ - ${@bb.utils.contains("TUNE_FEATURES", "mx32", "--disable-yadif", "", d)} \ -" - -export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}" - -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" - -FILES_${PN}-dev += "${libdir}/gstreamer-${LIBV}/include/gst/gl/gstglconfig.h" -FILES_${PN}-freeverb += "${datadir}/gstreamer-${LIBV}/presets/GstFreeverb.prs" -FILES_${PN}-opencv += "${datadir}/gst-plugins-bad/${LIBV}/opencv*" -FILES_${PN}-voamrwbenc += "${datadir}/gstreamer-${LIBV}/presets/GstVoAmrwbEnc.prs" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch deleted file mode 100644 index 154d340e4..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch +++ /dev/null @@ -1,57 +0,0 @@ -From cff6fbf555a072408c21da1e818209c9d3814dd3 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Tue, 27 Oct 2015 14:36:58 +0200 -Subject: [PATCH] Makefile.am: don't hardcode libtool name when running - introspection tools - -Upstream-Status: Pending [review on oe-core list] -Signed-off-by: Alexander Kanavin - ---- - gst-libs/gst/gl/Makefile.am | 2 +- - gst-libs/gst/insertbin/Makefile.am | 2 +- - gst-libs/gst/mpegts/Makefile.am | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am -index f968357..7cc2c7a 100644 ---- a/gst-libs/gst/gl/Makefile.am -+++ b/gst-libs/gst/gl/Makefile.am -@@ -149,7 +149,7 @@ GstGL-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstgl-@GST_API_VERSION@ - --library=libgstgl-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg gstreamer-video-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/insertbin/Makefile.am b/gst-libs/gst/insertbin/Makefile.am -index 09eb97c..b746885 100644 ---- a/gst-libs/gst/insertbin/Makefile.am -+++ b/gst-libs/gst/insertbin/Makefile.am -@@ -43,7 +43,7 @@ GstInsertBin-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstinsertbin-@GS - --library=libgstinsertbin-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg-export gstreamer-insertbin-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/mpegts/Makefile.am b/gst-libs/gst/mpegts/Makefile.am -index 2511d49..c1cbce6 100644 ---- a/gst-libs/gst/mpegts/Makefile.am -+++ b/gst-libs/gst/mpegts/Makefile.am -@@ -78,7 +78,7 @@ GstMpegts-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstmpegts-@GST_API_ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-video-@GST_API_VERSION@` \ - --library=libgstmpegts-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-video-@GST_API_VERSION@ \ - --pkg-export gstreamer-mpegts-@GST_API_VERSION@ \ --- -2.6.2 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/0001-glimagesink-Downrank-to-marginal.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/0001-glimagesink-Downrank-to-marginal.patch deleted file mode 100644 index 1085e95e8..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/0001-glimagesink-Downrank-to-marginal.patch +++ /dev/null @@ -1,32 +0,0 @@ -From c6b37a80806f9128de47f1ccc3f2354f8d436bb6 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Thu, 24 Sep 2015 19:47:32 +0300 -Subject: [PATCH] glimagesink: Downrank to marginal - -On desktop, where there is good OpenGL, xvimagesink will come up first, -on other platforms, OpenGL can't be trusted because it's either software (like -in a VM) or broken (like on embedded)., so let ximagesink come above. - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=751684] - -Signed-off-by: Alexander Kanavin ---- - ext/gl/gstopengl.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c -index a4b2540..0ccaacd 100644 ---- a/ext/gl/gstopengl.c -+++ b/ext/gl/gstopengl.c -@@ -101,7 +101,7 @@ plugin_init (GstPlugin * plugin) - #endif - - if (!gst_element_register (plugin, "glimagesink", -- GST_RANK_SECONDARY, gst_gl_image_sink_bin_get_type ())) { -+ GST_RANK_MARGINAL, gst_gl_image_sink_bin_get_type ())) { - return FALSE; - } - --- -2.1.4 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch deleted file mode 100644 index e81b06570..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch +++ /dev/null @@ -1,27 +0,0 @@ -From a93ca63d01e7cd1e40b5be576992f77fac364bd5 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Mon, 21 Mar 2016 18:21:17 +0200 -Subject: [PATCH] gstreamer-gl.pc.in: don't append GL_CFLAGS to CFLAGS - -Dependencies' include directories should not be added in this way; -it causes problems when cross-compiling in sysroot environments. - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin ---- - pkgconfig/gstreamer-gl.pc.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pkgconfig/gstreamer-gl.pc.in b/pkgconfig/gstreamer-gl.pc.in -index 5589e2a..b986450 100644 ---- a/pkgconfig/gstreamer-gl.pc.in -+++ b/pkgconfig/gstreamer-gl.pc.in -@@ -10,4 +10,4 @@ Version: @VERSION@ - Requires: gstreamer-base-@GST_API_VERSION@ gstreamer-@GST_API_VERSION@ - - Libs: -L${libdir} -lgstgl-@GST_API_VERSION@ @GL_LIBS@ --Cflags: -I${includedir} @GL_CFLAGS@ -+Cflags: -I${includedir} --- -2.7.0 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch deleted file mode 100755 index 3491a15e6..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 95cda7fbcf1a81289d9315c801c8e2b3d896f4cb Mon Sep 17 00:00:00 2001 -From: Haihua Hu -Date: Mon, 30 Nov 2015 09:36:09 +0800 -Subject: [PATCH 2/5] [glplugin] glwindow: fix memory leak of navigation - thread - -When exit navigation thread, call g_thread_join() to release -the resource hold by it. - -Upstream-Status: Backport [1.7.1] - -bugzilla URL: https://bugzilla.gnome.org/show_bug.cgi?id=758820 - -Signed-off-by: Haihua Hu ---- - gst-libs/gst/gl/gstglwindow.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c -index 44b74ca..42ef296 100644 ---- a/gst-libs/gst/gl/gstglwindow.c -+++ b/gst-libs/gst/gl/gstglwindow.c -@@ -343,6 +343,9 @@ gst_gl_window_finalize (GObject * object) - while (window->nav_alive) { - g_cond_wait (&window->nav_destroy_cond, &window->nav_lock); - } -+ /* release resource hold by navigation thread */ -+ g_thread_join(window->priv->navigation_thread); -+ window->priv->navigation_thread = NULL; - g_mutex_unlock (&window->nav_lock); - } - --- -1.7.9.5 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch deleted file mode 100644 index 357fd7800..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 72561a0fca562d03567ace7b4cfc94992cd6525c Mon Sep 17 00:00:00 2001 -From: Andre McCurdy -Date: Wed, 3 Feb 2016 18:05:41 -0800 -Subject: [PATCH] avoid including directly - -musl libc generates warnings if is included directly. - -Upstream-Status: Pending - -Signed-off-by: Andre McCurdy ---- - sys/dvb/gstdvbsrc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c -index b93255f..49f145a 100644 ---- a/sys/dvb/gstdvbsrc.c -+++ b/sys/dvb/gstdvbsrc.c -@@ -93,7 +93,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include --- -1.9.1 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch deleted file mode 100644 index d52afd5d5..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch +++ /dev/null @@ -1,64 +0,0 @@ -From f59c5269f92d59a5296cbfeeb682d42095cd88ad Mon Sep 17 00:00:00 2001 -From: Wenzong Fan -Date: Thu, 18 Sep 2014 02:24:07 -0400 -Subject: [PATCH] gstreamer1.0-plugins-bad: allow to disable libssh2 - -libssh2 is automatically linked to if present, this undetermined -dependency may cause build errors like: - - .../x86_64-poky-linux/4.9.0/ld: cannot find -lssh2 - -libssh2 isn't an oe-core recipe, so allow to disable it from -configure. - -Upstream-Status: Pending - -Signed-off-by: Wenzong Fan ---- - configure.ac | 23 +++++++++++++++++------ - 1 file changed, 17 insertions(+), 6 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 0e95c5c..12153b4 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1901,6 +1901,15 @@ AG_GST_CHECK_FEATURE(CHROMAPRINT, [chromaprint], chromaprint, [ - ]) - - dnl *** Curl *** -+AC_ARG_ENABLE([libssh2], -+ [ --enable-libssh2 enable LIBSSH2 support @<:@default=auto@:>@], -+ [case "${enableval}" in -+ yes) NEED_SSH2=yes ;; -+ no) NEED_SSH2=no ;; -+ auto) NEED_SSH2=auto ;; -+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-libssh2]) ;; -+ esac],[NEED_SSH2=auto]) -+ - translit(dnm, m, l) AM_CONDITIONAL(USE_CURL, true) - AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [ - PKG_CHECK_MODULES(CURL, libcurl >= 7.21.0, [ -@@ -1915,12 +1924,14 @@ AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [ - ]) - AC_SUBST(CURL_CFLAGS) - AC_SUBST(CURL_LIBS) -- PKG_CHECK_MODULES(SSH2, libssh2 >= 1.4.3, [ -- HAVE_SSH2="yes" -- AC_DEFINE(HAVE_SSH2, 1, [Define if libssh2 is available]) -- ], [ -- HAVE_SSH2="no" -- ]) -+ if test "x$NEED_SSH2" != "xno"; then -+ PKG_CHECK_MODULES(SSH2, libssh2 >= 1.4.3, [ -+ HAVE_SSH2="yes" -+ AC_DEFINE(HAVE_SSH2, 1, [Define if libssh2 is available]) -+ ], [ -+ HAVE_SSH2="no" -+ ]) -+ fi - AM_CONDITIONAL(USE_SSH2, test "x$HAVE_SSH2" = "xyes") - AC_SUBST(SSH2_CFLAGS) - AC_SUBST(SSH2_LIBS) --- -1.7.9.5 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch deleted file mode 100644 index 369ff93ac..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 2262ba4b686d5cc0d3e894707fe1d31619a3a8f1 Mon Sep 17 00:00:00 2001 -From: Andre McCurdy -Date: Tue, 9 Feb 2016 14:00:00 -0800 -Subject: [PATCH] ensure valid sentinals for gst_structure_get() etc - -For GStreamer functions declared with G_GNUC_NULL_TERMINATED, -ie __attribute__((__sentinel__)), gcc will generate a warning if the -last parameter passed to the function is not NULL (where a valid NULL -in this context is defined as zero with any pointer type). - -The C callers to such functions within gst-plugins-bad use the C NULL -definition (ie ((void*)0)), which is a valid sentinel. - -However the C++ NULL definition (ie 0L), is not a valid sentinel -without an explicit cast to a pointer type. - -Upstream-Status: Pending - -Signed-off-by: Andre McCurdy ---- - sys/decklink/gstdecklink.cpp | 10 +++++----- - sys/decklink/gstdecklinkaudiosrc.cpp | 2 +- - sys/decklink/gstdecklinkvideosink.cpp | 2 +- - 3 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp -index 64637f1..bac956f 100644 ---- a/sys/decklink/gstdecklink.cpp -+++ b/sys/decklink/gstdecklink.cpp -@@ -324,22 +324,22 @@ gst_decklink_mode_get_structure (GstDecklinkModeEnum e, BMDPixelFormat f) - "height", G_TYPE_INT, mode->height, - "pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d, - "interlace-mode", G_TYPE_STRING, mode->interlaced ? "interleaved" : "progressive", -- "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, NULL); -+ "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, (void *) NULL); - - switch (f) { - case bmdFormat8BitYUV: /* '2vuy' */ - gst_structure_set (s, "format", G_TYPE_STRING, "UYVY", - "colorimetry", G_TYPE_STRING, mode->colorimetry, -- "chroma-site", G_TYPE_STRING, "mpeg2", NULL); -+ "chroma-site", G_TYPE_STRING, "mpeg2", (void *) NULL); - break; - case bmdFormat10BitYUV: /* 'v210' */ -- gst_structure_set (s, "format", G_TYPE_STRING, "v210", NULL); -+ gst_structure_set (s, "format", G_TYPE_STRING, "v210", (void *) NULL); - break; - case bmdFormat8BitARGB: /* 'ARGB' */ -- gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", NULL); -+ gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", (void *) NULL); - break; - case bmdFormat8BitBGRA: /* 'BGRA' */ -- gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", NULL); -+ gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", (void *) NULL); - break; - case bmdFormat10BitRGB: /* 'r210' Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10 */ - case bmdFormat12BitRGB: /* 'R12B' Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component */ -diff --git a/sys/decklink/gstdecklinkaudiosrc.cpp b/sys/decklink/gstdecklinkaudiosrc.cpp -index 9a701ee..26fb7ec 100644 ---- a/sys/decklink/gstdecklinkaudiosrc.cpp -+++ b/sys/decklink/gstdecklinkaudiosrc.cpp -@@ -312,7 +312,7 @@ gst_decklink_audio_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps) - g_mutex_unlock (&self->input->lock); - - if (videosrc) { -- g_object_get (videosrc, "connection", &vconn, NULL); -+ g_object_get (videosrc, "connection", &vconn, (void *) NULL); - gst_object_unref (videosrc); - - switch (vconn) { -diff --git a/sys/decklink/gstdecklinkvideosink.cpp b/sys/decklink/gstdecklinkvideosink.cpp -index eebeff3..da6e486 100644 ---- a/sys/decklink/gstdecklinkvideosink.cpp -+++ b/sys/decklink/gstdecklinkvideosink.cpp -@@ -158,7 +158,7 @@ reset_framerate (GstCapsFeatures * features, GstStructure * structure, - gpointer user_data) - { - gst_structure_set (structure, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, -- G_MAXINT, 1, NULL); -+ G_MAXINT, 1, (void *) NULL); - - return TRUE; - } --- -1.9.1 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch deleted file mode 100644 index 5ce57714e..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch +++ /dev/null @@ -1,28 +0,0 @@ -From a67781000e82bd9ae3813da29401e8c0c852328a Mon Sep 17 00:00:00 2001 -From: Andre McCurdy -Date: Tue, 26 Jan 2016 15:16:01 -0800 -Subject: [PATCH] fix maybe-uninitialized warnings when compiling with -Os - -Upstream-Status: Pending - -Signed-off-by: Andre McCurdy ---- - gst-libs/gst/codecparsers/gstvc1parser.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gst-libs/gst/codecparsers/gstvc1parser.c b/gst-libs/gst/codecparsers/gstvc1parser.c -index fd16ee0..ddb890c 100644 ---- a/gst-libs/gst/codecparsers/gstvc1parser.c -+++ b/gst-libs/gst/codecparsers/gstvc1parser.c -@@ -1729,7 +1729,7 @@ gst_vc1_parse_sequence_layer (const guint8 * data, gsize size, - GstVC1SeqLayer * seqlayer) - { - guint32 tmp; -- guint8 tmp8; -+ guint8 tmp8 = 0; - guint8 structA[8] = { 0, }; - guint8 structB[12] = { 0, }; - GstBitReader br; --- -1.9.1 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad_1.6.3.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad_1.6.3.bb deleted file mode 100644 index 8eb47c265..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad_1.6.3.bb +++ /dev/null @@ -1,28 +0,0 @@ -include gstreamer1.0-plugins-bad.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \ - file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \ - file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50 \ - file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a" - -# Note: The mpg123 plugin was moved to gst-plugins-ugly prior to the 1.7.2 -# release, so this line should be removed during the update to 1.8.x -# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=08d8aefcdaaf89ecb6dd53ec1e4f95cd42d01664 -PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123" - -# Note: The gsettings plug-in was dropped prior to the 1.7.2 release, -# so this line should be removed during the update to 1.8.x -# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=914291808ad10621d6a74031f3d46d45eef5a3a3 -EXTRA_OECONF += "--disable-gsettings" - -SRC_URI = " \ - http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \ - file://configure-allow-to-disable-libssh2.patch \ - file://0001-glimagesink-Downrank-to-marginal.patch \ - file://0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch \ -" - -SRC_URI[md5sum] = "4857adcafe41e4b9b8805cf88303bd55" -SRC_URI[sha256sum] = "971b29101d6a9c5e3fe94d99d977a227f58f0b2d29b6ca2c7f292052542b3a61" - -S = "${WORKDIR}/gst-plugins-bad-${PV}" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad_git.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad_git.bb deleted file mode 100644 index ef6581b2a..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-bad_git.bb +++ /dev/null @@ -1,65 +0,0 @@ -DEFAULT_PREFERENCE = "-1" - -include gstreamer1.0-plugins-bad.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \ - file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \ - file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50 \ - file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a" - -SRC_URI = " \ - git://anongit.freedesktop.org/gstreamer/gst-plugins-bad;name=base \ - git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \ - file://configure-allow-to-disable-libssh2.patch \ - file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \ - file://avoid-including-sys-poll.h-directly.patch \ - file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \ - file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \ -" - -PV = "1.7.2+git${SRCPV}" - -UPSTREAM_CHECK_GITTAGREGEX = "(?P(\d+(\.\d+)+))" - -SRCREV_base = "50ae46cc0f8827bf966920d9c221e5cf86e811ba" -SRCREV_common = "a25397448942079002622be231e9ec49b985745a" -SRCREV_FORMAT = "base" - -S = "${WORKDIR}/git" - -# over-ride the default hls PACKAGECONFIG in gstreamer1.0-plugins-bad.inc to -# pass an additional --with-hls-crypto=XXX option (new in 1.7.x) and switch HLS -# AES decryption from nettle to openssl (ie a shared dependency with dtls). -# This should move back to the common .inc once the main recipe updates to 1.8.x -PACKAGECONFIG[hls] = "--enable-hls --with-hls-crypto=openssl,--disable-hls,openssl" - -# The tinyalsa plugin was added prior to the 1.7.2 release -# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=c8bd74fa9a81398f57d976c478d2043f30188684 -PACKAGECONFIG[tinyalsa] = "--enable-tinyalsa,--disable-tinyalsa,tinyalsa" - -# The vulkan based video sink plugin was added prior to the 1.7.2 release -# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=5de6dd9f40629562acf90e35e1fa58464d66617d -PACKAGECONFIG[vulkan] = "--enable-vulkan,--disable-vulkan,libxcb" - -# The dependency-less netsim plugin was added prior to the 1.7.2 release -# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=e3f9e854f08e82bfab11182c5a2aa6f9a0c73cd5 -EXTRA_OECONF += " \ - --enable-netsim \ -" - -do_configure_prepend() { - ${S}/autogen.sh --noconfigure -} - -# In 1.6.2, the "--enable-hls" configure option generated an installable package -# called "gstreamer1.0-plugins-bad-fragmented". In 1.7.1 that HLS plugin package -# has become "gstreamer1.0-plugins-bad-hls". See: -# http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=efe62292a3d045126654d93239fdf4cc8e48ae08 - -PACKAGESPLITFUNCS_append = " handle_hls_rename " - -python handle_hls_rename () { - d.setVar('RPROVIDES_gstreamer1.0-plugins-bad-hls', 'gstreamer1.0-plugins-bad-fragmented') - d.setVar('RREPLACES_gstreamer1.0-plugins-bad-hls', 'gstreamer1.0-plugins-bad-fragmented') - d.setVar('RCONFLICTS_gstreamer1.0-plugins-bad-hls', 'gstreamer1.0-plugins-bad-fragmented') -} diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base.inc b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base.inc deleted file mode 100644 index 7381458f4..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base.inc +++ /dev/null @@ -1,50 +0,0 @@ -require gstreamer1.0-plugins.inc - -SRC_URI_append = "\ - file://0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch \ - file://0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch \ - file://0003-riff-add-missing-include-directories-when-calling-in.patch \ - file://0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch \ -" - -LICENSE = "GPLv2+ & LGPLv2+" - -DEPENDS += "iso-codes util-linux zlib" - -inherit gettext - -PACKAGES_DYNAMIC =+ "^libgst.*" - -PACKAGECONFIG ??= " \ - ${GSTREAMER_ORC} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ - gio-unix-2.0 ivorbis ogg pango theora vorbis \ -" - -X11DEPENDS = "virtual/libx11 libsm libxrender libxv" -X11ENABLEOPTS = "--enable-x --enable-xvideo --enable-xshm" -X11DISABLEOPTS = "--disable-x --disable-xvideo --disable-xshm" - -PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" -PACKAGECONFIG[cdparanoia] = "--enable-cdparanoia,--disable-cdparanoia,cdparanoia" -PACKAGECONFIG[gio-unix-2.0] = "--enable-gio_unix_2_0,--disable-gio_unix_2_0,glib-2.0" -PACKAGECONFIG[ivorbis] = "--enable-ivorbis,--disable-ivorbis,tremor" -PACKAGECONFIG[ogg] = "--enable-ogg,--disable-ogg,libogg" -PACKAGECONFIG[pango] = "--enable-pango,--disable-pango,pango" -PACKAGECONFIG[theora] = "--enable-theora,--disable-theora,libtheora" -PACKAGECONFIG[visual] = "--enable-libvisual,--disable-libvisual,libvisual" -PACKAGECONFIG[vorbis] = "--enable-vorbis,--disable-vorbis,libvorbis" -PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}" - -EXTRA_OECONF += " \ - --enable-zlib \ -" - -CACHED_CONFIGUREVARS_append_x86 = " ac_cv_header_emmintrin_h=no ac_cv_header_xmmintrin_h=no" - -FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict" - -do_compile_prepend() { - export GIR_EXTRA_LIBS_PATH="${B}/gst-libs/gst/tag/.libs:${B}/gst-libs/gst/video/.libs:${B}/gst-libs/gst/audio/.libs:${B}/gst-libs/gst/rtp/.libs" -} diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch deleted file mode 100644 index 781e4d801..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch +++ /dev/null @@ -1,168 +0,0 @@ -From f1d9652351e7754c63003104eceb526af424c7e0 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Fri, 20 Nov 2015 16:53:04 +0200 -Subject: [PATCH 1/4] Makefile.am: don't hardcode libtool name when running - introspection tools - -Upstream-Status: Pending [review on oe-core maillist] -Signed-off-by: Alexander Kanavin ---- - gst-libs/gst/allocators/Makefile.am | 2 +- - gst-libs/gst/app/Makefile.am | 2 +- - gst-libs/gst/audio/Makefile.am | 2 +- - gst-libs/gst/fft/Makefile.am | 2 +- - gst-libs/gst/pbutils/Makefile.am | 2 +- - gst-libs/gst/riff/Makefile.am | 2 +- - gst-libs/gst/rtp/Makefile.am | 2 +- - gst-libs/gst/rtsp/Makefile.am | 2 +- - gst-libs/gst/sdp/Makefile.am | 2 +- - gst-libs/gst/tag/Makefile.am | 2 +- - gst-libs/gst/video/Makefile.am | 2 +- - 11 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makefile.am -index 9361bf9..bc7f53a 100644 ---- a/gst-libs/gst/allocators/Makefile.am -+++ b/gst-libs/gst/allocators/Makefile.am -@@ -37,7 +37,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstallocators-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg-export gstreamer-allocators-@GST_API_VERSION@ \ - --output $@ \ -diff --git a/gst-libs/gst/app/Makefile.am b/gst-libs/gst/app/Makefile.am -index 6d6de8d..dcc2fe0 100644 ---- a/gst-libs/gst/app/Makefile.am -+++ b/gst-libs/gst/app/Makefile.am -@@ -52,7 +52,7 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO - --library=libgstapp-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg-export gstreamer-app-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am -index 275d222..2374196 100644 ---- a/gst-libs/gst/audio/Makefile.am -+++ b/gst-libs/gst/audio/Makefile.am -@@ -106,7 +106,7 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ - --include=GstTag-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg-export gstreamer-audio-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/fft/Makefile.am b/gst-libs/gst/fft/Makefile.am -index 09b3d68..f545354 100644 ---- a/gst-libs/gst/fft/Makefile.am -+++ b/gst-libs/gst/fft/Makefile.am -@@ -64,7 +64,7 @@ GstFft-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstfft-@GST_API_VERSIO - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstfft-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg-export gstreamer-fft-@GST_API_VERSION@ \ - --output $@ \ -diff --git a/gst-libs/gst/pbutils/Makefile.am b/gst-libs/gst/pbutils/Makefile.am -index 64d5eb0..91dc214 100644 ---- a/gst-libs/gst/pbutils/Makefile.am -+++ b/gst-libs/gst/pbutils/Makefile.am -@@ -94,7 +94,7 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP - --include=GstTag-@GST_API_VERSION@ \ - --include=GstVideo-@GST_API_VERSION@ \ - --include=GstAudio-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-tag-@GST_API_VERSION@ \ - --pkg gstreamer-video-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am -index 83d83cb..3bd8fc0 100644 ---- a/gst-libs/gst/riff/Makefile.am -+++ b/gst-libs/gst/riff/Makefile.am -@@ -47,7 +47,7 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) - # --include=GstAudio-@GST_API_VERSION@ \ - # --include=GstTag-@GST_API_VERSION@ \ - # --include=Gst-@GST_API_VERSION@ \ --# --libtool="$(top_builddir)/libtool" \ -+# --libtool="$(LIBTOOL)" \ - # --pkg gstreamer-@GST_API_VERSION@ \ - # --pkg gstreamer-tag-@GST_API_VERSION@ \ - # --pkg gstreamer-audio-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/rtp/Makefile.am b/gst-libs/gst/rtp/Makefile.am -index fdd01c1..f5445c1 100644 ---- a/gst-libs/gst/rtp/Makefile.am -+++ b/gst-libs/gst/rtp/Makefile.am -@@ -64,7 +64,7 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO - --library=libgstrtp-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg-export gstreamer-rtp-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am -index ede5706..9b0b258 100644 ---- a/gst-libs/gst/rtsp/Makefile.am -+++ b/gst-libs/gst/rtsp/Makefile.am -@@ -71,7 +71,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS - --include=Gio-2.0 \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstSdp-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gio-2.0 \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-sdp-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/sdp/Makefile.am b/gst-libs/gst/sdp/Makefile.am -index a90f30b..0e149b8 100644 ---- a/gst-libs/gst/sdp/Makefile.am -+++ b/gst-libs/gst/sdp/Makefile.am -@@ -31,7 +31,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstsdp-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg-export gstreamer-sdp-@GST_API_VERSION@ \ - --output $@ \ -diff --git a/gst-libs/gst/tag/Makefile.am b/gst-libs/gst/tag/Makefile.am -index c534a4d..cafafd3 100644 ---- a/gst-libs/gst/tag/Makefile.am -+++ b/gst-libs/gst/tag/Makefile.am -@@ -44,7 +44,7 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO - --library=libgsttag-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg-export gstreamer-tag-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am -index 5d31fa1..ac64eb3 100644 ---- a/gst-libs/gst/video/Makefile.am -+++ b/gst-libs/gst/video/Makefile.am -@@ -113,7 +113,7 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE - --library=libgstvideo-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg-export gstreamer-video-@GST_API_VERSION@ \ --- -2.6.2 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch deleted file mode 100644 index 85fcacb55..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch +++ /dev/null @@ -1,298 +0,0 @@ -From 990b653c7b6de1937ec759019982d6c5f15770f7 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Mon, 26 Oct 2015 16:38:18 +0200 -Subject: [PATCH 2/4] Makefile.am: prefix calls to pkg-config with - PKG_CONFIG_SYSROOT_DIR - -Upstream-Status: Pending [review on oe-core maillist] -Signed-off-by: Alexander Kanavin ---- - gst-libs/gst/allocators/Makefile.am | 4 ++-- - gst-libs/gst/app/Makefile.am | 4 ++-- - gst-libs/gst/audio/Makefile.am | 12 ++++++------ - gst-libs/gst/fft/Makefile.am | 4 ++-- - gst-libs/gst/pbutils/Makefile.am | 12 ++++++------ - gst-libs/gst/riff/Makefile.am | 8 ++++---- - gst-libs/gst/rtp/Makefile.am | 8 ++++---- - gst-libs/gst/rtsp/Makefile.am | 4 ++-- - gst-libs/gst/sdp/Makefile.am | 4 ++-- - gst-libs/gst/tag/Makefile.am | 8 ++++---- - gst-libs/gst/video/Makefile.am | 8 ++++---- - 11 files changed, 38 insertions(+), 38 deletions(-) - -diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makefile.am -index bc7f53a..0ef5f86 100644 ---- a/gst-libs/gst/allocators/Makefile.am -+++ b/gst-libs/gst/allocators/Makefile.am -@@ -34,7 +34,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@ - --c-include "gst/allocators/allocators.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstallocators-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --libtool="$(LIBTOOL)" \ -@@ -58,7 +58,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/app/Makefile.am b/gst-libs/gst/app/Makefile.am -index dcc2fe0..dc076cb 100644 ---- a/gst-libs/gst/app/Makefile.am -+++ b/gst-libs/gst/app/Makefile.am -@@ -47,8 +47,8 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO - --c-include "gst/app/app.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --library=libgstapp-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am -index 2374196..295eb42 100644 ---- a/gst-libs/gst/audio/Makefile.am -+++ b/gst-libs/gst/audio/Makefile.am -@@ -96,12 +96,12 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ - --c-include "gst/audio/audio.h" \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --add-include-path="$(top_builddir)/gst-libs/gst/tag/" \ - --library=libgstaudio-@GST_API_VERSION@.la \ -- --library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \ -- --library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \ -+ --library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \ -+ --library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \ - --library-path="$(top_builddir)/gst-libs/gst/tag/" \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -@@ -130,8 +130,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - --includedir=$(srcdir) \ - --includedir=$(builddir) \ - --includedir="$(top_builddir)/gst-libs/gst/tag/" \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/fft/Makefile.am b/gst-libs/gst/fft/Makefile.am -index f545354..1bb6243 100644 ---- a/gst-libs/gst/fft/Makefile.am -+++ b/gst-libs/gst/fft/Makefile.am -@@ -61,7 +61,7 @@ GstFft-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstfft-@GST_API_VERSIO - --c-include "gst/fft/fft.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstfft-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --libtool="$(LIBTOOL)" \ -@@ -85,7 +85,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/pbutils/Makefile.am b/gst-libs/gst/pbutils/Makefile.am -index 91dc214..dc8e1d3 100644 ---- a/gst-libs/gst/pbutils/Makefile.am -+++ b/gst-libs/gst/pbutils/Makefile.am -@@ -79,14 +79,14 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP - --c-include "gst/pbutils/pbutils.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --add-include-path="$(top_builddir)/gst-libs/gst/tag/" \ - --add-include-path="$(top_builddir)/gst-libs/gst/video/" \ - --add-include-path="$(top_builddir)/gst-libs/gst/audio/" \ - --library=libgstpbutils-@GST_API_VERSION@.la \ -- --library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \ -- --library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \ -+ --library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \ -+ --library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \ - --library-path="$(top_builddir)/gst-libs/gst/tag/" \ - --library-path="$(top_builddir)/gst-libs/gst/video/" \ - --library-path="$(top_builddir)/gst-libs/gst/audio/" \ -@@ -119,8 +119,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --includedir="$(top_builddir)/gst-libs/gst/tag/" \ - --includedir="$(top_builddir)/gst-libs/gst/video/" \ - --includedir="$(top_builddir)/gst-libs/gst/audio/" \ -diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am -index 3bd8fc0..0a115cc 100644 ---- a/gst-libs/gst/riff/Makefile.am -+++ b/gst-libs/gst/riff/Makefile.am -@@ -41,8 +41,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) - # --c-include "gst/riff/riff.h" \ - # --add-include-path=$(builddir)/../tag \ - # --add-include-path=$(builddir)/../audio \ --# --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ --# --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+# --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+# --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - # --library=libgstriff-@GST_API_VERSION@.la \ - # --include=GstAudio-@GST_API_VERSION@ \ - # --include=GstTag-@GST_API_VERSION@ \ -@@ -73,8 +73,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) - # --includedir=$(builddir) \ - # --includedir=$(builddir)/../tag \ - # --includedir=$(builddir)/../audio \ --# --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ --# --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+# --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+# --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - # $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - # - #CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/rtp/Makefile.am b/gst-libs/gst/rtp/Makefile.am -index f5445c1..527c0b4 100644 ---- a/gst-libs/gst/rtp/Makefile.am -+++ b/gst-libs/gst/rtp/Makefile.am -@@ -59,8 +59,8 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO - --c-include "gst/rtp/rtp.h" \ - -I$(top_builddir)/gst-libs \ - -I$(top_srcdir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --library=libgstrtp-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -@@ -87,8 +87,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am -index 9b0b258..4f6d9f8 100644 ---- a/gst-libs/gst/rtsp/Makefile.am -+++ b/gst-libs/gst/rtsp/Makefile.am -@@ -66,7 +66,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS - -I$(top_builddir)/gst-libs \ - -I$(top_srcdir)/gst-libs \ - --add-include-path=$(builddir)/../sdp \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstrtsp-@GST_API_VERSION@.la \ - --include=Gio-2.0 \ - --include=Gst-@GST_API_VERSION@ \ -@@ -96,7 +96,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - --includedir=$(srcdir) \ - --includedir=$(builddir) \ - --includedir=$(builddir)/../sdp \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/sdp/Makefile.am b/gst-libs/gst/sdp/Makefile.am -index 0e149b8..9aa0512 100644 ---- a/gst-libs/gst/sdp/Makefile.am -+++ b/gst-libs/gst/sdp/Makefile.am -@@ -28,7 +28,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO - --warn-all \ - --c-include "gst/sdp/sdp.h" \ - -I$(top_srcdir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstsdp-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --libtool="$(LIBTOOL)" \ -@@ -52,7 +52,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/tag/Makefile.am b/gst-libs/gst/tag/Makefile.am -index cafafd3..ba99279 100644 ---- a/gst-libs/gst/tag/Makefile.am -+++ b/gst-libs/gst/tag/Makefile.am -@@ -39,8 +39,8 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO - --c-include "gst/tag/tag.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --library=libgsttag-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -@@ -67,8 +67,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am -index ac64eb3..342c8c6 100644 ---- a/gst-libs/gst/video/Makefile.am -+++ b/gst-libs/gst/video/Makefile.am -@@ -108,8 +108,8 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE - --c-include "gst/video/video.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --library=libgstvideo-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -@@ -136,8 +136,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA) --- -2.6.2 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch deleted file mode 100644 index 9b66f7f49..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 3c2c2d5dd08aa30ed0e8acd8566ec99412bb8209 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Mon, 26 Oct 2015 17:29:37 +0200 -Subject: [PATCH 3/4] riff: add missing include directories when calling - introspection scanner - -Upstream-Status: Pending [review on oe-core maillist] -Signed-off-by: Alexander Kanavin ---- - gst-libs/gst/riff/Makefile.am | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am -index 0a115cc..5057a58 100644 ---- a/gst-libs/gst/riff/Makefile.am -+++ b/gst-libs/gst/riff/Makefile.am -@@ -39,6 +39,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) - # --strip-prefix=Gst \ - # --warn-all \ - # --c-include "gst/riff/riff.h" \ -+# -I$(top_srcdir)/gst-libs \ -+# -I$(top_builddir)/gst-libs \ - # --add-include-path=$(builddir)/../tag \ - # --add-include-path=$(builddir)/../audio \ - # --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ --- -2.6.2 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch deleted file mode 100644 index 9fbebd570..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch +++ /dev/null @@ -1,225 +0,0 @@ -From be6163cfa3a255493f9d75bad9541cbfe1723fee Mon Sep 17 00:00:00 2001 -From: Mingke Wang -Date: Thu, 19 Mar 2015 14:17:10 +0800 -Subject: [PATCH 3/4] ssaparse: enhance SSA text lines parsing. - -some parser will pass in the original ssa text line which starts with "Dialog:" -and there's are maybe multiple Dialog lines in one input buffer. - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747496] - -Signed-off-by: Mingke Wang - -diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c -old mode 100644 -new mode 100755 -index 06ecef9..0ab5dce ---- a/gst/subparse/gstssaparse.c -+++ b/gst/subparse/gstssaparse.c -@@ -260,6 +260,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) - * gst_ssa_parse_push_line: - * @parse: caller element - * @txt: text to push -+ * @size: text size need to be parse - * @start: timestamp for the buffer - * @duration: duration for the buffer - * -@@ -269,27 +270,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) - * Returns: result of the push of the created buffer - */ - static GstFlowReturn --gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, -+gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, gint size, - GstClockTime start, GstClockTime duration) - { - GstFlowReturn ret; - GstBuffer *buf; -- gchar *t, *escaped; -+ gchar *t, *text, *p, *escaped, *p_start, *p_end; - gint num, i, len; -+ GstClockTime start_time = G_MAXUINT64, end_time = 0; - -- num = atoi (txt); -- GST_LOG_OBJECT (parse, "Parsing line #%d at %" GST_TIME_FORMAT, -- num, GST_TIME_ARGS (start)); -- -- /* skip all non-text fields before the actual text */ -+ p = text = g_malloc(size + 1); -+ *p = '\0'; - t = txt; -- for (i = 0; i < 8; ++i) { -- t = strchr (t, ','); -+ -+ /* there are may have multiple dialogue lines at a time */ -+ while (*t) { -+ /* ignore leading white space characters */ -+ while (isspace(*t)) -+ t++; -+ -+ /* ignore Format: and Style: lines */ -+ if (strncmp(t, "Format:", 7) == 0 || strncmp(t, "Style:", 6) == 0) { -+ while (*t != '\0' && *t != '\n') { -+ t++; -+ } -+ } -+ -+ if (*t == '\0') -+ break; -+ -+ /* continue with next line */ -+ if (*t == '\n') { -+ t++; -+ continue; -+ } -+ -+ if(strncmp(t, "Dialogue:", 9) != 0) { -+ /* not started with "Dialogue:", it must be a line trimmed by demuxer */ -+ num = atoi (t); -+ GST_LOG_OBJECT (parse, "Parsing line #%d at %" GST_TIME_FORMAT, -+ num, GST_TIME_ARGS (start)); -+ -+ /* skip all non-text fields before the actual text */ -+ for (i = 0; i < 8; ++i) { -+ t = strchr (t, ','); -+ if (t == NULL) -+ break; -+ ++t; -+ } -+ } else { -+ /* started with "Dialogue:", update timestamp and duration */ -+ /* time format are like Dialog:Mark,0:00:01.02,0:00:03.04,xx,xxx,... */ -+ guint hour, min, sec, msec, len; -+ GstClockTime tmp; -+ gchar t_str[12] = {0}; -+ -+ /* find the first ',' */ -+ p_start = strchr (t, ','); -+ if (p_start) -+ p_end = strchr (++p_start, ','); -+ -+ if (p_start && p_end) { -+ /* copy text between first ',' and second ',' */ -+ strncpy(t_str, p_start, p_end - p_start); -+ if (sscanf (t_str, "%u:%u:%u.%u", &hour, &min, &sec, &msec) == 4) { -+ tmp = ((hour*3600) + (min*60) + sec) * GST_SECOND + msec*GST_MSECOND; -+ GST_DEBUG_OBJECT (parse, "Get start time:%02d:%02d:%02d:%03d\n", -+ hour, min, sec, msec); -+ if (start_time > tmp) -+ start_time = tmp; -+ } else { -+ GST_WARNING_OBJECT (parse, -+ "failed to parse ssa start timestamp string :%s", t_str); -+ } -+ -+ p_start = p_end; -+ p_end = strchr (++p_start, ','); -+ if (p_end) { -+ /* copy text between second ',' and third ',' */ -+ strncpy(t_str, p_start, p_end - p_start); -+ if (sscanf (t_str, "%u:%u:%u.%u", &hour, &min, &sec, &msec) == 4) { -+ tmp = ((hour*3600) + (min*60) + sec)*GST_SECOND + msec*GST_MSECOND; -+ GST_DEBUG_OBJECT(parse, "Get end time:%02d:%02d:%02d:%03d\n", -+ hour, min, sec, msec); -+ if (end_time < tmp) -+ end_time = tmp; -+ } else { -+ GST_WARNING_OBJECT (parse, -+ "failed to parse ssa end timestamp string :%s", t_str); -+ } -+ } -+ } -+ -+ /* now skip all non-text fields before the actual text */ -+ for (i = 0; i <= 8; ++i) { -+ t = strchr (t, ','); -+ if (t == NULL) -+ break; -+ ++t; -+ } -+ } -+ -+ /* line end before expected number of ',', not a Dialogue line */ - if (t == NULL) -- return GST_FLOW_ERROR; -- ++t; -+ break; -+ -+ /* if not the first line, and the last character of previous line is '\0', -+ * then replace it with '\N' */ -+ if (p != text && *p == '\0') { -+ *p++ = '\\'; -+ *p++ = 'N'; -+ } -+ -+ /* copy all actual text of this line */ -+ while ((*t != '\0') && (*t != '\n')) -+ *p++ = *t++; -+ -+ /* add a terminator at the end */ -+ *p = '\0'; -+ } -+ -+ /* not valid text found in this buffer return OK to let caller unref buffer */ -+ if (strlen(text) <= 0) { -+ GST_WARNING_OBJECT (parse, "Not valid text found in this buffer\n"); -+ return GST_FLOW_ERROR; - } - -+ t = text; - GST_LOG_OBJECT (parse, "Text : %s", t); - - if (gst_ssa_parse_remove_override_codes (parse, t)) { -@@ -307,13 +414,22 @@ gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, - gst_buffer_fill (buf, 0, escaped, len + 1); - gst_buffer_set_size (buf, len); - g_free (escaped); -+ g_free(t); -+ -+ if (start_time != G_MAXUINT64) -+ GST_BUFFER_TIMESTAMP (buf) = start_time; -+ else -+ GST_BUFFER_TIMESTAMP (buf) = start; - -- GST_BUFFER_TIMESTAMP (buf) = start; -- GST_BUFFER_DURATION (buf) = duration; -+ if (end_time > start_time) -+ GST_BUFFER_DURATION (buf) = end_time - start_time; -+ else -+ GST_BUFFER_DURATION (buf) = duration; - - GST_LOG_OBJECT (parse, "Pushing buffer with timestamp %" GST_TIME_FORMAT -- " and duration %" GST_TIME_FORMAT, GST_TIME_ARGS (start), -- GST_TIME_ARGS (duration)); -+ " and duration %" GST_TIME_FORMAT, -+ GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), -+ GST_TIME_ARGS (GST_BUFFER_DURATION (buf))); - - ret = gst_pad_push (parse->srcpad, buf); - -@@ -333,6 +449,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) - GstClockTime ts; - gchar *txt; - GstMapInfo map; -+ gint size; - - if (G_UNLIKELY (!parse->framed)) - goto not_framed; -@@ -350,13 +467,14 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) - /* make double-sure it's 0-terminated and all */ - gst_buffer_map (buf, &map, GST_MAP_READ); - txt = g_strndup ((gchar *) map.data, map.size); -+ size = map.size; - gst_buffer_unmap (buf, &map); - - if (txt == NULL) - goto empty_text; - - ts = GST_BUFFER_TIMESTAMP (buf); -- ret = gst_ssa_parse_push_line (parse, txt, ts, GST_BUFFER_DURATION (buf)); -+ ret = gst_ssa_parse_push_line (parse, txt, size, ts, GST_BUFFER_DURATION (buf)); - - if (ret != GST_FLOW_OK && GST_CLOCK_TIME_IS_VALID (ts)) { - GstSegment segment; --- -1.7.9.5 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch deleted file mode 100644 index 42d99c1db..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 4330915d88dc4dd46eb4c28d756482b767c2747f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Mon, 26 Oct 2015 17:30:14 +0200 -Subject: [PATCH 4/4] rtsp: drop incorrect reference to gstreamer-sdp in - Makefile.am - -Upstream-Status: Pending [review on oe-core maillist] -Signed-off-by: Alexander Kanavin ---- - gst-libs/gst/rtsp/Makefile.am | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am -index 4f6d9f8..0afa370 100644 ---- a/gst-libs/gst/rtsp/Makefile.am -+++ b/gst-libs/gst/rtsp/Makefile.am -@@ -74,7 +74,6 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS - --libtool="$(LIBTOOL)" \ - --pkg gio-2.0 \ - --pkg gstreamer-@GST_API_VERSION@ \ -- --pkg gstreamer-sdp-@GST_API_VERSION@ \ - --pkg-export gstreamer-rtsp-@GST_API_VERSION@ \ - --add-init-section="$(INTROSPECTION_INIT)" \ - --output $@ \ --- -2.6.2 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch deleted file mode 100644 index 7813915d8..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch +++ /dev/null @@ -1,69 +0,0 @@ -From ed09c8fd2c9c2b5384b72cc70af3728be6694e64 Mon Sep 17 00:00:00 2001 -From: Mingke Wang -Date: Thu, 19 Mar 2015 14:20:26 +0800 -Subject: [PATCH 4/4] subparse: set need_segment after sink pad received - GST_EVENT_SEGMENT - -subparse works in push mode, chain funciton will be called once -up stream element finished the seeking and flushing. -if set need_segment flag in src pad event handler, the segment -event will be pushed earlier, result in the subtitle text will -be send out to down stream from the beginning. - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747498] - -Signed-off-by: Mingke Wang - -diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c -old mode 100644 -new mode 100755 -index b565e93..7741ccc ---- a/gst/subparse/gstsubparse.c -+++ b/gst/subparse/gstsubparse.c -@@ -266,22 +266,20 @@ gst_sub_parse_src_event (GstPad * pad, GstObject * parent, GstEvent * event) - goto beach; - } - -+ /* Apply the seek to our segment */ -+ gst_segment_do_seek (&self->segment, rate, format, flags, -+ start_type, start, stop_type, stop, &update); -+ -+ GST_DEBUG_OBJECT (self, "segment after seek: %" GST_SEGMENT_FORMAT, -+ &self->segment); -+ - /* Convert that seek to a seeking in bytes at position 0, - FIXME: could use an index */ - ret = gst_pad_push_event (self->sinkpad, - gst_event_new_seek (rate, GST_FORMAT_BYTES, flags, - GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_NONE, 0)); - -- if (ret) { -- /* Apply the seek to our segment */ -- gst_segment_do_seek (&self->segment, rate, format, flags, -- start_type, start, stop_type, stop, &update); -- -- GST_DEBUG_OBJECT (self, "segment after seek: %" GST_SEGMENT_FORMAT, -- &self->segment); -- -- self->need_segment = TRUE; -- } else { -+ if (!ret) { - GST_WARNING_OBJECT (self, "seek to 0 bytes failed"); - } - -@@ -1632,8 +1630,10 @@ gst_sub_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) - gst_event_parse_segment (event, &s); - if (s->format == GST_FORMAT_TIME) - gst_event_copy_segment (event, &self->segment); -- GST_DEBUG_OBJECT (self, "newsegment (%s)", -- gst_format_get_name (self->segment.format)); -+ GST_DEBUG_OBJECT (self, "newsegment (%s) %" GST_SEGMENT_FORMAT, -+ gst_format_get_name (self->segment.format), &self->segment); -+ -+ self->need_segment = TRUE; - - /* if not time format, we'll either start with a 0 timestamp anyway or - * it's following a seek in which case we'll have saved the requested --- -1.7.9.5 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch deleted file mode 100755 index 096a6f4cb..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch +++ /dev/null @@ -1,143 +0,0 @@ -From 5be6ed00aad028d9cbb4e0c63af0be69d335c71e Mon Sep 17 00:00:00 2001 -From: Song Bing -Date: Fri, 11 Dec 2015 21:42:00 +0800 -Subject: [PATCH] convertframe: Support video crop when convert frame - -Get thumbnail will user convertframe to convert video frame to -desired video format and size. But haven't process crop meta on -the video buffer. Add support video crop. - -https://bugzilla.gnome.org/show_bug.cgi?id=759329 - -Upstream-Status: Backport [1.7.1] - ---- - gst-libs/gst/video/convertframe.c | 65 +++++++++++++++++++++++++++++++++------ - 1 file changed, 56 insertions(+), 9 deletions(-) - -diff --git a/gst-libs/gst/video/convertframe.c b/gst-libs/gst/video/convertframe.c -index aa9c3d3..942a51e 100644 ---- a/gst-libs/gst/video/convertframe.c -+++ b/gst-libs/gst/video/convertframe.c -@@ -110,12 +110,23 @@ fail: - static GstElement * - build_convert_frame_pipeline (GstElement ** src_element, - GstElement ** sink_element, const GstCaps * from_caps, -- const GstCaps * to_caps, GError ** err) -+ GstVideoCropMeta * cmeta, const GstCaps * to_caps, GError ** err) - { -- GstElement *src = NULL, *csp = NULL, *vscale = NULL; -- GstElement *sink = NULL, *encoder = NULL, *pipeline; -+ GstElement *vcrop = NULL, *csp = NULL, *csp2 = NULL, *vscale = NULL; -+ GstElement *src = NULL, *sink = NULL, *encoder = NULL, *pipeline; -+ GstVideoInfo info; - GError *error = NULL; - -+ if (cmeta) { -+ if (!create_element ("videocrop", &vcrop, &error)) { -+ g_warning -+ ("build_convert_frame_pipeline: Buffer has crop metadata but videocrop element is not found. Cropping will be disabled"); -+ } else { -+ if (!create_element ("videoconvert", &csp2, &error)) -+ goto no_elements; -+ } -+ } -+ - /* videoscale is here to correct for the pixel-aspect-ratio for us */ - GST_DEBUG ("creating elements"); - if (!create_element ("appsrc", &src, &error) || -@@ -133,15 +144,42 @@ build_convert_frame_pipeline (GstElement ** src_element, - - GST_DEBUG ("adding elements"); - gst_bin_add_many (GST_BIN (pipeline), src, csp, vscale, sink, NULL); -+ if (vcrop) -+ gst_bin_add_many (GST_BIN (pipeline), vcrop, csp2, NULL); - - /* set caps */ - g_object_set (src, "caps", from_caps, NULL); -+ if (vcrop) { -+ gst_video_info_from_caps (&info, from_caps); -+ g_object_set (vcrop, "left", cmeta->x, NULL); -+ g_object_set (vcrop, "top", cmeta->y, NULL); -+ g_object_set (vcrop, "right", GST_VIDEO_INFO_WIDTH (&info) - cmeta->width, -+ NULL); -+ g_object_set (vcrop, "bottom", -+ GST_VIDEO_INFO_HEIGHT (&info) - cmeta->height, NULL); -+ GST_DEBUG ("crop meta [x,y,width,height]: %d %d %d %d", cmeta->x, cmeta->y, -+ cmeta->width, cmeta->height); -+ } - g_object_set (sink, "caps", to_caps, NULL); - - /* FIXME: linking is still way too expensive, profile this properly */ -- GST_DEBUG ("linking src->csp"); -- if (!gst_element_link_pads (src, "src", csp, "sink")) -- goto link_failed; -+ if (vcrop) { -+ GST_DEBUG ("linking src->csp2"); -+ if (!gst_element_link_pads (src, "src", csp2, "sink")) -+ goto link_failed; -+ -+ GST_DEBUG ("linking csp2->vcrop"); -+ if (!gst_element_link_pads (csp2, "src", vcrop, "sink")) -+ goto link_failed; -+ -+ GST_DEBUG ("linking vcrop->csp"); -+ if (!gst_element_link_pads (vcrop, "src", csp, "sink")) -+ goto link_failed; -+ } else { -+ GST_DEBUG ("linking src->csp"); -+ if (!gst_element_link_pads (src, "src", csp, "sink")) -+ goto link_failed; -+ } - - GST_DEBUG ("linking csp->vscale"); - if (!gst_element_link_pads_full (csp, "src", vscale, "sink", -@@ -193,8 +231,12 @@ no_elements: - { - if (src) - gst_object_unref (src); -+ if (vcrop) -+ gst_object_unref (vcrop); - if (csp) - gst_object_unref (csp); -+ if (csp2) -+ gst_object_unref (csp2); - if (vscale) - gst_object_unref (vscale); - if (sink) -@@ -209,7 +251,11 @@ no_elements: - no_pipeline: - { - gst_object_unref (src); -+ if (vcrop) -+ gst_object_unref (vcrop); - gst_object_unref (csp); -+ if (csp2) -+ gst_object_unref (csp2); - gst_object_unref (vscale); - gst_object_unref (sink); - -@@ -282,7 +328,8 @@ gst_video_convert_sample (GstSample * sample, const GstCaps * to_caps, - } - - pipeline = -- build_convert_frame_pipeline (&src, &sink, from_caps, to_caps_copy, &err); -+ build_convert_frame_pipeline (&src, &sink, from_caps, -+ gst_buffer_get_video_crop_meta (buf), to_caps_copy, &err); - if (!pipeline) - goto no_pipeline; - -@@ -646,8 +693,8 @@ gst_video_convert_sample_async (GstSample * sample, - } - - pipeline = -- build_convert_frame_pipeline (&src, &sink, from_caps, to_caps_copy, -- &error); -+ build_convert_frame_pipeline (&src, &sink, from_caps, -+ gst_buffer_get_video_crop_meta (buf), to_caps_copy, &error); - if (!pipeline) - goto no_pipeline; - --- -2.5.0 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch deleted file mode 100644 index 325671721..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 540e02c92c75e08b90326863dc787fa5cadf9da6 Mon Sep 17 00:00:00 2001 -From: Song Bing -Date: Fri, 13 Mar 2015 18:04:31 +0800 -Subject: [PATCH] encodebin: Need more buffers in output queue for better - performance - -Need more buffers in output queue for better performance - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=744191] - -Signed-off-by: Song Bing ---- - gst/encoding/gstencodebin.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c -index 6728e58..32daae4 100644 ---- a/gst/encoding/gstencodebin.c -+++ b/gst/encoding/gstencodebin.c -@@ -1138,8 +1138,7 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof, - * We only use a 1buffer long queue here, the actual queueing will be done - * in the input queue */ - last = sgroup->outqueue = gst_element_factory_make ("queue", NULL); -- g_object_set (sgroup->outqueue, "max-size-buffers", (guint32) 1, -- "max-size-bytes", (guint32) 0, "max-size-time", (guint64) 0, -+ g_object_set (sgroup->outqueue, "max-size-time", (guint64) 0, - "silent", TRUE, NULL); - - gst_bin_add (GST_BIN (ebin), sgroup->outqueue); --- -1.7.9.5 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch deleted file mode 100644 index 284abbe94..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch +++ /dev/null @@ -1,44 +0,0 @@ -From af0dac26f62aaceb4bf266720911953793e0fc5d Mon Sep 17 00:00:00 2001 -From: zhouming -Date: Wed, 14 May 2014 10:16:20 +0800 -Subject: [PATCH] ENGR00312515: get caps from src pad when query caps - -https://bugzilla.gnome.org/show_bug.cgi?id=728312 - -Upstream-Status: Pending - -Signed-off-by: zhouming ---- - gst-libs/gst/tag/gsttagdemux.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - mode change 100644 => 100755 gst-libs/gst/tag/gsttagdemux.c - -diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c -old mode 100644 -new mode 100755 -index 9b6c478..ae2294a ---- a/gst-libs/gst/tag/gsttagdemux.c -+++ b/gst-libs/gst/tag/gsttagdemux.c -@@ -1708,6 +1708,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query) - } - break; - } -+ case GST_QUERY_CAPS: -+ { -+ -+ /* We can hijack caps query if we typefind already */ -+ if (demux->priv->src_caps) { -+ gst_query_set_caps_result (query, demux->priv->src_caps); -+ res = TRUE; -+ } else { -+ res = gst_pad_query_default (pad, parent, query); -+ } -+ break; -+ } -+ - default: - res = gst_pad_query_default (pad, parent, query); - break; --- -1.7.9.5 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch deleted file mode 100644 index 01e944ddd..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 10d2a977ee1d469f0bf9059bb2d0b55fd2eecbac Mon Sep 17 00:00:00 2001 -From: Andre McCurdy -Date: Wed, 20 Jan 2016 13:00:00 -0800 -Subject: [PATCH] make gio_unix_2_0 dependency configurable - -Prior to 1.7.1, gst-plugins-base accepted a configure option to -disable gio_unix_2_0, however it was implemented incorrectly using -AG_GST_CHECK_FEATURE. That was fixed in 1.7.1 by making the -dependency unconditional. - - http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=aadefefba88afe4acbe64454650f24e7ce7c8d70 - -To make builds deterministic, re-instate support for ---disable-gio_unix_2_0, but implement it using the AC_ARG_ENABLE -instead of AG_GST_CHECK_FEATURE. - -Upstream-Status: Pending - -Signed-off-by: Andre McCurdy ---- - configure.ac | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 9c52aeb..26cacd6 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -747,9 +747,16 @@ AC_SUBST(FT2_CFLAGS) - AC_SUBST(FT2_LIBS) - - dnl *** gio-unix-2.0 for tests/check/pipelines/tcp.c *** -+AC_ARG_ENABLE([gio_unix_2_0], -+ [AS_HELP_STRING([--disable-gio_unix_2_0],[disable use of gio_unix_2_0])], -+ [], -+ [enable_gio_unix_2_0=yes]) -+ -+if test "x${enable_gio_unix_2_0}" != "xno"; then - PKG_CHECK_MODULES(GIO_UNIX_2_0, gio-unix-2.0 >= 2.24, - HAVE_GIO_UNIX_2_0="yes", - HAVE_GIO_UNIX_2_0="no") -+fi - AM_CONDITIONAL(USE_GIO_UNIX_2_0, test "x$HAVE_GIO_UNIX_2_0" = "xyes") - - dnl *** finalize CFLAGS, LDFLAGS, LIBS --- -1.9.1 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base_1.6.3.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base_1.6.3.bb deleted file mode 100644 index 429dc9338..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base_1.6.3.bb +++ /dev/null @@ -1,25 +0,0 @@ -include gstreamer1.0-plugins-base.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \ - file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \ - file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607" - -# Note: The dependency on freetype was dropped shortly after the 1.7.1 release -# so these lines should be removed during the update to 1.8.x -# http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=183610c035dd6955c9b3540b940aec50474af031 -DEPENDS += "freetype" -EXTRA_OECONF += "--disable-freetypetest" - -SRC_URI = " \ - http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \ - file://get-caps-from-src-pad-when-query-caps.patch \ - file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \ - file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \ - file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \ - file://0005-convertframe-Support-video-crop-when-convert-frame.patch \ -" - -SRC_URI[md5sum] = "3ddde0ad598ef69f58d6a2e87f8b460f" -SRC_URI[sha256sum] = "b6154f8fdba4877e95efd94610ef0ada4f0171cd12eb829a3c3c97345d9c7a75" - -S = "${WORKDIR}/gst-plugins-base-${PV}" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base_git.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base_git.bb deleted file mode 100644 index 38a9fcc29..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-base_git.bb +++ /dev/null @@ -1,27 +0,0 @@ -DEFAULT_PREFERENCE = "-1" - -include gstreamer1.0-plugins-base.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \ - file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \ - file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607" - -SRC_URI = " \ - git://anongit.freedesktop.org/gstreamer/gst-plugins-base;name=base \ - git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \ - file://make-gio_unix_2_0-dependency-configurable.patch \ -" - -PV = "1.7.2+git${SRCPV}" - -UPSTREAM_CHECK_GITTAGREGEX = "(?P(\d+(\.\d+)+))" - -SRCREV_base = "97e108bebaa58821f4566a74cbf0135e93407c01" -SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0" -SRCREV_FORMAT = "base" - -S = "${WORKDIR}/git" - -do_configure_prepend() { - ${S}/autogen.sh --noconfigure -} diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good.inc b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good.inc deleted file mode 100644 index 4621bf894..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good.inc +++ /dev/null @@ -1,53 +0,0 @@ -require gstreamer1.0-plugins.inc - -LICENSE = "GPLv2+ & LGPLv2.1+" - -DEPENDS += "gstreamer1.0-plugins-base libcap zlib bzip2" - -inherit gettext - -PACKAGECONFIG ??= " \ - ${GSTREAMER_ORC} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ - cairo flac gdk-pixbuf gudev jpeg libpng soup speex taglib v4l2 \ -" - -X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage" - -PACKAGECONFIG[cairo] = "--enable-cairo,--disable-cairo,cairo" -PACKAGECONFIG[dv1394] = "--enable-dv1394,--disable-dv1394,libiec61883 libavc1394 libraw1394" -PACKAGECONFIG[flac] = "--enable-flac,--disable-flac,flac" -PACKAGECONFIG[gdk-pixbuf] = "--enable-gdk_pixbuf,--disable-gdk_pixbuf,gdk-pixbuf" -PACKAGECONFIG[gudev] = "--with-gudev,--without-gudev,libgudev" -PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" -PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg" -PACKAGECONFIG[libpng] = "--enable-libpng,--disable-libpng,libpng" -PACKAGECONFIG[libv4l2] = "--with-libv4l2,--without-libv4l2,libv4l2" -PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio" -PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4" -PACKAGECONFIG[speex] = "--enable-speex,--disable-speex,speex" -PACKAGECONFIG[taglib] = "--enable-taglib,--disable-taglib,taglib" -PACKAGECONFIG[v4l2] = "--enable-gst_v4l2,--disable-gst_v4l2" -PACKAGECONFIG[vpx] = "--enable-vpx,--disable-vpx,libvpx" -PACKAGECONFIG[wavpack] = "--enable-wavpack,--disable-wavpack,wavpack" -PACKAGECONFIG[x11] = "--enable-x,--disable-x,${X11DEPENDS}" - -EXTRA_OECONF += " \ - --enable-bz2 \ - --enable-oss \ - --enable-zlib \ - --disable-aalib \ - --disable-aalibtest \ - --disable-directsound \ - --disable-libcaca \ - --disable-libdv \ - --disable-oss4 \ - --disable-osx_audio \ - --disable-osx_video \ - --disable-shout2 \ - --disable-sunaudio \ - --disable-waveform \ -" - -FILES_${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch deleted file mode 100755 index d1973d439..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch +++ /dev/null @@ -1,62 +0,0 @@ -From c782a30482908a4b4dd9cd4abff9f9bc4016698f Mon Sep 17 00:00:00 2001 -From: Song Bing -Date: Tue, 5 Aug 2014 14:40:46 +0800 -Subject: [PATCH] gstrtpmp4gpay: set dafault value for MPEG4 without codec - data in caps. - -https://bugzilla.gnome.org/show_bug.cgi?id=734263 - -Upstream-Status: Submitted - -Signed-off-by: Song Bing ---- - gst/rtp/gstrtpmp4gpay.c | 19 ++++++++++++++++++- - 1 file changed, 18 insertions(+), 1 deletion(-) - -diff --git a/gst/rtp/gstrtpmp4gpay.c b/gst/rtp/gstrtpmp4gpay.c -index 7913d9a..1749d39 100644 ---- a/gst/rtp/gstrtpmp4gpay.c -+++ b/gst/rtp/gstrtpmp4gpay.c -@@ -390,6 +390,7 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps) - const GValue *codec_data; - const gchar *media_type = NULL; - gboolean res; -+ const gchar *name; - - rtpmp4gpay = GST_RTP_MP4G_PAY (payload); - -@@ -400,7 +401,6 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps) - GST_LOG_OBJECT (rtpmp4gpay, "got codec_data"); - if (G_VALUE_TYPE (codec_data) == GST_TYPE_BUFFER) { - GstBuffer *buffer; -- const gchar *name; - - buffer = gst_value_get_buffer (codec_data); - GST_LOG_OBJECT (rtpmp4gpay, "configuring codec_data"); -@@ -426,6 +426,23 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps) - - rtpmp4gpay->config = gst_buffer_copy (buffer); - } -+ } else { -+ name = gst_structure_get_name (structure); -+ -+ if (!strcmp (name, "video/mpeg")) { -+ rtpmp4gpay->profile = g_strdup ("1"); -+ -+ /* fixed rate */ -+ rtpmp4gpay->rate = 90000; -+ /* video stream type */ -+ rtpmp4gpay->streamtype = "4"; -+ /* no params for video */ -+ rtpmp4gpay->params = NULL; -+ /* mode */ -+ rtpmp4gpay->mode = "generic"; -+ -+ media_type = "video"; -+ } - } - if (media_type == NULL) - goto config_failed; --- -1.7.9.5 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good/avoid-including-sys-poll.h-directly.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good/avoid-including-sys-poll.h-directly.patch deleted file mode 100644 index c7f3630ec..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good/avoid-including-sys-poll.h-directly.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 4bfe2c8570a4a7080ec662504882969054d8a072 Mon Sep 17 00:00:00 2001 -From: Andre McCurdy -Date: Wed, 3 Feb 2016 18:12:38 -0800 -Subject: [PATCH] avoid including directly - -musl libc generates warnings if is included directly. - -Upstream-Status: Pending - -Signed-off-by: Andre McCurdy ---- - ext/raw1394/gstdv1394src.c | 2 +- - ext/raw1394/gsthdv1394src.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/ext/raw1394/gstdv1394src.c b/ext/raw1394/gstdv1394src.c -index dbc7607..3c42b41 100644 ---- a/ext/raw1394/gstdv1394src.c -+++ b/ext/raw1394/gstdv1394src.c -@@ -37,7 +37,7 @@ - #include "config.h" - #endif - #include --#include -+#include - #include - #include - #include -diff --git a/ext/raw1394/gsthdv1394src.c b/ext/raw1394/gsthdv1394src.c -index 0b07a37..9785a15 100644 ---- a/ext/raw1394/gsthdv1394src.c -+++ b/ext/raw1394/gsthdv1394src.c -@@ -36,7 +36,7 @@ - #include "config.h" - #endif - #include --#include -+#include - #include - #include - #include --- -1.9.1 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch deleted file mode 100644 index bc7ac0b6a..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 2169f2205c0205a220d826d7573e5a863bd36e0a Mon Sep 17 00:00:00 2001 -From: Andre McCurdy -Date: Tue, 9 Feb 2016 14:00:00 -0800 -Subject: [PATCH] ensure valid sentinal for gst_structure_get() - -gst_structure_get() is declared with G_GNUC_NULL_TERMINATED, ie -__attribute__((__sentinel__)), which means gcc will generate a -warning if the last parameter passed to the function is not NULL -(where a valid NULL in this context is defined as zero with any -pointer type). - -The C code callers to gst_structure_get() within gst-plugins-good -use the C NULL definition (ie ((void*)0)), which is a valid sentinel. - -However gstid3v2mux.cc uses the C++ NULL definition (ie 0L), which -is not a valid sentinel without an explicit cast to a pointer type. - -Upstream-Status: Pending - -Signed-off-by: Andre McCurdy ---- - ext/taglib/gstid3v2mux.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ext/taglib/gstid3v2mux.cc b/ext/taglib/gstid3v2mux.cc -index 8651e77..a87234f 100644 ---- a/ext/taglib/gstid3v2mux.cc -+++ b/ext/taglib/gstid3v2mux.cc -@@ -465,7 +465,7 @@ add_image_tag (ID3v2::Tag * id3v2tag, const GstTagList * list, - - if (info_struct) { - if (gst_structure_get (info_struct, "image-type", -- GST_TYPE_TAG_IMAGE_TYPE, &image_type, NULL)) { -+ GST_TYPE_TAG_IMAGE_TYPE, &image_type, (void *) NULL)) { - if (image_type > 0 && image_type <= 18) { - image_type += 2; - } else { --- -1.9.1 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good_1.6.3.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good_1.6.3.bb deleted file mode 100644 index 0b4f43690..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good_1.6.3.bb +++ /dev/null @@ -1,15 +0,0 @@ -include gstreamer1.0-plugins-good.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \ - file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe" - -SRC_URI = " \ - http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \ - file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \ -" - -SRC_URI[md5sum] = "a1958df7aa498b42793e2f2048673815" -SRC_URI[sha256sum] = "24b19db70b2a83461ebddfe20033db432dadfdb5d4b54ffb1dfa0d830134a177" - -S = "${WORKDIR}/gst-plugins-good-${PV}" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good_git.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good_git.bb deleted file mode 100644 index 9cadc9afc..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-good_git.bb +++ /dev/null @@ -1,28 +0,0 @@ -DEFAULT_PREFERENCE = "-1" - -include gstreamer1.0-plugins-good.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \ - file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe" - -SRC_URI = " \ - git://anongit.freedesktop.org/gstreamer/gst-plugins-good;name=base \ - git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \ - file://avoid-including-sys-poll.h-directly.patch \ - file://ensure-valid-sentinel-for-gst_structure_get.patch \ -" - -PV = "1.7.2+git${SRCPV}" - -UPSTREAM_CHECK_GITTAGREGEX = "(?P(\d+(\.\d+)+))" - -SRCREV_base = "1b6fdce67c15d59957e395b1957aa625322092d4" -SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0" -SRCREV_FORMAT = "base" - -S = "${WORKDIR}/git" - -do_configure_prepend() { - ${S}/autogen.sh --noconfigure -} diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-ugly.inc b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-ugly.inc deleted file mode 100644 index aff223072..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-ugly.inc +++ /dev/null @@ -1,31 +0,0 @@ -require gstreamer1.0-plugins.inc - -LICENSE = "GPLv2+ & LGPLv2.1+ & LGPLv2+" -LICENSE_FLAGS = "commercial" - -DEPENDS += "gstreamer1.0-plugins-base libid3tag" - -inherit gettext - -PACKAGECONFIG ??= " \ - ${GSTREAMER_ORC} \ - a52dec lame mad mpeg2dec \ -" - -PACKAGECONFIG[a52dec] = "--enable-a52dec,--disable-a52dec,liba52" -PACKAGECONFIG[amrnb] = "--enable-amrnb,--disable-amrnb,opencore-amr" -PACKAGECONFIG[amrwb] = "--enable-amrwb,--disable-amrwb,opencore-amr" -PACKAGECONFIG[cdio] = "--enable-cdio,--disable-cdio,libcdio" -PACKAGECONFIG[dvdread] = "--enable-dvdread,--disable-dvdread,libdvdread" -PACKAGECONFIG[lame] = "--enable-lame,--disable-lame,lame" -PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad" -PACKAGECONFIG[mpeg2dec] = "--enable-mpeg2dec,--disable-mpeg2dec,mpeg2dec" -PACKAGECONFIG[x264] = "--enable-x264,--disable-x264,x264" - -EXTRA_OECONF += " \ - --disable-sidplay \ - --disable-twolame \ -" - -FILES_${PN}-amrnb += "${datadir}/gstreamer-1.0/presets/GstAmrnbEnc.prs" -FILES_${PN}-x264 += "${datadir}/gstreamer-1.0/presets/GstX264Enc.prs" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-ugly_1.6.3.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-ugly_1.6.3.bb deleted file mode 100644 index 7edfb81d2..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-ugly_1.6.3.bb +++ /dev/null @@ -1,13 +0,0 @@ -include gstreamer1.0-plugins-ugly.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068" - -SRC_URI = " \ - http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \ -" - -SRC_URI[md5sum] = "dbd92afb3816cbfa90ab1f197144a2e2" -SRC_URI[sha256sum] = "2fecf7b7c7882f8f62f1900048f4013f98c214fb3d3303d8d812245bb41fd064" - -S = "${WORKDIR}/gst-plugins-ugly-${PV}" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-ugly_git.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-ugly_git.bb deleted file mode 100644 index 69afe4cfb..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins-ugly_git.bb +++ /dev/null @@ -1,41 +0,0 @@ -DEFAULT_PREFERENCE = "-1" - -include gstreamer1.0-plugins-ugly.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068" - -SRC_URI = " \ - git://anongit.freedesktop.org/gstreamer/gst-plugins-ugly;name=base \ - git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \ -" - -PV = "1.7.2+git${SRCPV}" - -UPSTREAM_CHECK_GITTAGREGEX = "(?P(\d+(\.\d+)+))" - -SRCREV_base = "8bdb68edbc605e21314b608e7a39bdbaab7302b8" -SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0" -SRCREV_FORMAT = "base" - -S = "${WORKDIR}/git" - -# The mpg123 plugin was added prior to the 1.7.2 release -# https://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/commit/?id=43bd45ba991ef3247957ca37cdcb52f4b8c0acb1 -PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123" - -do_configure_prepend() { - ${S}/autogen.sh --noconfigure -} - -# In 1.7.2, the mpg123 plugin was moved from -bad to -ugly -# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=08d8aefcdaaf89ecb6dd53ec1e4f95cd42d01664 -# https://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/commit/?id=43bd45ba991ef3247957ca37cdcb52f4b8c0acb1 - -PACKAGESPLITFUNCS_append = " handle_mpg123_rename " - -python handle_mpg123_rename () { - d.setVar('RPROVIDES_gstreamer1.0-plugins-ugly-mpg123', 'gstreamer1.0-plugins-bad-mpg123') - d.setVar('RREPLACES_gstreamer1.0-plugins-ugly-mpg123', 'gstreamer1.0-plugins-bad-mpg123') - d.setVar('RCONFLICTS_gstreamer1.0-plugins-ugly-mpg123', 'gstreamer1.0-plugins-bad-mpg123') -} diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins.inc b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins.inc deleted file mode 100644 index 2dcec509d..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-plugins.inc +++ /dev/null @@ -1,40 +0,0 @@ -SUMMARY = "Plugins for the GStreamer multimedia framework 1.x" -HOMEPAGE = "http://gstreamer.freedesktop.org/" -BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer" -SECTION = "multimedia" - -DEPENDS = "gstreamer1.0 glib-2.0-native" - -inherit autotools pkgconfig upstream-version-is-even gobject-introspection - -acpaths = "-I ${S}/common/m4 -I ${S}/m4" - -LIBV = "1.0" -require gst-plugins-package.inc - -# Orc enables runtime JIT compilation of data processing routines from Orc -# bytecode to SIMD instructions for various architectures (currently SSE, MMX, -# MIPS, Altivec and NEON are supported). - -GSTREAMER_ORC ?= "orc" - -PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" -PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc orc-native" -PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind" - -export ORCC = "${STAGING_DIR_NATIVE}${bindir}/orcc" - -EXTRA_OECONF = " \ - --disable-examples \ -" - -SRC_URI_append = " file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch" - -delete_pkg_m4_file() { - # This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection - rm "${S}/common/m4/pkg.m4" || true -} - -do_configure[prefuncs] += " delete_pkg_m4_file" - -PACKAGES_DYNAMIC = "^${PN}-.*" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-rtsp-server.inc b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-rtsp-server.inc deleted file mode 100644 index ae6d36477..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-rtsp-server.inc +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "A library on top of GStreamer for building an RTSP server" -HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/" -SECTION = "multimedia" -LICENSE = "LGPLv2" - -DEPENDS = "gstreamer1.0 libcgroup gstreamer1.0-plugins-base" - -PNREAL = "gst-rtsp-server" - -SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz \ - file://0001-Don-t-hardcode-libtool-name-when-using-introspection.patch \ - file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch" - -S = "${WORKDIR}/${PNREAL}-${PV}" - -inherit autotools pkgconfig upstream-version-is-even gobject-introspection - -delete_pkg_m4_file() { - # This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection - rm "${S}/common/m4/pkg.m4" || true -} - -do_configure[prefuncs] += " delete_pkg_m4_file" - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-rtsp-server/0001-Don-t-hardcode-libtool-name-when-using-introspection.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-rtsp-server/0001-Don-t-hardcode-libtool-name-when-using-introspection.patch deleted file mode 100644 index 89d6384ad..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-rtsp-server/0001-Don-t-hardcode-libtool-name-when-using-introspection.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 4a12569e5ae5be63cd92a9b178860026a99746b1 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Tue, 27 Oct 2015 16:55:45 +0200 -Subject: [PATCH] Don't hardcode libtool name when using introspection - -Upstream-Status: Pending [review on oe-core maillist] -Signed-off-by: Alexander Kanavin ---- - gst/rtsp-server/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gst/rtsp-server/Makefile.am b/gst/rtsp-server/Makefile.am -index 4fcd366..c67f5ab 100644 ---- a/gst/rtsp-server/Makefile.am -+++ b/gst/rtsp-server/Makefile.am -@@ -87,7 +87,7 @@ GstRtspServer-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtspserver-@ - --include=Gst-@GST_API_VERSION@ \ - --include=GstRtsp-@GST_API_VERSION@ \ - --include=GstNet-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-rtsp-@GST_API_VERSION@ \ - --pkg gstreamer-net-@GST_API_VERSION@ \ --- -2.1.4 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-rtsp-server_1.6.2.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-rtsp-server_1.6.2.bb deleted file mode 100644 index 5bdae6cf9..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0-rtsp-server_1.6.2.bb +++ /dev/null @@ -1,6 +0,0 @@ -include gstreamer1.0-rtsp-server.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d" - -SRC_URI[md5sum] = "a1cafefb5fc14ac5d7e7d8cdbdfa9694" -SRC_URI[sha256sum] = "0f51f9879556c0950203c766b09a1b62f1f25b17f9a7d516e01b13ecf93c8858" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0.inc b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0.inc deleted file mode 100644 index 10b4668e5..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0.inc +++ /dev/null @@ -1,58 +0,0 @@ -SUMMARY = "GStreamer 1.0 multimedia framework" -DESCRIPTION = "GStreamer is a multimedia framework for encoding and decoding video and sound. \ -It supports a wide range of formats including mp3, ogg, avi, mpeg and quicktime." -HOMEPAGE = "http://gstreamer.freedesktop.org/" -BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer" -SECTION = "multimedia" -LICENSE = "LGPLv2+" - -DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native" - -inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection - -# This way common/m4/introspection.m4 will come first -# (it has a custom INTROSPECTION_INIT macro, and so must be used instead of our common introspection.m4 file) -acpaths = "-I ${S}/common/m4 -I ${S}/m4" - -SRC_URI_append = " \ - file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ -" - -PACKAGECONFIG ??= "" - -PACKAGECONFIG[check] = "--enable-check,--disable-check" -PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" -PACKAGECONFIG[tests] = "--enable-tests,--disable-tests" -PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind," - -EXTRA_OECONF = " \ - --disable-dependency-tracking \ - --disable-docbook \ - --disable-examples \ - --disable-gtk-doc \ -" - -CACHED_CONFIGUREVARS += "ac_cv_header_valgrind_valgrind_h=no" - -# musl libc generates warnings if is included directly -CACHED_CONFIGUREVARS += "ac_cv_header_sys_poll_h=no" - -PACKAGES += "${PN}-bash-completion" - -FILES_${PN} += "${libdir}/gstreamer-1.0/*.so" -FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la ${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include" -FILES_${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*" - -RRECOMMENDS_${PN}_qemux86 += "kernel-module-snd-ens1370 kernel-module-snd-rawmidi" -RRECOMMENDS_${PN}_qemux86-64 += "kernel-module-snd-ens1370 kernel-module-snd-rawmidi" - -delete_pkg_m4_file() { - # This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection - rm "${S}/common/m4/pkg.m4" || true -} - -do_configure[prefuncs] += " delete_pkg_m4_file" - -do_compile_prepend() { - export GIR_EXTRA_LIBS_PATH="${B}/gst/.libs:${B}/libs/gst/base/.libs" -} diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0/0001-Fix-crash-with-gst-inspect.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0/0001-Fix-crash-with-gst-inspect.patch deleted file mode 100644 index 94f5cc56e..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0/0001-Fix-crash-with-gst-inspect.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 6b26f3dbf9bf577d71534ab7410de66d06e46ba2 Mon Sep 17 00:00:00 2001 -From: Carlos Rafael Giani -Date: Sat, 6 Apr 2013 23:52:11 +0200 -Subject: [PATCH] Fix crash with gst-inspect Chris Lord - -Upstream-Status: Pending - -Signed-off-by: Carlos Rafael Giani ---- - tools/gst-inspect.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c -index 23b7c44..b79b02e 100644 ---- a/tools/gst-inspect.c -+++ b/tools/gst-inspect.c -@@ -1556,7 +1556,7 @@ main (int argc, char *argv[]) - g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE); - g_option_context_add_group (ctx, gst_init_get_option_group ()); - if (!g_option_context_parse (ctx, &argc, &argv, &err)) { -- g_printerr ("Error initializing: %s\n", err->message); -+ g_printerr ("Error initializing: %s\n", err ? err->message : "(null)"); - return -1; - } - g_option_context_free (ctx); --- -1.8.2 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0_1.6.3.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0_1.6.3.bb deleted file mode 100644 index ba1b83b08..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0_1.6.3.bb +++ /dev/null @@ -1,14 +0,0 @@ -include gstreamer1.0.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ - file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d" - -SRC_URI = " \ - http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \ - file://0001-Fix-crash-with-gst-inspect.patch \ -" - -SRC_URI[md5sum] = "b4cdeb2b9cb20dd6ac022a4f417eae0d" -SRC_URI[sha256sum] = "22f9568d67b87cf700a111f381144bd37cb93790a77e4e331db01fe854a37f24" - -S = "${WORKDIR}/gstreamer-${PV}" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0_git.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0_git.bb deleted file mode 100644 index 7715bb202..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-backport/gstreamer_bp_krogoth/gstreamer1.0_git.bb +++ /dev/null @@ -1,30 +0,0 @@ -DEFAULT_PREFERENCE = "-1" - -include gstreamer1.0.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ - file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d" - -SRC_URI = " \ - git://anongit.freedesktop.org/gstreamer/gstreamer;name=base \ - git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \ -" - -PV = "1.7.2+git${SRCPV}" - -UPSTREAM_CHECK_GITTAGREGEX = "(?P(\d+(\.\d+)+))" - -SRCREV_base = "9e33bfa2c7a5f43da2c49b0a8235fd43cba9feaf" -SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0" -SRCREV_FORMAT = "base" - -S = "${WORKDIR}/git" - -# The option to configure tracer hooks was added prior to the 1.7.2 release -# https://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=e5ca47236e4df4683707f0bcf99181a937d358d5 -PACKAGECONFIG[gst-tracer-hooks] = "--enable-gst-tracer-hooks,--disable-gst-tracer-hooks," -PACKAGECONFIG[trace-historic] = "--enable-trace,--disable-trace," - -do_configure_prepend() { - ${S}/autogen.sh --noconfigure -} -- cgit 1.2.3-korg From c9ce37905acd879db107eafe309678053073e086 Mon Sep 17 00:00:00 2001 From: ronan Date: Tue, 13 Feb 2018 14:53:45 +0100 Subject: Update ulcb conf file Change-Id: I2c68a132e315a61117a6d6709bafbff58dff8847 Signed-off-by: ronan --- meta-agl-bsp/conf/include/agl_h3ulcb.inc | 15 +++++---------- meta-agl-bsp/conf/include/agl_m3ulcb.inc | 11 ----------- 2 files changed, 5 insertions(+), 21 deletions(-) (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/conf/include/agl_h3ulcb.inc b/meta-agl-bsp/conf/include/agl_h3ulcb.inc index f384bcbe3..e2ebd85c6 100644 --- a/meta-agl-bsp/conf/include/agl_h3ulcb.inc +++ b/meta-agl-bsp/conf/include/agl_h3ulcb.inc @@ -1,5 +1,8 @@ SOC_FAMILY = "r8a7795" +# Enable AGL virtualization features +MACHINE_FEATURES_append = " agl-egvirt" + # for Wayland/Weston weston-laucher DISTRO_FEATURES_append = " pam" @@ -16,21 +19,14 @@ PREFERRED_PROVIDER_virtual/mesa = "mesa" PREFERRED_PROVIDER_libgbm = "libgbm" PREFERRED_RPROVIDER_libgbm-dev = "libgbm" +PREFERRED_RPROVIDER_libomxil = "omx-user-module" + # Mask the gstreamer recipe for MMP BBMASK = "meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" # Add for gstreamer plugins ugly LICENSE_FLAGS_WHITELIST = "commercial" -PREFERRED_VERSION_gstreamer1.0 = "1.6.3" -PREFERRED_VERSION_gstreamer1.0-libav = "1.6.3" -PREFERRED_VERSION_gstreamer1.0-plugins-base = "1.6.3" -PREFERRED_VERSION_gstreamer1.0-plugins-bad = "1.6.3" -PREFERRED_VERSION_gstreamer1.0-plugins-good = "1.6.3" -PREFERRED_VERSION_gstreamer1.0-plugins-ugly = "1.6.3" -PREFERRED_VERSION_gstreamer1.0-plugins-vspfilter = "1.0%" - -PREFERRED_VERSION_gstreamer1.0-omx ?= "1.2.0" MACHINE_FEATURES_append = " multimedia" @@ -50,7 +46,6 @@ IMAGE_INSTALL_append_rcar-gen3 = " \ omx-user-module \ " -BBMASK .= "|meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-forward-port/" OSTREE_BOOTLOADER ?= "u-boot" WKS_FILE = "singlepart-noloader.wks" diff --git a/meta-agl-bsp/conf/include/agl_m3ulcb.inc b/meta-agl-bsp/conf/include/agl_m3ulcb.inc index 7644e0b69..cce7dbd5e 100644 --- a/meta-agl-bsp/conf/include/agl_m3ulcb.inc +++ b/meta-agl-bsp/conf/include/agl_m3ulcb.inc @@ -27,15 +27,6 @@ BBMASK = "meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" # Add for gstreamer plugins ugly LICENSE_FLAGS_WHITELIST = "commercial" -PREFERRED_VERSION_gstreamer1.0 = "1.6.3" -PREFERRED_VERSION_gstreamer1.0-libav = "1.6.3" -PREFERRED_VERSION_gstreamer1.0-plugins-base = "1.6.3" -PREFERRED_VERSION_gstreamer1.0-plugins-bad = "1.6.3" -PREFERRED_VERSION_gstreamer1.0-plugins-good = "1.6.3" -PREFERRED_VERSION_gstreamer1.0-plugins-ugly = "1.6.3" -PREFERRED_VERSION_gstreamer1.0-plugins-vspfilter = "1.0%" - -PREFERRED_VERSION_gstreamer1.0-omx ?= "1.2.0" MACHINE_FEATURES_append = " multimedia" @@ -55,8 +46,6 @@ IMAGE_INSTALL_append_rcar-gen3 = " \ omx-user-module \ " -BBMASK .= "|meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-forward-port/" - DISTRO_FEATURES_append = " sota" OSTREE_KERNEL = "Image" IMAGE_BOOT_FILES_sota = "m3ulcb-ota-bootfiles/* Image-r8a7796-m3ulcb.dtb" -- cgit 1.2.3-korg