Commit 38a3fca3 authored by ZappeL's avatar ZappeL
Browse files

essential fixes - still testing

parent 6bbc0743
#!/bin/bash
resources=$(dirname `readlink -f $0`)/../resources/chroot
resources=$(dirname `readlink -f $0`)/../extensions/resources/chroot
### HEAD ###
if [[ ${EUID} != 0 ]] ; then
......@@ -14,28 +14,23 @@ ex_dscr="Setup extension."
ex_help="No Help available"
chroot_rc=$1/etc/bash/bashrc.d/chroot.sh
## TODO: fix appending only if not already applied!
# base64 -w0 "${resources}/append_make.conf"
### MAIN ###
if [[ -f ${chroot_rc} ]]; then
makeConfEnc=`base64 -w0 "${resources}/append_make.conf"`
echo -e "
ex_initial_setup() {
make_conf_data=\"Ck1BS0VPUFRTPSItajUiCgojIHRoaXMgaXMgbmVlZGVkIGZvciBjb21waWxpbmcgaW4gY2hyb290CkZFQVRVUkVTPSItcGlkLXNhbmRib3giCgpMSU5HVUFTPSJkZSIKTDEwTj0iJHtMMTBOfSAke0xJTkdVQVN9IgpBQ0NFUFRfTElDRU5TRT0iKiIKQUNDRVBUX0tFWVdPUkRTPSJ+YXJtNjQiCgpVU0U9Ii1zZWNjb21wIC1YIgoKUE9SVERJUj0iL3Vzci9wb3J0YWdlIgpESVNURElSPSIvdXNyL3BvcnRhZ2UvZGlzdGZpbGVzIgpQS0dESVI9Ii91c3IvcG9ydGFnZS9wYWNrYWdlcyIKCkVNRVJHRV9ERUZBVUxUX09QVFM9Ii0tbG9hZC1hdmVyYWdlPTE1IC0tYXV0b3VubWFzaz1uIC0tcXVpZXQtYnVpbGQ9eSAtLWNvbXBsZXRlLWdyYXBoIgo=\"
make_conf_data=\"${makeConfEnc}\"
echo -e \"fixing make.conf...\"
echo -e MAKEOPTS=\"-j\`nproc\`\" >> /etc/portage/make.conf
echo \${make_conf_data} | base64 -d >> /etc/portage/make.conf
echo -e \"creating portage dirs...\"
mkdir -p /etc/portage/package.{use,mask,keywords,unmask}
echo \"sys-apps/util-linux build -udev\" > /etc/portage/package.use/util-linux
echo -e \"fixing syscall-errors (this will take about 5 minutes to complete)...\"
(emerge -1O pax-utils &>/dev/null & emerge_pid=\$! && sleep 2m && kill -9 \${emerge_pid} &>/dev/null)
if [[ -d \"/var/tmp/portage/app-misc\" ]]; then
cp -a /var/tmp/portage/app-misc/pax-utils-*/image/* /
(emerge -1O pax-utils &>/dev/null)
fi
echo -e \"fixing syscall-errors (this could take some time to complete)...\"
(FEATURES=\"keepwork\" emerge -1O pax-utils &>/dev/null)
echo -e \"setting profile...\"
eselect profile set default/linux/arm64/17.0/systemd
echo -e \"initial setup done.\"
echo -e \"initial setup done. don't forget to set an root password.\"
}\n" >> ${chroot_rc}
fi
......
MAKEOPTS="-j5"
# this is needed for compiling in chroot
FEATURES="-pid-sandbox"
......
......@@ -71,7 +71,7 @@ int main(int argc, char **argv, char **envp) {
char *newargv[argc + 3];
newargv[0] = argv[0];
newargv[1] = "-cpu";
newargv[2] = "cortex-a8";
newargv[2] = "cortex-a72"; // cpu model to emulate
memcpy(&newargv[3], &argv[1], sizeof(*argv) * (argc - 1));
newargv[argc + 2] = NULL;
return execve("/usr/bin/qemu-arm", newargv, envp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment