pax_global_header00006660000000000000000000000064131635105000014504gustar00rootroot0000000000000052 comment=c2bfa15aa5bfc4e3f1b32de28e327b80b37db1cf skales-0.20170929/000077500000000000000000000000001316351050000134035ustar00rootroot00000000000000skales-0.20170929/.gitignore000066400000000000000000000000461316351050000153730ustar00rootroot00000000000000b/ config.sh .* /kobj/ /kernel/ *.img skales-0.20170929/README000066400000000000000000000071231316351050000142660ustar00rootroot00000000000000Skales ----------- These are the scripts which I use to build the kernel on a day-to-day basis. They mostly deal with building the kernel and packaging it up into a format that Android bootloaders are happy to deal with. The scripts are designed with the 'do one thing, and do it well' mantra in mind. Therefore there are separate scripts to setup, compile, package the kernel, etc. and they're all assembled into a 'toolbox' that goes in your $PATH. Prerequisites ------------- To use dtbTool you should have libfdt installed. libfdt1 (debian) libfdt-devel (redhat) sys-apps/dtc (gentoo) community/dtc (arch) Background ---------- Cloning skales should give you a collection of scripts and some directories: skales $ ls README atag-fix boards dtbTool init-branch initrds make-arm mkbootimg package source-me 'README' - This file 'atag-fix' - Contains the atag fixup hack for broken bootloaders 'boards' - Directory of board configuration files 'dtbTool' - Clone of dtbTool from Android (creates a QCDT image) 'init-branch' - Command to initialize a new working tree based off a particular branch. 'initrds' - Directory containing initrds to use as ramdisks (user supplied) 'make-arm' - Simple Makefile wrapper to build an ARM kernel 'mkbootimg' - Clone of mkbootimg from Android (creates a boot.img for booting) 'package' - Creates a boot.img with the correct parameters for a particular machine 'source-me' - Environment setup script to put these scripts into the $PATH. Getting Started --------------- A simple workflow: 1. Clone skales $ git clone skales.git 1.1 Add skales to your path $ . source-me 1.2. Copy the config.sh.example to config.sh $ cp config.sh.example config.sh 1.3. Edit the config file to set options like cross-compiler, defconfig, etc. Note that these options will be global and can be overriden by modifying the per-kernel options described in section 2.1. 2. Checkout or clone a kernel $ git clone git://git.kernel.org/... kernel 2.1. Configure per-kernel options to override the global options in .skales/config for this kernel source tree. $ mkdir .skales $ cp /skales/config.sh.example .skales/config $ 3. Build the kernel $ cd kernel $ make-arm -j 16 ... 4. Package the kernel up into a boot.img $ package 8960dt initrd.gz --cmdline="console=ttyMSM0,115200,n8" Packaged /usr/src/linux/b/my-branch/boot.img The boot.img will be placed one level above the kernel directory $ ls ../ boot.img kernel kobj 5. Boot the kernel $ fastboot boot /usr/src/linux/b/my-branch/boot.img Skales also contains a script, called init-branch, which uses the git-new-workdir utility to help work with multiple git trees that share history[1]. Most steps are similar to above, but the kernel can be managed with these steps: 1. Initialize a new working branch (b/ is not necessary but default ignored) with an optional defconfig (in this example we'll use no defconfig) $ mkdir -p b/my-branch $ cd b/my-branch $ init-branch my-branch $ ls kernel kobj The 'kernel' directory contains the sources of the kernel tree checked out to the branch that was specified (in this case my-branch). The 'kobj' directory contains any object files and build products. 2. Enter the kernel directory and configure your kernel $ cd kernel $ make-arm menuconfig Continue at step 3 listed above in the simple workflow. skales-0.20170929/atag-fix/000077500000000000000000000000001316351050000151035ustar00rootroot00000000000000skales-0.20170929/atag-fix/.gitignore000066400000000000000000000000141316351050000170660ustar00rootroot00000000000000/*.bin /*.o skales-0.20170929/atag-fix/fixup.S000066400000000000000000000057221316351050000163700ustar00rootroot00000000000000/* Copyright (c) 2013, The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * Neither the name of The Linux Foundation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ /* Fixup the atags for dragonboard (and possibly other targets). */ /* * The bootloader on some targets passes an ATAG in that sets the * first memory region to be 2MB after the actual start of memory. * With newer upstream kernels, the PHYS_OFFSET must be a multiple of * a large boundary (currently 128MB). Without devicetree, we work * around this with an early init hook, and a fixup that adds a * reservation. These hooks don't run in time to fix it in Device * tree. * * The following code can be prepended to the zImage. It adjusts the * memory atag back down to the actual start of memory. The * assumption is that the device tree will describe the necessary * memory reservation. The zImage is relocatable, so it is easy to * prepend this code. */ /* Figure out what the broken mem tag would be */ mov r8, pc and r8, r8, #0xf8000000 add r8, r8, #0x00200000 /* R2 is where the atags are passed. r5 on are scratch. */ mov r5, r2 ldr r7, .tag_mem .next: /* Load the tag, and check. */ ldr r6, [r5, #4] cmp r6, #0 beq .done /* Is the a 'mem' tag. */ cmp r6, r7 bne .not_mem /* Is this memory base what we want? */ ldr r6, [r5, #12] cmp r6, r8 subeq r6, r6, #0x200000 streq r6, [r5, #12] ldreq r6, [r5, #8] addeq r6, r6, #0x200000 streq r6, [r5, #8] .not_mem: /* Move r5 to the next tag. */ ldr r6, [r5, #0] add r5, r5, r6, asl #2 b .next .tag_mem: .word 0x54410002 .done: skales-0.20170929/boards/000077500000000000000000000000001316351050000146555ustar00rootroot00000000000000skales-0.20170929/boards/7201000066400000000000000000000031711316351050000151730ustar00rootroot00000000000000# Copyright (c) 2015, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # cmdline="console=ttyMSM2,115200,n8 mem=101M" base=0x10000000 arch=arm skales-0.20170929/boards/7201a0000777000000000000000000000000013163510500001564127201ustar00rootroot00000000000000skales-0.20170929/boards/7201dt000066400000000000000000000032241316351050000155220ustar00rootroot00000000000000# Copyright (c) 2015, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # cmdline="console=ttyMSM2,115200,n8 mem=101M" base=0x10000000 dtb=qcom-msm7201a-surf.dtb arch=arm skales-0.20170929/boards/72300000777000000000000000000000000013163510500001551027630ustar00rootroot00000000000000skales-0.20170929/boards/7630000066400000000000000000000031741316351050000152040ustar00rootroot00000000000000# Copyright (c) 2015, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # cmdline="console=ttyMSM1,115200,n8" base=0x200000 pagesize=4096 arch=arm skales-0.20170929/boards/7x300000777000000000000000000000000013163510500001561627630ustar00rootroot00000000000000skales-0.20170929/boards/8084-mtp000066400000000000000000000032111316351050000157760ustar00rootroot00000000000000# Copyright (c) 2015, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # cmdline="console=ttyMSM0,115200,n8" base=0x00000000 dtb=qcom-apq8084-mtp.dtb arch=arm skales-0.20170929/boards/8660000066400000000000000000000031431316351050000152040ustar00rootroot00000000000000# Copyright (c) 2015, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # cmdline="console=hvc0" base=0x40200000 arch=arm skales-0.20170929/boards/8660dt000066400000000000000000000032301316351050000155310ustar00rootroot00000000000000# Copyright (c) 2015, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # cmdline="console=ttyMSM0,115200,n8" base=0x40800000 needs_fixup=t dtb=qcom-msm8660-surf.dtb arch=arm skales-0.20170929/boards/8916000066400000000000000000000032111316351050000152040ustar00rootroot00000000000000# Copyright (c) 2015, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # cmdline="console=ttyMSM0,115200,n8" base=0x80000000 dtbs=qcom/ arch=arm64 image=Image skales-0.20170929/boards/8960000066400000000000000000000031431316351050000152070ustar00rootroot00000000000000# Copyright (c) 2015, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # cmdline="console=hvc0" base=0x80200000 arch=arm skales-0.20170929/boards/8960dt000066400000000000000000000032711316351050000155410ustar00rootroot00000000000000# Copyright (c) 2015, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # cmdline="console=ttyMSM0,115200,n8" base=0x86000000 # Put it high to avoid relocation needs_fixup=t dtb=qcom-msm8960-cdp.dtb arch=arm skales-0.20170929/boards/8974000066400000000000000000000032211316351050000152110ustar00rootroot00000000000000# Copyright (c) 2015, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # cmdline="console=ttyMSM0,115200,n8" base=0x00000000 dtb=qcom-apq8074-dragonboard.dtb arch=arm skales-0.20170929/boards/8996000066400000000000000000000031751316351050000152250ustar00rootroot00000000000000# Copyright (c) 2016, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # cmdline="console=ttyMSM0,115200,n8" base=0x00000000 dtbs=qcom/ arch=arm64 skales-0.20170929/boards/8998000066400000000000000000000032031316351050000152170ustar00rootroot00000000000000# Copyright (c) 2016, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # cmdline="clk_ignore_unused" base=0x00000000 dtb=qcom/msm8998-mtp.dtb arch=arm64 skales-0.20170929/boards/8x600000777000000000000000000000000013163510500001562628660ustar00rootroot00000000000000skales-0.20170929/boards/g10000777000000000000000000000000013163510500001541627201ustar00rootroot00000000000000skales-0.20170929/boards/ifc6410000066400000000000000000000032751316351050000156630ustar00rootroot00000000000000# Copyright (c) 2015, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # cmdline="console=ttyMSM0,115200,n8" base=0x86000000 # Put it high to avoid relocation needs_fixup=t dtb=qcom-apq8064-ifc6410.dtb arch=arm skales-0.20170929/boards/ipq806x000066400000000000000000000032051316351050000160170ustar00rootroot00000000000000# Copyright (c) 2015, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # cmdline="console=ttyMSM0,115200,n8" base=0x42208000 arch=arm uImage=y image=Image skales-0.20170929/boot000077500000000000000000000036111316351050000142750ustar00rootroot00000000000000#!/bin/sh # # Copyright (c) 2013, 2016, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # exe=$(readlink -f "$0") META_ROOT=$(dirname "$exe") META_ROOT=$(cd "$META_ROOT" && pwd) if test -f "$META_ROOT/config.sh" then . "$META_ROOT/config.sh" fi if test -f .skales/config then . .skales/config fi BOOTIMG_DIR="${BOOTIMG_DIR:-../}" BOOTIMG_DIR="$(readlink -f $BOOTIMG_DIR)" fastboot boot "$BOOTIMG_DIR/boot.img" skales-0.20170929/config.sh.example000066400000000000000000000042361316351050000166430ustar00rootroot00000000000000# Copyright (c) 2013,2015 The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Cross compiler to use. If not set, CROSS_COMPILE must be in your enviornment #CROSS_COMPILE=/path/to/my/compiler/arm-eabi- # The make-arm script can behave one of two ways in regards to the # defconfig. The default, if this is not set, is to just invoke make # directly. If you prefer, set this variable to the name of a defconfig file. # In this case, the script will copy the file from the kernel source on each # build, and place the resulting savedefconfig back into the user's # tree. #defconfig=qcom_defconfig # Where to put kernel build objects #KOBJ=../kobj # Where to put boot images #BOOTIMG_DIR=../ skales-0.20170929/dtbTool000077500000000000000000000342551316351050000147510ustar00rootroot00000000000000#! /usr/bin/env python # # Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Drop in replacement for dtbTool # from functools import total_ordering from struct import pack, unpack import ctypes import os import sys import re from optparse import OptionParser soc_ids = { 'msm8660' : 71, 'msm8960' : 87, 'apq8064' : 109, 'msm8660a' : 122, 'msm8260a' : 123, 'apq8060a' : 124, 'msm8974' : 126, 'msm8960ab' : 138, 'apq8060ab' : 139, 'msm8260ab' : 140, 'msm8660ab' : 141, 'apq8064_prime' : 153, 'apq8084' : 178, 'apq8074' : 184, 'msm8274' : 185, 'msm8674' : 186, 'msm8974_pro' : 194, 'ipq8062' : 201, 'ipq8064' : 202, 'ipq8066' : 203, 'msm8916' : 206, 'msm8994' : 207, 'apq8074_aa' : 208, 'apq8074_ab' : 209, 'apq8074_pro' : 210, 'msm8274_aa' : 211, 'msm8274_ab' : 212, 'msm8274_pro' : 213, 'msm8674_aa' : 214, 'msm8674_ab' : 215, 'msm8674_pro' : 216, 'msm8974_aa' : 217, 'msm8974_ab' : 218, 'apq8064_au' : 244, 'msm8909' : 245, 'msm8996' : 246, 'apq8016' : 247, 'msm8216' : 248, 'msm8992' : 251, 'apq8092' : 252, 'apq8094' : 253, 'ipq4019' : 273, 'apq8096' : 291, 'msm8998' : 292, 'msm8996sg' : 305, } platform_type = { 'cdp' : 1, 'ffa' : 2, 'fluid' : 3, 'fusion' : 4, 'oem' : 5, 'qt' : 6, 'mtp_mdm' : 7, 'mtp' : 8, 'liquid' : 9, 'dragonboard' : 10, 'qrd' : 11, 'evb' : 12, 'hrd' : 13, 'dtv' : 14, 'rumi' : 15, 'virtio' : 16, 'xpm' : 20, 'rcm' : 21, 'stp' : 23, 'sbc' : 24, 'cls' : 29, } pmic_ids = { 'pm8941' : 1, 'pm8841' : 2, 'pm8019' : 3, 'pm8026' : 4, 'pm8110' : 5, 'pma8084' : 6, 'pmi8962' : 7, 'pmd9635' : 8, 'pm8994' : 9, 'pmi8994' : 10, 'pm8916' : 11, 'pm8004' : 12, 'pm8909' : 13, 'pm2433' : 14, 'pmd9655' : 15, 'pm8950' : 16, 'pmi8950' : 17, 'pmk8001' : 18, 'pmi8996' : 19, 'pm8998' : 20, 'pmi8998' : 21, 'pm8953' : 22, 'smb1380' : 23, 'pm8005' : 24, 'pm8937' : 25, } boot_device_ids = { 'emmc_sdc1' : 2, 'ufs' : 4 } boot_device_ids_mdm = { 'emmc_sdc1' : 3 } panel_ids = { 'hd' : 0, '720p' : 1, 'qHD' : 2, 'fWVGA' : 3 } try: libfdt = ctypes.CDLL('libfdt.so') except OSError: sys.exit("libfdt is missing, please install it") prototype = ctypes.CFUNCTYPE(ctypes.c_char_p, ctypes.c_void_p, ctypes.c_char_p) paramflags = (1, "fdt", None), (1, "name", None) fdt_get_alias = prototype(("fdt_get_alias", libfdt), paramflags) prototype = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_void_p, ctypes.c_char_p) paramflags = (1, "fdt", None), (1, "path", None) fdt_path_offset = prototype(("fdt_path_offset", libfdt), paramflags) prototype = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int, ctypes.c_char_p, ctypes.c_void_p) paramflags = (1, "fdt", None), (1, "nodeoffset", None), (1, "name", None), (1, "lenp", None) fdt_getprop = prototype(("fdt_getprop", libfdt), paramflags) def fdt_get_property_int(blob, nodeoffset, name): """Return an int list of property name's values at nodeoffset """ vals = [] i = 0 length = ctypes.c_int(0) name = str.encode(name) addr = fdt_getprop(blob, nodeoffset, name, ctypes.byref(length)) if addr is None: return None addr = ctypes.cast(addr, ctypes.POINTER(ctypes.c_uint32)) while i < length.value / 4: # Convert from big-endian to native endianness val = unpack("I", pack(">I", addr[i]))[0] vals.append(val) i += 1 return vals def fdt_get_property_string(blob, nodeoffset, name): """Return a string list of property name's values at nodeoffset """ vals = [] i = 0 length = ctypes.c_int(0) name = str.encode(name) val = fdt_getprop(blob, nodeoffset, name, ctypes.byref(length)) if val is None: return vals while i < length.value: c = ctypes.cast(val + i, ctypes.c_char_p).value.decode("utf-8") vals.append(c) i += len(vals[-1]) + 1 # Skip the NUL character return vals def find_pmics(blob): pmics = [] for usid in ["usid0", "usid2", "usid4", "usid6"]: path = fdt_get_alias(blob, str.encode(usid)) if path is None: pmics.append("") continue off = fdt_path_offset(blob, path) pmic = fdt_get_property_string(blob, off, "compatible") pmics.append(pmic[0]) return pmics class QcomIds(object): pattern = re.compile(r''' qcom,(?P\w+) # SoC (req) (-v(?P\d+)(.(?P\d+))?)? # SoC version (opt) (-(?P\d+))? # foundry (opt) -(?P\w+) # Platform (req) (/(?P\d+))? # Number for platform sub (opt) (-v(?P\d+)(.(?P\d+))?)? # Plat version (opt) ''', re.VERBOSE) pmic_pattern = re.compile(r''' qcom,(?P\w+)(-v(?P\d+)(.(?P\d+))?)? ''', re.VERBOSE) def __init__(self, compat, pmics): self.msm_id = [0, 0] self.board_id = [0, 0] self.pmic_id = [0, 0, 0, 0] matches = QcomIds.pattern.match(compat).groupdict() foundry = int(matches['foundry'] or 0) self.msm_id[0] = soc_ids[matches['soc']] | (foundry << 16) major = int(matches['soc_major'] or 0) minor = int(matches['soc_minor'] or 0) self.msm_id[1] = major << 16 | minor plat = platform_type[matches['platform']] subtype = int(matches['platform_sub'] or 0) major = int(matches['plat_major'] or 0) minor = int(matches['plat_minor'] or 0) self.board_id[0] = plat | minor << 8 | major << 16 | subtype << 24 self.board_id[1] = 0 for (i, pmic) in enumerate(pmics): if len(pmic) == 0: continue matches = QcomIds.pmic_pattern.match(pmic).groupdict() model = pmic_ids[matches['pmic']] major = int(matches['major'] or 0) minor = int(matches['minor'] or 0) self.pmic_id[i] = model | major << 16 | minor << 8 @staticmethod def valid(compat): match = QcomIds.pattern.match(compat) if match: matches = match.groupdict() return (matches['soc'] in soc_ids and matches['platform'] in platform_type) return False @total_ordering class DTRecord: def __init__(self, plat_id, variant_id, subtype_id, soc_rev, pmic0, pmic1, pmic2, pmic3, offset, size, f, version): self.plat_id = int(plat_id) self.variant_id = int(variant_id) self.subtype_id = int(subtype_id) self.soc_rev = int(soc_rev) self.pmic0 = int(pmic0) self.pmic1 = int(pmic1) self.pmic2 = int(pmic2) self.pmic3 = int(pmic3) self.offset = int(offset) self.size = int(size) self.f = f self.version = int(version) self.duplicate = False def __eq__(self, other): if other is None: return False return (self.plat_id == other.plat_id and self.variant_id == other.variant_id and self.subtype_id == other.subtype_id and self.soc_rev == other.soc_rev and self.pmic0 == other.pmic0 and self.pmic1 == other.pmic1 and self.pmic2 == other.pmic2 and self.pmic3 == other.pmic3) def __lt__(self, other): if other is None: return False if self.plat_id < other.plat_id: return True if self.plat_id > other.plat_id: return False if self.variant_id < other.variant_id: return True if self.variant_id > other.variant_id: return False if self.subtype_id < other.subtype_id: return True if self.subtype_id > other.subtype_id: return False if self.soc_rev < other.soc_rev: return True if self.soc_rev > other.soc_rev: return False if self.pmic0 < other.pmic0: return True if self.pmic0 > other.pmic0: return False if self.pmic1 < other.pmic1: return True if self.pmic1 > other.pmic1: return False if self.pmic2 < other.pmic2: return True if self.pmic2 > other.pmic2: return False if self.pmic3 < other.pmic3: return True return False def generate_records(f, pagesize): version = None size = os.stat(f).st_size mod = size % pagesize if mod != 0: size += pagesize - mod; fi = open(f, 'rb') s = ctypes.create_string_buffer(fi.read()) blob = ctypes.byref(s) msm_id = fdt_get_property_int(blob, 0, "qcom,msm-id") if msm_id is None: compats = fdt_get_property_string(blob, 0, "compatible") if len(compats) == 0: sys.exit("%s is missing compatible?" % f) board_id = fdt_get_property_int(blob, 0, "qcom,board-id") pmic_id = fdt_get_property_int(blob, 0, "qcom,pmic-id") if board_id: x = iter(board_id) board_id = list(zip(x, x)) x = iter(msm_id) msm_id = list(zip(x, x)) version = 2 elif msm_id: x = iter(msm_id) msm_id = list(zip(x, x, x)) version = 1 if pmic_id: x = iter(pmic_id) pmic_id = list(zip(x, x, x, x)) version = 3 records = [] if version == 1: for (plat_id, variant_id, soc_rev) in msm_id: records += [DTRecord(plat_id, variant_id, 0, soc_rev, 0, 0, 0, 0, 0, size, f, version)] elif version == 2: for (plat_id, soc_rev) in msm_id: for (variant_id, subtype_id) in board_id: records += [DTRecord(plat_id, variant_id, subtype_id, soc_rev, 0, 0, 0, 0, 0, size, f, version)] elif version == 3: for (plat_id, soc_rev) in msm_id: for (variant_id, subtype_id) in board_id: for (pmic0, pmic1, pmic2, pmic3) in pmic_id: records += [DTRecord(plat_id, variant_id, subtype_id, soc_rev, pmic0, pmic1, pmic2, pmic3, 0, size, f, version)] else: version = 3 pmics = find_pmics(blob) ids = [QcomIds(compat, pmics) for compat in compats if QcomIds.valid(compat)] records += [DTRecord(x.msm_id[0], x.board_id[0], x.board_id[1], x.msm_id[1], x.pmic_id[0], x.pmic_id[1], x.pmic_id[2], x.pmic_id[3], 0, size, f, version) for x in ids] return records def write_padding(f, pagesize): count = pagesize - (f.tell() % pagesize) # Write padding as long as we aren't already aligned to a page if count != pagesize: output.write(b"".join([b'\x00' for x in range(count)])) if __name__ == "__main__": usage = ("""%prog -o [options]""") parser = OptionParser(usage=usage) # Standard options parser.add_option("-o", "--output-file", dest="output", metavar="FILE", help="output file") parser.add_option("-p", "--dtc-path", dest="dtc", metavar="PATH", help="path to dtc", default="") parser.add_option("-v", "--verbose", action="store_true", dest="verbose", help="verbose") parser.add_option("-s", "--page-size", type="int", dest="pagesize", default=2048, help="page size in bytes [default: %default]") # New options parser.add_option("--version", dest="version", type="int", help="Force version") (options, args) = parser.parse_args() if options.output is None: parser.error("Output file must be specified") if len(args) != 1: parser.error("Exactly one input directory must be specified") pagesize = options.pagesize indir = args[0] flist = [os.path.join(indir, f) for f in os.listdir(indir) if os.path.isfile(os.path.join(indir, f)) and f.endswith('.dtb')] records = [] for f in flist: records += generate_records(f, pagesize) if len(records) == 0: sys.exit("No valid dtbs found") records.sort() if options.version is None: version = records[0].version else: version = options.version try: output = open(options.output, 'wb') except IOError: sys.exit("Can't open %s" % options.output) offset = 12 if version == 1: offset += 5 * 4 * len(records) elif version == 2: offset += 6 * 4 * len(records) elif version == 3: offset += 10 * 4 * len(records) offset += 4 offset += pagesize - (offset % pagesize) found = {} p = None for r in records: if r.f in found: r.duplicate = True else: if p: offset += p.size found[r.f] = offset p = r r.offset = found[r.f] hdr_format = "<4sII" blob = pack(hdr_format, b"QCDT", version, len(records)) if version == 1: blob_format = "&2 "$@" exit 1 } USAGE="$prog [defconfig]" branch="$1" base=$PWD defconfig=$2 if test -z $branch then die "usage: $USAGE" fi # Make new directory for branch git worktree add --detach $base/kernel $branch && mkdir $base/kobj && # Copy optional defconfig to the kobj directory test -f "$defconfig" && cp $defconfig kobj/.config skales-0.20170929/initrds/000077500000000000000000000000001316351050000150575ustar00rootroot00000000000000skales-0.20170929/initrds/.gitignore000066400000000000000000000000061316351050000170430ustar00rootroot00000000000000/*.gz skales-0.20170929/make-arm000077500000000000000000000046631316351050000150340ustar00rootroot00000000000000#!/bin/sh # # Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # ARM compiler wrapper exe=$(readlink -f "$0") META_ROOT=$(dirname "$exe") META_ROOT=$(cd "$META_ROOT" && pwd) if test -f "$META_ROOT/config.sh" then . "$META_ROOT/config.sh" fi if test -f .skales/config then . .skales/config fi export CROSS_COMPILE=$CROSS_COMPILE KOBJ="${KOBJ:-../kobj}" O_STR= if ! test "$PWD" -ef "$KOBJ" then O_STR="O=$KOBJ" fi die() { echo ${1:-Failure} exit 1 } if test -n "$ARCH" -a "$ARCH" != "arm" then die "Building for wrong arch" fi if test -z "$defconfig" then # Simple case make ARCH=arm $O_STR "$@" exit $? fi # Copy the defconfig in and out of the kernel source tree as part of # the build. config=arch/arm/configs/${defconfig} # cp $config ../kobj/.config make ARCH=arm $O_STR ${defconfig} || die "Build failure" make ARCH=arm $O_STR "$@" status=$? make ARCH=arm $O_STR savedefconfig mv $KOBJ/defconfig $config exit $status skales-0.20170929/make-arm64000077500000000000000000000046761316351050000152120ustar00rootroot00000000000000#!/bin/sh # # Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # ARM64 compiler wrapper exe=$(readlink -f "$0") META_ROOT=$(dirname "$exe") META_ROOT=$(cd "$META_ROOT" && pwd) if test -f "$META_ROOT/config.sh" then . "$META_ROOT/config.sh" fi if test -f .skales/config then . .skales/config fi export CROSS_COMPILE=$CROSS_COMPILE KOBJ="${KOBJ:-../kobj}" O_STR= if ! test "$PWD" -ef "$KOBJ" then O_STR="O=$KOBJ" fi die() { echo ${1:-Failure} exit 1 } if test -n "$ARCH" -a "$ARCH" != "arm64" then die "Building for wrong arch" fi if test -z "$defconfig" then # Simple case make ARCH=arm64 $O_STR "$@" exit $? fi # Copy the defconfig in and out of the kernel source tree as part of # the build. config=arch/arm64/configs/${defconfig} # cp $config ../kobj/.config make ARCH=arm64 $O_STR ${defconfig} || die "Build failure" make ARCH=arm64 $O_STR "$@" status=$? make ARCH=arm64 $O_STR savedefconfig mv $KOBJ/defconfig $config exit $status skales-0.20170929/mkbootimg000077500000000000000000000121411316351050000153200ustar00rootroot00000000000000#! /usr/bin/env python # # Copyright (c) 2013, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Drop in replacement for android's mkbootimg plus some more additions # from struct import pack import os from optparse import OptionParser def write_padding(f, pagesize): count = pagesize - (f.tell() % pagesize) # Write padding as long as we aren't already aligned to a page if count != pagesize: output.write(b'\x00' * count) if __name__ == "__main__": usage = ("""%prog [options]""") parser = OptionParser(usage=usage) # Standard options parser.add_option("--kernel", dest="kernel", metavar="FILE", help="Input kernel image") parser.add_option("--ramdisk", dest="ramdisk", metavar="FILE", help="Input ramdisk image") parser.add_option("--base", type="int", dest="base", help="Start address of kernel image") parser.add_option("--output", dest="output", metavar="FILE", help="Write output to FILE") parser.add_option("--cmdline", dest="cmdline", help="Kernel command line") parser.add_option("--pagesize", type="int", dest="pagesize", default=2048, help="NAND pagesize [default: %default]") parser.add_option("--board", dest="board", default="", help="Board identifier") # New options parser.add_option("--ramdisk_base", type="int", dest="ramdisk_base", default=-1, help="Start address of ramdisk image") parser.add_option("--dt", dest="devicetree", metavar="FILE", help="Input device tree image") (options, args) = parser.parse_args() if options.kernel is None: parser.error("Must specify --kernel") if options.ramdisk is None: parser.error("Must specify --ramdisk") if options.output is None: parser.error("Must specify --output") if options.base is None: parser.error("Must specify --base") if options.cmdline is None: parser.error("Must specify --cmdline") if len(options.board) > 16: parser.error("--boards argument must be <= 16 characters") try: kernel = open(options.kernel, 'rb') except IOError: exit("Can't open %s" % options.kernel) try: ramdisk = open(options.ramdisk, 'rb') except IOError: exit("Can't open %s" % options.ramdisk) try: output = open(options.output, 'wb') except IOError: exit("Can't open %s" % options.output) if options.devicetree: try: devicetree = open(options.devicetree, 'rb') except IOError: exit("Can't open %s" % options.devicetree) pagesize = options.pagesize tags = options.base + 0x100 ramdisk_base = options.ramdisk_base if options.ramdisk_base != -1 else options.base + 0x2000000 kernel_size = os.fstat(kernel.fileno()).st_size dtb_size = 0 if options.devicetree: magic = devicetree.read(4) devicetree.seek(0) if magic == b'\xd0\x0d\xfe\xed': # 0xd00dfeed append_dtb = True kernel_size += os.fstat(devicetree.fileno()).st_size elif magic == b'QCDT': append_dtb = False dtb_size = os.fstat(devicetree.fileno()).st_size else: exit("dtb: %s is of unknown format" % options.devicetree) hdr_format = "<8sIIIIIIII2I16s512s8I" output.write(pack(hdr_format, b"ANDROID!", kernel_size, options.base + 0x8000, os.fstat(ramdisk.fileno()).st_size, ramdisk_base, 0, 0, tags, options.pagesize, dtb_size, 0, options.board.encode(), options.cmdline.encode(), 123456, 123456, 123456, 123456, 123456, 123456, 0, 0)) write_padding(output, pagesize) output.write(kernel.read()) if options.devicetree and append_dtb: output.write(devicetree.read()) write_padding(output, pagesize) output.write(ramdisk.read()) write_padding(output, pagesize) if options.devicetree and not append_dtb: output.write(devicetree.read()) write_padding(output, pagesize) skales-0.20170929/package000077500000000000000000000146531316351050000147350ustar00rootroot00000000000000#!/bin/sh # # Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # prog=$(basename "$0") USAGE="$prog [initrd] [options] --base= specify the address the bootloader loads the kernel to --cmdline= override the default command line --modules include modules in ramdisk --directory= include directory in ramdisk --dirty skip cleanup -v be verbose " exe=$(readlink -f "$0") META_ROOT=$(dirname "$exe") META_ROOT=$(cd "$META_ROOT" && pwd) if test -f "$META_ROOT/config.sh" then . "$META_ROOT/config.sh" fi if test -f .skales/config then . .skales/config fi KOBJ="${KOBJ:-../kobj}" BOOTIMG_DIR="${BOOTIMG_DIR:-../}" BOOTIMG_DIR="$(readlink -f $BOOTIMG_DIR)" die() { printf >&2 "%s\n" "$@" exit 1 } usage() { die "usage: $USAGE" } error() { printf >&2 "%s\n" "$@" usage } if test -z "$1" then usage fi pagesize=2048 cmdline= base= initrd= needs_fixup= dtb= modules= extra_dir= dtbs= dtarg= arch= uImage= dirty= verbose= target="$1" case "$target" in -h|--help) usage ;; *) if test -f "$META_ROOT/boards/$1" then . "$META_ROOT/boards/$1" else die "Unknown architecture $1" fi ;; esac if test -z $image then if test "$arch" = "arm" then image=zImage else image=Image.gz fi fi shift while test $# != 0 do case "$1" in --cmdline|--cmdline=*) case "$#,$1" in *,*=*) cmdline=`expr "z$1" : 'z-[^=]*=\(.*\)'` ;; 1,*) error "'$1' option missing value" ;; *) cmdline="$2" shift ;; esac ;; --base|--base=*) case "$#,$1" in *,*=*) base=`expr "z$1" : 'z-[^=]*=\(.*\)'` ;; 1,*) error "'$1' option missing value" ;; *) base="$2" shift ;; esac ;; --modules) modules=t ;; --directory|--directory=*) case "$#,$1" in *,*=*) extra_dir=`expr "z$1" : 'z-[^=]*=\(.*\)'` ;; 1,*) error "'$1' option missing value" ;; *) extra_dir="$2" shift ;; esac ;; --dirty) dirty=t ;; -v) verbose=t ;; *) initrd="$1" if ! test -e "$initrd" then initrd="$META_ROOT/initrds/$initrd" if ! test -e "$initrd" then echo >&2 "fatal: can't find initrd" echo >&2 "Available initrds:" for x in $META_ROOT/initrds/* do printf >&2 " %s\n" $(basename "$x") done exit 1 fi else initrd="$(readlink -f $initrd)" fi ;; esac shift done silence= make_silence= if test -z "$verbose" then silence='>/dev/null 2>&1' make_silence=-s fi ( cd $KOBJ && if test -n "$modules" then if test -z "$initrd" then die "Need an initrd to append modules to" fi rm -rf modules && INSTALL_MOD_PATH=modules make ARCH=$arch $make_silence modules_install && ( cd modules && find . | cpio --quiet -o -H newc ) | gzip -n -9 > initrd-modules.gz && cat $initrd initrd-modules.gz > initrd.gz initrd=initrd.gz fi if test -n "$extra_dir" then if test -z "$initrd" then die "Need an initrd to add directory to" fi ( cd - >/dev/null 2>&1 && cd $extra_dir && find . | cpio --quiet -o -H newc ) | gzip -n -9 > initrd-extra.gz && cat $initrd initrd-extra.gz > initrd2.gz && mv initrd2.gz initrd.gz initrd=initrd.gz fi if test "$arch" = "arm" then image=arch/arm/boot/$image dtdir1=arch/arm/boot/dts/ dtdir2=arch/arm/boot/ else image=arch/arm64/boot/$image dtdir1=arch/arm64/boot/dts/ dtdir2=arch/arm64/boot/dts/ fi initrd=${initrd:-/dev/null} test -f $image || die "Can't find $image. Build a kernel?" if test -n "$dtb" then # Older kernels have it in different places dbf="$dtdir1$dtb" && test -f $dbf || dbf="$dtdir2$dtb" && test -f $dbf || die "Can't find '$dtb'. Build a device tree blob?" dtb="$dbf" dtarg="--dt $dtb" fi # Compile the atag fixup if necessary if test -n "$needs_fixup" then fixup="$META_ROOT/atag-fix/fixup" ${CROSS_COMPILE}gcc -c $fixup.S -o $fixup.o && ${CROSS_COMPILE}objcopy -O binary $fixup.o $fixup.bin && cat $fixup.bin $image > fImage && image=fImage || die "Can't build fixup" fi # build dtbs to append if test -n "$dtbs" then rm -rf dtbs && INSTALL_DTBS_PATH=dtbs make $make_silence ARCH=$arch dtbs_install && eval "$META_ROOT/dtbTool --page-size $pagesize -o .dtblob dtbs/$dtbs $silence" && dtarg="--dt .dtblob" || die "Can't build dtbs" fi if test -n "$uImage" then eval "mkimage -A $arch -O linux -C none -T kernel \ -a $base -e $base -n "$target kernel" \ -d "$image" $BOOTIMG_DIR/uImage-$target $silence" && echo "Packaged $(readlink -f $BOOTIMG_DIR/uImage-$target)" && ln -fs uImage-$target $BOOTIMG_DIR/uImage else "$META_ROOT/mkbootimg" --kernel $image \ --ramdisk $initrd \ --cmdline "$cmdline" \ --base $base \ --pagesize $pagesize \ --output $BOOTIMG_DIR/boot-$target.img \ $dtarg && echo "Packaged $(readlink -f $BOOTIMG_DIR/boot-$target.img)" && ln -fs boot-$target.img $BOOTIMG_DIR/boot.img fi # Cleanup for people with kobj=working_dir if test -z "$dirty" then rm -rf fImage modules initrd-modules.gz initrd-extra.gz dtbs .dtblob if test -n "$modules" -o -n "$extra_dir" then rm -rf $initrd fi fi ) skales-0.20170929/source-me000066400000000000000000000031301316351050000152220ustar00rootroot00000000000000#!/bin/sh # # Copyright (c) 2013, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of The Linux Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # export PATH="$PATH:$PWD"