summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2015-07-15 17:14:27 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2015-07-16 15:01:29 -0300
commitf8517afc7a5ada4538b3b7d397fa32586d57ffe5 (patch)
tree79349f091306d1760fd4687e62336ffa8fb8c721 /scripts
parentc92b415d653afc55f33b6b93fb9248193bfd4fa0 (diff)
downloadmeta-freescale-f8517afc7a5ada4538b3b7d397fa32586d57ffe5.tar.gz
Move meta-fsl-arm content to layer root
The meta-fsl-arm is going to be used as the base for this layer. It contains a clean history and allowing a more granullar set of changes. This commit is just a rename of all contents of meta-fsl-arm subdirectory to this layer's root, subsequent changes are based on top of that. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/get-maintainer107
-rw-r--r--scripts/lib/image/canned-wks/imx-barebox.wks18
-rw-r--r--scripts/lib/image/canned-wks/imx-uboot-spl.wks18
-rw-r--r--scripts/lib/image/canned-wks/imx-uboot.wks17
4 files changed, 160 insertions, 0 deletions
diff --git a/scripts/get-maintainer b/scripts/get-maintainer
new file mode 100755
index 00000000..071cdf60
--- /dev/null
+++ b/scripts/get-maintainer
@@ -0,0 +1,107 @@
1#!/bin/sh
2# -*- mode: shell-script; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
3#
4# Copyright (C) 2014 O.S. Systems Software LTDA.
5# Authored-by: Otavio Salvador <otavio@ossystems.com.br>
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License version 2 as
9# published by the Free Software Foundation.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License along
17# with this program; if not, write to the Free Software Foundation, Inc.,
18# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20usage() {
21 cat<<EOF
22Usage:
23
24 $0 [ --machine=<machine> ] <path> ...
25
26 <path>
27 Directory(ies) where to look for machine definition files.
28
29 Options:
30
31 --machine=<machine>
32 Optional param to restrict the printing for a specific machine name.
33
34 --dump
35 Generate output in a format which is easier to parse. Columns
36 are separated by TAB. Empty cells for the "Maintainer" column
37 represent "no maintainer".
38
39EOF
40}
41
42path=
43specific_machine=
44dump_mode=
45
46for opt in ${*}; do
47 if [ "`echo $opt | cut -b-10`" = "--machine=" ]; then
48 specific_machine="`echo $opt | cut -b11-`"
49 elif [ "$opt" = "--dump" ]; then
50 dump_mode=1
51 else
52 path="$path $opt"
53 fi
54done
55
56if [ -z "$path" ]; then
57 usage
58 exit 1
59fi
60
61maintained=`mktemp`
62orphan=`mktemp`
63
64machines=`find $path -wholename '*/conf/machine/*.conf'`
65for m in $machines; do
66 machine=`basename $m | sed 's,\.conf$,,g'`
67 if [ -n "$specific_machine" ] && [ "$machine" != "$specific_machine" ]; then
68 continue
69 fi
70
71 name=`sed -n 's,#@NAME:\s*\(.*\)\s*,\1,p' $m`
72 maint=`sed -n 's,#@MAINTAINER:\s*\(.*\)\s*,\1,p' $m`
73
74 if [ -n "$dump_mode" ]; then
75 if [ -n "$maint" ]; then
76 printf "${machine}\t${name}\t${maint}\n" >> $maintained
77 else
78 printf "${machine}\t${name}\n" >> $orphan
79 fi
80 else
81 if [ -n "$maint" ]; then
82 printf "%-25s %-50s %-50s\n" "$machine" "$name" "$maint" >> $maintained
83 else
84 printf "%-25s %-50s %-50s\n" "$machine" "$name" "Orphan" >> $orphan
85 fi
86 fi
87done
88
89display() {
90 sort -u -k 2 $maintained | grep -v $^
91 sort -u -k 2 $orphan | grep -v $^
92}
93
94if [ -n "$dump_mode" ]; then
95 display
96else
97 cat <<EOF
98========================= ================================================== ==================================================
99 Machine Name Maintainer
100========================= ================================================== ==================================================
101EOF
102 display
103 cat <<EOF
104========================= ================================================== ==================================================
105EOF
106fi
107rm $maintained $orphan
diff --git a/scripts/lib/image/canned-wks/imx-barebox.wks b/scripts/lib/image/canned-wks/imx-barebox.wks
new file mode 100644
index 00000000..77b55548
--- /dev/null
+++ b/scripts/lib/image/canned-wks/imx-barebox.wks
@@ -0,0 +1,18 @@
1# short-description: Create SD card image with a boot partition
2# long-description:
3# Create an image that can be written onto a SD card using dd for use
4# with i.MX SoC family
5# It uses barebox
6#
7# The disk layout used is:
8# - --------- ------------ --------- --------------
9# | | barebox | bareboxenv | /boot | rootfs |
10# - --------- ------------ --------- --------------
11# ^ ^ ^ ^ ^ ^
12# | | | | | |
13# 0 512B 512kiB 4MiB 4MiB + 8MiB 4MiB + 8Mib + rootfs + IMAGE_EXTRA_SPACE (default 10MiB)
14#
15part barebox --source rawcopy --sourceparams="file=barebox.bin,skip=512" --ondisk mmcblk --no-table
16part bareboxenv --source rawcopy --sourceparams="file=bareboxenv.bin" --ondisk mmcblk --no-table --align 512
17part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 8M --extra-space 0
18part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096
diff --git a/scripts/lib/image/canned-wks/imx-uboot-spl.wks b/scripts/lib/image/canned-wks/imx-uboot-spl.wks
new file mode 100644
index 00000000..e2bdc145
--- /dev/null
+++ b/scripts/lib/image/canned-wks/imx-uboot-spl.wks
@@ -0,0 +1,18 @@
1# short-description: Create SD card image with a boot partition
2# long-description:
3# Create an image that can be written onto a SD card using dd for use
4# with i.MX SoC family.
5# It uses SPL and u-boot
6#
7# The disk layout used is:
8# - ----- --------- --------- --------------
9# | | SPL | u-boot | /boot | rootfs |
10# - ----- --------- --------- --------------
11# ^ ^ ^ ^ ^ ^
12# | | | | | |
13# 0 1kiB 69kiB 4MiB 4MiB + 8MiB 4MiB + 8Mib + rootfs + IMAGE_EXTRA_SPACE (default 10MiB)
14#
15part SPL --source rawcopy --sourceparams="file=SPL" --ondisk mmcblk --no-table --align 1
16part u-boot --source rawcopy --sourceparams="file=u-boot.imx" --ondisk mmcblk --no-table --align 69
17part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 8M --extra-space 0
18part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096
diff --git a/scripts/lib/image/canned-wks/imx-uboot.wks b/scripts/lib/image/canned-wks/imx-uboot.wks
new file mode 100644
index 00000000..08652103
--- /dev/null
+++ b/scripts/lib/image/canned-wks/imx-uboot.wks
@@ -0,0 +1,17 @@
1# short-description: Create SD card image with a boot partition
2# long-description:
3# Create an image that can be written onto a SD card using dd for use
4# with i.MX SoC family
5# It uses u-boot
6#
7# The disk layout used is:
8# - --------- --------- --------------
9# | | u-boot | /boot | rootfs |
10# - --------- --------- --------------
11# ^ ^ ^ ^ ^
12# | | | | |
13# 0 1kiB 4MiB 4MiB + 8MiB 4MiB + 8Mib + rootfs + IMAGE_EXTRA_SPACE (default 10MiB)
14#
15part u-boot --source rawcopy --sourceparams="file=u-boot.imx" --ondisk mmcblk --no-table --align 1
16part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 8M --extra-space 0
17part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096