new post: fix clear kernel compile

This commit is contained in:
dongdigua 2022-11-04 16:52:02 +08:00
parent 1bc7767eea
commit b0fe7d3e2e
6 changed files with 318 additions and 50 deletions

View File

@ -0,0 +1,252 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2022-11-04 五 16:51 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Clear Kernel Build Error? Fix It</title>
<meta name="author" content="dongdigua" />
<meta name="description" content="arch/x86/kernel/cpu/intel_epb.c:171:2: error: call to undeclared function 'sched _set_itmt_power_ratio'" />
<meta name="generator" content="Org Mode" />
<style>
#content { max-width: 60em; margin: auto; }
.title { text-align: center;
margin-bottom: .2em; }
.subtitle { text-align: center;
font-size: medium;
font-weight: bold;
margin-top:0; }
.todo { font-family: monospace; color: red; }
.done { font-family: monospace; color: green; }
.priority { font-family: monospace; color: orange; }
.tag { background-color: #eee; font-family: monospace;
padding: 2px; font-size: 80%; font-weight: normal; }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
.underline { text-decoration: underline; }
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
p.verse { margin-left: 3%; }
pre {
border: 1px solid #e6e6e6;
border-radius: 3px;
background-color: #f2f2f2;
padding: 8pt;
font-family: monospace;
overflow: auto;
margin: 1.2em;
}
pre.src {
position: relative;
overflow: auto;
}
pre.src:before {
display: none;
position: absolute;
top: -8px;
right: 12px;
padding: 3px;
color: #555;
background-color: #f2f2f299;
}
pre.src:hover:before { display: inline; margin-top: 14px;}
/* Languages per Org manual */
pre.src-asymptote:before { content: 'Asymptote'; }
pre.src-awk:before { content: 'Awk'; }
pre.src-authinfo::before { content: 'Authinfo'; }
pre.src-C:before { content: 'C'; }
/* pre.src-C++ doesn't work in CSS */
pre.src-clojure:before { content: 'Clojure'; }
pre.src-css:before { content: 'CSS'; }
pre.src-D:before { content: 'D'; }
pre.src-ditaa:before { content: 'ditaa'; }
pre.src-dot:before { content: 'Graphviz'; }
pre.src-calc:before { content: 'Emacs Calc'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-fortran:before { content: 'Fortran'; }
pre.src-gnuplot:before { content: 'gnuplot'; }
pre.src-haskell:before { content: 'Haskell'; }
pre.src-hledger:before { content: 'hledger'; }
pre.src-java:before { content: 'Java'; }
pre.src-js:before { content: 'Javascript'; }
pre.src-latex:before { content: 'LaTeX'; }
pre.src-ledger:before { content: 'Ledger'; }
pre.src-lisp:before { content: 'Lisp'; }
pre.src-lilypond:before { content: 'Lilypond'; }
pre.src-lua:before { content: 'Lua'; }
pre.src-matlab:before { content: 'MATLAB'; }
pre.src-mscgen:before { content: 'Mscgen'; }
pre.src-ocaml:before { content: 'Objective Caml'; }
pre.src-octave:before { content: 'Octave'; }
pre.src-org:before { content: 'Org mode'; }
pre.src-oz:before { content: 'OZ'; }
pre.src-plantuml:before { content: 'Plantuml'; }
pre.src-processing:before { content: 'Processing.js'; }
pre.src-python:before { content: 'Python'; }
pre.src-R:before { content: 'R'; }
pre.src-ruby:before { content: 'Ruby'; }
pre.src-sass:before { content: 'Sass'; }
pre.src-scheme:before { content: 'Scheme'; }
pre.src-screen:before { content: 'Gnu Screen'; }
pre.src-sed:before { content: 'Sed'; }
pre.src-sh:before { content: 'shell'; }
pre.src-sql:before { content: 'SQL'; }
pre.src-sqlite:before { content: 'SQLite'; }
/* additional languages in org.el's org-babel-load-languages alist */
pre.src-forth:before { content: 'Forth'; }
pre.src-io:before { content: 'IO'; }
pre.src-J:before { content: 'J'; }
pre.src-makefile:before { content: 'Makefile'; }
pre.src-maxima:before { content: 'Maxima'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-picolisp:before { content: 'Pico Lisp'; }
pre.src-scala:before { content: 'Scala'; }
pre.src-shell:before { content: 'Shell Script'; }
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
/* additional language identifiers per "defun org-babel-execute"
in ob-*.el */
pre.src-cpp:before { content: 'C++'; }
pre.src-abc:before { content: 'ABC'; }
pre.src-coq:before { content: 'Coq'; }
pre.src-groovy:before { content: 'Groovy'; }
/* additional language identifiers from org-babel-shell-names in
ob-shell.el: ob-shell is the only babel language using a lambda to put
the execution function name together. */
pre.src-bash:before { content: 'bash'; }
pre.src-csh:before { content: 'csh'; }
pre.src-ash:before { content: 'ash'; }
pre.src-dash:before { content: 'dash'; }
pre.src-ksh:before { content: 'ksh'; }
pre.src-mksh:before { content: 'mksh'; }
pre.src-posh:before { content: 'posh'; }
/* Additional Emacs modes also supported by the LaTeX listings package */
pre.src-ada:before { content: 'Ada'; }
pre.src-asm:before { content: 'Assembler'; }
pre.src-caml:before { content: 'Caml'; }
pre.src-delphi:before { content: 'Delphi'; }
pre.src-html:before { content: 'HTML'; }
pre.src-idl:before { content: 'IDL'; }
pre.src-mercury:before { content: 'Mercury'; }
pre.src-metapost:before { content: 'MetaPost'; }
pre.src-modula-2:before { content: 'Modula-2'; }
pre.src-pascal:before { content: 'Pascal'; }
pre.src-ps:before { content: 'PostScript'; }
pre.src-prolog:before { content: 'Prolog'; }
pre.src-simula:before { content: 'Simula'; }
pre.src-tcl:before { content: 'tcl'; }
pre.src-tex:before { content: 'TeX'; }
pre.src-plain-tex:before { content: 'Plain TeX'; }
pre.src-verilog:before { content: 'Verilog'; }
pre.src-vhdl:before { content: 'VHDL'; }
pre.src-xml:before { content: 'XML'; }
pre.src-nxml:before { content: 'XML'; }
/* add a generic configuration mode; LaTeX export needs an additional
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
pre.src-conf:before { content: 'Configuration File'; }
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; }
th.org-right { text-align: center; }
th.org-left { text-align: center; }
th.org-center { text-align: center; }
td.org-right { text-align: right; }
td.org-left { text-align: left; }
td.org-center { text-align: center; }
dt { font-weight: bold; }
.footpara { display: inline; }
.footdef { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
.equation-container {
display: table;
text-align: center;
width: 100%;
}
.equation {
vertical-align: middle;
}
.equation-label {
display: table-cell;
text-align: right;
vertical-align: middle;
}
.inlinetask {
padding: 10px;
border: 2px solid gray;
margin: 10px;
background: #ffffcc;
}
#org-div-home-and-up
{ text-align: right; font-size: 70%; white-space: nowrap; }
textarea { overflow-x: auto; }
.linenr { font-size: smaller }
.code-highlighted { background-color: #ffff00; }
.org-info-js_info-navigation { border-style: none; }
#org-info-js_console-label
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
.org-info-js_search-highlight
{ background-color: #ffff00; color: #000000; font-weight: bold; }
.org-svg { width: 90%; }
</style>
<link rel='stylesheet' type='text/css' href='css/main.css' />
</head>
<body>
<div id="org-div-home-and-up">
<a accesskey="h" href="./../posts"> UP </a>
|
<a accesskey="H" href="https://dongdigua.github.io"> HOME </a>
</div><div id="content" class="content">
<h1 class="title">Clear Kernel Build Error? Fix It</h1>
<p>
when I compile clear kernel with LLVM enabled, I got this error:<br />
</p>
<div class="org-src-container">
<pre class="src src-text">arch/x86/kernel/cpu/intel_epb.c:172:2: error: call to undeclared function 'sched_set_itmt_power_ratio';
ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
sched_set_itmt_power_ratio(256 - val * 2, cpu);
^
arch/x86/kernel/cpu/intel_epb.c:172:2: note: did you mean 'sched_set_itmt_core_prio'?
./arch/x86/include/asm/topology.h:189:20: note: 'sched_set_itmt_core_prio' declared here
static inline void sched_set_itmt_core_prio(int prio, int core_cpu)
^
1 error generated.
</pre>
</div>
<p>
it's obvious that the <code>sched_set_itmt_power_ratio</code> function is undeclared<br />
so I added the following and it is able to compile :)<br />
</p>
<div class="org-src-container">
<pre class="src src-diff"><span style="font-weight: bold;">--- </span><span style="font-weight: bold;">/home/gentoo/linux/topology.h 2022-11-04 16:40:18.500113117 +0800</span>
<span style="font-weight: bold;">+++ </span><span style="font-weight: bold;">arch/x86/include/asm/topology.h 2022-11-04 16:41:03.676782505 +0800</span>
<span style="font-weight: bold;">@@ -189,6 +189,9 @@</span>
static inline void sched_set_itmt_core_prio(int prio, int core_cpu)
{
}
+static inline void sched_set_itmt_power_ratio(int prio, int core_cpu)
+{
+}
static inline int sched_set_itmt_support(void)
{
return 0;
</pre>
</div>
<p>
End.<br />
</p>
</div>
<div id="postamble" class="status">
<p class="date">Date: 2022-11-04 五 00:00</p>
<p class="author">Author: dongdigua</p>
<p class="date">Created: 2022-11-04 五 16:51</p>
</div>
</body>
</html>

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2022-10-31 一 10:21 -->
<!-- 2022-11-04 五 17:54 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Internet Collections</title>
@ -533,27 +533,12 @@ from ruanyifeng<br />
<h4><span class="section-number-4">1.36.2.</span> <a href="https://xeiaso.net/blog/nim-and-tup-2015-06-10">Nim and Tup</a></h4>
</div>
<div class="outline-4">
<h4><span class="section-number-4">1.36.3.</span> <span class="todo TODO">TODO</span> <a href="https://xeiaso.net/blog/openssl-3.x-secvuln-incoming">You should prepare for the OpenSSL 3.x secvuln</a></h4>
<h4><span class="section-number-4">1.36.3.</span> <a href="https://xeiaso.net/blog/openssl-3.x-secvuln-incoming">You should prepare for the OpenSSL 3.x secvuln</a></h4>
<div class="outline-text-4" id="text-1-36-3">
<p>
seems now have a <a href="https://mta.openssl.org/pipermail/openssl-announce/2022-October/000238.html">CRITICAL</a> vuln, butt no CVE,<br />
patch will come out on 11.1<br />
</p>
<blockquote>
<p>
The details on this issue seem to be super embargoed at the moment, but here is what I can tell based on what has been done publicly:<br />
</p>
<ul class="org-ul">
<li>The Tor project has urged relay owners to upgrade as soon as possible.<br /></li>
<li>The <a href="https://lwn.net/Articles/912776/">release for Fedora 37 has been pushed back from October 25th to November 15th</a>.<br /></li>
<li>Popular tweeter @SwiftOnSecurity tweeted about hearsay about the severity of the issue and was deleted. No reason for the deletion<br /></li>
<li>Go programming language also has "PRIVATE security fixes to the standard library". which contains crypto/tls.<br /></li>
</ul>
</blockquote>
<p>
so let's wait ^_^<br />
</p>
</div>
<ol class="org-ol">
<li><a></a><a href="https://mta.openssl.org/pipermail/openssl-announce/2022-November/000243.html">OpenSSL Security Advisory</a><br /></li>
</ol>
</div>
</div>
<div class="outline-3">
@ -1209,50 +1194,50 @@ a webos using oxygen visual design<br />
</div>
</div>
<div class="outline-3">
<h3><span class="section-number-3">4.10.</span> <a href="https://news.ycombinator.com/item?id=32012566">Hacker News: A better formulation of DRY(Don't Repeat Yourself) is SPOT (Single Point Of Truth)</a></h3>
<h3><span class="section-number-3">4.10.</span> <a href="https://news-web.php.net/php.internals/70691">PHP function hashing mechanism was strlen()</a></h3>
</div>
<div class="outline-3">
<h3><span class="section-number-3">4.11.</span> <a href="https://news-web.php.net/php.internals/70691">PHP function hashing mechanism was strlen()</a></h3>
</div>
<div class="outline-3">
<h3><span class="section-number-3">4.12.</span> <a href="http://phrack.org">Phrack Magazine</a></h3>
<div class="outline-text-3" id="text-4-12">
<h3><span class="section-number-3">4.11.</span> <a href="http://phrack.org">Phrack Magazine</a></h3>
<div class="outline-text-3" id="text-4-11">
<p>
worth reading<br />
</p>
</div>
<div class="outline-4">
<h4><span class="section-number-4">4.12.1.</span> <a href="http://phrack.org/issues/49/14.html">Smashing The Stack For Fun And Profit</a></h4>
<h4><span class="section-number-4">4.11.1.</span> <a href="http://phrack.org/issues/49/14.html">Smashing The Stack For Fun And Profit</a></h4>
</div>
<div class="outline-4">
<h4><span class="section-number-4">4.12.2.</span> <a href="http://phrack.org/issues/70/15.html">YouTube Security Scene - LiveOverflow!</a></h4>
<h4><span class="section-number-4">4.11.2.</span> <a href="http://phrack.org/issues/70/15.html">YouTube Security Scene - LiveOverflow!</a></h4>
</div>
</div>
<div class="outline-3">
<h3><span class="section-number-3">4.13.</span> <a href="https://akrl.sdf.org/gccemacs.html">gccemacs</a></h3>
<div class="outline-text-3" id="text-4-13">
<h3><span class="section-number-3">4.12.</span> <a href="https://akrl.sdf.org/gccemacs.html">gccemacs</a></h3>
<div class="outline-text-3" id="text-4-12">
</div>
<div class="outline-4">
<h4><span class="section-number-4">4.13.1.</span> <a href="https://akrl.sdf.org/gccemacs_els2020.pdf">slides_els2020</a></h4>
<h4><span class="section-number-4">4.12.1.</span> <a href="https://akrl.sdf.org/gccemacs_els2020.pdf">slides_els2020</a></h4>
</div>
</div>
<div class="outline-3">
<h3><span class="section-number-3">4.14.</span> <a href="https://tildeverse.org">https://tildeverse.org</a></h3>
<h3><span class="section-number-3">4.13.</span> <a href="https://tildeverse.org">https://tildeverse.org</a></h3>
</div>
<div class="outline-3">
<h3><span class="section-number-3">4.15.</span> <a href="http://decss.zoy.org">42 ways to distribute DeCSS</a></h3>
<div class="outline-text-3" id="text-4-15">
<h3><span class="section-number-3">4.14.</span> <a href="http://decss.zoy.org">42 ways to distribute DeCSS</a></h3>
<div class="outline-text-3" id="text-4-14">
</div>
<div class="outline-4">
<h4><span class="section-number-4">4.15.1.</span> <a href="http://www.cs.cmu.edu/~dst/DeCSS/Kesden/index.html">Lecture 33: Content Scrambling System</a></h4>
<h4><span class="section-number-4">4.14.1.</span> <a href="http://www.cs.cmu.edu/~dst/DeCSS/Kesden/index.html">Lecture 33: Content Scrambling System</a></h4>
</div>
</div>
<div class="outline-3">
<h3><span class="section-number-3">4.15.</span> <a href="https://custodians.online/chinese.html">声援 Library Genesis 和 Sci-Hub</a></h3>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="date">Date: 2022-06-05 日 00:00</p>
<p class="author">Author: dongdigua</p>
<p class="date">Created: 2022-10-31 一 10:21</p>
<p class="date">Created: 2022-11-04 五 17:54</p>
</div>
</body>
</html>

View File

@ -2,9 +2,10 @@ var data = [
"富强民主文明和谐, 自由平等公正法治, 爱国敬业诚信友善",
"解放思想, 实事求是, 与时俱进",
"绿水青山就是金山银山",
"为中华之崛起而读书!",
"<a id=quote href=https://www.bilibili.com/video/BV1vW411g7tN>谁甘人生黯淡无光 谁愿做叶不争艳芳</a>",
"fly high my friend, until we meet again",
"Fly high my friend, until we meet again",
"The internet is FULL, go away!",
"May the --force be with you",
@ -16,7 +17,9 @@ var data = [
"大炮做好了不放珍珠是什么意思?",
"write terrible nonsensical code to\\n\nensure the Copilot doesn't take over as captain",
"Automagically",
"<a id=quote href=https://www.curseforge.com/minecraft/mc-mods/carpet>NOT VANILLA!</a>"
"<a id=quote href=https://www.curseforge.com/minecraft/mc-mods/carpet>NOT VANILLA!</a>",
"Big Brother is Watching You",
"Deep Dark Fantacies",
];
var index = Math.floor((Math.random() * data.length));

View File

@ -0,0 +1,35 @@
#+TITLE: Clear Kernel Build Error? Fix It
#+DATE: <2022-11-04 五>
#+DESCRIPTION: arch/x86/kernel/cpu/intel_epb.c:171:2: error: call to undeclared function 'sched _set_itmt_power_ratio'
when I compile clear kernel with LLVM enabled, I got this error:
#+BEGIN_SRC text
arch/x86/kernel/cpu/intel_epb.c:172:2: error: call to undeclared function 'sched_set_itmt_power_ratio';
ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
sched_set_itmt_power_ratio(256 - val * 2, cpu);
^
arch/x86/kernel/cpu/intel_epb.c:172:2: note: did you mean 'sched_set_itmt_core_prio'?
./arch/x86/include/asm/topology.h:189:20: note: 'sched_set_itmt_core_prio' declared here
static inline void sched_set_itmt_core_prio(int prio, int core_cpu)
^
1 error generated.
#+END_SRC
it's obvious that the =sched_set_itmt_power_ratio= function is undeclared
so I added the following and it is able to compile :)
#+BEGIN_SRC diff
--- /home/gentoo/linux/topology.h 2022-11-04 16:40:18.500113117 +0800
+++ arch/x86/include/asm/topology.h 2022-11-04 16:41:03.676782505 +0800
@@ -189,6 +189,9 @@
static inline void sched_set_itmt_core_prio(int prio, int core_cpu)
{
}
+static inline void sched_set_itmt_power_ratio(int prio, int core_cpu)
+{
+}
static inline int sched_set_itmt_support(void)
{
return 0;
#+END_SRC
End.

View File

@ -104,17 +104,8 @@ from ruanyifeng
**** [[https://xeiaso.net/blog/v-vaporware-2019-06-23][V for Vaporware]]
经典永流传~
*** [[https://xeiaso.net/blog/nim-and-tup-2015-06-10][Nim and Tup]]
*** TODO [[https://xeiaso.net/blog/openssl-3.x-secvuln-incoming][You should prepare for the OpenSSL 3.x secvuln]]
seems now have a [[https://mta.openssl.org/pipermail/openssl-announce/2022-October/000238.html][CRITICAL]] vuln, butt no CVE,
patch will come out on 11.1
#+BEGIN_QUOTE
The details on this issue seem to be super embargoed at the moment, but here is what I can tell based on what has been done publicly:
- The Tor project has urged relay owners to upgrade as soon as possible.
- The [[https://lwn.net/Articles/912776/][release for Fedora 37 has been pushed back from October 25th to November 15th]].
- Popular tweeter @SwiftOnSecurity tweeted about hearsay about the severity of the issue and was deleted. No reason for the deletion
- Go programming language also has "PRIVATE security fixes to the standard library". which contains crypto/tls.
#+END_QUOTE
so let's wait ^_^
*** [[https://xeiaso.net/blog/openssl-3.x-secvuln-incoming][You should prepare for the OpenSSL 3.x secvuln]]
**** [[https://mta.openssl.org/pipermail/openssl-announce/2022-November/000243.html][OpenSSL Security Advisory]]
** [[https://lantian.pub/][蓝天]]
大佬!
*** [[https://lantian.pub/article/chat/how-i-nuked-my-btrfs-partition.lantian/][我把硬盘换到了新电脑上,这是 Btrfs 上的数据发生的变化]]
@ -339,7 +330,6 @@ foreign or domestic, requires you to follow Snowden's example.
** [[https://ghinda.net/oxygenos/][oxygenos]]
his final year project in high school, 2008
a webos using oxygen visual design
** [[https://news.ycombinator.com/item?id=32012566][Hacker News: A better formulation of DRY(Don't Repeat Yourself) is SPOT (Single Point Of Truth)]]
** [[https://news-web.php.net/php.internals/70691][PHP function hashing mechanism was strlen()]]
** [[http://phrack.org][Phrack Magazine]]
worth reading
@ -350,3 +340,4 @@ worth reading
** [[https://tildeverse.org]]
** [[http://decss.zoy.org][42 ways to distribute DeCSS]]
*** [[http://www.cs.cmu.edu/~dst/DeCSS/Kesden/index.html][Lecture 33: Content Scrambling System]]
** [[https://custodians.online/chinese.html][声援 Library Genesis 和 Sci-Hub]]

View File

@ -1,5 +1,6 @@
## Table of Contents
### Posts (sorted by time)
[Clear Kernel Compile Error? Fix It](clear_kernel_compile_fix)<br>
[Gentoo LLVM\_TARGETS not Working?](gentoo_llvm_targets)<br>
[CentOS/Fedora 不同的配置默认都安装了什么软件](anaconda_kickstarts)<br>
[build a nixos live image](nixos)<br>
@ -15,6 +16,7 @@
---
### Long Term Update
[大概是语文知识整理](digua-YW)<br>
[Gopher/Gemini reactions](re.gmi.txt)<br>
[Gopher/Gemini collections, a quiet web](gopher_collections.gmi.txt)<br>
[折腾 sway 的一些记录(problem&solution)](wayland)<br>