Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:SUSECan:branches:openSUSE:Templates:Images:Tumbleweed
openSUSE-Tumbleweed-KDE3
editbootinstall_rpi.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File editbootinstall_rpi.sh of Package openSUSE-Tumbleweed-KDE3
#!/bin/bash set -euxo pipefail diskname=$1 devname="$2" loopname="${devname%*p?}" loopdev=/dev/${loopname#/dev/mapper/*} #========================================== # copy Raspberry Pi firmware to EFI partition #------------------------------------------ echo "RPi EFI system, installing firmware on ESP" mkdir -p ./mnt-pi mount ${loopname}p1 ./mnt-pi ( cd boot/vc; tar c . ) | ( cd ./mnt-pi/; tar x ) umount ./mnt-pi rmdir ./mnt-pi #========================================== # Change partition label type to MBR #------------------------------------------ # # The target system doesn't support GPT, so let's move it to # MBR partition layout instead. # # Also make sure to set the ESP partition to type 0xc so that # broken firmware (Rpi) detects it as FAT. # # Use tabs, "<<-" strips tabs, but no other whitespace! cat > gdisk.tmp <<-'EOF' x r g t 1 c w y EOF dd if=$loopdev of=mbrid.bin bs=1 skip=440 count=4 gdisk $loopdev < gdisk.tmp dd of=$loopdev if=mbrid.bin bs=1 seek=440 count=4 rm -f mbrid.bin rm -f gdisk.tmp
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor