Source: base-installer
Version: 1.218
Severity: normal
Tags: patch
User: debian-loonga...@lists.debian.org
Usertags: loong64

Dear maintainers,

The base-installer source package lacks loongarch64 support.
I have submitted a bug to base-installer on July 17, 2024, but now I click the bug link and the reported information is: 'An error occurred. Error was: Bad bug log for Bug 1076505. Unable to read records: state kill-init at end at /usr/local/lib/site_perl/Debbugs/Log.pm line 320.'.
Please check https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1076505.
I also feedback on #debian-ports channel.

So, I would like to re-submit a bug to base-installer.

I have added support for loongarch64 in base-installer package and built successfully on my local ENV.
Please consider the patch I attached.

Could you add loongarch64 support in the next upload?
Your opinions are welcome.

Best regards,
Dandan Zhang

diff -Nru base-installer-1.218/debian/changelog 
base-installer-1.218+loong64/debian/changelog
--- base-installer-1.218/debian/changelog       2024-05-28 16:40:12.000000000 
+0000
+++ base-installer-1.218+loong64/debian/changelog       2024-11-07 
11:39:40.000000000 +0000
@@ -1,3 +1,9 @@
+base-installer (1.218+loong64) unreleased; urgency=medium
+
+  * Add support for loongarch64.
+
+ -- Dandan Zhang <zhangdan...@loongson.cn>  Thu, 07 Nov 2024 19:39:40 +0800
+
 base-installer (1.218) unstable; urgency=medium
 
   * Team upload
diff -Nru base-installer-1.218/kernel/loong64.sh 
base-installer-1.218+loong64/kernel/loong64.sh
--- base-installer-1.218/kernel/loong64.sh      1970-01-01 00:00:00.000000000 
+0000
+++ base-installer-1.218+loong64/kernel/loong64.sh      2024-11-07 
11:38:36.000000000 +0000
@@ -0,0 +1,22 @@
+arch_get_kernel_flavour () {
+       echo "loong64"
+       return 0
+}
+
+arch_check_usable_kernel () {
+       case "$1" in
+           *-dbg)
+               return 1
+               ;;
+           *-loong64 | *-loong64-*)
+                return 0
+                ;;
+            *)
+                return 1
+                ;;
+        esac
+}
+
+arch_get_kernel () {
+       echo "linux-image-loong64"
+}
diff -Nru base-installer-1.218/library.sh 
base-installer-1.218+loong64/library.sh
--- base-installer-1.218/library.sh     2024-01-04 19:42:08.000000000 +0000
+++ base-installer-1.218+loong64/library.sh     2024-11-07 11:39:40.000000000 
+0000
@@ -894,7 +894,7 @@
 
 is_ports_architecture() {
        case "$1" in
-               
alpha|hppa|hurd-amd64|hurd-i386|ia64|kfreebsd-amd64|kfreebsd-i386|m68k|powerpc|ppc64|sh4|sparc64|x32)
+               
alpha|hppa|hurd-amd64|hurd-i386|ia64|kfreebsd-amd64|kfreebsd-i386|loong64|m68k|powerpc|ppc64|sh4|sparc64|x32)
                        return 0
                        ;;
                *)

Reply via email to