Skip to content

Commit

Permalink
osresearch: heads-linuxboot: Fix initrd preparation.
Browse files Browse the repository at this point in the history
* osresearch/packages/heads.scm (heads-linuxboot)[arguments]<#:phases>[prepare-initrd]: New phase.
  • Loading branch information
Danny Milosavljevic committed Dec 2, 2020
1 parent b7f46a7 commit be60e85
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions osresearch/packages/heads.scm
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ include_directories(hidapi/hidapi)"))
(string-append "CC=" ,(cc-for-target))
"BUILD_CC=gcc"
(string-append "KERNEL=" (assoc-ref %build-inputs "heads-linux") "/bzImage")
(string-append "INITRD=" (assoc-ref %build-inputs "heads-dev-cpio") "/libexec/initrd.cpio.xz")
(string-append "INITRD=initrd.cpio.xz")
) ; TODO: BOARD
#:phases
(modify-phases %standard-phases
Expand All @@ -855,6 +855,14 @@ include_directories(hidapi/hidapi)"))
(substitute* "dxe/Makefile"
(("/usr/bin/printf") "command printf"))
#t))
(add-after 'unpack 'prepare-initrd
(lambda* (#:key inputs #:allow-other-keys)
(copy-file (string-append (assoc-ref inputs "heads-dev-cpio") "/libexec/dev.cpio")
"initrd.cpio")
;; FIXME: Make sure that initrd.cpio.xz is a multiple of 512 Byte long! (see Heads)
(invoke "xz" "-f" "--check=crc32" "--lzma2=dict=1MiB" "-9"
"initrd.cpio")
#t))
(delete 'configure))))
(propagated-inputs
`())
Expand All @@ -864,7 +872,8 @@ include_directories(hidapi/hidapi)"))
("libuuid" ,util-linux "lib")
("nasm" ,nasm)
("perl" ,perl)
("python" ,python-2)))
("python" ,python-2)
("xz" ,xz)))
(inputs
`(("heads-dev-cpio" ,heads-dev-cpio)
("heads-linux" ,heads-linux)))
Expand Down

0 comments on commit be60e85

Please sign in to comment.