添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Remove "dirty" in boot message

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
I've built a few micropython kernels for the STM32F405 boards using the PYBV11 as a template. However, the message listed on boot says something like "dirty-xxxx" where xxxx appears to be some hash.
If I remove the .git folder, this goes away. Is there some flag I can set so I can leave the .git directory and remove the "dirty" word?
Thanks,
'dirty' probably means you have modified files, with respect to the last commit in git. Committing those changes, or undoing them, would make the 'dirty' go away. Not sure how much you know about git, but you'd run e.g 'git status' on the commandline when in the micropython directory to see which files are modified, 'git diff' to see the changes, etc.
I see the same. If I run git diff, it tells me:

Code: Select all

	geändert:       ../../lib/axtls (geänderter Inhalt)
	geändert:       ../../lib/libffi (geänderter Inhalt)
	geändert:       ../../lib/lwip (geänderter Inhalt)
	geändert:       ../../lib/mbedtls (geänderter Inhalt)
	geändert:       ../../lib/nrfx (geänderter Inhalt)
	geändert:       ../../lib/tinyusb (geänderter Inhalt, unversionierter Inhalt)
So its the lib directories, which change after building locally.
Note:
geändert = changed, geänderter Inhalt = changed content
Ok. What finally worked was a re-initialisation:

Code: Select all

git submodule deinit --all -f
git submodule update --init
			
For ESP32 build-generic I got :

Code: Select all

Use '.' if you really want to deinitialize all submodules
Did a bit searching and there seems to have been several changes to this command. I only installed Micropython about a month ago, is my git out of date?

Code: Select all

git submodule deinit -f .
git submodule update --init
saw a lot of activity but still get:

Code: Select all

MicroPython v1.12-662-g8da40ba-dirty on 2020-09-06; ESP32 module with ESP32
Apologies, I now see that there were some left-over changes when I was working on a "black-pill".

Code: Select all

On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
	modified:   extmod/moduhashlib.c
Untracked files:
  (use "git add <file>..." to include in what will be committed)
	ports/esp32/makefile
	ports/stm32/boards/WEACT_F411CEU6/
no changes added to commit (use "git add" and/or "git commit -a")
I'll sort those.
Thanks
I did a "git status" and it did correctly report the changed files. I added an additional directory for my board (which is a derivative of the PYBV11).
My problem is that I would like to update the repo, but I'm scared to do this as I don't want to mess things up.
I do have my own repo (github/aerosynth) but I don't know how to update it from my PC.
Should I commit my files on the host pc then push? It's not clear in any of the git docs I have.
Also, since I forked my repo with the micpython repo, how would I update my own repo? again, I'm scared to mess up the micrpython repo.
Once I do this, will I no longer get "dirty" flags?
  • ↳   Announcements and News
  • ↳   Newsletter archive
  • ↳   Kickstarter logistics for the Micro Python campaign
  • The MicroPython Language
  • ↳   General Discussion and Questions
  • ↳   Programs, Libraries and Tools
  • ↳   Development of MicroPython
  • Boards Running MicroPython
  • ↳   MicroPython pyboard
  • ↳   Pyboard D-series
  • ↳   WiPy and CC3200 boards
  • ↳   ESP8266 boards
  • ↳   ESP32 boards
  • ↳   micro:bit boards
  • ↳   Raspberry Pi microcontroller boards
  • ↳   Other Boards
  • Hardware Projects and Component Drivers
  • ↳   Hardware Projects
  • ↳   Drivers for External Components
  •