-
Notifications
You must be signed in to change notification settings - Fork 0
Enable Uart4 & htop #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
KrzysKond
wants to merge
14
commits into
master
Choose a base branch
from
uart4-htop
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
72030ce
[wip] feat:enable uart4, htop
KrzysKond 044f82d
fix: remove interfaces
KrzysKond d8a6b19
restore old srp startup
KrzysKond 65377b8
fix: remove trailing dashes
KrzysKond 10f61c8
remove cursor gitignore
KrzysKond 18d79cb
remove trailing dash
KrzysKond b4b6327
direclty copy files from meta-srp-platforrm with fixed ip address
KrzysKond cbb3256
update image target
KrzysKond abce74e
path changes
KrzysKond be48b40
path changes srp-user
KrzysKond f6568ee
match original repo
KrzysKond 373561f
test new paths
KrzysKond c9743aa
test another paths
KrzysKond 92aa3f6
revert paths
KrzysKond File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| { | ||
| } |
2 changes: 1 addition & 1 deletion
2
recipes-core/ images/fc-image.bb → recipes-core/images/fc-image.bb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| #!/bin/bash | ||
|
|
||
| out_put_file="/srp/token/token.hex" | ||
| out_put_file_ver="/srp/token/token.hex.sha1" | ||
|
|
||
| if [ ! -d "/srp/update" ]; then | ||
| cd /srp | ||
| mkdir update | ||
| echo "[SRP-PLATFORM]: [INFO] SRP sw dir added" | ||
| fi | ||
|
|
||
| if [ ! -d "/srp/update/backup" ]; then | ||
| cd /srp/update | ||
| mkdir backup | ||
| echo "[SRP-PLATFORM]: [INFO] Backup dir added" | ||
| fi | ||
|
|
||
| if [ ! -d "/srp/update/new" ]; then | ||
| cd /srp/update | ||
| mkdir new | ||
| echo "[SRP-PLATFORM]: [INFO] New dir added" | ||
| fi | ||
|
|
||
| if [ ! -d "/srp/update/current" ]; then | ||
| cd /srp/update | ||
| mkdir current | ||
| echo "[SRP-PLATFORM]: [INFO] Current dir added" | ||
| fi | ||
|
|
||
| if [ ! -e "/srp/token/token.hex" ] | ||
| then | ||
| if [ ! -d "/srp/token" ]; then | ||
| cd /srp | ||
| mkdir token | ||
| fi | ||
| var1="$(cat /sys/class/net/*/address | tr -d '\n')" | ||
| sec='sec_token2' | ||
| eng='eng_token2' | ||
| upload='upload_token2' | ||
| sec=$var1$sec | ||
| sec="$(echo $sec | sha256sum)" | ||
| eng=$var1$eng | ||
| eng="$(echo $eng | sha256sum)" | ||
| upload=$var1$upload | ||
| upload="$(echo $upload | sha256sum)" | ||
| echo ${sec::-3} > $out_put_file | ||
| echo ${eng::-3} >> $out_put_file | ||
| echo ${upload::-3} >> $out_put_file | ||
| ver_hash="$(sha1sum $out_put_file)" | ||
| echo $ver_hash > $out_put_file_ver | ||
| chmod -w $out_put_file | ||
| chmod -w $out_put_file_ver | ||
| reboot | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| DESCRIPTION = "SRP Initscripts" | ||
| LICENSE = "CLOSED" | ||
|
|
||
| SRC_URI += "\ | ||
| file://srp_recover.sh \ | ||
| " | ||
|
|
||
| INITSCRIPT_NAME = "srp_recover.sh" | ||
| INITSCRIPT_PARAMS = "start 99 5 ." | ||
|
|
||
| inherit update-rc.d | ||
|
|
||
| S = "${UNPACKDIR}" | ||
|
|
||
| do_install () { | ||
| install -d ${D}${sysconfdir}/init.d/ | ||
| install -c -m 755 ${UNPACKDIR}/${INITSCRIPT_NAME} ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} | ||
| } | ||
|
|
||
| DEPENDS = "bash" | ||
|
|
||
| RDEPENDS:${PN} = "bash" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| SUMMARY = "Example recipe for using inherit useradd" | ||
| DESCRIPTION = "This recipe serves as an example for using features from useradd.bbclass" | ||
| SECTION = "examples" | ||
| LICENSE = "MIT" | ||
| LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
|
|
||
| SRC_URI = "file://file1 \ | ||
| file://file2 \ | ||
| file://file3 \ | ||
| file://file4" | ||
|
|
||
| S = "${UNPACKDIR}" | ||
|
|
||
| inherit useradd | ||
|
|
||
| PACKAGES =+ "${PN}-user3" | ||
|
|
||
| # You must set USERADD_PACKAGES when you inherit useradd. This | ||
| # lists which output packages will include the user/group | ||
| # creation code. | ||
| USERADD_PACKAGES = "${PN} ${PN}-user3" | ||
|
|
||
| # You must also set USERADD_PARAM and/or GROUPADD_PARAM when | ||
| # you inherit useradd. | ||
|
|
||
| # USERADD_PARAM specifies command line options to pass to the | ||
| # useradd command. Multiple users can be created by separating | ||
| # the commands with a semicolon. Here we'll create two users, | ||
| # user1 and user2: | ||
|
|
||
| GROUPADD_PARAM:${PN} = "-g 1000 srp ; -g 1001 logs ; -g 1002 persistence ; -g 1003 com ; -g 890 group2;--system gpio;--system i2c;--system tty;--system bin" | ||
|
|
||
| # Likewise, we'll manage group3 in the useradd-example-user3 package: | ||
| GROUPADD_PARAM:${PN}-user3 = "-g 900 group3" | ||
|
|
||
| USERADD_PARAM:${PN} = "-u 1000 -d /home/srpapp -r -s /bin/bash --groups srp,gpio,i2c,tty,bin,logs,persistence,com srpapp" | ||
|
|
||
| # user3 will be managed in the useradd-example-user3 package: | ||
| # As an example, we use the -p option to set password ('user3') for user3 | ||
| USERADD_PARAM:${PN}-user3 = "-u 1202 -d /home/user3 -r -s /bin/bash -p '\$6\$XAWr.8nc\$bUE4pYYaVb8n6BbnBitU0zeJMtfhTpFpiOBLL9zRl4e4YQo88UU4r/1kjRzmTimCy.BvDh4xoFwVqcO.pihLa1' user3" | ||
|
|
||
|
|
||
| GROUPADD_PARAM:${PN}-user3 = "-g 900 group3" | ||
|
|
||
| do_install () { | ||
| install -d -m 755 ${D}${datadir}/srpapp | ||
| install -d -m 755 ${D}${datadir}/user3 | ||
| install -p -m 644 ${UNPACKDIR}/file1 ${D}${datadir}/srpapp/ | ||
|
|
||
| install -p -m 644 ${UNPACKDIR}/file3 ${D}${datadir}/user3/ | ||
| install -p -m 644 ${UNPACKDIR}/file4 ${D}${datadir}/user3/ | ||
| install -d ${D}/persistence | ||
| install -d ${D}/logs | ||
| chmod 0666 ${D}/persistence | ||
| chmod 0666 ${D}/logs | ||
| } | ||
|
|
||
| do_rootfs() { | ||
| chgrp -R persistence ${D}/persistence | ||
| chgrp -R logs ${D}/logs | ||
| chgrp -R com ${D}/run | ||
| } | ||
|
|
||
| FILES:${PN} = "${datadir}/srpapp/* \ | ||
| /logs \ | ||
| /persistence \ | ||
| " | ||
| FILES:${PN}-user3 = "${datadir}/user3/*" | ||
|
|
||
| # Prevents do_package failures with: | ||
| # debugsources.list: No such file or directory: | ||
| # INHIBIT_PACKAGE_DEBUG_SPLIT = "1" |
Empty file.
Empty file.
Empty file.
Empty file.
11 changes: 5 additions & 6 deletions
11
...re/srp-startup/files/network_interface.sh → recipes-core/srp/files/network_interface.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,13 @@ | ||
|
|
||
| #!/bin/sh | ||
| #!/bin/bash | ||
| ################################################################################ | ||
| # | ||
| # Copyright (c) 2024 Bartosz Snieg. | ||
| # | ||
| # | ||
| ################################################################################ | ||
| # | ||
| # | ||
| echo "Setting interface: eth0 for ec " | ||
| echo "ip: 192.168.10.101" | ||
| echo "ip: 192.168.10.52" | ||
| echo "net mask 255.255.255.0 " | ||
| ifconfig eth0 192.168.10.101 netmask 255.255.255.0 | ||
| ifconfig eth0 192.168.10.52 netmask 255.255.255.0 | ||
| echo "Interface set [DONE]" | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| #!/bin/bash | ||
|
|
||
| out_put_file="/srp/token/token.hex" | ||
| out_put_file_ver="/srp/token/token.hex.sha1" | ||
|
|
||
| if [ ! -d "/srp/update" ]; then | ||
| cd /srp | ||
| mkdir update | ||
| echo "[SRP-PLATFORM]: [INFO] SRP sw dir added" | ||
| fi | ||
|
|
||
| if [ ! -d "/srp/update/backup" ]; then | ||
| cd /srp/update | ||
| mkdir backup | ||
| echo "[SRP-PLATFORM]: [INFO] Backup dir added" | ||
| fi | ||
|
|
||
| if [ ! -d "/srp/update/new" ]; then | ||
| cd /srp/update | ||
| mkdir new | ||
| echo "[SRP-PLATFORM]: [INFO] New dir added" | ||
| fi | ||
|
|
||
| if [ ! -d "/srp/update/current" ]; then | ||
| cd /srp/update | ||
| mkdir current | ||
| echo "[SRP-PLATFORM]: [INFO] Current dir added" | ||
| fi | ||
|
|
||
| if sha1sum -c $out_put_file_ver; | ||
| then | ||
| sh /srp/opt/cpu_srp/start_up.sh | ||
| else | ||
| echo "[SRP-PLATFORM]: [ERROR] Security file breach detected" | ||
| echo "[SRP-PLATFORM]: [INFO] Deletion of invalid token" | ||
| rm $out_put_file | ||
| rm $out_put_file_ver | ||
| echo "[SRP-PLATFORM]: [INFO] Reboot the system" | ||
| fi | ||
10 changes: 4 additions & 6 deletions
10
recipes-core/srp-startup/files/start_up.sh → recipes-core/srp/files/start_up.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,12 @@ | ||
|
|
||
| #!/bin/sh | ||
| #!/bin/bash | ||
| ################################################################################ | ||
| # | ||
| # Copyright (c) 2024 Bartosz Snieg. | ||
| # | ||
| ################################################################################ | ||
| # | ||
| echo "Simab SRP start up script" | ||
| echo "SRP start up script" | ||
|
|
||
| sh /opt/cpu_simba/network_interface.sh | ||
| sh /opt/cpu_simba/component_start_up.sh | ||
| sh /srp/opt/cpu_srp/network_interface.sh | ||
|
|
||
| echo "Simab SRP start up script [DONE]" | ||
| echo "SRP start up script [DONE]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
|
|
||
| f0fe281ebf48da4c8cb23d1cdf5a908c04824b8065fff81f8494730abe4e62b8 | ||
| 3171dc64bae40fd17caab150af3012e4d6f3a560900c56d2c84af211d98870d9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| f0fe281ebf48da4c8cb23d1cdf5a908c04824b8065fff81f8494730abe4e62b8 | ||
| 3171dc64bae40fd17caab150af3012e4d6f3a560900c56d2c84af211d98870d9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 697c683dab6a72bb16e01ca51b085d34e9a23dff token.hex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tu się ścieżki pewnie nie zgadzaja, a tu wsm wszedzie w skryptach jest zla