From c5467bf5db51a5763255e9ec3408c5cf7769301e Mon Sep 17 00:00:00 2001 From: Arszilla Date: Mon, 22 Aug 2022 20:23:50 +0300 Subject: [PATCH] Update and fix beaglebone-black.sh --- beaglebone-black.sh | 47 ++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/beaglebone-black.sh b/beaglebone-black.sh index 782509f..e270fa7 100755 --- a/beaglebone-black.sh +++ b/beaglebone-black.sh @@ -9,8 +9,10 @@ # Hardware model hw_model=${hw_model:-"beaglebone-black"} + # 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 <> "${work_dir}"/third-stage +cat <>"${work_dir}"/third-stage status_stage3 'Copy rpi services' cp -p /bsp/services/rpi/*.service /etc/systemd/system/ @@ -52,13 +54,14 @@ include clean_system status 'Kernel compile' git clone https://github.com/beagleboard/linux -b 4.14 --depth 1 ${work_dir}/usr/src/kernel cd ${work_dir}/usr/src/kernel -git rev-parse HEAD > ${work_dir}/usr/src/kernel-at-commit +git rev-parse HEAD >${work_dir}/usr/src/kernel-at-commit export ARCH=arm + # Edit the CROSS_COMPILE variable as needed export CROSS_COMPILE=arm-linux-gnueabihf- touch .scmversion -patch -p1 --no-backup-if-mismatch < ${repo_dir}/patches/kali-wifi-injection-4.14.patch -patch -p1 --no-backup-if-mismatch < ${repo_dir}/patches/0001-wireless-carl9170-Enable-sniffer-mode-promisc-flag-t.patch +patch -p1 --no-backup-if-mismatch <${repo_dir}/patches/kali-wifi-injection-4.14.patch +patch -p1 --no-backup-if-mismatch <${repo_dir}/patches/0001-wireless-carl9170-Enable-sniffer-mode-promisc-flag-t.patch make bb.org_defconfig make -j $(grep -c processor /proc/cpuinfo) cp arch/arm/boot/zImage ${work_dir}/boot/zImage @@ -71,7 +74,7 @@ make bb.org_defconfig cd "${base_dir}" status 'Create uEnv.txt file' -cat << EOF > ${work_dir}/boot/uEnv.txt +cat <${work_dir}/boot/uEnv.txt #u-boot eMMC specific overrides; Angstrom Distribution (BeagleBone Black) 2013-06-20 kernel_file=zImage initrd_file=uInitrd @@ -102,39 +105,41 @@ uenvcmd=run loadzimage; run loadfdt; run mmcargs; bootz \${loadaddr} - \${fdtadd EOF status "Setting up modules.conf" + # rm the symlink if it exists, and the original files if they exist rm ${work_dir}/etc/modules rm ${work_dir}/etc/modules-load.d/modules.conf -cat << EOF > ${work_dir}/etc/modules-load.d/modules.conf +cat <${work_dir}/etc/modules-load.d/modules.conf g_ether EOF status 'Create xorg config' mkdir -p ${work_dir}/etc/X11/ -cat << EOF > ${work_dir}/etc/X11/xorg.conf + +cat <${work_dir}/etc/X11/xorg.conf Section "Monitor" - Identifier "Builtin Default Monitor" + Identifier "Builtin Default Monitor" EndSection Section "Device" - Identifier "Builtin Default fbdev Device 0" - Driver "fbdev" - Option "SWCursor" "true" + Identifier "Builtin Default fbdev Device 0" + Driver "fbdev" + Option "SWCursor" "true" EndSection Section "Screen" - Identifier "Builtin Default fbdev Screen 0" - Device "Builtin Default fbdev Device 0" - Monitor "Builtin Default Monitor" - DefaultDepth 16 - # Comment out the above and uncomment the below if using a - # bbb-view or bbb-exp - #DefaultDepth 24 + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" + DefaultDepth 16 + # Comment out the above and uncomment the below if using a + # bbb-view or bbb-exp + #DefaultDepth 24 EndSection Section "ServerLayout" - Identifier "Builtin Default Layout" - Screen "Builtin Default fbdev Screen 0" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" EndSection EOF @@ -167,8 +172,10 @@ parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary "$fstype" " # Set the partition variables make_loop + # Create file systems mkfs_partitions + # Make fstab. make_fstab