# Maintainer: Natanael Copa global pkgname := 'linux-rpi' global pkgver := '4.9.52' matchstr $pkgver { *.*.* { global _kernver := $(pkgver%.*)} *.* { global _kernver := $(pkgver)} } global pkgrel := '0' global pkgdesc := '"Linux kernel with Raspberry Pi patches'" global url := 'https://github.com/raspberrypi/linux' global depends := '"mkinitfs linux-firmware'" global makedepends := '"perl installkernel bash gmp-dev bc'" global options := '"!strip'" global install := '' # rpi patches are git diff against latest release tag from: # linux-4.4.y https://github.com/raspberrypi/linux/tree/rpi-4.4.y global source := ""https://kernel.org/pub/linux/kernel/v4.x/linux-$_kernver.tar.xz https://kernel.org/pub/linux/kernel/v4.x/patch-$pkgver.xz https://dev.alpinelinux.org/archive/rpi-patches/rpi-$pkgver-alpine.patch gpio-mcp23s08-pullups.patch issue-4973.patch config-rpi.armhf config-rpi2.armhf markdt "" global subpackages := ''"" global _flavors := '' for _i in [$source] { matchstr $_i { config-*.$CARCH { global _f := $(_i%.$CARCH) global _f := $(_f#config-) global _flavors := ""$_flavors $(_f)"" test "linux-$_f" != $pkgname && global subpackages := ""$subpackages linux-$(_f)"" global subpackages := ""$subpackages linux-$(_f)-dev:_dev"" } } } global arch := '"armhf'" global license := '"GPL2'" proc prepare { var _patch_failed = '' cd "$srcdir"/linux-$_kernver if test $(pkgver%.0) = $pkgver { msg "Applying patch-$pkgver.xz" unxz -c < "$srcdir"/patch-$pkgver.xz | patch -p1 -N || return 1 } # first apply patches in specified order for i in [$source] { matchstr $i { *.patch { msg "Applying $i..." if ! patch -s -p1 -N -i "$srcdir"/$(i##*/) { echo $i >>failed _patch_failed := '1' } } } } if ! test -z $_patch_failed { error "The following patches failed:" cat failed return 1 } # remove localversion from patch if any rm -f localversion* for i in [$_flavors] { var _config = "config-$i.$(CARCH)" var _builddir = ""$srcdir"/build-$i" mkdir -p $_builddir echo "-$pkgrel-$i" > "$srcdir"/build-$i/localversion-alpine \ || return 1 cp "$srcdir"/$_config "$_builddir"/.config || return 1 make -C "$srcdir"/linux-$_kernver \ O="$_builddir" \ HOSTCC="$(CC:-gcc)" \ silentoldconfig || return 1 } } proc build { for i in [$_flavors] { cd "$srcdir"/build-$i make CC="$(CC:-gcc) -fno-pie" \ KBUILD_BUILD_VERSION="$(pkgrel + 1 )-Alpine" \ || return 1 } } proc _package { var _buildflavor = $1, _outdir = $2 var _abi_release = "$(pkgver)-$(pkgrel)-$(_buildflavor)" cd "$srcdir"/build-$_buildflavor || return 1 mkdir -p "$_outdir"/boot "$_outdir"/lib/modules var _install = '' matchstr $CARCH { arm* { _install := '"zinstall dtbs_install'" } * { _install := 'install' } } cd "$srcdir"/build-$_buildflavor || return 1 make -j1 modules_install firmware_install $_install \ INSTALL_MOD_PATH="$_outdir" \ INSTALL_PATH="$_outdir"/boot \ INSTALL_DTBS_PATH="$_outdir"/usr/lib/linux-$(_abi_release) \ || return 1 # tell rpi bootloader we are device tree capable "$srcdir"/markdt "$_outdir"/boot/vmlinuz-$_buildflavor \ || return 1 rm -f "$_outdir"/lib/modules/$(_abi_release)/build \ "$_outdir"/lib/modules/$(_abi_release)/source rm -rf "$_outdir"/lib/firmware install -D include/config/kernel.release \ "$_outdir"/usr/share/kernel/$_buildflavor/kernel.release } # main flavor installs in $pkgdir proc package { _package rpi $pkgdir } # subflavors install in $subpkgdir proc rpi2 { _package rpi2 $subpkgdir } proc _dev { var _flavor = $[echo $subpkgname | sed -E 's/(^linux-|-dev$)//g] var _abi_release = "$(pkgver)-$(pkgrel)-$_flavor" # copy the only the parts that we really need for build 3rd party # kernel modules and install those as /usr/src/linux-headers, # simlar to what ubuntu does # # this way you dont need to install the 300-400 kernel sources to # build a tiny kernel module # global pkgdesc := ""Headers and script for third party modules for $_flavor kernel"" global depends := '"gmp-dev bash'" var dir = ""$subpkgdir"/usr/src/linux-headers-$(_abi_release)" # first we import config, run prepare to set up for building # external modules, and create the scripts mkdir -p $dir cp "$srcdir"/config-$_flavor.$(CARCH) "$dir"/.config make -j1 -C "$srcdir"/linux-$_kernver O="$dir" HOSTCC="$(CC:-gcc)" \ silentoldconfig prepare modules_prepare scripts # remove the stuff that points to real sources. we want 3rd party # modules to believe this is the soruces rm "$dir"/Makefile "$dir"/source # copy the needed stuff from real sources # # this is taken from ubuntu kernel build script # http://kernel.ubuntu.com/git/ubuntu/ubuntu-zesty.git/tree/debian/rules.d/3-binary-indep.mk cd "$srcdir"/linux-$_kernver find . -path './include/*' -prune \ -o -path './scripts/*' -prune -o -type f \ '(' -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Kbuild*' -o \ -name '*.sh' -o -name '*.pl' -o -name '*.lds' ')' \ -print | cpio -pdm $dir || return 1 cp -a scripts include $dir || return 1 find $[find arch -name include -type d -print] -type f \ | cpio -pdm $dir install -Dm644 "$srcdir"/build-$_flavor/Module.symvers \ "$dir"/Module.symvers mkdir -p "$subpkgdir"/lib/modules/$(_abi_release) ln -sf /usr/src/linux-headers-$(_abi_release) \ "$subpkgdir"/lib/modules/$(_abi_release)/build } global sha512sums := '"bf67ff812cc3cb7e5059e82cc5db0d9a7c5637f7ed9a42e4730c715bf7047c81ed3a571225f92a33ef0b6d65f35595bc32d773356646df2627da55e9bc7f1f1a linux-4.9.tar.xz e490bfc16ebf14177a2863bf87278911d0a85dbbfd14b6e8605460e482376fc5f93ac4da355002ffa18d09a20ae4e00f2a4dee50cdd067b801b3f4d5a0f665e5 patch-4.9.52.xz c78b59068c267e8b4b3768b5d79c22f4d3ce46f0c84ce0783b335aef750bb912e2a8804a633dc277090d218b799c77186946b4406a6925bc0b417b36209135ca rpi-4.9.52-alpine.patch 36724ba56cb8fdf3a3d347cffb67ae1cc3d7b1052d526b6b5134ebf6baae9f9724b586c97833453dc7697ab24699426f0749af78b6a80be36967a80033a0cf40 gpio-mcp23s08-pullups.patch 501c91bf2538a18102da59bbccc3097f9c3c90079acc0e946ff075074160c09b8a66934e5ce5470e170f0e4f93d114709a95230367426d0bb7ea02c4bdf4cc9b issue-4973.patch 649d3a7d3c1da95c5265a2e85a946a523e1a6ab0bcce1ab8b656329dc3a6a2e94373a8a0b8fc96cbeedc31093a661e4ed0f1ad0a995bfeff1686b8f19ef7621c config-rpi.armhf ba6fb71c4c4ce58693c848290eeb50781a3aa7109188eb22bc099a8a601b8ffcf193f9f3887d16ce5d76a11f31e627a309d37648a8476ab52db79a3eebd96e96 config-rpi2.armhf a8e7f434c325c9dd7a9109efecad408e42a50ecd1391cb0c7d1d7de79609caee007486c8a6538231c74bdc5d7b84cbca053958e1b239bc0507e6d3598ace383a markdt'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(linux-rpi)} spids:[4])] spids: [4] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(4.9.52)} spids:[7])] spids: [7] ) (Case to_match: {($ VSub_Name "$pkgver")} arms: [ (case_arm pat_list: [{(Lit_Other "*") (.) (Lit_Other "*") (.) (Lit_Other "*")}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_kernver) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(".*")}) spids: [24 28] ) } spids: [23] ) ] spids: [23] ) ] spids: [16 21 29 -1] ) (case_arm pat_list: [{(Lit_Other "*") (.) (Lit_Other "*")}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_kernver) op: Equal rhs: {(${ VSub_Name pkgver)} spids: [36] ) ] spids: [36] ) ] spids: [31 34 40 -1] ) ] spids: [10 14 42] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(0)} spids:[44])] spids: [44] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Linux kernel with Raspberry Pi patches"))} spids: [47] ) ] spids: [47] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(https) (Lit_Other ":") (//github.com/raspberrypi/linux)} spids: [52] ) ] spids: [52] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:depends) op: Equal rhs: {(DQ ("mkinitfs linux-firmware"))} spids: [57] ) ] spids: [57] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: {(DQ ("perl installkernel bash gmp-dev bc"))} spids: [62] ) ] spids: [62] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:options) op:Equal rhs:{(DQ ("!strip"))} spids:[67])] spids: [67] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:install) op:Equal rhs:{(SQ )} spids:[72])] spids: [72] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ("https://kernel.org/pub/linux/kernel/v4.x/linux-") ($ VSub_Name "$_kernver") (".tar.xz\n") ("\thttps://kernel.org/pub/linux/kernel/v4.x/patch-") ($ VSub_Name "$pkgver") (".xz\n") ("\thttps://dev.alpinelinux.org/archive/rpi-patches/rpi-") ($ VSub_Name "$pkgver") ("-alpine.patch\n") ("\tgpio-mcp23s08-pullups.patch\n") ("\tissue-4973.patch\n") ("\n") ("\tconfig-rpi.armhf\n") ("\tconfig-rpi2.armhf\n") ("\tmarkdt\n") ("\t") ) } spids: [80] ) ] spids: [80] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:subpackages) op:Equal rhs:{(DQ )} spids:[100])] spids: [100] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:_flavors) op:Equal rhs:{(SQ )} spids:[104])] spids: [104] ) (ForEach iter_name: _i iter_words: [{($ VSub_Name "$source")}] do_arg_iter: False body: (DoGroup children: [ (Case to_match: {($ VSub_Name "$_i")} arms: [ (case_arm pat_list: [{(config-) (Lit_Other "*") (.) ($ VSub_Name "$CARCH")}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_f) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id: VOp1_Percent arg_word: {(.) ($ VSub_Name "$CARCH")} ) spids: [133 138] ) } spids: [132] ) ] spids: [132] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_f) op: Equal rhs: { (BracedVarSub token: suffix_op: (StringUnary op_id:VOp1_Pound arg_word:{(config-)}) spids: [142 146] ) } spids: [141] ) ] spids: [141] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_flavors) op: Equal rhs: {(DQ ($ VSub_Name "$_flavors") (" ") (${ VSub_Name _f))} spids: [149] ) ] spids: [149] ) (AndOr children: [ (C {(Lit_Other "[")} {(DQ (linux-) ($ VSub_Name "$_f"))} {(KW_Bang "!") (Lit_Other "=")} {(DQ ($ VSub_Name "$pkgname"))} {(Lit_Other "]")} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: {(DQ ($ VSub_Name "$subpackages") (" linux-") (${ VSub_Name _f))} spids: [177] ) ] spids: [177] ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: { (DQ ($ VSub_Name "$subpackages") (" linux-") (${ VSub_Name _f) ("-dev:_dev") ) } spids: [187] ) ] spids: [187] ) ] spids: [125 129 198 -1] ) ] spids: [118 122 201] ) ] spids: [115 203] ) spids: [111 113] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (armhf))} spids:[206])] spids: [206] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ (GPL2))} spids:[211])] spids: [211] ) (FuncDef name: prepare body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:_patch_failed) op:Equal rhs:{(SQ )} spids:[226])] spids: [224] ) (C {(cd)} {(DQ ($ VSub_Name "$srcdir")) (/linux-) ($ VSub_Name "$_kernver")}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} { (DQ (BracedVarSub token: suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(.0)}) spids: [243 247] ) ) } {(Lit_Other "=")} {(DQ ($ VSub_Name "$pkgver"))} {(Lit_Other "]")} ) terminator: ) ] action: [ (C {(msg)} {(DQ ("Applying patch-") ($ VSub_Name "$pkgver") (.xz))}) (AndOr children: [ (Pipeline children: [ (SimpleCommand words: [{(unxz)} {(-c)}] redirects: [ (Redir op_id: Redir_Less fd: -1 arg_word: {(DQ ($ VSub_Name "$srcdir")) (/patch-) ($ VSub_Name "$pkgver") (.xz) } spids: [275] ) ] ) (C {(patch)} {(-p1)} {(-N)}) ] negated: False ) (ControlFlow token: arg_word: {(1)} ) ] op_id: Op_DPipe ) ] spids: [-1 259] ) ] spids: [-1 299] ) (ForEach iter_name: i iter_words: [{($ VSub_Name "$source")}] do_arg_iter: False body: (DoGroup children: [ (Case to_match: {($ VSub_Name "$i")} arms: [ (case_arm pat_list: [{(Lit_Other "*") (.patch)}] action: [ (C {(msg)} {(DQ ("Applying ") ($ VSub_Name "$i") (...))}) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (C {(patch)} {(-s)} {(-p1)} {(-N)} {(-i)} {(DQ ($ VSub_Name "$srcdir")) (/) (BracedVarSub token: suffix_op: (StringUnary op_id: VOp1_DPound arg_word: {("*") (Lit_Slash /)} ) spids: [358 363] ) } ) ] negated: True ) terminator: ) ] action: [ (SimpleCommand words: [{(echo)} {($ VSub_Name "$i")}] redirects: [ (Redir op_id: Redir_DGreat fd: -1 arg_word: {(failed)} spids: [373] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_patch_failed) op: Equal rhs: {(1)} spids: [377] ) ] spids: [377] ) ] spids: [-1 366] ) ] spids: [-1 381] ) ] spids: [326 328 384 -1] ) ] spids: [319 323 387] ) ] spids: [316 390] ) spids: [312 314] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$_patch_failed"))} {(Lit_Other "]")} ) ] negated: True ) terminator: ) ] action: [ (C {(error)} {(DQ ("The following patches failed:"))}) (C {(cat)} {(failed)}) (ControlFlow token: arg_word:{(1)}) ] spids: [-1 409] ) ] spids: [-1 429] ) (C {(rm)} {(-f)} {(localversion) (Lit_Other "*")}) (ForEach iter_name: i iter_words: [{($ VSub_Name "$_flavors")}] do_arg_iter: False body: (DoGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:_config) op: Equal rhs: {(config-) ($ VSub_Name "$i") (.) (${ VSub_Name CARCH)} spids: [460] ) ] spids: [458] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:_builddir) op: Equal rhs: {(DQ ($ VSub_Name "$srcdir")) (/build-) ($ VSub_Name "$i")} spids: [471] ) ] spids: [469] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$_builddir"))}) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ (-) ($ VSub_Name "$pkgrel") (-) ($ VSub_Name "$i"))}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ ($ VSub_Name "$srcdir")) (/build-) ($ VSub_Name "$i") (/localversion-alpine) } spids: [497] ) ] ) (ControlFlow token: arg_word: {(1)} ) ] op_id: Op_DPipe ) (AndOr children: [ (C {(cp)} {(DQ ($ VSub_Name "$srcdir")) (/) ($ VSub_Name "$_config")} {(DQ ($ VSub_Name "$_builddir")) (/.config)} ) (ControlFlow token: arg_word: {(1)} ) ] op_id: Op_DPipe ) (AndOr children: [ (C {(make)} {(-C)} {(DQ ($ VSub_Name "$srcdir")) (/linux-) ($ VSub_Name "$_kernver")} {(Lit_VarLike "O=") (DQ ($ VSub_Name "$_builddir"))} {(Lit_VarLike "HOSTCC=") (DQ (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(gcc)}) spids: [557 561] ) ) } {(silentoldconfig)} ) (ControlFlow token: arg_word: {(1)} ) ] op_id: Op_DPipe ) ] spids: [455 575] ) spids: [451 453] ) ] spids: [221] ) spids: [217 220] ) (FuncDef name: build body: (BraceGroup children: [ (ForEach iter_name: i iter_words: [{($ VSub_Name "$_flavors")}] do_arg_iter: False body: (DoGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$srcdir")) (/build-) ($ VSub_Name "$i")}) (AndOr children: [ (C {(make)} {(Lit_VarLike "CC=") (DQ (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(gcc)}) spids: [612 616] ) (" -fno-pie") ) } {(Lit_VarLike "KBUILD_BUILD_VERSION=") (DQ (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithVarRef name:pkgrel) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [624 632] ) (-Alpine) ) } ) (ControlFlow token: arg_word: {(1)} ) ] op_id: Op_DPipe ) ] spids: [596 645] ) spids: [592 594] ) ] spids: [584] ) spids: [580 583] ) (FuncDef name: _package body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:_buildflavor) op: Equal rhs: {(DQ ($ VSub_Number "$1"))} spids: [659] ) (assign_pair lhs: (LhsName name:_outdir) op: Equal rhs: {(DQ ($ VSub_Number "$2"))} spids: [664] ) ] spids: [657] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:_abi_release) op: Equal rhs: {(${ VSub_Name pkgver) (-) (${ VSub_Name pkgrel) (-) (${ VSub_Name _buildflavor)} spids: [672] ) ] spids: [670] ) (AndOr children: [ (C {(cd)} {(DQ ($ VSub_Name "$srcdir")) (/build-) ($ VSub_Name "$_buildflavor")}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$_outdir")) (/boot)} {(DQ ($ VSub_Name "$_outdir")) (/lib/modules)} ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:_install) op:Equal spids:[721])] spids: [719] ) (Case to_match: {(DQ ($ VSub_Name "$CARCH"))} arms: [ (case_arm pat_list: [{(arm) (Lit_Other "*")}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_install) op: Equal rhs: {(DQ ("zinstall dtbs_install"))} spids: [738] ) ] spids: [738] ) ] spids: [733 735 744 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_install) op: Equal rhs: {(install)} spids: [751] ) ] spids: [751] ) ] spids: [747 748 755 -1] ) ] spids: [724 730 758] ) (AndOr children: [ (C {(cd)} {(DQ ($ VSub_Name "$srcdir")) (/build-) ($ VSub_Name "$_buildflavor")}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(make)} {(-j1)} {(modules_install)} {(firmware_install)} {($ VSub_Name "$_install")} {(Lit_VarLike "INSTALL_MOD_PATH=") (DQ ($ VSub_Name "$_outdir"))} {(Lit_VarLike "INSTALL_PATH=") (DQ ($ VSub_Name "$_outdir")) (/boot)} {(Lit_VarLike "INSTALL_DTBS_PATH=") (DQ ($ VSub_Name "$_outdir")) (/usr/lib/linux-) (${ VSub_Name _abi_release) } ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(DQ ($ VSub_Name "$srcdir")) (/markdt)} {(DQ ($ VSub_Name "$_outdir")) (/boot/vmlinuz-) ($ VSub_Name "$_buildflavor")} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (C {(rm)} {(-f)} {(DQ ($ VSub_Name "$_outdir")) (/lib/modules/) (${ VSub_Name _abi_release) (/build)} {(DQ ($ VSub_Name "$_outdir")) (/lib/modules/) (${ VSub_Name _abi_release) (/source)} ) (C {(rm)} {(-rf)} {(DQ ($ VSub_Name "$_outdir")) (/lib/firmware)}) (C {(install)} {(-D)} {(include/config/kernel.release)} {(DQ ($ VSub_Name "$_outdir")) (/usr/share/kernel/) ($ VSub_Name "$_buildflavor") (/kernel.release) } ) ] spids: [654] ) spids: [650 653] ) (FuncDef name: package body: (BraceGroup children: [(C {(_package)} {(rpi)} {(DQ ($ VSub_Name "$pkgdir"))})] spids: [909] ) spids: [905 908] ) (FuncDef name: rpi2 body: (BraceGroup children: [(C {(_package)} {(rpi2)} {(DQ ($ VSub_Name "$subpkgdir"))})] spids: [930] ) spids: [926 929] ) (FuncDef name: _dev body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:_flavor) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name "$subpkgname")}) (C {(sed)} {(-E)} {(SQ <"s/(^linux-|-dev$)//g">)}) ] negated: False ) ] ) left_token: spids: [954 968] ) } spids: [953] ) ] spids: [951] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:_abi_release) op: Equal rhs: {(${ VSub_Name pkgver) (-) (${ VSub_Name pkgrel) (-) ($ VSub_Name "$_flavor")} spids: [973] ) ] spids: [971] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: { (DQ ("Headers and script for third party modules for ") ($ VSub_Name "$_flavor") (" kernel") ) } spids: [1013] ) ] spids: [1013] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:depends) op: Equal rhs: {(DQ ("gmp-dev bash"))} spids: [1021] ) ] spids: [1021] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:dir) op: Equal rhs: {(DQ ($ VSub_Name "$subpkgdir")) (/usr/src/linux-headers-) (${ VSub_Name _abi_release) } spids: [1029] ) ] spids: [1027] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$dir"))}) (C {(cp)} {(DQ ($ VSub_Name "$srcdir")) (/config-) ($ VSub_Name "$_flavor") (.) (${ VSub_Name CARCH) } {(DQ ($ VSub_Name "$dir")) (/.config)} ) (C {(make)} {(-j1)} {(-C)} {(DQ ($ VSub_Name "$srcdir")) (/linux-) ($ VSub_Name "$_kernver")} {(Lit_VarLike "O=") (DQ ($ VSub_Name "$dir"))} {(Lit_VarLike "HOSTCC=") (DQ (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(gcc)}) spids: [1094 1098] ) ) } {(silentoldconfig)} {(prepare)} {(modules_prepare)} {(scripts)} ) (C {(rm)} {(DQ ($ VSub_Name "$dir")) (/Makefile)} {(DQ ($ VSub_Name "$dir")) (/source)}) (C {(cd)} {(DQ ($ VSub_Name "$srcdir")) (/linux-) ($ VSub_Name "$_kernver")}) (AndOr children: [ (Pipeline children: [ (C {(find)} {(.)} {(-path)} {(SQ <"./include/*">)} {(-prune)} {(-o)} {(-path)} {(SQ <"./scripts/*">)} {(-prune)} {(-o)} {(-type)} {(f)} {(EscapedLiteralPart token:)} {(-name)} {(SQ <"Makefile*">)} {(-o)} {(-name)} {(SQ <"Kconfig*">)} {(-o)} {(-name)} {(SQ <"Kbuild*">)} {(-o)} {(-name)} {(SQ <"*.sh">)} {(-o)} {(-name)} {(SQ <"*.pl">)} {(-o)} {(-name)} {(SQ <"*.lds">)} {(EscapedLiteralPart token:)} {(-print)} ) (C {(cpio)} {(-pdm)} {(DQ ($ VSub_Name "$dir"))}) ] negated: False ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(cp)} {(-a)} {(scripts)} {(include)} {(DQ ($ VSub_Name "$dir"))}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (Pipeline children: [ (C {(find)} { (CommandSubPart command_list: (CommandList children: [ (C {(find)} {(arch)} {(-name)} {(include)} {(-type)} {(d)} {(-print)}) ] ) left_token: spids: [1287 1301] ) } {(-type)} {(f)} ) (C {(cpio)} {(-pdm)} {(DQ ($ VSub_Name "$dir"))}) ] negated: False ) (C {(install)} {(-Dm644)} {(DQ ($ VSub_Name "$srcdir")) (/build-) ($ VSub_Name "$_flavor") (/Module.symvers)} {(DQ ($ VSub_Name "$dir")) (/Module.symvers)} ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/lib/modules/) (${ VSub_Name _abi_release)} ) (C {(ln)} {(-sf)} {(/usr/src/linux-headers-) (${ VSub_Name _abi_release)} {(DQ ($ VSub_Name "$subpkgdir")) (/lib/modules/) (${ VSub_Name _abi_release) (/build)} ) ] spids: [948] ) spids: [944 947] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "bf67ff812cc3cb7e5059e82cc5db0d9a7c5637f7ed9a42e4730c715bf7047c81ed3a571225f92a33ef0b6d65f35595bc32d773356646df2627da55e9bc7f1f1a linux-4.9.tar.xz\n" ) ( "e490bfc16ebf14177a2863bf87278911d0a85dbbfd14b6e8605460e482376fc5f93ac4da355002ffa18d09a20ae4e00f2a4dee50cdd067b801b3f4d5a0f665e5 patch-4.9.52.xz\n" ) ( "c78b59068c267e8b4b3768b5d79c22f4d3ce46f0c84ce0783b335aef750bb912e2a8804a633dc277090d218b799c77186946b4406a6925bc0b417b36209135ca rpi-4.9.52-alpine.patch\n" ) ( "36724ba56cb8fdf3a3d347cffb67ae1cc3d7b1052d526b6b5134ebf6baae9f9724b586c97833453dc7697ab24699426f0749af78b6a80be36967a80033a0cf40 gpio-mcp23s08-pullups.patch\n" ) ( "501c91bf2538a18102da59bbccc3097f9c3c90079acc0e946ff075074160c09b8a66934e5ce5470e170f0e4f93d114709a95230367426d0bb7ea02c4bdf4cc9b issue-4973.patch\n" ) ( "649d3a7d3c1da95c5265a2e85a946a523e1a6ab0bcce1ab8b656329dc3a6a2e94373a8a0b8fc96cbeedc31093a661e4ed0f1ad0a995bfeff1686b8f19ef7621c config-rpi.armhf\n" ) ( "ba6fb71c4c4ce58693c848290eeb50781a3aa7109188eb22bc099a8a601b8ffcf193f9f3887d16ce5d76a11f31e627a309d37648a8476ab52db79a3eebd96e96 config-rpi2.armhf\n" ) ( "a8e7f434c325c9dd7a9109efecad408e42a50ecd1391cb0c7d1d7de79609caee007486c8a6538231c74bdc5d7b84cbca053958e1b239bc0507e6d3598ace383a markdt" ) ) } spids: [1378] ) ] spids: [1378] ) ] )