Commit 9539e6f6 authored by ZappeL's avatar ZappeL
Browse files

fixed some minor bugs

parent e7ff72e0
......@@ -58,15 +58,15 @@ inside chroot:
(chroot)$ exit
```
## Sampels
## Samples
### Rebuilding/configuring the kernel
/dev/sdX is optional, not setting it enables the dummy mode.
```bash
cd /your/prefered/location/
./rpi4-aarch64-gentoo/mount_sd.sh /dev/sdX
./rpi4-aarch64-gentoo/prepare_kernel.sh
./rpi4-aarch64-gentoo/mount_sd.sh /dev/sdX -u
./rpi4-aarch64-gentoo/setup.sh /dev/sdX -k
```
### Entering chroot
......
......@@ -27,10 +27,12 @@ ex_initial_setup() {
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 could take some time to complete)...\"
(FEATURES=\"keepwork\" emerge -1O pax-utils &>/dev/null)
(emerge -1O pax-utils &>/dev/null)
echo -e \"installing needed tools...\"
(emerge gentoolkit genlop dhcpcd &>/dev/null)
echo -e \"setting profile...\"
eselect profile set default/linux/arm64/17.0/systemd
echo -e \"initial setup done. don't forget to set an root password.\"
echo -e \"initial setup done. don't forget to set a root password.\"
}\n" >> ${chroot_rc}
fi
......
......@@ -6,7 +6,7 @@ if [[ ${EUID} != 0 ]] ; then
fi
script_root=$(dirname `readlink -f $0`)
build_root=$(dirname `readlink -f $0`)/../../mnt/gentoo
build_root=${script_root}/../../mnt/gentoo
live_mode=0
live_dev=""
extensions=0
......
......@@ -85,10 +85,10 @@ echo -e "Patching fstab..."
echo -e \
"/dev/mmcblk0p1 /boot vfat noauto,noatime 1 2
/dev/mmcblk0p2 / ext4 noatime 0 1
/dev/mmcblk0p3 none swap sw 0 0"\
/dev/mmcblk0p3 none swap sw 0 0" \
> ${build_root}/gentoo/etc/fstab
echo -e "Patching make.conf..."
cat ${build_root}/gentoo/etc/portage/make.conf | egrep -v "^(COMMON_FLAGS|#)"\
cat ${build_root}/gentoo/etc/portage/make.conf | egrep -v "^(COMMON_FLAGS|#)" \
> ${build_root}/gentoo/etc/portage/make.conf_new
echo -e \
'COMMON_FLAGS="-march=armv8-a+crc -mtune=cortex-a72.cortex-a53 -ftree-vectorize -O2 -pipe -fomit-frame-pointer"' \
......
......@@ -13,11 +13,13 @@ elif [[ ${EUID} != 0 ]] ; then
exit 2
fi
flag_1=""
flag="-c"
dev=$1
# dummy mode (using /dev/null for actions)
if [[ $1 == "-d" || $2 == "-d" ]]; then
if [[ $1 == "-d" || $1 == "-k" || $2 == "-d" ]]; then
flag_1="$1"
flag="-d"
dev="/dev/null"
fi
......@@ -28,11 +30,13 @@ echo -e "Running initial setup on" \
# mount SD-Card (force create)
$cur_workdir/scripts/mount.sh ${dev} ${flag}
# creating boot-files
$cur_workdir/scripts/bootfiles.sh
if [[ ${flag_1} != "-k" ]]; then
# creating boot-files
$cur_workdir/scripts/bootfiles.sh
# creating filsystem (root)
$cur_workdir/scripts/filesystem.sh quiet
# creating filsystem (root)
$cur_workdir/scripts/filesystem.sh quiet
fi
# building the kernel
$cur_workdir/scripts/kernel.sh
......
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