Skip to content

[cmds] Port md5 from Minix/NetBSD to ELKS as md5sum#1656

Merged
ghaerr merged 2 commits intoghaerr:masterfrom
ccoffing:md5sum
Aug 20, 2023
Merged

[cmds] Port md5 from Minix/NetBSD to ELKS as md5sum#1656
ghaerr merged 2 commits intoghaerr:masterfrom
ccoffing:md5sum

Conversation

@ccoffing
Copy link
Contributor

No description provided.

@ghaerr
Copy link
Owner

ghaerr commented Aug 19, 2023

Looks good, thanks @ccoffing! Would you like to add an entry into elkscmd/Applications so that this gets copied onto the 2880k+ distributions? (Not having any tags like :1440k in Applications essentially specifies 2880k and HD images). Probably better there, there's only 34k left on 1440k.

@ccoffing
Copy link
Contributor Author

Done.

General question (I could discover this myself so obviously this is a leading question). Are the size tags in this file "this size and greater", or only that specific size? It seems strange that some things are installed (for example) only with the ":720k" tag, yet others list multiple size tags. If it's important, shouldn't it be installed starting with the first image that it fits, and everything larger?

@ghaerr
Copy link
Owner

ghaerr commented Aug 20, 2023

Are the size tags in this file "this size and greater", or only that specific size?

They are interpreted by elkscmd/Make.install to be "this size and greater".

yet others list multiple size tags.

Yes, I see that all the :1200k tags also have a :1440k tag, which is confusing and unnecessary. Thanks for pointing that out! This could be cleaned up (note, the :128ktag is handled differently and is used for ROM builds). IIRC, the 1200k floppy was added separately some time ago and likely was the source of this.

The following in Make.install handles the selection and interpretation of "this size and greater":

#
# Install apps by image size    
#
ifdef CONFIG_APPS_360K          
    TAGS = :boot|:360k|         
endif

ifdef CONFIG_APPS_720K          
    TAGS = :boot|:360k|:net|:720k|
endif

ifdef CONFIG_APPS_1200K         
    TAGS = :boot|:360k|:net|:720k|:1200k|       
endif

ifdef CONFIG_APPS_1232K         
    TAGS = :boot|:360k|:net|:720k|:1200k|           
endif

ifdef CONFIG_APPS_1440K 
    TAGS = :boot|:360k|:net|:720k|:1200k|:1440k|                
endif

ifdef CONFIG_APPS_2880K         
    # below TAGS relies on :ash rule following :defsash rule in Applications
    TAGS = :*|
    CONFIG_APP_MAN_PAGES=y      
endif

@ghaerr ghaerr merged commit c691417 into ghaerr:master Aug 20, 2023
@ghaerr
Copy link
Owner

ghaerr commented Aug 20, 2023

BTW, forgot to mention - nice work in porting md5sum and keeping it super small with no printf/stdio! :)

@ccoffing ccoffing deleted the md5sum branch December 9, 2023 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants