Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
create-iso
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
le6
create-iso
Commits
27d10e21
Commit
27d10e21
authored
Aug 14, 2018
by
Daniel Bissani Furlin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue/585' into 'develop'
SCRUM#585
: Remove unused code See merge request
!15
parents
1be8fa16
27d1be49
Pipeline
#17183
passed with stage
in 12 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
20 deletions
+14
-20
scripts-available/make-initrd.sh
scripts-available/make-initrd.sh
+14
-20
No files found.
scripts-available/make-initrd.sh
View file @
27d10e21
...
...
@@ -51,27 +51,21 @@ version="$(basename "${initrd_path}" | cut --delimiter='-' --fields=2,3)"
cp
"
${
CHROOTDIR
}
/boot/vmlinuz-
${
version
}
-generic"
"
${
TMP
}
/image/casper/vmlinuz"
||
createIsoLogger
--message
"Unable to copy kernel to image"
--tag
"cp"
# The initrd is converted from gzip to lzma
if
!
test
-f
initrd.lz
;
then
if
[
!
-d
"
${
PREFIX
}
/initrd"
]
;
then
mkdir
"
${
PREFIX
}
/initrd"
else
rm
--recursive
--force
"
${
PREFIX
:?
}
"
/initrd/
*
fi
createIsoLogger
--message
"Using '
$(
basename
"
${
initrd_path
}
"
)
'"
--type
info
initrd_type
=
"
$(
file
"
${
initrd_path
}
"
)
"
pushd
"
${
PREFIX
}
/initrd"
||
createIsoLogger
--message
"Unable to change directory"
--tag
"pushd"
if
grep
--quiet
--ignore-case
"gzip"
<<<
"
${
initrd_type
}
"
;
then
gzip
--decompress
--stdout
"
${
initrd_path
}
"
| cpio
--extract
||
createIsoLogger
--message
"Unable to decompress initrd"
--tag
"gzip"
elif
grep
--quiet
--ignore-case
"ascii"
<<<
"
${
initrd_type
}
"
;
then
block_size
=
"
$(
binwalk
--include
=
"compressed data"
"
${
initrd_path
}
"
|
cut
--delimiter
=
" "
--fields
=
1 |
grep
-E
"[0-9]+"
)
"
dd
if
=
"
${
initrd_path
}
"
bs
=
"
${
block_size
}
"
skip
=
1 |
gunzip
| cpio
--extract
--make-directories
else
createIsoLogger
--message
"Invalid initrd format"
fi
find
.
| cpio
--quiet
--create
-H
newc | lzma
-7
>
../initrd.lz
||
createIsoLogger
--message
"Unable to compress initrd"
--tag
"lzma"
popd
||
createIsoLogger
--message
"Unable to change directory"
--tag
"popd"
rm
--recursive
--force
"
${
PREFIX
:?
}
/initrd"
createIsoLogger
--message
"Using '
$(
basename
"
${
initrd_path
}
"
)
'"
--type
info
initrd_type
=
"
$(
file
"
${
initrd_path
}
"
)
"
mkdir
"
${
PREFIX
}
/initrd"
pushd
"
${
PREFIX
}
/initrd"
||
createIsoLogger
--message
"Unable to change directory"
--tag
"pushd"
if
grep
--quiet
--ignore-case
"gzip"
<<<
"
${
initrd_type
}
"
;
then
gzip
--decompress
--stdout
"
${
initrd_path
}
"
| cpio
--extract
||
createIsoLogger
--message
"Unable to decompress initrd"
--tag
"gzip"
elif
grep
--quiet
--ignore-case
"ascii"
<<<
"
${
initrd_type
}
"
;
then
block_size
=
"
$(
binwalk
--include
=
"compressed data"
"
${
initrd_path
}
"
|
cut
--delimiter
=
" "
--fields
=
1 |
grep
-E
"[0-9]+"
)
"
dd
if
=
"
${
initrd_path
}
"
bs
=
"
${
block_size
}
"
skip
=
1 |
gunzip
| cpio
--extract
--make-directories
else
createIsoLogger
--message
"Invalid initrd format"
fi
find
.
| cpio
--quiet
--create
-H
newc | lzma
-7
>
../initrd.lz
||
createIsoLogger
--message
"Unable to compress initrd"
--tag
"lzma"
popd
||
createIsoLogger
--message
"Unable to change directory"
--tag
"popd"
rm
--recursive
--force
"
${
PREFIX
:?
}
/initrd"
||
createIsoLogger
--message
"Unable to remove dir
\"
${
PREFIX
}
/initrd
\"
"
--tag
"rm"
mv
initrd.lz
"
${
TMP
}
/image/casper/initrd.lz"
||
createIsoLogger
--message
"Unable to move initrd to image"
--tag
"mv"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment