##// END OF EJS Templates
pullback from pull
Unknown -
r697:0797db4e7989
parent child
Show More
@@ -230,7 +230,8 Use debootstrap script variant `minbase` which only includes essential packages
230 Reduce the disk space usage by deleting packages and files. See `REDUCE_*` parameters for detailed information.
230 Reduce the disk space usage by deleting packages and files. See `REDUCE_*` parameters for detailed information.
231
231
232 ##### `ENABLE_UBOOT`=false
232 ##### `ENABLE_UBOOT`=false
233 Replace the default RPi 0/1/2/3/4 second stage bootloader (bootcode.bin) with [U-Boot bootloader](https://git.denx.de/?p=u-boot.git;a=summary). U-Boot can boot images via the network using the BOOTP/TFTP protocol.
233 Replace the default RPi 0/1/2/3 second stage bootloader (bootcode.bin) with [U-Boot bootloader](https://git.denx.de/?p=u-boot.git;a=summary). U-Boot can boot images via the network using the BOOTP/TFTP protocol.
234 RPI4 needs tbd
234
235
235 ##### `UBOOTSRC_DIR`=""
236 ##### `UBOOTSRC_DIR`=""
236 Path to a directory (`u-boot`) of [U-Boot bootloader sources](https://git.denx.de/?p=u-boot.git;a=summary) that will be copied, configured, build and installed inside the chroot.
237 Path to a directory (`u-boot`) of [U-Boot bootloader sources](https://git.denx.de/?p=u-boot.git;a=summary) that will be copied, configured, build and installed inside the chroot.
@@ -322,7 +323,7 Precompiled 64bit kernel for RPI3/4 by [https://github.com/sakaki-/](sakaki)
322
323
323 ##### `CROSS_COMPILE`="arm-linux-gnueabihf-"
324 ##### `CROSS_COMPILE`="arm-linux-gnueabihf-"
324 This sets the cross-compile environment for the compiler.
325 This sets the cross-compile environment for the compiler.
325
326
326 ##### `KERNEL_ARCH`="arm"
327 ##### `KERNEL_ARCH`="arm"
327 This sets the kernel architecture for the compiler.
328 This sets the kernel architecture for the compiler.
328
329
@@ -1,4 +1,4
1 #!/bin/sh
1 #
2 # Setup fstab and initramfs
2 # Setup fstab and initramfs
3 #
3 #
4
4
@@ -8,17 +8,6
8 # Install and setup fstab
8 # Install and setup fstab
9 install_readonly files/mount/fstab "${ETC_DIR}/fstab"
9 install_readonly files/mount/fstab "${ETC_DIR}/fstab"
10
10
11 #USB BOOT /boot on sda1 / on sda2
12 if [ "$ENABLE_USBBOOT" = true ] && [ "$ENABLE_CRYPTFS" = false ]; then
13 sed -i "s/mmcblk0p1/sda1/" "${ETC_DIR}/fstab"
14 sed -i "s/mmcblk0p2/sda2/" "${ETC_DIR}/fstab"
15 fi
16
17 # Add usb/sda disk root partition to fstab
18 if [ "$ENABLE_SPLITFS" = true ] && [ "$ENABLE_CRYPTFS" = false ]; then
19 sed -i "s/mmcblk0p2/sda1/" "${ETC_DIR}/fstab"
20 fi
21
22 # Generate initramfs file
11 # Generate initramfs file
23 if [ "$ENABLE_INITRAMFS" = true ] ; then
12 if [ "$ENABLE_INITRAMFS" = true ] ; then
24 if [ "$ENABLE_CRYPTFS" = true ] ; then
13 if [ "$ENABLE_CRYPTFS" = true ] ; then
@@ -49,7 +38,7 if [ "$ENABLE_INITRAMFS" = true ] ; then
49 sed -i "s/mmcblk0p2/sda1/" "${ETC_DIR}/crypttab"
38 sed -i "s/mmcblk0p2/sda1/" "${ETC_DIR}/crypttab"
50 fi
39 fi
51
40
52 if [ "$CRYPTFS_DROPBEAR" = true ]; then
41 if [ "$CRYPTFS_DROPBEAR" = true ] ; then
53 if [ "$ENABLE_DHCP" = false ] ; then
42 if [ "$ENABLE_DHCP" = false ] ; then
54 # Get cdir from NET_ADDRESS e.g. 24
43 # Get cdir from NET_ADDRESS e.g. 24
55 cdir=$(printf "%s" "${NET_ADDRESS}" | cut -d '/' -f2)
44 cdir=$(printf "%s" "${NET_ADDRESS}" | cut -d '/' -f2)
@@ -58,7 +47,10 if [ "$ENABLE_INITRAMFS" = true ] ; then
58 NET_MASK=$(cdr2mask "$cdir")
47 NET_MASK=$(cdr2mask "$cdir")
59
48
60 # Write static ip settings to "${ETC_DIR}"/initramfs-tools/initramfs.conf
49 # Write static ip settings to "${ETC_DIR}"/initramfs-tools/initramfs.conf
50 # ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
61 sed -i "\$a\nIP=${NET_ADDRESS}::${NET_GATEWAY}:${NET_MASK}:${HOSTNAME}:" "${ETC_DIR}"/initramfs-tools/initramfs.conf
51 sed -i "\$a\nIP=${NET_ADDRESS}::${NET_GATEWAY}:${NET_MASK}:${HOSTNAME}:" "${ETC_DIR}"/initramfs-tools/initramfs.conf
52 else
53 sed -i "\$a\nIP=::::${HOSTNAME}::dhcp" "${ETC_DIR}"/initramfs-tools/initramfs.conf
62 fi
54 fi
63
55
64 if [ -n "$CRYPTFS_DROPBEAR_PUBKEY" ] && [ -f "$CRYPTFS_DROPBEAR_PUBKEY" ] ; then
56 if [ -n "$CRYPTFS_DROPBEAR_PUBKEY" ] && [ -f "$CRYPTFS_DROPBEAR_PUBKEY" ] ; then
@@ -112,6 +104,16 if [ "$ENABLE_INITRAMFS" = true ] ; then
112 chroot_exec cryptsetup close "${CRYPTFS_MAPPING}"
104 chroot_exec cryptsetup close "${CRYPTFS_MAPPING}"
113 # CRYPTFS=false
105 # CRYPTFS=false
114 else
106 else
107 #USB BOOT /boot on sda1 / on sda2
108 if [ "$ENABLE_USBBOOT" = true ] ; then
109 sed -i "s/mmcblk0p1/sda1/" "${ETC_DIR}/fstab"
110 sed -i "s/mmcblk0p2/sda2/" "${ETC_DIR}/fstab"
111 fi
112
113 # Add usb/sda disk root partition to fstab
114 if [ "$ENABLE_SPLITFS" = true ] ; then
115 sed -i "s/mmcblk0p2/sda1/" "${ETC_DIR}/fstab"
116 fi
115 # Generate initramfs without encrypted root partition support
117 # Generate initramfs without encrypted root partition support
116 chroot_exec mkinitramfs -o "/boot/firmware/initramfs-${KERNEL_VERSION}" "${KERNEL_VERSION}"
118 chroot_exec mkinitramfs -o "/boot/firmware/initramfs-${KERNEL_VERSION}" "${KERNEL_VERSION}"
117 fi
119 fi
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant