##// END OF EJS Templates
its bin/sh again...
Unknown -
r384:ebd8e6e39c8b
parent child
Show More
@@ -448,13 +448,13 After the image file was successfully created by the `rpi23-gen-image.sh` script
448 448
449 449 ##### Flashing examples:
450 450 ```shell
451 bmaptool copy ./images/jessie/2017-01-23-rpi3-jessie.img /dev/mmcblk0
452 dd bs=4M if=./images/jessie/2017-01-23-rpi3-jessie.img of=/dev/mmcblk0
451 bmaptool copy ./images/buster/2017-01-23-rpi3-buster.img /dev/mmcblk0
452 dd bs=4M if=./images/buster/2017-01-23-rpi3-buster.img of=/dev/mmcblk0
453 453 ```
454 454 If you have set `ENABLE_SPLITFS`, copy the `-frmw` image on the microSD card, then the `-root` one on the USB drive:
455 455 ```shell
456 bmaptool copy ./images/jessie/2017-01-23-rpi3-jessie-frmw.img /dev/mmcblk0
457 bmaptool copy ./images/jessie/2017-01-23-rpi3-jessie-root.img /dev/sdc
456 bmaptool copy ./images/buster/2017-01-23-rpi3-buster-frmw.img /dev/mmcblk0
457 bmaptool copy ./images/buster/2017-01-23-rpi3-buster-root.img /dev/sdc
458 458 ```
459 459
460 460 ## QEMU emulation
@@ -42,9 +42,9 fi
42 42
43 43 # Setup firmware boot cmdline
44 44 if [ "$ENABLE_SPLITFS" = true ] ; then
45 CMDLINE="dwc_otg.lpm_enable=0 root=/dev/sda1 rootfstype=ext4 rootflags=commit=100,data=writeback elevator=deadline rootwait console=tty1"
45 CMDLINE="dwc_otg.lpm_enable=0 root=/dev/sda1 rootfstype=ext4 rootflags=commit=100,data=writeback elevator=deadline rootwait console=tty1 init=/bin/systemd"
46 46 else
47 CMDLINE="dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootflags=commit=100,data=writeback elevator=deadline rootwait console=tty1"
47 CMDLINE="dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootflags=commit=100,data=writeback elevator=deadline rootwait console=tty1 init=/bin/systemd"
48 48 fi
49 49
50 50 # Add encrypted root partition to cmdline.txt
@@ -73,11 +73,6 else
73 73 CMDLINE="${CMDLINE} net.ifnames=1"
74 74 fi
75 75
76 # Set init to systemd if required by Debian release
77 if [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then
78 CMDLINE="${CMDLINE} init=/bin/systemd"
79 fi
80
81 76 # Install firmware boot cmdline
82 77 echo "${CMDLINE}" > "${BOOT_DIR}/cmdline.txt"
83 78
@@ -7,11 +7,11
7 7
8 8 # Install and setup hostname
9 9 install_readonly files/network/hostname "${ETC_DIR}/hostname"
10 sed -i "s/^rpi2-jessie/${HOSTNAME}/" "${ETC_DIR}/hostname"
10 sed -i "s/^RaspberryPI/${HOSTNAME}/" "${ETC_DIR}/hostname"
11 11
12 12 # Install and setup hosts
13 13 install_readonly files/network/hosts "${ETC_DIR}/hosts"
14 sed -i "s/rpi2-jessie/${HOSTNAME}/" "${ETC_DIR}/hosts"
14 sed -i "s/RaspberryPI/${HOSTNAME}/" "${ETC_DIR}/hosts"
15 15
16 16 # Setup hostname entry with static IP
17 17 if [ "$NET_ADDRESS" != "" ] ; then
@@ -65,13 +65,12 sed -i "/.*=\$/d" "${ETC_DIR}/systemd/network/eth.network"
65 65 sed -i "/.*=\$/d" "${ETC_DIR}/systemd/network/wlan.network"
66 66
67 67 # Move systemd network configuration if required by Debian release
68 if [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then
69 mv -v "${ETC_DIR}/systemd/network/eth.network" "${LIB_DIR}/systemd/network/10-eth.network"
70 if [ "$ENABLE_WIRELESS" = true ] ; then
71 mv -v "${ETC_DIR}/systemd/network/wlan.network" "${LIB_DIR}/systemd/network/11-wlan.network"
72 fi
73 rm -fr "${ETC_DIR}/systemd/network"
68 mv -v "${ETC_DIR}/systemd/network/eth.network" "${LIB_DIR}/systemd/network/10-eth.network"
69 # If WLAN is enabled copy wlan configuration too
70 if [ "$ENABLE_WIRELESS" = true ] ; then
71 mv -v "${ETC_DIR}/systemd/network/wlan.network" "${LIB_DIR}/systemd/network/11-wlan.network"
74 72 fi
73 rm -fr "${ETC_DIR}/systemd/network"
75 74
76 75 # Enable systemd-networkd service
77 76 chroot_exec systemctl enable systemd-networkd
@@ -11,9 +11,7 if [ "$ENABLE_IPTABLES" = true ] ; then
11 11
12 12 # make sure iptables-legacy is the used alternatives
13 13 #iptables-save and -restore are slaves of iptables and thus are set accordingly
14 if ! [ "$RELEASE" = jessie ] ; then
15 chroot_exec update-alternatives --verbose --set iptables /usr/sbin/iptables-legacy
16 fi
14 chroot_exec update-alternatives --verbose --set iptables /usr/sbin/iptables-legacy
17 15
18 16 # Install iptables systemd service
19 17 install_readonly files/iptables/iptables.service "${ETC_DIR}/systemd/system/iptables.service"
@@ -28,11 +28,7 if [ "$ENABLE_FBTURBO" = true ] ; then
28 28 fi
29 29
30 30 # Install Xorg build dependencies
31 if [ "$RELEASE" = "jessie" ] ; then
32 chroot_exec apt-get -q -y --no-install-recommends install xorg-dev xutils-dev x11proto-dri2-dev libltdl-dev libtool automake libdrm-dev
33 elif [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then
34 chroot_exec apt-get -q -y --no-install-recommends --allow-unauthenticated install xorg-dev xutils-dev x11proto-dri2-dev libltdl-dev libtool automake libdrm-dev
35 fi
31 chroot_exec apt-get -q -y --no-install-recommends --allow-unauthenticated install xorg-dev xutils-dev x11proto-dri2-dev libltdl-dev libtool automake libdrm-dev
36 32
37 33 # Build and install fbturbo driver inside chroot
38 34 chroot_exec /bin/bash -x <<'EOF'
@@ -46,12 +46,8 if [ "$ENABLE_REDUCE" = true ] ; then
46 46
47 47 # Replace bash shell by dash shell (experimental)
48 48 if [ "$REDUCE_BASH" = true ] ; then
49 if [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then
50 echo "Yes, do as I say!" | chroot_exec apt-get purge -qq -y --allow-remove-essential bash
51 else
52 echo "Yes, do as I say!" | chroot_exec apt-get purge -qq -y --force-yes bash
53 fi
54
49 # Purge bash and update alternatives
50 echo "Yes, do as I say!" | chroot_exec apt-get purge -qq -y --allow-remove-essential bash
55 51 chroot_exec update-alternatives --install /bin/bash bash /bin/dash 100
56 52 fi
57 53
@@ -60,11 +56,6 if [ "$ENABLE_REDUCE" = true ] ; then
60 56 chroot_exec apt-get -qq -y purge alsa-utils libsamplerate0 libasound2 libasound2-data
61 57 fi
62 58
63 # Re-install tools for managing kernel modules
64 if [ "$RELEASE" = "jessie" ] ; then
65 chroot_exec apt-get -qq -y install module-init-tools
66 fi
67
68 59 # Remove GPU kernels
69 60 if [ "$ENABLE_MINGPU" = true ] ; then
70 61 rm -f "${BOOT_DIR}/start.elf"
@@ -1,1 +1,1
1 rpi2-jessie
1 RaspberryPI
@@ -1,5 +1,5
1 1 127.0.0.1 localhost
2 127.0.1.1 rpi2-jessie
2 127.0.1.1 RaspberryPI
3 3
4 4 ::1 localhost ip6-localhost ip6-loopback
5 5 ff02::1 ip6-allnodes
@@ -63,12 +63,8 chroot_install_cc() {
63 63 # Install c/c++ build environment inside the chroot
64 64 if [ -z "${COMPILER_PACKAGES}" ] ; then
65 65 COMPILER_PACKAGES=$(chroot_exec apt-get -s install g++ make bc | grep "^Inst " | awk -v ORS=" " '{ print $2 }')
66
67 if [ "$RELEASE" = "jessie" ] ; then
68 chroot_exec apt-get -q -y --no-install-recommends install ${COMPILER_PACKAGES}
69 elif [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then
70 chroot_exec apt-get -q -y --allow-unauthenticated --no-install-recommends install ${COMPILER_PACKAGES}
71 fi
66 # Install COMPILER_PACKAGES in chroot
67 chroot_exec apt-get -q -y --allow-unauthenticated --no-install-recommends install ${COMPILER_PACKAGES}
72 68 fi
73 69 }
74 70
@@ -1,4 +1,4
1 #!/bin/bash
1 #!/bin/sh
2 2 ########################################################################
3 3 # rpi23-gen-image.sh 2015-2017
4 4 #
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant