Try running it with the command nohup python -u test.py &
. This should make the output unbuffered.
You can make the script executable by adding a bang path as the first line with the -u
option. Your will also need to set the executable bit with the command chmod +x test.py
.
#!/usr/bin/python -u
import time
....
You can then run it as nohup test.py &
.
Загрузите кросс-компилятор ARM -GCC на свой компьютер.
wget -c https://releases.linaro.org/components/toolchain/binaries/6.4-2017.11/arm-linux-gnueabihf/gcc-linaro-6.4.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz
tar xf gcc-linaro-6.4.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz
export CC=**/path to**/gcc-linaro-6.4.1-2017.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
Убедитесь, что у вас правильный путь. Он должен быть от корня, что-то вроде этого /home/username/path to gcc -linaro/bin/arm -linux -gnueabihf-
Тестовый кросс-компилятор:
${CC}gcc --version
Вы должны увидеть это на своем терминале, если у вас правильный путь:
arm-linux-gnueabihf-gcc (Linaro GCC 6.4-2017.11) 6.4.1 20171012
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Загрузить -boot
git clone https://github.com/u-boot/u-boot
cd u-boot/
git checkout v2018.01 -b tmp
Получите исправления (Требуется подключение к Интернету)
wget -c https://rcn-ee.com/repos/git/u-boot-patches/v2018.01/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch
wget -c https://rcn-ee.com/repos/git/u-boot-patches/v2018.01/0002-U-Boot-BeagleBone-Cape-Manager.patch
wget -c https://raw.githubusercontent.com/RobertCNelson/Bootloader-Builder/master/patches/v2018.03-rc1/0002-NFM-Production-eeprom-assume-device-is-BeagleBone-Bl.patch
Применение исправлений к загрузке -
patch -p1 < 0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch
patch -p1 < 0002-U-Boot-BeagleBone-Cape-Manager.patch
patch -p1 < 0002-NFM-Production-eeprom-assume-device-is-BeagleBone-Bl.patch
Настройка и сборка
make ARCH=arm CROSS_COMPILE=${CC} distclean
make ARCH=arm CROSS_COMPILE=${CC} am335x_evm_defconfig
Теперь в папке загрузки u -будет файл.config, который вы можете отредактировать и изменить параметр bootdelay. Сборка
make ARCH=arm CROSS_COMPILE=${CC}
Подключите SD-карту к компьютеру и запустите «lsblk», чтобы узнать идентификатор SD-карты. В моем случае идентификатор был «sdb»
.Установить:
export DISK=/dev/sdb
sudo dd if=./MLO of=${DISK} count=1 seek=1 bs=128k
sudo dd if=./u-boot.img of=${DISK} count=2 seek=1 bs=384k