diff --git a/src/freedombone-image-hardware-setup b/src/freedombone-image-hardware-setup index f22d7fc9..ea44c215 100755 --- a/src/freedombone-image-hardware-setup +++ b/src/freedombone-image-hardware-setup @@ -93,17 +93,17 @@ beaglebone_flash() { } beaglebone_repack_kernel() { -# process installed kernel to create uImage, uInitrd, dtb -# using flash-kernel would be a good approach, except it fails in the -# cross build environment due to too many environment checks... -#FK_MACHINE="TI AM335x BeagleBone" flash-kernel -# so, let's do it manually... + # process installed kernel to create uImage, uInitrd, dtb + # using flash-kernel would be a good approach, except it fails in the + # cross build environment due to too many environment checks... + #FK_MACHINE="TI AM335x BeagleBone" flash-kernel + # so, let's do it manually... -# flash-kernel's hook-functions provided to mkinitramfs have the -# unfortunate side-effect of creating /conf/param.conf in the initrd -# when run from our emulated chroot environment, which means our root= -# on the kernel command line is completely ignored! repack the initrd -# to remove this evil... + # flash-kernel's hook-functions provided to mkinitramfs have the + # unfortunate side-effect of creating /conf/param.conf in the initrd + # when run from our emulated chroot environment, which means our root= + # on the kernel command line is completely ignored! repack the initrd + # to remove this evil... echo "info: repacking beaglebone kernel and initrd" @@ -115,22 +115,22 @@ beaglebone_repack_kernel() { mkdir /tmp/initrd-repack (cd /tmp/initrd-repack ; \ - zcat /boot/$initRd | cpio -i ; \ - rm -f conf/param.conf ; \ - find . | cpio --quiet -o -H newc | \ - gzip -9 > /boot/$initRd ) + zcat /boot/$initRd | cpio -i ; \ + rm -f conf/param.conf ; \ + find . | cpio --quiet -o -H newc | \ + gzip -9 > /boot/$initRd ) rm -rf /tmp/initrd-repack (cd /boot ; \ - cp /usr/lib/$kernelVersion/am335x-boneblack.dtb dtb ; \ - cat $vmlinuz dtb >> temp-kernel ; \ - mkimage -A arm -O linux -T kernel -n "Debian kernel ${version}" \ - -C none -a 0x80200000 -e 0x80200000 -d temp-kernel uImage ; \ - rm -f temp-kernel ; \ - mkimage -A arm -O linux -T ramdisk -C gzip -a 0x81000000 -e 0x81000000 \ - -n "Debian ramdisk ${version}" \ - -d $initRd uInitrd ) + cp /usr/lib/$kernelVersion/am335x-boneblack.dtb dtb ; \ + cat $vmlinuz dtb >> temp-kernel ; \ + mkimage -A arm -O linux -T kernel -n "Debian kernel ${version}" \ + -C none -a 0x80200000 -e 0x80200000 -d temp-kernel uImage ; \ + rm -f temp-kernel ; \ + mkimage -A arm -O linux -T ramdisk -C gzip -a 0x81000000 -e 0x81000000 \ + -n "Debian ramdisk ${version}" \ + -d $initRd uInitrd ) } odroidc2_setup_boot() { @@ -187,9 +187,9 @@ a20_setup_boot() { # Setup boot.cmd if grep -q btrfs /etc/fstab ; then - fstype=btrfs + fstype=btrfs else - fstype=ext4 + fstype=ext4 fi kernelVersion=$(ls /usr/lib/*/$dtb | head -1 | cut -d/ -f4) version=$(echo $kernelVersion | sed 's/linux-image-\(.*\)/\1/') @@ -241,33 +241,33 @@ EOF case "$MACHINE" in beaglebone) - beaglebone_setup_boot - beaglebone_flash - beaglebone_repack_kernel - enable_serial_console ttyO0 - ;; + beaglebone_setup_boot + beaglebone_flash + beaglebone_repack_kernel + enable_serial_console ttyO0 + ;; odroid-c2) - odroidc2_setup_boot meson64_odroidc2 - enable_serial_console ttyO0 - ;; + odroidc2_setup_boot meson64_odroidc2 + enable_serial_console ttyO0 + ;; cubietruck) - a20_setup_boot sun7i-a20-cubietruck.dtb - enable_serial_console ttyS0 - ;; + a20_setup_boot sun7i-a20-cubietruck.dtb + enable_serial_console ttyS0 + ;; a20-olinuxino-lime) - a20_setup_boot sun7i-a20-olinuxino-lime.dtb - enable_serial_console ttyS0 - ;; + a20_setup_boot sun7i-a20-olinuxino-lime.dtb + enable_serial_console ttyS0 + ;; a20-olinuxino-lime2) - a20_setup_boot sun7i-a20-olinuxino-lime2.dtb - enable_serial_console ttyS0 - ;; + a20_setup_boot sun7i-a20-olinuxino-lime2.dtb + enable_serial_console ttyS0 + ;; a20-olinuxino-micro) - a20_setup_boot sun7i-a20-olinuxino-micro.dtb - enable_serial_console ttyS0 - ;; + a20_setup_boot sun7i-a20-olinuxino-micro.dtb + enable_serial_console ttyS0 + ;; cubieboard2) - a20_setup_boot sun7i-a20-cubieboard2.dtb - enable_serial_console ttyS0 - ;; + a20_setup_boot sun7i-a20-cubieboard2.dtb + enable_serial_console ttyS0 + ;; esac