Skip to content

Commit d554d7a

Browse files
committed
First usable version of linux kernel 5.8
- Updated rootfs creation - Added gcc-arm-none-eabi compiler for kernel 5.8
1 parent 0055b04 commit d554d7a

File tree

4 files changed

+4094
-14
lines changed

4 files changed

+4094
-14
lines changed

build_debian_rootfs.sh

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ arch='armhf'
1818
qemu_binary='qemu-arm-static'
1919
components='main,contrib'
2020
# Adjust package list here
21-
includes="ccache,locales,git,ca-certificates,debhelper,rsync,python3,distcc,systemd,init,udev,kmod,bash-completion,busybox,ethtool,dirmngr,hdparm,ifupdown,iproute2,iputils-ping,logrotate,net-tools,nftables,powermgmt-base,procps,rename,resolvconf,rsyslog,ssh,sysstat,update-inetd,isc-dhcp-client,isc-dhcp-common,vim,dialog,apt-utils,nano,keyboard-configuration,console-setup,linux-base"
21+
includes="ccache,locales,git,ca-certificates,debhelper,rsync,python3,distcc,systemd,init,udev,kmod,bash-completion,busybox,ethtool,dirmngr,hdparm,ifupdown,iproute2,iputils-ping,logrotate,net-tools,nftables,powermgmt-base,procps,rename,resolvconf,rsyslog,ssh,sysstat,update-inetd,isc-dhcp-client,isc-dhcp-common,vim,dialog,apt-utils,nano,keyboard-configuration,console-setup,linux-base,htop"
2222
mirror_addr="http://httpredir.debian.org/debian/"
2323

2424
# Adjust default root pw
@@ -27,6 +27,10 @@ root_pw='1234'
2727
# Adjust hostname here
2828
def_hostname='wdmycloud'
2929

30+
31+
################################################################################
32+
33+
3034
# cleanup old
3135
rm -rf "${rootfs}"
3236
rm -rf "${target_dir}"/"${release}"-rootfs.tar.gz
@@ -58,6 +62,27 @@ mount -t sysfs chsys "${rootfs}"/sys
5862
mount -t devtmpfs chdev "${rootfs}"/dev || mount --bind /dev "${rootfs}"/dev
5963
mount -t devpts chpts "${rootfs}"/dev/pts
6064

65+
echo "### Addings sources list and updating"
66+
cat << EOF > ${rootfs}/etc/apt/sources.list
67+
###
68+
deb http://httpredir.debian.org/debian buster main contrib non-free
69+
deb-src http://httpredir.debian.org/debian buster main contrib non-free
70+
71+
deb http://httpredir.debian.org/debian-security/ buster/updates main contrib non-free
72+
deb-src http://httpredir.debian.org/debian-security/ buster/updates main contrib non-free
73+
74+
deb http://httpredir.debian.org/debian buster-updates main contrib non-free
75+
deb-src http://httpredir.debian.org/debian buster-updates main contrib non-free
76+
77+
deb http://httpredir.debian.org/debian buster-backports main contrib non-free
78+
deb-src http://httpredir.debian.org/debian buster-backports main contrib non-free
79+
###
80+
EOF
81+
82+
chroot "${rootfs}" /bin/bash -c "apt-get -y update"
83+
chroot "${rootfs}" /bin/bash -c "apt-get -y full-upgrade"
84+
chroot "${rootfs}" /bin/bash -c "apt-get -y autoremove"
85+
chroot "${rootfs}" /bin/bash -c "apt-get -y clean"
6186

6287
echo "### Applying tweaks"
6388
[[ -f "${rootfs}"/etc/locale.gen ]] && sed -i "s/^# en_US.UTF-8/en_US.UTF-8/" "${rootfs}"/etc/locale.gen
@@ -67,13 +92,8 @@ chroot "${rootfs}" /bin/bash -c "dpkg-reconfigure tzdata"
6792
chroot "${rootfs}" /bin/bash -c "dpkg-reconfigure keyboard-configuration"
6893
chroot "${rootfs}" /bin/bash -c "/usr/sbin/update-ccache-symlinks"
6994

70-
71-
chroot "${rootfs}" /bin/bash -c "apt-get -y update"
72-
chroot "${rootfs}" /bin/bash -c "apt-get -y full-upgrade"
73-
chroot "${rootfs}" /bin/bash -c "apt-get -y autoremove"
74-
chroot "${rootfs}" /bin/bash -c "apt-get -y clean"
75-
7695
# set root password
96+
echo "### Root password set to ${root_pw}"
7797
chroot "${rootfs}" /bin/bash -c "(echo ${root_pw};echo ${root_pw};) | passwd root >/dev/null 2>&1"
7898

7999
# permit root login via SSH for the first boot
@@ -138,6 +158,7 @@ iface eth0 inet dhcp
138158
# netmask 255.255.255.0
139159
# gateway 192.168.1.1
140160
# dns-nameservers 192.168.1.1
161+
# dns-search fritz.box
141162
pre-up /sbin/ethtool -C eth0 pkt-rate-low 20000 pkt-rate-high 3000000 rx-frames 32 rx-usecs 1150 rx-usecs-high 1150 rx-usecs-low 100 rx-frames-low 32 rx-frames-high 32 adaptive-rx on
142163
EOF
143164

build_kernel_image.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash
22

33
# Required gcc:
4-
#armada370-gcc464_glibc215_hard_armada-GPL.txz (included in git)
5-
#gcc-arm-none-eabi (downloadable via apt)
4+
#armada370-gcc464_glibc215_hard_armada-GPL.txz (included in git) FOR KERNEL VERSION <= 5.6
5+
#gcc-arm-none-eabi (downloadable via apt / included in git) FOR KERNEL VERSION >= 5.6
66

7-
KERNEL_VERSION='5.6'
7+
KERNEL_VERSION='5.8.16'
88

99
# we can never know what aliases may be set, so remove them all
1010
unalias -a
@@ -35,8 +35,9 @@ cp armada-375-wdmc-gen2.dts linux-$KERNEL_VERSION/arch/arm/boot/dts/
3535
# cd into linux source
3636
cd linux-$KERNEL_VERSION
3737

38-
#makehelp='make CROSS_COMPILE=/opt/arm-marvell-linux-gnueabi/bin/arm-marvell-linux-gnueabi- ARCH=arm'
39-
makehelp='make CROSS_COMPILE=/usr/bin/arm-none-eabi- ARCH=arm'
38+
39+
#makehelp='make CROSS_COMPILE=/opt/arm-marvell-linux-gnueabi/bin/arm-marvell-linux-gnueabi- ARCH=arm' FOR KERNEL VERSION <= 5.6
40+
makehelp='make CROSS_COMPILE=/opt/gcc-arm-none-eabi/bin/arm-none-eabi- ARCH=arm' #FOR KERNEL VERSION >= 5.6
4041

4142
$makehelp menuconfig
4243
$makehelp -j2 zImage
@@ -52,8 +53,8 @@ cd ..
5253

5354
cp uRamdisk output/boot/
5455

55-
#rm output/lib/modules/$KERNEL_VERSION/source
56-
#rm output/lib/modules/$KERNEL_VERSION/build
56+
rm output/lib/modules/*/source
57+
rm output/lib/modules/*/build
5758

5859
chmod =rwxrxrx output/boot/uRamdisk
5960
chmod =rwxrxrx output/boot/uImage-$KERNEL_VERSION

gcc-arm-none-eabi.txz

29.9 MB
Binary file not shown.

0 commit comments

Comments
 (0)