Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Context Sensitive Group
freedombone
Commits
c6e6b0da
Commit
c6e6b0da
authored
6 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
More generic names
parent
dce7f082
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-image-hardware-setup
+11
-13
11 additions, 13 deletions
src/freedombone-image-hardware-setup
with
11 additions
and
13 deletions
src/freedombone-image-hardware-setup
+
11
−
13
View file @
c6e6b0da
...
@@ -38,7 +38,7 @@ enable_serial_console() {
...
@@ -38,7 +38,7 @@ enable_serial_console() {
echo
"T0:12345:respawn:/sbin/getty -L
$device
115200 vt100"
>>
/etc/inittab
echo
"T0:12345:respawn:/sbin/getty -L
$device
115200 vt100"
>>
/etc/inittab
}
}
beaglebone
_flash
()
{
arm
_flash
()
{
# allow flash-kernel to work without valid /proc contents
# allow flash-kernel to work without valid /proc contents
# ** this doesn't *really* work, since there are too many checks
# ** this doesn't *really* work, since there are too many checks
# that fail in an emulated environment! We'll have to do it by
# that fail in an emulated environment! We'll have to do it by
...
@@ -50,8 +50,8 @@ beaglebone_flash() {
...
@@ -50,8 +50,8 @@ beaglebone_flash() {
fi
fi
}
}
beaglebone
_repack_kernel
()
{
arm
_repack_kernel
()
{
beaglebone_variant
=
"
$1
"
dtb
=
"
$1
"
arm_loadaddr
=
"
$2
"
arm_loadaddr
=
"
$2
"
arm_initrd_addr
=
"
$3
"
arm_initrd_addr
=
"
$3
"
arm_arch
=
"
$4
"
arm_arch
=
"
$4
"
...
@@ -67,24 +67,22 @@ beaglebone_repack_kernel() {
...
@@ -67,24 +67,22 @@ beaglebone_repack_kernel() {
# on the kernel command line is completely ignored! repack the initrd
# on the kernel command line is completely ignored! repack the initrd
# to remove this evil...
# to remove this evil...
echo
"info: repacking beaglebone kernel and initrd"
echo
"info: repacking
$dtb
kernel and initrd"
bbb_dtb
=
"
$beaglebone_variant
"
# shellcheck disable=SC2012,SC2086
# shellcheck disable=SC2012,SC2086
kernelVersion
=
$(
ls
/usr/lib/
*
/
${
bbb_
dtb
}
.dtb |
head
-1
|
cut
-d
/
-f4
)
kernelVersion
=
$(
ls
/usr/lib/
*
/
${
dtb
}
.dtb |
head
-1
|
cut
-d
/
-f4
)
version
=
$(
echo
"
$kernelVersion
"
|
sed
's/linux-image-\(.*\)/\1/'
)
version
=
$(
echo
"
$kernelVersion
"
|
sed
's/linux-image-\(.*\)/\1/'
)
initRd
=
initrd.img-
$version
initRd
=
initrd.img-
$version
vmlinuz
=
vmlinuz-
$version
vmlinuz
=
vmlinuz-
$version
# optionally use a separately compiled kernel
# optionally use a separately compiled kernel
bbb_
dtb_file
=
/usr/lib/
$kernelVersion
/
${
bbb_
dtb
}
.dtb
dtb_file
=
/usr/lib/
$kernelVersion
/
${
dtb
}
.dtb
#if [ -f /boot/bbb.tar.gz ]; then
#if [ -f /boot/bbb.tar.gz ]; then
# cd /boot
# cd /boot
# tar -xzvf /boot/bbb.tar.gz
# tar -xzvf /boot/bbb.tar.gz
# if [ -f /boot/bbb/dtbs/${
bbb_
dtb}.dtb ]; then
# if [ -f /boot/bbb/dtbs/${dtb}.dtb ]; then
# if [ -f /boot/bbb/zImage ]; then
# if [ -f /boot/bbb/zImage ]; then
#
bbb_
dtb_file=/boot/bbb/dtbs/${
bbb_
dtb}.dtb
# dtb_file=/boot/bbb/dtbs/${dtb}.dtb
# vmlinuz=/boot/bbb/zImage
# vmlinuz=/boot/bbb/zImage
# fi
# fi
# fi
# fi
...
@@ -101,7 +99,7 @@ beaglebone_repack_kernel() {
...
@@ -101,7 +99,7 @@ beaglebone_repack_kernel() {
rm
-rf
/tmp/initrd-repack
rm
-rf
/tmp/initrd-repack
(
cd
/boot
||
exit
24
;
\
(
cd
/boot
||
exit
24
;
\
cp
"
${
bbb_
dtb_file
}
"
dtb
;
\
cp
"
${
dtb_file
}
"
dtb
;
\
cat
"
$vmlinuz
"
dtb
>>
temp-kernel
;
\
cat
"
$vmlinuz
"
dtb
>>
temp-kernel
;
\
mkimage
-A
"
${
arm_arch
}
"
-O
linux
-T
kernel
-n
"Debian kernel
${
version
}
"
\
mkimage
-A
"
${
arm_arch
}
"
-O
linux
-T
kernel
-n
"Debian kernel
${
version
}
"
\
-C
none
-a
"
${
arm_loadaddr
}
"
-e
"
${
arm_loadaddr
}
"
-d
temp-kernel uImage
;
\
-C
none
-a
"
${
arm_loadaddr
}
"
-e
"
${
arm_loadaddr
}
"
-d
temp-kernel uImage
;
\
...
@@ -265,8 +263,8 @@ EOF
...
@@ -265,8 +263,8 @@ EOF
if
[
"
$arm_flash_name
"
]
;
then
if
[
"
$arm_flash_name
"
]
;
then
case
"
$arm_flash_name
"
in
case
"
$arm_flash_name
"
in
"TI "
*
)
"TI "
*
)
beaglebone
_flash
"
$arm_flash_name
"
arm
_flash
"
$arm_flash_name
"
beaglebone
_repack_kernel
"
${
dtb
}
"
"
$arm_loadaddr
"
"
$arm_initrd_addr
"
"
$arm_arch
"
arm
_repack_kernel
"
${
dtb
}
"
"
$arm_loadaddr
"
"
$arm_initrd_addr
"
"
$arm_arch
"
;;
;;
esac
esac
fi
fi
...
...
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