Advertisement
zombah

snow chainloading partition

Apr 29th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.62 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. diskname=/dev/sde
  4. # uboot=/tmp/boot/u-boot.img
  5. uboot=u-boot.img
  6.  
  7. mkimage -A arm -O linux -T kernel -C none -a 0x43e00000 -e 0x43e00000 -n uboot -d u-boot-dtb.bin u-boot.img
  8.  
  9. echo "console=tty1 debug verbose" > /tmp/config
  10. vbutil_kernel --pack /tmp/newkern \
  11.         --keyblock /usr/share/vboot/devkeys/kernel.keyblock \
  12.         --version 1 \
  13.         --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk \
  14.         --config=/tmp/config --vmlinuz $uboot --arch arm
  15. kpartx -av $diskname
  16. dd if=/tmp/newkern of=$diskname\1
  17. kpartx -d $diskname
  18. cgpt add -t kernel -i 1 -S 1 -T 5 -P 10 -l U-BOOT $diskname
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement