diff --git a/documentation/geek-faq.md b/documentation/geek-faq.md index 66fa9a8b86..775903c398 100644 --- a/documentation/geek-faq.md +++ b/documentation/geek-faq.md @@ -6,7 +6,7 @@ If it is a new feature request, don't start the coding first. Remember to [open an issue](https://guides.github.com/features/issues/) to discuss the new feature. -If you are strougling, check [this detailed step by step guide on contributing](https://www.exchangecore.com/blog/contributing-concrete5-github/). +If you are struggling, check [this detailed step by step guide on contributing](https://www.exchangecore.com/blog/contributing-concrete5-github/). # How to build Armbian image or custom kernel? @@ -67,7 +67,7 @@ Run the script - **EXTENDED_DEBOOTSTRAP** (yes|**no**): use new debootstrap and image creation process - **FORCE_USE_RAMDISK** (yes|no): overrides autodetect for using tmpfs in new debootstrap and image creation process. Takes effect only if `EXTENDED_DEBOOTSTRAP` is set to "yes" - **FIXED_IMAGE_SIZE** (integer): create image file of this size (in megabytes) instead of minimal. Takes effect only if `EXTENDED_DEBOOTSTRAP` is set to "yes" -- **COMPRESS_OUTPUTIMAGE** (**yes**|no): create zip archive with image file and GPG signature for redistribution +- **COMPRESS_OUTPUTIMAGE** (**yes**|no): create compressed archive with image file and GPG signature for redistribution - **SEVENZIP** (yes|**no**): create .7z archive with extreme compression ratio instead of .zip - **ROOTFS_TYPE** (**ext4**|f2fs|btrfs|nfs|fel): create image with different root filesystems instead of default ext4. Requires setting FIXED_IMAGE_SIZE to actual size of your SD card for F2FS and BTRFS. Takes effect only if `EXTENDED_DEBOOTSTRAP` is set to "yes" @@ -98,7 +98,7 @@ You can run additional commands to customize created image. Edit file: userpatches/customize-image.sh -and place your code here. You may test values of variables noted in the file to use different commands for different configurations. Those commands will be executed in a process of building just before closing image. +and place your code here. You may test values of variables noted in the file to use different commands for different configurations. Those commands will be executed in a chroot environment just before closing image. To add files to image easily, put them in `userpatches/overlay` and access them in `/tmp/overlay` from `customize-image.sh` @@ -167,7 +167,7 @@ To recreate those files you need to remove them manually. ## Kernel install ## -When root filesystem is ready we need to instal kernel image with modules, board definitions, firmwares. Along with this we set the CPU frequency min/max, hostname, modules, network interfaces templates. Here is also the place to install headers and fix + native compile them on the way. +When root filesystem is ready we need to install kernel image with modules, board definitions, firmwares. Along with this we set the CPU frequency min/max, hostname, modules, network interfaces templates. Here is also the place to install headers and fix + native compile them on the way. ## Distribution fixes ## diff --git a/scripts/armhwinfo b/scripts/armhwinfo index 485c2a3edb..6a96a21806 100644 --- a/scripts/armhwinfo +++ b/scripts/armhwinfo @@ -229,8 +229,22 @@ log_hardware_info() { ifconfig >>${Log} echo -e "\n### df:\n" >>${Log} df -h >>${Log} + get_flash_information >>${Log} & } # log_hardware_info +get_flash_information() { + # http://www.bunniestudios.com/blog/?page_id=1022 + find /sys -name oemid | while read Device ; do + DeviceNode="${Device%/*}" + DeviceName="${DeviceNode##*/}" + echo -e "\n### ${DeviceName} info:\n" + find "${DeviceNode}" -maxdepth 1 -type f | while read ; do + NodeName="${REPLY##*/}" + echo -e "$(printf "%20s" ${NodeName}): $(cat "${DeviceNode}/${NodeName}" | tr '\n' " ")" + done + done +} # get_flash_information + show_motd_warning() { cat > /etc/update-motd.d/90-warning < /var/run/machine.id + echo $ID >/var/run/machine.id if [ $? -ne 0 ]; then # most probably readonly fs. We'll try to warn the user. show_motd_warning "It seems the rootfs is readonly at the moment. Please check your SD card for errors" fi + # check whether auto detection override exists and if true use this for machine.id + [ -f /root/.machine.id ] && cat /root/.machine.id >/var/run/machine.id log_hardware_info # crash detection, enable verbose logging and disable it at clean shutdown @@ -283,3 +299,4 @@ case $1 in fi ;; esac + diff --git a/scripts/firstrun b/scripts/firstrun index 522f886132..526bf5c2b1 100644 --- a/scripts/firstrun +++ b/scripts/firstrun @@ -36,7 +36,7 @@ MEMTOTAL=$(( $(awk -F" " '/^MemTotal/ {print $2}' /dev/null 2>&1 -if [ $? -eq 1 ]; then dd if=/dev/zero of=/var/swap bs=1024 count=131072 status=noxfer >/dev/null 2>&1; fi +if [ $? -eq 1 ]; then dd if=/dev/zero of=/var/swap bs=1M count=128 status=noxfer >/dev/null 2>&1; fi chown root:root /var/swap chmod 0600 /var/swap mkswap /var/swap >/dev/null 2>&1 @@ -120,15 +120,9 @@ autodetect_sunxi() { echo heartbeat >/sys/class/leds/blue_led/trigger fi - # check whether the auto detection override exists and if true use this as $MACHINE - if [ -f /root/.machine.id ]; then - read MACHINE >/var/log/armhwinfo.log iozone -e -I -a -s 1M -r 4k -i 0 -i 1 -i 2 | grep '^ 1024' | sed 's/ 1024 //' >>/var/log/armhwinfo.log @@ -283,4 +278,3 @@ main() { main exit 0 -