Created
May 25, 2021 17:15
-
-
Save player999/652039f29272fa9048f37e45a369f75e to your computer and use it in GitHub Desktop.
Prepare initramfs for Hikvision
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dd if=/dev/zero of=tmp.ext2 bs=1M count=16 | |
mkfs.ext2 ./tmp.ext2 | |
mkdir -p tmp_mp | |
sudo mount ./tmp.ext2 ./tmp_mp | |
sudo cp -rf fs/* ./tmp_mp | |
sudo umount ./tmp_mp | |
rm -r ./tmp_mp | |
gzip ./tmp.ext2 | |
mkimage -A arm -O Linux -T ramdisk -C gzip -n ramdisk_1.0.28_ubuntu -d ./tmp.ext2.gz test_initrd.gz | |
rm ./tmp.ext2.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment