# Install Linux kernel headers. setupfor linux # Expand and copy kernel .config. getconfig linux > mini.conf && test $SYSIMAGE_TYPE == "initramfs" && echo "CONFIG_BLK_DEV_INITRD=y" >> mini.conf make ARCH=$(BOOT_KARCH:-$KARCH) KCONFIG_ALLCONFIG=mini.conf $LINUX_FLAGS \ $VERBOSITY allnoconfig >/dev/null && mkdir -p "$STAGE_DIR/src" && cp .config "$STAGE_DIR/src/config-linux" # Install Linux kernel headers (for use by uClibc). make -j $CPUS headers_install ARCH="$(KARCH)" INSTALL_HDR_PATH="$STAGE_DIR" \ $VERBOSITY && # This makes some very old package builds happy. test ! -e "$STAGE_DIR/include/asm/page.h" && ln -sf ../sys/user.h "$STAGE_DIR/include/asm/page.h" cleanup # Remove debris the kernel puts in there for no apparent reason. find "$STAGE_DIR/include" -name ".install" -print0 -or -name "..install.cmd" -print0 | xargs -0 rm (CommandList children: [ (C {(setupfor)} {(linux)}) (AndOr children: [ (SimpleCommand words: [{(getconfig)} {(linux)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(mini.conf)} spids:[17])] ) (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$SYSIMAGE_TYPE"))} {(Lit_Other "=") (Lit_Other "=")} {(DQ (initramfs))} {(Lit_Other "]")} ) (SimpleCommand words: [{(echo)} {(DQ ("CONFIG_BLK_DEV_INITRD=y"))}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(mini.conf)} spids:[46])] ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (AndOr children: [ (SimpleCommand words: [ {(make)} {(Lit_VarLike "ARCH=") (BracedVarSub token: suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{($ VSub_Name "$KARCH")}) spids: [54 58] ) } {(Lit_VarLike "KCONFIG_ALLCONFIG=") (mini.conf)} {($ VSub_Name "$LINUX_FLAGS")} {($ VSub_Name "$VERBOSITY")} {(allnoconfig)} ] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[71])] ) (AndOr children: [ (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$STAGE_DIR") (/src))}) (C {(cp)} {(.config)} {(DQ ($ VSub_Name "$STAGE_DIR") (/src/config-linux))}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(make)} {(-j)} {($ VSub_Name "$CPUS")} {(headers_install)} {(Lit_VarLike "ARCH=") (DQ (${ VSub_Name KARCH))} {(Lit_VarLike "INSTALL_HDR_PATH=") (DQ ($ VSub_Name "$STAGE_DIR"))} {($ VSub_Name "$VERBOSITY")} ) (AndOr children: [ (C {(Lit_Other "[")} {(KW_Bang "!")} {(-e)} {(DQ ($ VSub_Name "$STAGE_DIR") (/include/asm/page.h))} {(Lit_Other "]")} ) (C {(ln)} {(-sf)} {(../sys/user.h)} {(DQ ($ VSub_Name "$STAGE_DIR") (/include/asm/page.h))}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (C {(cleanup)}) (Pipeline children: [ (C {(find)} {(DQ ($ VSub_Name "$STAGE_DIR") (/include))} {(-name)} {(DQ (.install))} {(-print0)} {(-or)} {(-name)} {(DQ (..install.cmd))} {(-print0)} ) (C {(xargs)} {(-0)} {(rm)}) ] negated: False ) ] )