mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
zip-image: factor out with common
Notably, only include the strictly necessary files in the archive, otherwise initrd's from other builds might get in the way.
This commit is contained in:
@@ -239,10 +239,10 @@ sudo apt-get install qemu-system-x86
|
|||||||
git clone https://github.com/cirosantilli/linux-kernel-module-cheat
|
git clone https://github.com/cirosantilli/linux-kernel-module-cheat
|
||||||
cd linux-kernel-module-cheat
|
cd linux-kernel-module-cheat
|
||||||
....
|
....
|
||||||
. go to the latest release link:https://github.com/cirosantilli/linux-kernel-module-cheat/releases[], download the `images-*.zip` file and extract it into the repository:
|
. go to the latest release link:https://github.com/cirosantilli/linux-kernel-module-cheat/releases[], download the `lkmc-*.zip` file and extract it into the repository:
|
||||||
+
|
+
|
||||||
....
|
....
|
||||||
unzip images-*.zip
|
unzip lkmc-*.zip
|
||||||
....
|
....
|
||||||
+
|
+
|
||||||
It is link:https://stackoverflow.com/questions/24987542/is-there-a-link-to-github-for-downloading-a-file-in-the-latest-release-of-a-repo/50540591#50540591[not possible to automate this step without the API], and I'm not venturing there at this time, pull requests welcome.
|
It is link:https://stackoverflow.com/questions/24987542/is-there-a-link-to-github-for-downloading-a-file-in-the-latest-release-of-a-repo/50540591#50540591[not possible to automate this step without the API], and I'm not venturing there at this time, pull requests welcome.
|
||||||
@@ -8837,7 +8837,7 @@ Next, you will also want to give the relevant images to save them time. Zip the
|
|||||||
./zip-img
|
./zip-img
|
||||||
....
|
....
|
||||||
|
|
||||||
and then upload the `out/images-*.zip` file somewhere, e.g. GitHub release assets as in https://github.com/cirosantilli/linux-kernel-module-cheat/releases/tag/test-replay-arm
|
and then upload the `out/lkmc-*.zip` file somewhere, e.g. GitHub release assets as in https://github.com/cirosantilli/linux-kernel-module-cheat/releases/tag/test-replay-arm
|
||||||
|
|
||||||
Finally, do a clone of the relevant repository out of tree and reproduce the bug there, to be 100% sure that it is an actual upstream bug, and to provide developers with the cleanest possible commands.
|
Finally, do a clone of the relevant repository out of tree and reproduce the bug there, to be 100% sure that it is an actual upstream bug, and to provide developers with the cleanest possible commands.
|
||||||
|
|
||||||
|
|||||||
1
common
1
common
@@ -62,6 +62,7 @@ common_setup() {
|
|||||||
common_qemu_guest_custom_dir="${common_build_dir}/qemu-custom"
|
common_qemu_guest_custom_dir="${common_build_dir}/qemu-custom"
|
||||||
common_host_dir="${common_buildroot_out_dir}/host"
|
common_host_dir="${common_buildroot_out_dir}/host"
|
||||||
common_images_dir="${common_buildroot_out_dir}/images"
|
common_images_dir="${common_buildroot_out_dir}/images"
|
||||||
|
common_qcow2_file="${common_images_dir}/rootfs.ext2.qcow2"
|
||||||
common_gem5_run_dir="${common_out_arch_dir}/gem5/${common_run_id}"
|
common_gem5_run_dir="${common_out_arch_dir}/gem5/${common_run_id}"
|
||||||
common_m5out_dir="${common_gem5_run_dir}/m5out"
|
common_m5out_dir="${common_gem5_run_dir}/m5out"
|
||||||
common_trace_txt_file="${common_m5out_dir}/trace.txt"
|
common_trace_txt_file="${common_m5out_dir}/trace.txt"
|
||||||
|
|||||||
@@ -13,4 +13,4 @@ git push --tags
|
|||||||
# -H 'Accept: application/vnd.github.v3+json' \
|
# -H 'Accept: application/vnd.github.v3+json' \
|
||||||
# -X POST \
|
# -X POST \
|
||||||
#;
|
#;
|
||||||
./bench-all -u
|
./bench-all -Au
|
||||||
|
|||||||
2
qemu
2
qemu
Submodule qemu updated: c42634d8e3...f750236039
4
run
4
run
@@ -307,7 +307,7 @@ ${vnc}"
|
|||||||
rrid=
|
rrid=
|
||||||
snapshot=,snapshot
|
snapshot=,snapshot
|
||||||
fi
|
fi
|
||||||
extra_flags="${extra_flags} -drive 'file=${common_images_dir}/rootfs.ext2.qcow2,format=qcow2,if=${driveif}${snapshot}${rrid}' \\
|
extra_flags="${extra_flags} -drive 'file=${common_qcow2_file},format=qcow2,if=${driveif}${snapshot}${rrid}' \\
|
||||||
"
|
"
|
||||||
if [ -n "$rr" ]; then
|
if [ -n "$rr" ]; then
|
||||||
extra_flags="${extra_flags} \\
|
extra_flags="${extra_flags} \\
|
||||||
@@ -371,7 +371,7 @@ ${extra_flags} \
|
|||||||
if ! "$ramfs"; then
|
if ! "$ramfs"; then
|
||||||
root='root=/dev/hda'
|
root='root=/dev/hda'
|
||||||
extra_flags="${extra_flags} \
|
extra_flags="${extra_flags} \
|
||||||
-drive 'file=${common_images_dir}/rootfs.ext2.qcow2,format=qcow2${snapshot}' \\
|
-drive 'file=${common_qcow2_file},format=qcow2${snapshot}' \\
|
||||||
"
|
"
|
||||||
fi
|
fi
|
||||||
cmd="\
|
cmd="\
|
||||||
|
|||||||
6
zip-img
6
zip-img
@@ -1,10 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common"
|
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common"
|
||||||
common_setup
|
common_setup
|
||||||
|
cd "$common_root_dir"
|
||||||
outfile="${common_out_dir}/lkmc-${common_sha}.zip"
|
outfile="${common_out_dir}/lkmc-${common_sha}.zip"
|
||||||
rm -f "$outfile"
|
rm -f "$outfile"
|
||||||
for arch in x86_64 arm aarch64; do
|
for common_arch in x86_64 arm aarch64; do
|
||||||
common_setup
|
common_setup
|
||||||
rm -f "${common_images_dir}/rootfs.ext2"
|
zip -r "$outfile" "${common_qcow2_file#${common_root_dir}/}" "${common_linux_image#${common_root_dir}/}"
|
||||||
zip -r "$outfile" "$common_images_dir"
|
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user