Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F15445522
riscv64 image build script
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
swills
Jan 17 2021, 7:04 PM
2021-01-17 19:04:10 (UTC+0)
Size
2 KB
Referenced Files
None
Subscribers
None
riscv64 image build script
View Options
#!/bin/sh
set
-x
set
-e
IMAGE_NAME
=
riscv.img
BUILDER_JFLAG
=
10
TARGET
=
riscv
TARGET_ARCH
=
riscv64
BASE_DIR
=
$(
dirname
$(
realpath
"
$0
"
))
JOB_BASE
=
$(
realpath
${
BASE_DIR
}
)
export
MAKEOBJDIRPREFIX
=
${
BASE_DIR
}
/obj
export
DESTDIR
=
${
BASE_DIR
}
/dest
MAKECONF
=
${
MAKECONF
:-
/dev/null
}
SRCCONF
=
${
SRCCONF
:-
/dev/null
}
buildworld
=
"yes"
cd
${
BASE_DIR
}
/src
if
[
"
${
buildworld
}
"
==
"yes"
]
;
then
rm
-fr
${
MAKEOBJDIRPREFIX
}
rm
-fr
${
DESTDIR
}
make
-j
${
BUILDER_JFLAG
}
\
-DNO_CLEAN
\
TARGET
=
${
TARGET
}
\
TARGET_ARCH
=
${
TARGET_ARCH
}
\
buildworld
make
-j
${
BUILDER_JFLAG
}
\
TARGET
=
${
TARGET
}
\
TARGET_ARCH
=
${
TARGET_ARCH
}
\
-DNO_CLEAN
\
-DNO_ROOT
\
-DDB_FROM_SRC
\
DESTDIR
=
${
DESTDIR
}
\
installworld
make
-j
${
BUILDER_JFLAG
}
\
TARGET
=
${
TARGET
}
\
TARGET_ARCH
=
${
TARGET_ARCH
}
\
-DNO_CLEAN
\
-DNO_ROOT
\
DESTDIR
=
${
DESTDIR
}
\
distribution
fi
cp
${
JOB_BASE
}
/RISCVTEST
${
JOB_BASE
}
/src/sys/riscv/conf/RISCVTEST
make
-j
${
BUILDER_JFLAG
}
\
-DNO_CLEAN
\
TARGET
=
${
TARGET
}
\
TARGET_ARCH
=
${
TARGET_ARCH
}
\
KERNCONF
=
RISCVTEST
\
WITHOUT_FORMAT_EXTENSIONS
=
yes
\
buildkernel
make
-j
${
BUILDER_JFLAG
}
\
TARGET
=
${
TARGET
}
\
TARGET_ARCH
=
${
TARGET_ARCH
}
\
KERNCONF
=
RISCVTEST
\
WITHOUT_FORMAT_EXTENSIONS
=
yes
\
-DNO_CLEAN
\
-DNO_ROOT
\
-DDB_FROM_SRC
\
DESTDIR
=
${
DESTDIR
}
\
installkernel
if
[
"
${
buildworld
}
"
==
"yes"
||
true
]
;
then
dd
if
=
/dev/random
of
=
${
DESTDIR
}
/boot/entropy
bs
=
4k
count
=
1
cp
${
JOB_BASE
}
/fstab
${
DESTDIR
}
/etc/
echo
"./etc/fstab type=file uname=root gname=wheel mode=0644 size=`stat -f \"%z\"
${
DESTDIR
}
/etc/fstab` tags=package=utilities,config"
>>
${
DESTDIR
}
/METALOG
cp
${
JOB_BASE
}
/rc.conf
${
DESTDIR
}
/etc/
echo
"./etc/rc.conf type=file uname=root gname=wheel mode=0644 size=`stat -f \"%z\"
${
DESTDIR
}
/etc/rc.conf` tags=package=utilities,config"
>>
${
DESTDIR
}
/METALOG
./tools/tools/makeroot/makeroot.sh
-s
32g
${
IMAGE_NAME
}
${
DESTDIR
}
mv
${
IMAGE_NAME
}
${
JOB_BASE
}
fi
cd
..
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3394450
Default Alt Text
riscv64 image build script (2 KB)
Attached To
Mode
P474 riscv64 image build script
Attached
Detach File
Event Timeline
Log In to Comment