Advertisement
corrosiontears

Script: Kernel-CK para Ubuntu (Atualizado Manualmente)

Jan 23rd, 2015
718
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 16.79 KB | None | 0 0
  1. #!/bin/sh
  2. #http://viajemotu.wordpress.com/2012/08/13/kernel-ck-for-ubuntu-precise/
  3. #https://github.com/chilicuil/learn/blob/master/sh/is/kernel-ck-ubuntu
  4. # $ time sh kernel-ck-ubuntu
  5. #####################################
  6. #kernel version base
  7. kernel="3.18"
  8. #kernel specific version
  9. patchkernel="3.18.3"
  10. #BFQ patch
  11. bfq="3.18.0-v7r7"
  12. #CK patch
  13. patchck="3.18-ck1"
  14. #####################################
  15. ################################################################################
  16. ############DO NOT EDIT BELOW UNLESS YOU KNOW WHAT YOU'RE DOING#################
  17. ################################################################################
  18. trap _cleanup SIGINT SIGTERM #trap ctrl-c
  19. #/tmp partition could have noexec
  20. tmp_path="${HOME}/.tmp/kernel-ck-ubuntu-${patchkernel}"
  21. curr_path="${PWD}"
  22. apps_default="kernel-package gcc-4.6 libncurses5 libncurses5-dev build-essential
  23. patch fakeroot bc"
  24. cl="$(printf "%s\\n" "$(($(grep -c processor /proc/cpuinfo) + 1))")"
  25. vbfq="$(printf "%s" "${bfq}" | cut -d'-' -f2)"
  26. ckk="$(printf "%s" "${patchck}" | cut -d'-' -f2)"
  27. arqt="$(dpkg --print-architecture)"
  28. _printfl()
  29. { #print lines
  30. _printfl_var_max_len="80"
  31. if [ -n "${1}" ]; then
  32. _printfl_var_word_len="$((${#1} + 2))"
  33. _printfl_var_sub="$((${_printfl_var_max_len} - ${_printfl_var_word_len}))"
  34. _printfl_var_half="$((${_printfl_var_sub} / 2))"
  35. _printfl_var_other_half="$((${_printfl_var_sub} - ${_printfl_var_half}))"
  36. printf "%b" "\033[1m" #white strong
  37. printf '%*s' "${_printfl_var_half}" '' | tr ' ' -
  38. printf "%b" "\033[7m" #white background
  39. printf " %s " "${1}"
  40. printf "%b" "\033[0m\033[1m" #white strong
  41. printf '%*s' "${_printfl_var_other_half}" '' | tr ' ' -
  42. printf "%b" "\033[0m" #back to normal
  43. printf "\\n"
  44. else
  45. printf "%b" "\033[1m" #white strong
  46. printf '%*s' "${_printfl_var_max_len}" '' | tr ' ' -
  47. printf "%b" "\033[0m" #back to normal
  48. printf "\\n"
  49. fi
  50. }
  51. _printfs()
  52. { #print step
  53. [ -z "${1}" ] && return 1
  54. printf "%s\\n" "[+] ${*}"
  55. }
  56. _die()
  57. {
  58. [ -z "${1}"] && return 1
  59. printf "%b\\n" "[-] Error: ${*}"
  60. exit 1
  61. }
  62. _header()
  63. {
  64. clear
  65. _printfl "Kernel ck builder (${patchkernel})"
  66. printf "%b\\n" "\033[1m Updates:\033[0m https://github.com/chilicuil/learn/blob/master/sh/is/kernel-ck-ubuntu"
  67. printf "%b\\n" "\033[1m Patches:\033[0m -bfq, -ck"
  68. printf "%b\\n" "\033[1m Config:\033[0m http://repo-ck.com/"
  69. _printfl "Current configuration: edit the script to change it"
  70. printf "%s\\n" " build path: ${tmp_path}"
  71. printf "%s\\n" " kernel: ${patchkernel}"
  72. printf "%s\\n" " -bfq patchset: ${bfq}"
  73. printf "%s\\n" " -ck patchset: ${patchck}"
  74. printf "%s\\n" " sufix: ${ckk}"
  75. printf "%s\\n" " arch: ${arqt}"
  76. printf "%s\\n" " concurrency level: ${cl}"
  77. _printfl
  78. }
  79. _cmd()
  80. { #print current command, exits on fail
  81. [ -z "${1}" ] && return 0
  82. printf "%s " " $ ${@}"
  83. printf "%s\\n"
  84. eval "${@}" 2>&1 >/tmp/kernel-ck-ubuntu.error
  85. status="${?}"
  86. [ X"${status}" != X"0" ] && { \
  87. cat /tmp/kernel-ck-ubuntu.error; \
  88. exit "${status}"; } || return
  89. }
  90. _cmdsudo()
  91. { #print current command, exits on fail
  92. [ -z "${1}" ] && return 0
  93. printf "%s " " $ sudo ${@}"
  94. printf "%s\\n" "${sudopwd}" | ${sudocmd} ${@} 2>&1 >/tmp/kernel-ck-ubuntu.error
  95. status="${?}"
  96. [ X"${status}" != X"0" ] && { \
  97. cat /tmp/kernel-ck-ubuntu.error; \
  98. exit "${status}"; } || return
  99. }
  100. _animcui()
  101. { #wait animation
  102. [ -z "${1}" ] && { printf "%5s\n" ""; return 1; }
  103. if ! printf "%s" "$(pidof "${1}")" | grep "[0-9].*" >/dev/null; then
  104. printf "%5s\n" ""
  105. return 1;
  106. fi
  107. _animcui_var_animation_state="1"
  108. if [ ! "$(ps -p "$(pidof "${1}")" -o comm= 2>/dev/null)" ]; then
  109. printf "%5s\n" ""
  110. return 1
  111. fi
  112. printf "%5s" ""
  113. while [ "$(ps -p "$(pidof "${1}")" -o comm= 2>/dev/null)" ]; do
  114. printf "%b" "\b\b\b\b\b"
  115. case "${_animcui_var_animation_state}" in
  116. 1) printf "%s" '\o@o\'
  117. _animcui_var_animation_state="2" ;;
  118. 2) printf "%s" '|o@o|'
  119. _animcui_var_animation_state="3" ;;
  120. 3) printf "%s" '/o@o/'
  121. _animcui_var_animation_state="4" ;;
  122. 4) printf "%s" '|o@o|'
  123. _animcui_var_animation_state="1" ;;
  124. esac
  125. sleep 1
  126. done
  127. printf "%b" "\b\b\b\b\b" && printf "%5s\n" ""
  128. }
  129. _getroot()
  130. { #get sudo's password, define $sudopwd and $sudocmd
  131. if [ ! X"${LOGNAME}" = X"root" ]; then
  132. printf "%s\\n" "Detecting user ${LOGNAME} (non-root) ..."
  133. printf "%s\\n" "Checking if sudo is available ..."
  134. if command -v "sudo" >/dev/null 2>&1; then
  135. sudo -K
  136. if [ -n "${sudopwd}" ]; then
  137. # password check
  138. _getroot_var_test="$(printf "%s\\n" "${sudopwd}" | sudo -S ls 2>&1)"
  139. _getroot_var_status="${?}"
  140. _getroot_var_not_allowed="$(printf "%s" "${_getroot_var_test}" | \
  141. grep -i "sudoers")"
  142. if [ -n "${_getroot_var_not_allowed}" ]; then
  143. printf "%s %s\\n" "You're not allowed to use sudo," \
  144. "get in contact with your local administrator"
  145. exit
  146. fi
  147. if [ X"${_getroot_var_status}" != X"0" ]; then
  148. sudopwd=""
  149. printf "%s\\n" "Incorrect preseed password"
  150. exit
  151. else
  152. sudocmd="sudo -S"
  153. fi
  154. printf "%s\\n" " - all set ..."
  155. return
  156. fi
  157. i=0 ; while [ "${i}" -lt "3" ]; do
  158. i="$((${i} + 1))"
  159. printf "%s" " - enter sudo password: "
  160. stty -echo
  161. read sudopwd
  162. stty echo
  163. # password check
  164. _getroot_var_test="$(printf "%s\\n" "${sudopwd}" | sudo -S ls 2>&1)"
  165. _getroot_var_status="${?}"
  166. _getroot_var_not_allowed="$(printf "%s" "${_getroot_var_test}" | \
  167. grep -i "sudoers")"
  168. if [ -n "${_getroot_var_not_allowed}" ]; then
  169. printf "\\n%s %s\\n" "You're not allowed to use sudo," \
  170. "get in contact with your local administrator"
  171. exit
  172. fi
  173. printf "\\n"
  174. if [ X"${_getroot_var_status}" != X"0" ]; then
  175. sudopwd=""
  176. else
  177. sudocmd="sudo -S"
  178. break
  179. fi
  180. done
  181. if [ -z "${sudopwd}" ]; then
  182. printf "%s\\n" "Failed authentication"
  183. exit
  184. fi
  185. else
  186. printf "%s %s\\n" "You're not root and sudo isn't available." \
  187. "Please run this script as root!"
  188. exit
  189. fi
  190. fi
  191. }
  192. _cleanup()
  193. {
  194. stty echo
  195. printf "\\n"
  196. _printfl "Cleanup"
  197. _printfs "deleting files at ${tmp_path} ..."
  198. #printf "%s\\n" "${sudopwd}" | ${sudocmd} rm -v "${tmp_path}"/patch*
  199. #printf "%s\\n" "${sudopwd}" | ${sudocmd} rm -v "${tmp_path}"/*.patch
  200. printf "%s\\n" "${sudopwd}" | _cmd ${sudocmd} rm -rf "${tmp_path}/linux-${patchkernel}-${ckk}"
  201. #printf "%s\\n" "${sudopwd}" | ${sudocmd} mount -o remount /tmp
  202. #rm -rf "${tmp_path}" 2>/dev/null
  203. [ -z "${1}" ] && exit
  204. }
  205. _waitfor()
  206. { #print, execute and wait for a command to finish
  207. [ -z "${1}" ] && return 1
  208. printf "%s " " $ ${@} ..."
  209. ${@} > /dev/null 2>&1 &
  210. sleep 1s
  211. _animcui "${1}"
  212. }
  213. _waitforsudo()
  214. { #print, execute and wait for a command to finish
  215. [ -z "${1}" ] && return 1
  216. printf "%s " " $ sudo ${@} ..."
  217. printf "%s\\n" "${sudopwd}" | ${sudocmd} ${*} >/dev/null 2>&1 &
  218. sleep 1s
  219. if [ X"${1}" = X"DEBIAN_FRONTEND=noninteractive" ]; then
  220. _animcui "${2}"
  221. else
  222. _animcui "${1}"
  223. fi
  224. }
  225. _header
  226. _getroot
  227. _printfl "Fixing dependencies"
  228. _waitforsudo apt-get update
  229. _waitforsudo apt-get install --no-install-recommends -y ${apps_default}
  230. _printfl "Downloading archives"
  231. _printfs "downloading main vanilla kernel tree ..."
  232. _cmd mkdir -p "${tmp_path}"
  233. _cmd cd "${tmp_path}"
  234. _waitfor wget --no-check-certificate -N http://www.kernel.org/pub/linux/kernel/v3.x/linux-"${kernel}".tar.gz
  235. [ ! -f linux-"${kernel}".tar.gz ] && _die "couldn't get http://www.kernel.org/pub/linux/kernel/v3.x/linux-${kernel}.tar.gz"
  236. _printfs "downloading mainstream patches ..."
  237. _waitfor wget --no-check-certificate -N http://www.kernel.org/pub/linux/kernel/v3.x/patch-"${patchkernel}".gz
  238. [ ! -f patch-"${patchkernel}".gz ] && _die "couldn't get http://www.kernel.org/pub/linux/kernel/v3.x/patch-${patchkernel}.gz"
  239. _printfs "downloading -ck patches ..."
  240. _waitfor wget -N "http://ck.kolivas.org/patches/3.0/${kernel}/${patchck}/patch-${patchck}.bz2"
  241. [ ! -f patch-"${patchck}".bz2 ] && _die "couldn't get http://ck.kolivas.org/patches/3.0/${kernel}/${patchck}/patch-${patchck}.bz2"
  242. _printfs "downloading bfq patches ..."
  243. _waitfor wget -N "http://algo.ing.unimo.it/people/paolo/disk_sched/patches/${bfq}/0001-block-cgroups-kconfig-build-bits-for-BFQ-${vbfq}-${kernel}.patch"
  244. [ ! -f "0001-block-cgroups-kconfig-build-bits-for-BFQ-${vbfq}-${kernel}.patch" ] && \
  245. _die "couldn't get http://algo.ing.unimo.it/people/paolo/disk_sched/patches/${bfq}/0001-block-cgroups-kconfig-build-bits-for-BFQ-${vbfq}-${kernel}.patch"
  246. _waitfor wget -N "http://algo.ing.unimo.it/people/paolo/disk_sched/patches/${bfq}/0002-block-introduce-the-BFQ-${vbfq}-I-O-sched-for-${kernel}.patch"
  247. [ ! -f "0002-block-introduce-the-BFQ-${vbfq}-I-O-sched-for-${kernel}.patch" ] && \
  248. _die "couldn't get http://algo.ing.unimo.it/people/paolo/disk_sched/patches/${bfq}/0002-block-introduce-the-BFQ-${vbfq}-I-O-sched-for-${kernel}.patch"
  249. _waitfor wget -N "http://algo.ing.unimo.it/people/paolo/disk_sched/patches/${bfq}/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-${vbfq}-for-${kernel}.0.patch"
  250. [ ! -f "0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-${vbfq}-for-${kernel}.0.patch" ] && \
  251. _die "couldn't get http://algo.ing.unimo.it/people/paolo/disk_sched/patches/${bfq}/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-${vbfq}-for-${kernel}.0.patch"
  252. _printfl "Applying patches"
  253. _printfs "uncompresing kernel to ${tmp_path}/linux-${kernel}/ ..."
  254. if [ ! -d "/${tmp_path}/linux-${kernel}/" ]; then
  255. _waitfor tar zxf "${tmp_path}/linux-${kernel}.tar.gz"
  256. [ ! -d "${tmp_path}/linux-${kernel}" ] && _die "couldn't unpack ${tmp_path}/linux-${kernel}.tar.gz"
  257. fi
  258. _printfs "uncompresing patches ..."
  259. _waitfor gunzip patch-"${patchkernel}".gz; [ ! -f patch-"${patchkernel}" ] && _die "couldn't unpack patch-${patchkernel}.gz"
  260. _waitfor bunzip2 patch-"${patchck}".bz2; [ ! -f patch-"${patchck}" ] && _die "couldn't unpack patch-${patchck}.bz2"
  261. _printfs "moving to ${tmp_path}/linux-${patchkernel}-${ckk}"
  262. _waitfor rm -rf "linux-${patchkernel}-${ckk}"
  263. _waitfor cp -R -- linux-"${kernel}" "linux-${patchkernel}-${ckk}"
  264. _cmd cd "linux-${patchkernel}-${ckk}"
  265. _printfs "applying patches ..."
  266. _cmd "patch -p1 < ../patch-${patchkernel}"
  267. _cmd "patch -p1 < ../patch-${patchck}"
  268. _cmd "patch -p1 < ../0001-block-cgroups-kconfig-build-bits-for-BFQ-${vbfq}-${kernel}.patch"
  269. _cmd "patch -p1 < ../0002-block-introduce-the-BFQ-${vbfq}-I-O-sched-for-${kernel}.patch"
  270. _cmd "patch -p1 < ../0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-${vbfq}-for-${kernel}.0.patch"
  271. _printfl "Configuring kernel"
  272. _printfs "downloading optimized config from http://repo-ck.com ... "
  273. #_waitfor wget "http://liquorix.net/sources/${kernel}/config.${arqt}"
  274. ##TODO 05-11-2013 20:30 >> liquorix.net current configuration breaks -ck kernel
  275. # starting in >= 3.10, check from time to time if it can be reused
  276. #for now use config mirrored from http://repo-ck.com/
  277. _waitfor wget "http://javier.io/mirror/${kernel}/config.${arqt}"
  278. _cmd cp -- "config.${arqt}" .config
  279. ##tmp fix for bug #663474, disable lguest hypervisor, http://lguest.ozlabs.org/lguest.txt
  280. ##http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=663474
  281. if [ X"${arqt}" = X"i386" ]; then
  282. sed -i "/CONFIG_LGUEST_GUEST/d" .config
  283. sed -i "/CONFIG_LGUEST/d" .config
  284. elif [ X"${arqt}" = X"amd64" ]; then
  285. if [ ! -d ./arch/amd64 ]; then
  286. cd arch >/dev/null 2>&1
  287. ln -s x86 amd64 >/dev/null 2>&1
  288. cd - >/dev/null 2>&1
  289. fi
  290. fi
  291. _printfs "making sure BFS and BFQ are enabled in config ..."
  292. sed -i "/CONFIG_SCHED_CFS=y/d" .config
  293. sed -i -e "s/# CONFIG_SCHED_BFS is not set/CONFIG_SCHED_BFS=y/g" \
  294. -i -e "s/# CONFIG_IOSCHED_BFQ is not set/CONFIG_IOSCHED_BFQ=y/g" \
  295. -i -e "s/CONFIG_DEFAULT_CFQ=y/# CONFIG_DEFAULT_CFQ is not set/g" \
  296. -i -e "s/CONFIG_DEFAULT_DEADLINE=y/# CONFIG_DEFAULT_DEADLINE is not set/g" \
  297. -i -e "s/CONFIG_DEFAULT_NOOP=y/# CONFIG_DEFAULT_NOOP is not set/g" \
  298. -i -e "s/CONFIG_DEFAULT_IOSCHED="cfq"/CONFIG_DEFAULT_IOSCHED="bfq"/g" \
  299. -i -e "s/CONFIG_DEFAULT_IOSCHED="deadline"/CONFIG_DEFAULT_IOSCHED="bfq"/g" \
  300. -i -e "s/CONFIG_DEFAULT_IOSCHED="noop"/CONFIG_DEFAULT_IOSCHED="bfq"/g" \
  301. -i -e "s/# CONFIG_DEFAULT_BFQ is not set/CONFIG_DEFAULT_BFQ=y/g" .config
  302. _printfs "making sure CONFIG_HZ is set to 1000, better performance + fixes in resume|suspending issues"
  303. sed -i -e 's/^CONFIG_HZ_300=y/# CONFIG_HZ_300 is not set/' \
  304. -i -e 's/^# CONFIG_HZ_1000 is not set/CONFIG_HZ_1000=y/' \
  305. -i -e 's/^CONFIG_HZ=300/CONFIG_HZ=1000/' .config
  306. #Avoid stackprotector http://www.spinics.net/lists/linux-kbuild/msg08964.html
  307. #not available in ubuntu precise gcc (4.6.3)
  308. _printfs "making sure CONFIG_CC_STACKPROTECTOR_STRONG is disabled, allow compilation in old gcc versions ..."
  309. sed -i -e 's/^CONFIG_CC_STACKPROTECTOR_STRONG=y/# CONFIG_CC_STACKPROTECTOR_STRONG is not set/' \
  310. -i -e 's/^# CONFIG_CC_STACKPROTECTOR_NONE is not set/CONFIG_CC_STACKPROTECTOR_NONE=y/' .config
  311. _printfs "removing double -ck suffix ..."
  312. sed -i -e 's/CONFIG_LOCALVERSION="-ck"/# CONFIG_LOCALVERSION="-ck"/' .config
  313. ##############
  314. #extra patches
  315. ##############
  316. #a lot of shit made it to 3.14.x =/
  317. #_printfs "setting back FSID to 1, http://www.spinics.net/lists/kernel/msg1716924.html"
  318. #sed -i 's/static int unnamed_dev_start = 0/static int unnamed_dev_start = 1/' ./fs/super.c
  319. #_printfs "disable usb autosuspend for intel btusb, http://www.spinics.net/lists/kernel/msg1716461.html"
  320. #sed -i "/usb_enable_autosuspend(data->udev);/d" ./drivers/bluetooth/btusb.c
  321. #_printfs "fix Xorg crash for i810 chipset, http://lkml.kernel.org/g/533D01BD.1010200@googlemail.com"
  322. #cat > ../kernfs-fix-removed-error-check.patch << EOF
  323. #diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c
  324. #index 8034706..e01ea4a 100644
  325. #--- a/fs/kernfs/file.c
  326. #+++ b/fs/kernfs/file.c
  327. #@@ -484,6 +484,8 @@ static int kernfs_fop_mmap(struct file *file, struct vm_area_struct *vma)
  328. #ops = kernfs_ops(of->kn);
  329. #rc = ops->mmap(of, vma);
  330. #+ if (rc)
  331. #+ goto out_put;
  332. #/*
  333. #* PowerPC's pci_mmap of legacy_mem uses shmem_zero_setup()
  334. #EOF
  335. #_cmd "patch -p1 < ../kernfs-fix-removed-error-check.patch"
  336. #_printfs "fix saa7134 video, https://bugzilla.kernel.org/show_bug.cgi?id=73361"
  337. #cat > ../fix-saa7134.patch << EOF
  338. #--- a/drivers/media/pci/saa7134/saa7134-video.c
  339. #+++ a/drivers/media/pci/saa7134/saa7134-video.c
  340. #@@ -1243,6 +1243,7 @@ static int video_release(struct file *file)
  341. #videobuf_streamoff(&dev->cap);
  342. #res_free(dev, fh, RESOURCE_VIDEO);
  343. #videobuf_mmap_free(&dev->cap);
  344. #+ INIT_LIST_HEAD(&dev->cap.stream);
  345. #}
  346. #if (dev->cap.read_buf) {
  347. #buffer_release(&dev->cap, dev->cap.read_buf);
  348. #@@ -1254,6 +1255,7 @@ static int video_release(struct file *file)
  349. #videobuf_stop(&dev->vbi);
  350. #res_free(dev, fh, RESOURCE_VBI);
  351. #videobuf_mmap_free(&dev->vbi);
  352. #+ INIT_LIST_HEAD(&dev->vbi.stream);
  353. #}
  354. #/* ts-capture will not work in planar mode, so turn it off Hac: 04.05*/
  355. #@@ -1987,17 +1989,12 @@ int saa7134_streamoff(struct file *file, void *priv,
  356. #enum v4l2_buf_type type)
  357. #{
  358. #struct saa7134_dev *dev = video_drvdata(file);
  359. #- int err;
  360. #int res = saa7134_resource(file);
  361. #if (res != RESOURCE_EMPRESS)
  362. #pm_qos_remove_request(&dev->qos_request);
  363. #- err = videobuf_streamoff(saa7134_queue(file));
  364. #- if (err < 0)
  365. #- return err;
  366. #- res_free(dev, priv, res);
  367. #- return 0;
  368. #+ return videobuf_streamoff(saa7134_queue(file));
  369. #}
  370. #EXPORT_SYMBOL_GPL(saa7134_streamoff);
  371. #EOF
  372. #_cmd "patch -p1 < ../fix-saa7134.patch"
  373. #_printfs "Back port and refine validation of the XSDT root table, https://bugzilla.kernel.org/show_bug.cgi?id=73911"
  374. #cat > ../fix-xsdt-validation.patch << EOF
  375. #@@ -, +, @@
  376. #acpi_tb_parse_root_table().
  377. #Commit: 671cc68dc61f029d44b43a681356078e02d8dab8
  378. #Subject: ACPICA: Back port and refine validation of the XSDT root table.
  379. #---
  380. #drivers/acpi/acpica/tbutils.c | 6 ++++--
  381. #1 file changed, 4 insertions(+), 2 deletions(-)
  382. #--- a/drivers/acpi/acpica/tbutils.c
  383. #+++ a/drivers/acpi/acpica/tbutils.c
  384. #@@ -461,6 +461,7 @@ acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
  385. #u32 table_count;
  386. #struct acpi_table_header *table;
  387. #acpi_physical_address address;
  388. #+ acpi_physical_address rsdt_address;
  389. #u32 length;
  390. #u8 *table_entry;
  391. #acpi_status status;
  392. #@@ -488,11 +489,13 @@ acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
  393. #* as per the ACPI specification.
  394. #*/
  395. #address = (acpi_physical_address) rsdp->xsdt_physical_address;
  396. #+ rsdt_address = (acpi_physical_address) rsdp->rsdt_physical_address;
  397. #table_entry_size = ACPI_XSDT_ENTRY_SIZE;
  398. #} else {
  399. #/* Root table is an RSDT (32-bit physical addresses) */
  400. #address = (acpi_physical_address) rsdp->rsdt_physical_address;
  401. #+ rsdt_address = address;
  402. #table_entry_size = ACPI_RSDT_ENTRY_SIZE;
  403. #}
  404. #@@ -515,8 +518,7 @@ acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
  405. #/* Fall back to the RSDT */
  406. #- address =
  407. #- (acpi_physical_address) rsdp->rsdt_physical_address;
  408. #+ address = rsdt_address;
  409. #table_entry_size = ACPI_RSDT_ENTRY_SIZE;
  410. #}
  411. #}
  412. #EOF
  413. #_cmd "patch -p1 < ../fix-xsdt-validation.patch"
  414. _printfl "Compiling kernel"
  415. _printfs "running make-kpkg ..."
  416. CONCURRENCY_LEVEL="${cl}"
  417. printf "\\n" | _cmd fakeroot make-kpkg --initrd kernel_image kernel_headers modules_image
  418. _printfl "DONE"
  419. _printfs "copying debs files ..."
  420. _cmd cp -- ../linux-*.deb "${curr_path}"
  421. _printfs "you may want to install the generated packages and reboot your system, run: $ sudo dpkg -i linux-*.deb"
  422. _printfs "have fun ^_^!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement