Update and fix banana-pro.sh
This commit is contained in:
@@ -9,8 +9,10 @@
|
||||
|
||||
# Hardware model
|
||||
hw_model=${hw_model:-"banana-pro"}
|
||||
|
||||
# Architecture
|
||||
architecture=${architecture:-"armhf"}
|
||||
|
||||
# Desktop manager (xfce, gnome, i3, kde, lxde, mate, e17 or none)
|
||||
desktop=${desktop:-"xfce"}
|
||||
|
||||
@@ -22,7 +24,7 @@ basic_network
|
||||
add_interface eth0
|
||||
|
||||
# Third stage
|
||||
cat <<EOF >> "${work_dir}"/third-stage
|
||||
cat <<EOF >>"${work_dir}"/third-stage
|
||||
status_stage3 'Copy rpi services'
|
||||
cp -p /bsp/services/rpi/*.service /etc/systemd/system/
|
||||
|
||||
@@ -49,8 +51,10 @@ parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary "$fstype" 4
|
||||
|
||||
# Set the partition variables
|
||||
make_loop
|
||||
|
||||
# Create file systems
|
||||
mkfs_partitions
|
||||
|
||||
# Make fstab.
|
||||
make_fstab
|
||||
|
||||
@@ -60,15 +64,17 @@ mkdir -p "${base_dir}"/root
|
||||
mount ${rootp} "${base_dir}"/root
|
||||
|
||||
status "Edit the extlinux.conf file to set root uuid and proper name"
|
||||
|
||||
# Ensure we don't have root=/dev/sda3 in the extlinux.conf which comes from running u-boot-menu in a cross chroot
|
||||
# We do this down here because we don't know the UUID until after the image is created
|
||||
sed -i -e "0,/root=.*/s//root=UUID=$root_uuid rootfstype=$fstype console=tty1 consoleblank=0 ro rootwait/g" ${work_dir}/boot/extlinux/extlinux.conf
|
||||
|
||||
# And we remove the "GNU/Linux because we don't use it
|
||||
sed -i -e "s|.*GNU/Linux Rolling|menu label Kali Linux|g" ${work_dir}/boot/extlinux/extlinux.conf
|
||||
|
||||
status "Set the default options in /etc/default/u-boot"
|
||||
echo 'U_BOOT_MENU_LABEL="Kali Linux"' >> ${work_dir}/etc/default/u-boot
|
||||
echo 'U_BOOT_PARAMETERS="console=tty1 consoleblank=0 ro rootwait"' >> ${work_dir}/etc/default/u-boot
|
||||
echo 'U_BOOT_MENU_LABEL="Kali Linux"' >>${work_dir}/etc/default/u-boot
|
||||
echo 'U_BOOT_PARAMETERS="console=tty1 consoleblank=0 ro rootwait"' >>${work_dir}/etc/default/u-boot
|
||||
|
||||
status "Rsyncing rootfs into image file"
|
||||
rsync -HPavz -q ${work_dir}/ ${base_dir}/root/
|
||||
|
||||
Reference in New Issue
Block a user