Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
Meta MAR Fast Boot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Qiyang Sun
Meta MAR Fast Boot
Commits
52b5e216
Verified
Commit
52b5e216
authored
6 months ago
by
Qiyang Sun
Browse files
Options
Downloads
Patches
Plain Diff
Add script to change runlevel
parent
75d79944
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
recipes-core/fastinit/chlevel.1
+19
-0
19 additions, 0 deletions
recipes-core/fastinit/chlevel.1
recipes-core/fastinit/files/chlevel.sh
+38
-0
38 additions, 0 deletions
recipes-core/fastinit/files/chlevel.sh
with
57 additions
and
0 deletions
recipes-core/fastinit/chlevel.1
0 → 100644
+
19
−
0
View file @
52b5e216
.TH CHLEVEL 1 "November 2024" "Version 0.1" "General Commands Manual"
.SH NAME
chlevel.sh \- change fastinit runlevel
.SH SYNOPSIS
.B /usr/sbin/chlevel.sh
\fIrunlevel\fP
.SH DESCRIPTION
Chlevel.sh remounts the boot filesystem, edit the kernel command line to change the runlevel and restart the system.
.SH SEE ALSO
.BR runlevel (8),
.BR fastinit (8),
.BR mount (8)
.SH AUTHOR
The
.B chlevel
script was first written by Qiyang Sun <qs2g22@soton.ac.uk>, and is maintained by the MAR24 project maintainers.
This diff is collapsed.
Click to expand it.
recipes-core/fastinit/files/chlevel.sh
0 → 100755
+
38
−
0
View file @
52b5e216
#!/bin/sh
runlevel
=
$1
case
$runlevel
in
1
)
mount
-o
rw,remount /boot
cat
>
/boot/cmdline.txt
<<
EOF
quiet loglevel=0 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait logo.nologo net.ifnames=0 modules.load=dwc2,g_serial init=/usr/sbin/fastinit.sh 1
EOF
reboot
-f
;;
2
)
mount
-o
rw,remount /boot
cat
>
/boot/cmdline.txt
<<
EOF
quiet loglevel=0 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait logo.nologo net.ifnames=0 modules.load=dwc2,g_serial init=/usr/sbin/fastinit.sh 2
EOF
reboot
-f
;;
3
)
mount
-o
rw,remount /boot
cat
>
/boot/cmdline.txt
<<
EOF
dwc_otg.lpm_enable=0 console=serial0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait logo.nologo net.ifnames=0 modules.load=dwc2,g_serial earlycon=uart8250,mmio32,0x20215040 init=/usr/sbin/fastinit.sh 3
EOF
reboot
-f
;;
5
)
mount
-o
rw,remount /boot
cat
>
/boot/cmdline.txt
<<
EOF
dwc_otg.lpm_enable=0 console=serial0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait logo.nologo net.ifnames=0 modules.load=dwc2,g_serial earlycon=uart8250,mmio32,0x20215040 init=/usr/sbin/fastinit.sh 5
EOF
reboot
-f
;;
*
)
echo
"Invalid new runlevel"
;;
esac
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment