Change image_dir location
This commit is contained in:
@@ -184,11 +184,11 @@ sed -i -e 's/append.*/append console=ttyS0,115200 console=tty1 root=\/dev\/mmcbl
|
||||
|
||||
# Create the disk partitions
|
||||
status "Create the disk partitions"
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype 4MiB 100%
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype 4MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup -f --show ${current_dir}/${image_name}.img)
|
||||
loopdevice=$(losetup -f --show "${image_dir}/${image_name}.img")
|
||||
device=$(kpartx -va ${loopdevice} | sed 's/.*\(loop[0-9]\+\)p.*/\1/g' | head -1)
|
||||
sleep 5
|
||||
device="/dev/mapper/${device}"
|
||||
|
||||
@@ -175,11 +175,11 @@ sed -i -e 's/append.*/append console=ttyS0,115200 console=tty1 root=\/dev\/mmcbl
|
||||
|
||||
# Create the disk partitions
|
||||
status "Create the disk partitions"
|
||||
parted -s "${current_dir}"/"${image_name}".img mklabel msdos
|
||||
parted -s -a minimal "${current_dir}"/"${image_name}".img mkpart primary "$fstype" 4MiB 100%
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary "$fstype" 4MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup -f --show ${current_dir}/${image_name}.img)
|
||||
loopdevice=$(losetup -f --show "${image_dir}/${image_name}.img")
|
||||
device=$(kpartx -va ${loopdevice} | sed 's/.*\(loop[0-9]\+\)p.*/\1/g' | head -1)
|
||||
sleep 5s
|
||||
device="/dev/mapper/${device}"
|
||||
|
||||
@@ -464,11 +464,11 @@ echo $raw_size
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file ${image_name}.img"
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${image_name}.img
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) "${image_dir}/${image_name}.img"
|
||||
echo "Partitioning ${image_name}.img"
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s ${current_dir}/${image_name}.img mkpart primary fat32 1MiB ${bootsize}MiB
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype ${bootsize}MiB 100%
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s "${image_dir}/${image_name}.img" mkpart primary fat32 1MiB ${bootsize}MiB
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype ${bootsize}MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=`losetup -f --show ${current_dir}/${image_name}.img`
|
||||
@@ -536,11 +536,11 @@ if [ $compress = xz ]; then
|
||||
if [ $(arch) == 'x86_64' ]; then
|
||||
echo "Compressing ${image_name}.img"
|
||||
[ $(nproc) \< 3 ] || cpu_cores=3 # cpu_cores = Number of cores to use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} ${current_dir}/${image_name}.img # -p Nº cpu cores use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} "${image_dir}/${image_name}.img" # -p Nº cpu cores use
|
||||
chmod 0644 ${current_dir}/${image_name}.img.xz
|
||||
fi
|
||||
else
|
||||
chmod 0644 ${current_dir}/${image_name}.img
|
||||
chmod 0644 "${image_dir}/${image_name}.img"
|
||||
fi
|
||||
|
||||
# Clean up all the temporary build stuff and remove the directories
|
||||
|
||||
@@ -669,13 +669,13 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096))
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file ${image_name}.img"
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${image_name}.img
|
||||
parted -s ${current_dir}/${image_name}.img mklabel gpt
|
||||
cgpt create -z ${current_dir}/${image_name}.img
|
||||
cgpt create ${current_dir}/${image_name}.img
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) "${image_dir}/${image_name}.img"
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel gpt
|
||||
cgpt create -z "${image_dir}/${image_name}.img"
|
||||
cgpt create "${image_dir}/${image_name}.img"
|
||||
|
||||
cgpt add -i 1 -t kernel -b 8192 -s 32768 -l kernel -S 1 -T 5 -P 10 ${current_dir}/${image_name}.img
|
||||
cgpt add -i 2 -t data -b 40960 -s `expr $(cgpt show ${current_dir}/${image_name}.img | grep 'Sec GPT table' | awk '{ print \$1 }') - 40960` -l Root ${current_dir}/${image_name}.img
|
||||
cgpt add -i 1 -t kernel -b 8192 -s 32768 -l kernel -S 1 -T 5 -P 10 "${image_dir}/${image_name}.img"
|
||||
cgpt add -i 2 -t data -b 40960 -s `expr $(cgpt show "${image_dir}/${image_name}.img" | grep 'Sec GPT table' | awk '{ print \$1 }') - 40960` -l Root "${image_dir}/${image_name}.img"
|
||||
|
||||
loopdevice=`losetup -f --show ${current_dir}/${image_name}.img`
|
||||
device=`kpartx -va ${loopdevice} | sed 's/.*\(loop[0-9]\+\)p.*/\1/g' | head -1`
|
||||
@@ -741,11 +741,11 @@ if [ $compress = xz ]; then
|
||||
if [ $(arch) == 'x86_64' ]; then
|
||||
echo "Compressing ${image_name}.img"
|
||||
[ $(nproc) \< 3 ] || cpu_cores=3 # cpu_cores = Number of cores to use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} ${current_dir}/${image_name}.img # -p Nº cpu cores use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} "${image_dir}/${image_name}.img" # -p Nº cpu cores use
|
||||
chmod 0644 ${current_dir}/${image_name}.img.xz
|
||||
fi
|
||||
else
|
||||
chmod 0644 ${current_dir}/${image_name}.img
|
||||
chmod 0644 "${image_dir}/${image_name}.img"
|
||||
fi
|
||||
|
||||
# Clean up all the temporary build stuff and remove the directories
|
||||
|
||||
@@ -573,13 +573,13 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096))
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file ${image_name}.img"
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${image_name}.img
|
||||
parted -s ${current_dir}/${image_name}.img mklabel gpt
|
||||
cgpt create -z ${current_dir}/${image_name}.img
|
||||
cgpt create ${current_dir}/${image_name}.img
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) "${image_dir}/${image_name}.img"
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel gpt
|
||||
cgpt create -z "${image_dir}/${image_name}.img"
|
||||
cgpt create "${image_dir}/${image_name}.img"
|
||||
|
||||
cgpt add -i 1 -t kernel -b 8192 -s 32768 -l kernel -S 1 -T 5 -P 10 ${current_dir}/${image_name}.img
|
||||
cgpt add -i 2 -t data -b 40960 -s `expr $(cgpt show ${current_dir}/${image_name}.img | grep 'Sec GPT table' | awk '{ print \$1 }') - 40960` -l Root ${current_dir}/${image_name}.img
|
||||
cgpt add -i 1 -t kernel -b 8192 -s 32768 -l kernel -S 1 -T 5 -P 10 "${image_dir}/${image_name}.img"
|
||||
cgpt add -i 2 -t data -b 40960 -s `expr $(cgpt show "${image_dir}/${image_name}.img" | grep 'Sec GPT table' | awk '{ print \$1 }') - 40960` -l Root "${image_dir}/${image_name}.img"
|
||||
|
||||
loopdevice=`losetup -f --show ${current_dir}/${image_name}.img`
|
||||
device=`kpartx -va ${loopdevice} | sed 's/.*\(loop[0-9]\+\)p.*/\1/g' | head -1`
|
||||
@@ -646,11 +646,11 @@ if [ $compress = xz ]; then
|
||||
if [ $(arch) == 'x86_64' ]; then
|
||||
echo "Compressing ${image_name}.img"
|
||||
[ $(nproc) \< 3 ] || cpu_cores=3 # cpu_cores = Number of cores to use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} ${current_dir}/${image_name}.img # -p Nº cpu cores use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} "${image_dir}/${image_name}.img" # -p Nº cpu cores use
|
||||
chmod 0644 ${current_dir}/${image_name}.img.xz
|
||||
fi
|
||||
else
|
||||
chmod 0644 ${current_dir}/${image_name}.img
|
||||
chmod 0644 "${image_dir}/${image_name}.img"
|
||||
fi
|
||||
|
||||
# Clean up all the temporary build stuff and remove the directories
|
||||
|
||||
@@ -543,13 +543,13 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096))
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file ${image_name}.img"
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${image_name}.img
|
||||
parted -s ${current_dir}/${image_name}.img mklabel gpt
|
||||
cgpt create -z ${current_dir}/${image_name}.img
|
||||
cgpt create ${current_dir}/${image_name}.img
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) "${image_dir}/${image_name}.img"
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel gpt
|
||||
cgpt create -z "${image_dir}/${image_name}.img"
|
||||
cgpt create "${image_dir}/${image_name}.img"
|
||||
|
||||
cgpt add -i 1 -t kernel -b 8192 -s 32768 -l kernel -S 1 -T 5 -P 10 ${current_dir}/${image_name}.img
|
||||
cgpt add -i 2 -t data -b 40960 -s `expr $(cgpt show ${current_dir}/${image_name}.img | grep 'Sec GPT table' | awk '{ print \$1 }') - 40960` -l Root ${current_dir}/${image_name}.img
|
||||
cgpt add -i 1 -t kernel -b 8192 -s 32768 -l kernel -S 1 -T 5 -P 10 "${image_dir}/${image_name}.img"
|
||||
cgpt add -i 2 -t data -b 40960 -s `expr $(cgpt show "${image_dir}/${image_name}.img" | grep 'Sec GPT table' | awk '{ print \$1 }') - 40960` -l Root "${image_dir}/${image_name}.img"
|
||||
|
||||
loopdevice=`losetup -f --show ${current_dir}/${image_name}.img`
|
||||
device=`kpartx -va ${loopdevice} | sed 's/.*\(loop[0-9]\+\)p.*/\1/g' | head -1`
|
||||
@@ -612,11 +612,11 @@ if [ $compress = xz ]; then
|
||||
if [ $(arch) == 'x86_64' ]; then
|
||||
echo "Compressing ${image_name}.img"
|
||||
[ $(nproc) \< 3 ] || cpu_cores=3 # cpu_cores = Number of cores to use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} ${current_dir}/${image_name}.img # -p Nº cpu cores use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} "${image_dir}/${image_name}.img" # -p Nº cpu cores use
|
||||
chmod 0644 ${current_dir}/${image_name}.img.xz
|
||||
fi
|
||||
else
|
||||
chmod 0644 ${current_dir}/${image_name}.img
|
||||
chmod 0644 "${image_dir}/${image_name}.img"
|
||||
fi
|
||||
|
||||
# Clean up all the temporary build stuff and remove the directories
|
||||
|
||||
@@ -246,7 +246,8 @@ function make_image() {
|
||||
# Clean up all the temporary build stuff and remove the directories.
|
||||
function clean_build() {
|
||||
log "Cleaning up the temporary build files..." yellow
|
||||
rm -rf "${base_dir}"
|
||||
#rm -rf "${base_dir}"
|
||||
rm -rf "${work_dir}"
|
||||
log "Done" green
|
||||
echo -e "\n"
|
||||
log "Your image is: $(tput sgr0) $(ls "${image_dir}/${image_name}".*)" bold
|
||||
|
||||
@@ -386,10 +386,10 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096))
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file ${image_name}.img"
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${image_name}.img
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s ${current_dir}/${image_name}.img mkpart primary fat32 1MiB ${bootsize}MiB
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype ${bootsize}MiB 100%
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) "${image_dir}/${image_name}.img"
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s "${image_dir}/${image_name}.img" mkpart primary fat32 1MiB ${bootsize}MiB
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype ${bootsize}MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=`losetup -f --show ${current_dir}/${image_name}.img`
|
||||
@@ -468,11 +468,11 @@ if [ $compress = xz ]; then
|
||||
if [ $(arch) == 'x86_64' ]; then
|
||||
echo "Compressing ${image_name}.img"
|
||||
[ $(nproc) \< 3 ] || cpu_cores=3 # cpu_cores = Number of cores to use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} ${current_dir}/${image_name}.img # -p Nº cpu cores use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} "${image_dir}/${image_name}.img" # -p Nº cpu cores use
|
||||
chmod 0644 ${current_dir}/${image_name}.img.xz
|
||||
fi
|
||||
else
|
||||
chmod 0644 ${current_dir}/${image_name}.img
|
||||
chmod 0644 "${image_dir}/${image_name}.img"
|
||||
fi
|
||||
|
||||
# Clean up all the temporary build stuff and remove the directories
|
||||
|
||||
@@ -386,10 +386,10 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096))
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file ${image_name}.img"
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${image_name}.img
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s ${current_dir}/${image_name}.img mkpart primary fat32 1MiB ${bootsize}MiB
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype ${bootsize}MiB 100%
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) "${image_dir}/${image_name}.img"
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s "${image_dir}/${image_name}.img" mkpart primary fat32 1MiB ${bootsize}MiB
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype ${bootsize}MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=`losetup -f --show ${current_dir}/${image_name}.img`
|
||||
@@ -466,11 +466,11 @@ if [ $compress = xz ]; then
|
||||
if [ $(arch) == 'x86_64' ]; then
|
||||
echo "Compressing ${image_name}.img"
|
||||
[ $(nproc) \< 3 ] || cpu_cores=3 # cpu_cores = Number of cores to use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} ${current_dir}/${image_name}.img # -p Nº cpu cores use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} "${image_dir}/${image_name}.img" # -p Nº cpu cores use
|
||||
chmod 0644 ${current_dir}/${image_name}.img.xz
|
||||
fi
|
||||
else
|
||||
chmod 0644 ${current_dir}/${image_name}.img
|
||||
chmod 0644 "${image_dir}/${image_name}.img"
|
||||
fi
|
||||
|
||||
# Clean up all the temporary build stuff and remove the directories
|
||||
|
||||
@@ -350,9 +350,9 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096))
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file ${image_name}.img"
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${image_name}.img
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype 1MiB 100%
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) "${image_dir}/${image_name}.img"
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype 1MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=`losetup -f --show ${current_dir}/${image_name}.img`
|
||||
@@ -432,11 +432,11 @@ if [ $compress = xz ]; then
|
||||
if [ $(arch) == 'x86_64' ]; then
|
||||
echo "Compressing ${image_name}.img"
|
||||
[ $(nproc) \< 3 ] || cpu_cores=3 # cpu_cores = Number of cores to use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} ${current_dir}/${image_name}.img # -p Nº cpu cores use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} "${image_dir}/${image_name}.img" # -p Nº cpu cores use
|
||||
chmod 0644 ${current_dir}/${image_name}.img.xz
|
||||
fi
|
||||
else
|
||||
chmod 0644 ${current_dir}/${image_name}.img
|
||||
chmod 0644 "${image_dir}/${image_name}.img"
|
||||
fi
|
||||
|
||||
# Clean up all the temporary build stuff and remove the directories
|
||||
|
||||
10
cubox.sh
10
cubox.sh
@@ -405,9 +405,9 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096))
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file ${image_name}.img"
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${image_name}.img
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype 1MiB 100%
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) "${image_dir}/${image_name}.img"
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype 1MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=`losetup -f --show ${current_dir}/${image_name}.img`
|
||||
@@ -469,11 +469,11 @@ if [ $compress = xz ]; then
|
||||
if [ $(arch) == 'x86_64' ]; then
|
||||
echo "Compressing ${image_name}.img"
|
||||
[ $(nproc) \< 3 ] || cpu_cores=3 # cpu_cores = Number of cores to use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} ${current_dir}/${image_name}.img # -p Nº cpu cores use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} "${image_dir}/${image_name}.img" # -p Nº cpu cores use
|
||||
chmod 0644 ${current_dir}/${image_name}.img.xz
|
||||
fi
|
||||
else
|
||||
chmod 0644 ${current_dir}/${image_name}.img
|
||||
chmod 0644 "${image_dir}/${image_name}.img"
|
||||
fi
|
||||
|
||||
# Clean up all the temporary build stuff and remove the directories
|
||||
|
||||
@@ -211,13 +211,13 @@ raw_size=$(($((${free_space}*1024))+${root_extra}))
|
||||
|
||||
# Weird Boot Partition
|
||||
status "Creating image file ${image_name}.img"
|
||||
wget http://dev.gateworks.com/newport/boot_firmware/firmware-newport.img -O ${current_dir}/${image_name}.img
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${base_dir}/${image_name}.img
|
||||
dd if=${base_dir}/${image_name}.img of=${current_dir}/${image_name}.img bs=16M seek=1
|
||||
echo ", +" | sfdisk -N 2 ${current_dir}/${image_name}.img
|
||||
wget http://dev.gateworks.com/newport/boot_firmware/firmware-newport.img -O "${image_dir}/${image_name}.img"
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) "${image_dir}/${image_name}.img"
|
||||
dd if=${base_dir}/${image_name}.img of="${image_dir}/${image_name}.img"bs=16M seek=1
|
||||
echo ", +" | sfdisk -N 2 "${image_dir}/${image_name}.img"
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup -f --show ${current_dir}/${image_name}.img)
|
||||
loopdevice=$(losetup -f --show "${image_dir}/${image_name}.img")
|
||||
device=$(kpartx -va ${loopdevice} | sed 's/.*\(loop[0-9]\+\)p.*/\1/g' | head -1)
|
||||
sleep 5
|
||||
device="/dev/mapper/${device}"
|
||||
|
||||
@@ -228,11 +228,11 @@ make_image
|
||||
|
||||
# Create the disk partitions
|
||||
status "Create the disk partitions"
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype 4MiB 100%
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype 4MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup --show -fP "${current_dir}/${image_name}.img")
|
||||
loopdevice=$(losetup --show -fP "${image_dir}/${image_name}.img")
|
||||
rootp="${loopdevice}p1"
|
||||
|
||||
# Create file systems
|
||||
|
||||
10
mini-x.sh
10
mini-x.sh
@@ -343,9 +343,9 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096))
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file ${image_name}.img"
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${image_name}.img
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype 4MiB 100%
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) "${image_dir}/${image_name}.img"
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype 4MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=`losetup -f --show ${current_dir}/${image_name}.img`
|
||||
@@ -411,11 +411,11 @@ if [ $compress = xz ]; then
|
||||
if [ $(arch) == 'x86_64' ]; then
|
||||
echo "Compressing ${image_name}.img"
|
||||
[ $(nproc) \< 3 ] || cpu_cores=3 # cpu_cores = Number of cores to use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} ${current_dir}/${image_name}.img # -p Nº cpu cores use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} "${image_dir}/${image_name}.img" # -p Nº cpu cores use
|
||||
chmod 0644 ${current_dir}/${image_name}.img.xz
|
||||
fi
|
||||
else
|
||||
chmod 0644 ${current_dir}/${image_name}.img
|
||||
chmod 0644 "${image_dir}/${image_name}.img"
|
||||
fi
|
||||
|
||||
# Clean up all the temporary build stuff and remove the directories
|
||||
|
||||
@@ -206,12 +206,12 @@ make_image
|
||||
|
||||
# Create the disk partitions
|
||||
status "Create the disk partitions"
|
||||
parted -s "${current_dir}"/"${image_name}".img mklabel msdos
|
||||
parted -s "${current_dir}"/"${image_name}".img mkpart primary ext3 4MiB "${bootsize}"MiB
|
||||
parted -s -a minimal "${current_dir}"/"${image_name}".img mkpart primary "$fstype" "${bootsize}"MiB 100%
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s "${image_dir}/${image_name}.img" mkpart primary ext3 4MiB "${bootsize}"MiB
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary "$fstype" "${bootsize}"MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup --show -fP "${current_dir}/${image_name}.img")
|
||||
loopdevice=$(losetup --show -fP "${image_dir}/${image_name}.img")
|
||||
bootp="${loopdevice}p1"
|
||||
rootp="${loopdevice}p2"
|
||||
|
||||
|
||||
@@ -339,11 +339,11 @@ make_image
|
||||
|
||||
# Create the disk partitions
|
||||
status "Create the disk partitions"
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype 32MiB 100%
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype 32MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup --show -fP "${current_dir}/${image_name}.img")
|
||||
loopdevice=$(losetup --show -fP "${image_dir}/${image_name}.img")
|
||||
rootp="${loopdevice}p1"
|
||||
|
||||
# Create file systems
|
||||
|
||||
@@ -356,11 +356,11 @@ make_image
|
||||
|
||||
# Create the disk partitions
|
||||
status "Create the disk partitions"
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype 32MiB 100%
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype 32MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup --show -fP "${current_dir}/${image_name}.img")
|
||||
loopdevice=$(losetup --show -fP "${image_dir}/${image_name}.img")
|
||||
rootp="${loopdevice}p1"
|
||||
|
||||
# Create file systems
|
||||
|
||||
12
nanopi2.sh
12
nanopi2.sh
@@ -439,10 +439,10 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096))
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file ${image_name}.img"
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${image_name}.img
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s ${current_dir}/${image_name}.img mkpart primary ext3 1MiB ${bootsize}MiB
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype ${bootsize}MiB 100%
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) "${image_dir}/${image_name}.img"
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s "${image_dir}/${image_name}.img" mkpart primary ext3 1MiB ${bootsize}MiB
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype ${bootsize}MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=`losetup -f --show ${current_dir}/${image_name}.img`
|
||||
@@ -550,11 +550,11 @@ if [ $compress = xz ]; then
|
||||
if [ $(arch) == 'x86_64' ]; then
|
||||
echo "Compressing ${image_name}.img"
|
||||
[ $(nproc) \< 3 ] || cpu_cores=3 # cpu_cores = Number of cores to use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} ${current_dir}/${image_name}.img # -p Nº cpu cores use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} "${image_dir}/${image_name}.img" # -p Nº cpu cores use
|
||||
chmod 0644 ${current_dir}/${image_name}.img.xz
|
||||
fi
|
||||
else
|
||||
chmod 0644 ${current_dir}/${image_name}.img
|
||||
chmod 0644 "${image_dir}/${image_name}.img"
|
||||
fi
|
||||
|
||||
# Clean up all the temporary build stuff and remove the directories
|
||||
|
||||
12
odroid-c.sh
12
odroid-c.sh
@@ -582,10 +582,10 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096))
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file ${image_name}.img"
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${image_name}.img
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s ${current_dir}/${image_name}.img mkpart primary fat32 4MiB ${bootsize}MiB
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype ${bootsize}MiB 100%
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) "${image_dir}/${image_name}.img"
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s "${image_dir}/${image_name}.img" mkpart primary fat32 4MiB ${bootsize}MiB
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype ${bootsize}MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=`losetup -f --show ${current_dir}/${image_name}.img`
|
||||
@@ -671,11 +671,11 @@ if [ $compress = xz ]; then
|
||||
if [ $(arch) == 'x86_64' ]; then
|
||||
echo "Compressing ${image_name}.img"
|
||||
[ $(nproc) \< 3 ] || cpu_cores=3 # cpu_cores = Number of cores to use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} ${current_dir}/${image_name}.img # -p Nº cpu cores use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} "${image_dir}/${image_name}.img" # -p Nº cpu cores use
|
||||
chmod 0644 ${current_dir}/${image_name}.img.xz
|
||||
fi
|
||||
else
|
||||
chmod 0644 ${current_dir}/${image_name}.img
|
||||
chmod 0644 "${image_dir}/${image_name}.img"
|
||||
fi
|
||||
|
||||
# Clean up all the temporary build stuff and remove the directories
|
||||
|
||||
@@ -198,11 +198,11 @@ make_image
|
||||
|
||||
# Create the disk partitions
|
||||
status "Create the disk partitions"
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype 32MiB 100%
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype 32MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup --show -fP "${current_dir}/${image_name}.img")
|
||||
loopdevice=$(losetup --show -fP "${image_dir}/${image_name}.img")
|
||||
rootp="${loopdevice}p1"
|
||||
|
||||
# Create file systems
|
||||
|
||||
12
odroid-u2.sh
12
odroid-u2.sh
@@ -427,10 +427,10 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096))
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file ${image_name}.img"
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${image_name}.img
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s ${current_dir}/${image_name}.img mkpart primary fat32 1MiB ${bootsize}MiB
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype ${bootsize}MiB 100%
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) "${image_dir}/${image_name}.img"
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s "${image_dir}/${image_name}.img" mkpart primary fat32 1MiB ${bootsize}MiB
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype ${bootsize}MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=`losetup -f --show ${current_dir}/${image_name}.img`
|
||||
@@ -514,11 +514,11 @@ if [ $compress = xz ]; then
|
||||
if [ $(arch) == 'x86_64' ]; then
|
||||
echo "Compressing ${image_name}.img"
|
||||
[ $(nproc) \< 3 ] || cpu_cores=3 # cpu_cores = Number of cores to use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} ${current_dir}/${image_name}.img # -p Nº cpu cores use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} "${image_dir}/${image_name}.img" # -p Nº cpu cores use
|
||||
chmod 0644 ${current_dir}/${image_name}.img.xz
|
||||
fi
|
||||
else
|
||||
chmod 0644 ${current_dir}/${image_name}.img
|
||||
chmod 0644 "${image_dir}/${image_name}.img"
|
||||
fi
|
||||
|
||||
# Clean up all the temporary build stuff and remove the directories
|
||||
|
||||
@@ -266,12 +266,12 @@ make_image
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file ${image_name}.img"
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s ${current_dir}/${image_name}.img mkpart primary fat32 4MiB ${bootsize}MiB
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype ${bootsize}MiB 100%
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s "${image_dir}/${image_name}.img" mkpart primary fat32 4MiB ${bootsize}MiB
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype ${bootsize}MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup --show -fP "${current_dir}/${image_name}.img")
|
||||
loopdevice=$(losetup --show -fP "${image_dir}/${image_name}.img")
|
||||
bootp="${loopdevice}p1"
|
||||
rootp="${loopdevice}p2"
|
||||
|
||||
|
||||
@@ -296,11 +296,11 @@ make_image
|
||||
|
||||
# Create the disk partitions
|
||||
status "Create the disk partitions"
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype 32MiB 100%
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype 32MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup --show -fP "${current_dir}/${image_name}.img")
|
||||
loopdevice=$(losetup --show -fP "${image_dir}/${image_name}.img")
|
||||
rootp="${loopdevice}p1"
|
||||
|
||||
# Create file systems
|
||||
|
||||
@@ -250,11 +250,11 @@ make_image
|
||||
|
||||
# Create the disk partitions
|
||||
status "Create the disk partitions"
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype 32MiB 100%
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype 32MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup --show -fP "${current_dir}/${image_name}.img")
|
||||
loopdevice=$(losetup --show -fP "${image_dir}/${image_name}.img")
|
||||
rootp="${loopdevice}p1"
|
||||
|
||||
# Create file systems
|
||||
|
||||
12
riotboard.sh
12
riotboard.sh
@@ -410,10 +410,10 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096))
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file ${image_name}.img"
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${image_name}.img
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s ${current_dir}/${image_name}.img mkpart primary fat32 1MiB ${bootsize}MiB
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype ${bootsize}MiB 100%
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) "${image_dir}/${image_name}.img"
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s "${image_dir}/${image_name}.img" mkpart primary fat32 1MiB ${bootsize}MiB
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype ${bootsize}MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=`losetup -f --show ${current_dir}/${image_name}.img`
|
||||
@@ -481,11 +481,11 @@ if [ $compress = xz ]; then
|
||||
if [ $(arch) == 'x86_64' ]; then
|
||||
echo "Compressing ${image_name}.img"
|
||||
[ $(nproc) \< 3 ] || cpu_cores=3 # cpu_cores = Number of cores to use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} ${current_dir}/${image_name}.img # -p Nº cpu cores use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} "${image_dir}/${image_name}.img" # -p Nº cpu cores use
|
||||
chmod 0644 ${current_dir}/${image_name}.img.xz
|
||||
fi
|
||||
else
|
||||
chmod 0644 ${current_dir}/${image_name}.img
|
||||
chmod 0644 "${image_dir}/${image_name}.img"
|
||||
fi
|
||||
|
||||
# Clean up all the temporary build stuff and remove the directories
|
||||
|
||||
@@ -186,12 +186,12 @@ make_image
|
||||
|
||||
# Create the disk partitions
|
||||
status "Create the disk partitions"
|
||||
parted -s "${current_dir}"/"${image_name}".img mklabel msdos
|
||||
parted -s "${current_dir}"/"${image_name}".img mkpart primary fat32 1MiB "${bootsize}"MiB
|
||||
parted -s -a minimal "${current_dir}"/"${image_name}".img mkpart primary "$fstype" "${bootsize}"MiB 100%
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s "${image_dir}/${image_name}.img" mkpart primary fat32 1MiB "${bootsize}"MiB
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary "$fstype" "${bootsize}"MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup --show -fP "${current_dir}/${image_name}.img")
|
||||
loopdevice=$(losetup --show -fP "${image_dir}/${image_name}.img")
|
||||
bootp="${loopdevice}p1"
|
||||
rootp="${loopdevice}p2"
|
||||
|
||||
|
||||
@@ -188,12 +188,12 @@ make_image
|
||||
|
||||
# Create the disk partitions
|
||||
status "Create the disk partitions"
|
||||
parted -s "${current_dir}"/"${image_name}".img mklabel msdos
|
||||
parted -s "${current_dir}"/"${image_name}".img mkpart primary fat32 1MiB "${bootsize}"MiB
|
||||
parted -s -a minimal "${current_dir}"/"${image_name}".img mkpart primary "$fstype" "${bootsize}"MiB 100%
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s "${image_dir}/${image_name}.img" mkpart primary fat32 1MiB "${bootsize}"MiB
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary "$fstype" "${bootsize}"MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup --show -fP "${current_dir}/${image_name}.img")
|
||||
loopdevice=$(losetup --show -fP "${image_dir}/${image_name}.img")
|
||||
bootp="${loopdevice}p1"
|
||||
rootp="${loopdevice}p2"
|
||||
|
||||
|
||||
10
rpi.sh
10
rpi.sh
@@ -165,7 +165,7 @@ include rpi_firmware
|
||||
set_locale "$locale"
|
||||
# Clean system
|
||||
include clean_system
|
||||
trap clean_build ERR SIGTERM SIGINT
|
||||
#trap clean_build ERR SIGTERM SIGINT
|
||||
# Define DNS server after last running systemd-nspawn
|
||||
echo "nameserver ${nameserver}" > "${work_dir}"/etc/resolv.conf
|
||||
# Disable the use of http proxy in case it is enabled
|
||||
@@ -189,12 +189,12 @@ make_image
|
||||
|
||||
# Create the disk partitions
|
||||
status "Create the disk partitions"
|
||||
parted -s "${current_dir}"/"${image_name}".img mklabel msdos
|
||||
parted -s "${current_dir}"/"${image_name}".img mkpart primary fat32 1MiB "${bootsize}"MiB
|
||||
parted -s -a minimal "${current_dir}"/"${image_name}".img mkpart primary "$fstype" "${bootsize}"MiB 100%
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s "${image_dir}/${image_name}.img" mkpart primary fat32 1MiB "${bootsize}"MiB
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary "$fstype" "${bootsize}"MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup --show -fP "${current_dir}/${image_name}.img")
|
||||
loopdevice=$(losetup --show -fP "${image_dir}/${image_name}.img")
|
||||
bootp="${loopdevice}p1"
|
||||
rootp="${loopdevice}p2"
|
||||
|
||||
|
||||
@@ -183,12 +183,12 @@ make_image
|
||||
|
||||
# Create the disk partitions
|
||||
status "Create the disk partitions"
|
||||
parted -s "${current_dir}"/"${image_name}".img mklabel msdos
|
||||
parted -s "${current_dir}"/"${image_name}".img mkpart primary fat32 1MiB "${bootsize}"MiB
|
||||
parted -s -a minimal "${current_dir}"/"${image_name}".img mkpart primary "$fstype" "${bootsize}"MiB 100%
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s "${image_dir}/${image_name}.img" mkpart primary fat32 1MiB "${bootsize}"MiB
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary "$fstype" "${bootsize}"MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup --show -fP "${current_dir}/${image_name}.img")
|
||||
loopdevice=$(losetup --show -fP "${image_dir}/${image_name}.img")
|
||||
bootp="${loopdevice}p1"
|
||||
rootp="${loopdevice}p2"
|
||||
|
||||
|
||||
@@ -543,13 +543,13 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096))
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file ${image_name}.img"
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${image_name}.img
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s ${current_dir}/${image_name}.img mkpart primary fat32 4MiB ${bootsize}MiB
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype ${bootsize}MiB 100%
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) "${image_dir}/${image_name}.img"
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s "${image_dir}/${image_name}.img" mkpart primary fat32 4MiB ${bootsize}MiB
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype ${bootsize}MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup --show -fP "${current_dir}/${image_name}.img")
|
||||
loopdevice=$(losetup --show -fP "${image_dir}/${image_name}.img")
|
||||
bootp="${loopdevice}p1"
|
||||
rootp="${loopdevice}p2"
|
||||
|
||||
@@ -628,11 +628,11 @@ if [ $compress = xz ]; then
|
||||
if [ $(arch) == 'x86_64' ]; then
|
||||
echo "Compressing ${image_name}.img"
|
||||
[ $(nproc) \< 3 ] || cpu_cores=3 # cpu_cores = Number of cores to use
|
||||
pixz -p ${cpu_cores:-2} ${current_dir}/${image_name}.img # -p Nº cpu cores use
|
||||
pixz -p ${cpu_cores:-2} "${image_dir}/${image_name}.img" # -p Nº cpu cores use
|
||||
chmod 0644 ${current_dir}/${image_name}.img.xz
|
||||
fi
|
||||
else
|
||||
chmod 0644 ${current_dir}/${image_name}.img
|
||||
chmod 0644 "${image_dir}/${image_name}.img"
|
||||
fi
|
||||
|
||||
# Clean up all the temporary build stuff and remove the directories
|
||||
|
||||
@@ -500,13 +500,13 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096))
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file ${image_name}.img"
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${image_name}.img
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s ${current_dir}/${image_name}.img mkpart primary fat32 1MiB ${bootsize}MiB
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype ${bootsize}MiB 100%
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) "${image_dir}/${image_name}.img"
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s "${image_dir}/${image_name}.img" mkpart primary fat32 1MiB ${bootsize}MiB
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype ${bootsize}MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup --show -fP "${current_dir}/${image_name}.img")
|
||||
loopdevice=$(losetup --show -fP "${image_dir}/${image_name}.img")
|
||||
bootp="${loopdevice}p1"
|
||||
rootp="${loopdevice}p2"
|
||||
|
||||
@@ -567,11 +567,11 @@ if [ "$compress" == "xz" ]; then
|
||||
if [ $(arch) == 'x86_64' ]; then
|
||||
echo "Compressing ${image_name}.img"
|
||||
[ $(nproc) \< 3 ] || cpu_cores=3 # cpu_cores = Number of cores to use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} ${current_dir}/${image_name}.img # -p Nº cpu cores use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} "${image_dir}/${image_name}.img" # -p Nº cpu cores use
|
||||
chmod 0644 ${current_dir}/${image_name}.img.xz
|
||||
fi
|
||||
else
|
||||
chmod 0644 ${current_dir}/${image_name}.img
|
||||
chmod 0644 "${image_dir}/${image_name}.img"
|
||||
fi
|
||||
|
||||
# Clean up all the temporary build stuff and remove the directories
|
||||
|
||||
8
rpi0w.sh
8
rpi0w.sh
@@ -189,12 +189,12 @@ make_image
|
||||
|
||||
# Create the disk partitions
|
||||
status "Create the disk partitions"
|
||||
parted -s "${current_dir}"/"${image_name}".img mklabel msdos
|
||||
parted -s "${current_dir}"/"${image_name}".img mkpart primary fat32 1MiB "${bootsize}"MiB
|
||||
parted -s -a minimal "${current_dir}"/"${image_name}".img mkpart primary "$fstype" "${bootsize}"MiB 100%
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s "${image_dir}/${image_name}.img" mkpart primary fat32 1MiB "${bootsize}"MiB
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary "$fstype" "${bootsize}"MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup --show -fP "${current_dir}/${image_name}.img")
|
||||
loopdevice=$(losetup --show -fP "${image_dir}/${image_name}.img")
|
||||
bootp="${loopdevice}p1"
|
||||
rootp="${loopdevice}p2"
|
||||
|
||||
|
||||
8
rpi1.sh
8
rpi1.sh
@@ -186,12 +186,12 @@ make_image
|
||||
|
||||
# Create the disk partitions
|
||||
status "Create the disk partitions"
|
||||
parted -s "${current_dir}"/"${image_name}".img mklabel msdos
|
||||
parted -s "${current_dir}"/"${image_name}".img mkpart primary fat32 1MiB "${bootsize}"MiB
|
||||
parted -s -a minimal "${current_dir}"/"${image_name}".img mkpart primary "$fstype" "${bootsize}"MiB 100%
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s "${image_dir}/${image_name}.img" mkpart primary fat32 1MiB "${bootsize}"MiB
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary "$fstype" "${bootsize}"MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup --show -fP "${current_dir}/${image_name}.img")
|
||||
loopdevice=$(losetup --show -fP "${image_dir}/${image_name}.img")
|
||||
bootp="${loopdevice}p1"
|
||||
rootp="${loopdevice}p2"
|
||||
|
||||
|
||||
12
trimslice.sh
12
trimslice.sh
@@ -381,10 +381,10 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096))
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file ${image_name}.img"
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${image_name}.img
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s ${current_dir}/${image_name}.img mkpart primary ext2 1MiB ${bootsize}MiB
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype ${bootsize}MiB 100%
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) "${image_dir}/${image_name}.img"
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s "${image_dir}/${image_name}.img" mkpart primary ext2 1MiB ${bootsize}MiB
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype ${bootsize}MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=`losetup -f --show ${current_dir}/${image_name}.img`
|
||||
@@ -452,11 +452,11 @@ if [ $compress = xz ]; then
|
||||
if [ $(arch) == 'x86_64' ]; then
|
||||
echo "Compressing ${image_name}.img"
|
||||
[ $(nproc) \< 3 ] || cpu_cores=3 # cpu_cores = Number of cores to use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} ${current_dir}/${image_name}.img # -p Nº cpu cores use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} "${image_dir}/${image_name}.img" # -p Nº cpu cores use
|
||||
chmod 0644 ${current_dir}/${image_name}.img.xz
|
||||
fi
|
||||
else
|
||||
chmod 0644 ${current_dir}/${image_name}.img
|
||||
chmod 0644 "${image_dir}/${image_name}.img"
|
||||
fi
|
||||
|
||||
# Clean up all the temporary build stuff and remove the directories
|
||||
|
||||
@@ -526,9 +526,9 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096))
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file ${image_name}.img"
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${image_name}.img
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary ext2 5MiB 100%
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) "${image_dir}/${image_name}.img"
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary ext2 5MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=`losetup -f --show ${current_dir}/${image_name}.img`
|
||||
@@ -595,11 +595,11 @@ if [ $compress = xz ]; then
|
||||
if [ $(arch) == 'x86_64' ]; then
|
||||
echo "Compressing ${image_name}.img"
|
||||
[ $(nproc) \< 3 ] || cpu_cores=3 # cpu_cores = Number of cores to use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} ${current_dir}/${image_name}.img # -p Nº cpu cores use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} "${image_dir}/${image_name}.img" # -p Nº cpu cores use
|
||||
chmod 0644 ${current_dir}/${image_name}.img.xz
|
||||
fi
|
||||
else
|
||||
chmod 0644 ${current_dir}/${image_name}.img
|
||||
chmod 0644 "${image_dir}/${image_name}.img"
|
||||
fi
|
||||
|
||||
# Clean up all the temporary build stuff and remove the directories
|
||||
|
||||
@@ -253,11 +253,11 @@ make_image
|
||||
|
||||
# Create the disk partitions
|
||||
status "Create the disk partitions"
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary ext2 5MiB 100%
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary ext2 5MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=$(losetup --show -fP "${current_dir}/${image_name}.img")
|
||||
loopdevice=$(losetup --show -fP "${image_dir}/${image_name}.img")
|
||||
rootp="${loopdevice}p1"
|
||||
|
||||
# Create file systems
|
||||
|
||||
@@ -422,10 +422,10 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096))
|
||||
|
||||
# Create the disk and partition it
|
||||
echo "Creating image file ${image_name}.img"
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${image_name}.img
|
||||
parted -s ${current_dir}/${image_name}.img mklabel msdos
|
||||
parted -s ${current_dir}/${image_name}.img mkpart primary fat32 1MiB ${bootsize}MiB
|
||||
parted -s -a minimal ${current_dir}/${image_name}.img mkpart primary $fstype ${bootsize}MiB 100%
|
||||
fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) "${image_dir}/${image_name}.img"
|
||||
parted -s "${image_dir}/${image_name}.img" mklabel msdos
|
||||
parted -s "${image_dir}/${image_name}.img" mkpart primary fat32 1MiB ${bootsize}MiB
|
||||
parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary $fstype ${bootsize}MiB 100%
|
||||
|
||||
# Set the partition variables
|
||||
loopdevice=`losetup -f --show ${current_dir}/${image_name}.img`
|
||||
@@ -495,11 +495,11 @@ if [ $compress = xz ]; then
|
||||
if [ $(arch) == 'x86_64' ]; then
|
||||
echo "Compressing ${image_name}.img"
|
||||
[ $(nproc) \< 3 ] || cpu_cores=3 # cpu_cores = Number of cores to use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} ${current_dir}/${image_name}.img # -p Nº cpu cores use
|
||||
limit_cpu pixz -p ${cpu_cores:-2} "${image_dir}/${image_name}.img" # -p Nº cpu cores use
|
||||
chmod 0644 ${current_dir}/${image_name}.img.xz
|
||||
fi
|
||||
else
|
||||
chmod 0644 ${current_dir}/${image_name}.img
|
||||
chmod 0644 "${image_dir}/${image_name}.img"
|
||||
fi
|
||||
|
||||
# Clean up all the temporary build stuff and remove the directories
|
||||
|
||||
Reference in New Issue
Block a user