Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mkimage-profiles
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Anton Palgunov
mkimage-profiles
Commits
35dd2008
You need to sign in or sign up before continuing.
Commit
35dd2008
authored
Aug 02, 2017
by
Michael Shigorin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tar2fs: add e2k arch support
Somewhat ARM-like with only the bootloader bits standing out; Elbrus 2000 firmware can read ext2 and boot the kernel directly.
parent
78ac727d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
tar2fs
bin/tar2fs
+23
-2
No files found.
bin/tar2fs
View file @
35dd2008
...
@@ -31,7 +31,9 @@ INITRD_MODULES=
...
@@ -31,7 +31,9 @@ INITRD_MODULES=
BOOTFSTYPE
=
BOOTFSTYPE
=
BOOTPART
=
BOOTPART
=
case
"
`
arch
`
"
in
# NB: sudo => no GLOBAL_ will do either; mind qemu-*
ARCH
=
"
$(
arch
)
"
# NB: sudo => no GLOBAL_ will do either; mind qemu-*
case
"
$ARCH
"
in
*
86
*
)
*
86
*
)
# NB: different storage modules might be needed for non-kvm
# NB: different storage modules might be needed for non-kvm
INITRD_MODULES
=
"sd_mod ata_piix ahci virtio-scsi virtio-blk"
INITRD_MODULES
=
"sd_mod ata_piix ahci virtio-scsi virtio-blk"
...
@@ -44,6 +46,12 @@ arm*)
...
@@ -44,6 +46,12 @@ arm*)
BOOTPART
=
"1"
BOOTPART
=
"1"
ROOTPART
=
"2"
ROOTPART
=
"2"
;;
;;
e2k
)
BOOTFSTYPE
=
"ext2"
# firmware knows it
BLOCKDEV
=
"/dev/sda"
# ...hopefully...
BOOTPART
=
"1"
ROOTPART
=
"2"
;;
esac
esac
# figure out the part taken by /boot in the given tarball
# figure out the part taken by /boot in the given tarball
...
@@ -203,7 +211,15 @@ if [ -n "$BOOTPART" ]; then
...
@@ -203,7 +211,15 @@ if [ -n "$BOOTPART" ]; then
fi
fi
echo
"MODULES_PRELOAD +=
$INITRD_MODULES
$ROOTFSTYPE
"
>>
"
$ROOTFS
/etc/initrd.mk"
echo
"MODULES_PRELOAD +=
$INITRD_MODULES
$ROOTFSTYPE
"
>>
"
$ROOTFS
/etc/initrd.mk"
echo
"FEATURES += qemu"
>>
"
$ROOTFS
/etc/initrd.mk"
case
"
$ARCH
"
in
*
86
*
)
echo
"FEATURES += qemu"
>>
"
$ROOTFS
/etc/initrd.mk"
;;
e2k
)
echo
"FEATURES += usb"
>>
"
$ROOTFS
/etc/initrd.mk"
;;
esac
# NB: don't stick BOOTFS here, it has slightly different semantics
# NB: don't stick BOOTFS here, it has slightly different semantics
pushd
$ROOTFS
/boot
pushd
$ROOTFS
/boot
...
@@ -217,6 +233,11 @@ rm -f .origver
...
@@ -217,6 +233,11 @@ rm -f .origver
# ...target device too
# ...target device too
sed
-i
"s,
$LOOPROOT
,
$ROOTDEV
,"
"
$ROOTFS
/etc/fstab"
sed
-i
"s,
$LOOPROOT
,
$ROOTDEV
,"
"
$ROOTFS
/etc/fstab"
if
[
-f
boot.conf
]
;
then
sed
-i
-e
"s,@ROOTUUID@,
$ROOTUUID
,g"
-e
"s,@KVER@,
$KVER
,g"
boot.conf
fi
popd
if
[
-x
"
$ROOTFS
"
/sbin/lilo
]
;
then
if
[
-x
"
$ROOTFS
"
/sbin/lilo
]
;
then
# configure and install bootloader
# configure and install bootloader
REGEXP
=
'^.*: ([0-9]+) cylinders, ([0-9]+) heads, ([0-9]+) sectors/track*$'
REGEXP
=
'^.*: ([0-9]+) cylinders, ([0-9]+) heads, ([0-9]+) sectors/track*$'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment